Follow-up to the fix of PR22075.
Details
- Reviewers
rsmith - Commits
- rGc07d1e23fb25: Diagnose ref-qualifiers occuring after virt-specifier-seq and generate fixit…
rG86638e59bff9: Diagnose ref-qualifiers occuring after virt-specifier-seq and generate fixit…
rC233161: Diagnose ref-qualifiers occuring after virt-specifier-seq and generate fixit…
rC233070: Diagnose ref-qualifiers occuring after virt-specifier-seq and generate fixit…
rL233161: Diagnose ref-qualifiers occuring after virt-specifier-seq and generate fixit…
rL233070: Diagnose ref-qualifiers occuring after virt-specifier-seq and generate fixit…
Diff Detail
Event Timeline
Looks good, thanks!
lib/Parse/ParseDecl.cpp | ||
---|---|---|
5319–5321 | Remove braces here, please. | |
lib/Parse/ParseDeclCXX.cpp | ||
2100–2139 | Maybe only produce a single diagnostic no matter how many specifiers were provided? You can then also use FixItHint::CreateInsertionFromRange to produce a fixit that copies the complete range of specifiers from after the virt-specifier to before (this will preserve things like macro names and whitespace between the tokens). |
lib/Parse/ParseDeclCXX.cpp | ||
---|---|---|
2100–2139 | Can you please tell me how that would work? My fixit hints are careful so that if you have something like: void foo() override final &; you would get void foo() final & override; whereas if you have void foo() final override final &; you would get void foo() final & override; (IOW you won't get two final keywords.) I don't know how to do the same with a range based insertion fixit hint... |
Remove braces here, please.