[PATCH] D25882: Remove special error recovery for ::(id)

2016-12-09 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289273: Remove special error recovery for ::(id) (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D25882?vs=75509&id=80946#toc Repository: rL LLVM https://reviews.llvm.org/D25882

[PATCH] D25882: Remove special error recovery for ::(id)

2016-12-09 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I think the last time we discussed this, we decided that to truly fix this we need to audit all calls to PP.EnterToken(Stream) from the parser. They are probably broken in token caching mode. I haven't been able to find the time to do that. Should we commit this in the mean

[PATCH] D25882: Remove special error recovery for ::(id)

2016-10-21 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 75509. rnk added a comment. - Remove unused diagnostic https://reviews.llvm.org/D25882 Files: include/clang/Basic/DiagnosticParseKinds.td include/clang/Parse/Parser.h lib/Parse/ParseExprCXX.cpp test/Parser/colon-colon-parentheses.cpp Index: test/Parser

[PATCH] D25882: Remove special error recovery for ::(id)

2016-10-21 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:73-75 PP.EnterToken(ColonToken); if (!AtDigraph) PP.EnterToken(DigraphToken); rsmith wrote: > This seems to mess up the cached token buffer in the same way; it's a little > surprising w

[PATCH] D25882: Remove special error recovery for ::(id)

2016-10-21 Thread Richard Smith via cfe-commits
rsmith added a comment. Can you also remove the corresponding diagnostic? Comment at: lib/Parse/ParseExprCXX.cpp:73-75 PP.EnterToken(ColonToken); if (!AtDigraph) PP.EnterToken(DigraphToken); This seems to mess up the cached token buffer in the same w

[PATCH] D25882: Remove special error recovery for ::(id)

2016-10-21 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added reviewers: rsmith, rtrieu. rnk added a subscriber: cfe-commits. The code pattern used to implement the token rewriting hack doesn't interact well with token caching in the pre-processor. As a result, clang would crash on 'int f(::(id));' while doing a tenative