Page MenuHomePhabricator

Diagnose declspecs occuring after virt-specifier-seq and generate fixit hints
ClosedPublic

Authored by ehsan on Jan 2 2015, 12:23 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

ehsan updated this revision to Diff 17763.Jan 2 2015, 12:23 PM
ehsan retitled this revision from to Diagnose declspecs occuring after virt-specifier-seq and generate fixit hints.
ehsan updated this object.
ehsan edited the test plan for this revision. (Show Details)
ehsan added a reviewer: rsmith.
ehsan added a subscriber: Unknown Object (MLST).
rsmith edited edge metadata.Jan 14 2015, 5:20 PM

Thanks, this is a nice improvement. Have you considered also handling ref-qualifiers here?

lib/Parse/ParseDeclCXX.cpp
2100–2113 ↗(On Diff #17763)

Please factor this out into a loop or a lambda rather than duplicating it three times.

Thanks, this is a nice improvement. Have you considered also handling ref-qualifiers here?

That's a good idea! I'll do that in a separate patch, if that's OK.

ehsan updated this revision to Diff 18289.Jan 15 2015, 9:07 PM
ehsan edited edge metadata.

Addressed the review comments

ehsan abandoned this revision.Jan 15 2015, 10:05 PM

I don't know how to submit these separately, but I added a patch to handle ref-qualifiers as well, and they are both now in D7012.

This revision was automatically updated to reflect the committed changes.

I'm having difficulty fixing the issue that caused this patch to bounce when I landed it earlier this morning. Here is a link to the log of the test failure: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/24611/steps/check-all/logs/FAIL%3A%20Clang%3A%3Afixit-cxx0x.cpp

The issue is my call to getFunctionTypeInfo(). That call is now asserting because isFunctionDeclarator() returns false on the declaration. I checked, and isDeclarationOfFunction() returns true, but I'm not sure how to get a FunctionTypeInfo out of such a declarator.

Can someone please help? Thanks!