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

REVIEW fix(SniperPrettyPrinter): fix pretty-printing of joint declarations (#3386) #3387

Merged
merged 6 commits into from
Jun 5, 2020

Conversation

nharrand
Copy link
Collaborator

@nharrand nharrand commented Jun 1, 2020

Reproduces #3386

@monperrus
Copy link
Collaborator

Ohh that will be tough

the ElementSourceFragment is int a;|99, 108|int a, c;|, it covers two elements while being attached to only int a (elementFragment.getElement() == <int a> only)

@monperrus
Copy link
Collaborator

The ElementSourceFragment of int c is merged into that of int a because it is a strict subset.

@monperrus
Copy link
Collaborator

Here is a first fix so that @fermadeiral can proceed.

It's a partial fix, fields with joint declarations won't be snipered, but the improvement is that the resulting code will compile.

It's mergeble but it does not close #3386.

@monperrus monperrus changed the title test(SniperPrettyPrinter): test inlined multiple declarations (#3386) fixSniperPrettyPrinter): fix pretty-printing of joint declarations (#3386) Jun 5, 2020
@monperrus monperrus changed the title fixSniperPrettyPrinter): fix pretty-printing of joint declarations (#3386) REVIEW fix(SniperPrettyPrinter): fix pretty-printing of joint declarations (#3386) Jun 5, 2020
@nharrand nharrand merged commit df73729 into INRIA:master Jun 5, 2020
@fermadeiral
Copy link
Contributor

Thanks @monperrus!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants