Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

artifacts }; remain for N3922 declarations #158

Closed
stullemitbrot opened this issue Apr 2, 2019 · 2 comments
Closed

artifacts }; remain for N3922 declarations #158

stullemitbrot opened this issue Apr 2, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@stullemitbrot
Copy link

declaration + definition
auto x { 27 };
yields

int x = 27;
 };

which is obviously wrong.

@andreasfertig
Copy link
Owner

Hello @stullemitbrot,

thanks for reporting that. I'll have a look at it. Looks like the extracted range is incomplete.

Andreas

@stullemitbrot
Copy link
Author

Hallo Andreas,

sounds plausible :)
Nevertheless great work, Thanx!

Reinhard

andreasfertig pushed a commit that referenced this issue Apr 4, 2019
In case of a global variable with braced-init `findLocationAfterToken`
does not return the location after the semi. Instead it returns a
location at the end of the init-expr. This leaves some characters in the
result. This fix tries to find the right-brace, if a semi is required
which does the job. To move only the location which need it a new
parameter was introduced `RequireSemi` which activates the behaviour for
`FindLocationAfterSemi` and `GetSourceRangeAfterSemi`.
@andreasfertig andreasfertig added the bug Something isn't working label Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants