rsmith added a comment.
This isn't quite the right way to fix this issue.
================
Comment at: lib/Parse/ParseDeclCXX.cpp:3206-3209
@@ -3205,6 +3205,6 @@
// we're just missing a comma.
else if (Tok.isOneOf(tok::identifier, tok::coloncolon)) {
SourceLocation Loc = PP.getLocForEndOfToken(PrevTokLocation);
Diag(Loc, diag::err_ctor_init_missing_comma)
<< FixItHint::CreateInsertion(Loc, ", ");
} else {
----------------
This is the right place to fix the bug. We should not enter this codepath if
the previous initializer was not valid, and should instead fall into the `else`
below to skip the rest of the initializers. (Delete the `else {` so that
`MemInit` is still in scope here, and don't enter this block if
`MemInit.isInvalid()`. Please also suppress the `err_expected_either`
diagnostic below in that case.)
http://reviews.llvm.org/D16216
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits