{"action":"created","issue":{"url":"https://api.github.com/repos/arduino/arduino-builder/issues/23","labels_url":"https://api.github.com/repos/arduino/arduino-builder/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/arduino/arduino-builder/issues/23/comments","events_url":"https://api.github.com/repos/arduino/arduino-builder/issues/23/events","html_url":"https://github.com/arduino/arduino-builder/issues/23","id":109060601,"number":23,"title":"Regression when using default parameters","user":{"login":"matthijskooijman","id":194491,"avatar_url":"https://avatars.githubusercontent.com/u/194491?v=3","gravatar_id":"","url":"https://api.github.com/users/matthijskooijman","html_url":"https://github.com/matthijskooijman","followers_url":"https://api.github.com/users/matthijskooijman/followers","following_url":"https://api.github.com/users/matthijskooijman/following{/other_user}","gists_url":"https://api.github.com/users/matthijskooijman/gists{/gist_id}","starred_url":"https://api.github.com/users/matthijskooijman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthijskooijman/subscriptions","organizations_url":"https://api.github.com/users/matthijskooijman/orgs","repos_url":"https://api.github.com/users/matthijskooijman/repos","events_url":"https://api.github.com/users/matthijskooijman/events{/privacy}","received_events_url":"https://api.github.com/users/matthijskooijman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-30T10:44:21Z","updated_at":"2015-09-30T14:44:40Z","closed_at":"2015-09-30T12:29:30Z","body":"Consider this sketch:\r\n\r\n    void test(int x = 1) {\r\n    }\r\n\r\n    void setup() {\r\n    }\r\n\r\n    void loop() {\r\n    }\r\n\r\nWhen using 1.6.5 this compiles, but it breaks when using arduino-builder. I remember reading that supporting optional arguments with arduino-builder/ctags is too tricky, so it was intentionally left out. However, since the old regex-based parser code simply did not recognize functions using default arguments at all (so did not generate a prototype for them), this means that functions using default arguments compiled properly before, but not anymore.\r\n\r\nPerhaps it is possible to detect that default arguments are present in a function prototype and if so, refrain from generating a prototype? Ideally, a prototype is generated with the default arguments removed, but that is probably tricky to get right (without involving things like libclang)."},"comment":{"url":"https://api.github.com/repos/arduino/arduino-builder/issues/comments/144433707","html_url":"https://github.com/arduino/arduino-builder/issues/23#issuecomment-144433707","issue_url":"https://api.github.com/repos/arduino/arduino-builder/issues/23","id":144433707,"user":{"login":"matthijskooijman","id":194491,"avatar_url":"https://avatars.githubusercontent.com/u/194491?v=3","gravatar_id":"","url":"https://api.github.com/users/matthijskooijman","html_url":"https://github.com/matthijskooijman","followers_url":"https://api.github.com/users/matthijskooijman/followers","following_url":"https://api.github.com/users/matthijskooijman/following{/other_user}","gists_url":"https://api.github.com/users/matthijskooijman/gists{/gist_id}","starred_url":"https://api.github.com/users/matthijskooijman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthijskooijman/subscriptions","organizations_url":"https://api.github.com/users/matthijskooijman/orgs","repos_url":"https://api.github.com/users/matthijskooijman/repos","events_url":"https://api.github.com/users/matthijskooijman/events{/privacy}","received_events_url":"https://api.github.com/users/matthijskooijman/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T14:44:40Z","updated_at":"2015-09-30T14:44:40Z","body":"Seems to work, thanks!"}}