summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-09-12 23:28:08 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-09-12 23:28:08 +0000
commit1fff95c7023d343bee9f0e633169c91452ec5368 (patch)
treea116b518447dd2185b0bac01c78fb71fcce82f1b /llvm/lib/Target/PowerPC/PPCISelLowering.cpp
parent6b3e6d54871f02cdaca323a80051f2d744b39b76 (diff)
downloadbcm5719-llvm-1fff95c7023d343bee9f0e633169c91452ec5368.tar.gz
bcm5719-llvm-1fff95c7023d343bee9f0e633169c91452ec5368.zip
PR13657 (and duplicates):
When a comma occurs in a default argument or default initializer within a class, disambiguate whether it is part of the initializer or whether it ends the initializer. The way this works (which I will be proposing for standardization) is to treat the comma as ending the default argument or default initializer if the following token sequence matches the syntactic constraints of a parameter-declaration-clause or init-declarator-list (respectively). This is both consistent with the disambiguation rules elsewhere (where entities are treated as declarations if they can be), and should have no regressions over our old behavior. I think it might also disambiguate all cases correctly, but I don't have a proof of that. There is an annoyance here: because we're performing a tentative parse in a situation where we may not have seen declarations of all relevant entities (if the comma is part of the initializer, lookup may find entites declared later in the class), we need to turn off typo-correction and diagnostics during the tentative parse, and in the rare case that we decide the comma is part of the initializer, we need to revert all token annotations we performed while disambiguating. Any diagnostics that occur outside of the immediate context of the tentative parse (for instance, if we trigger the implicit instantiation of a class template) are *not* suppressed, mirroring the usual rules for a SFINAE context. llvm-svn: 190639
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud