[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-19 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, thanks! https://reviews.llvm.org/D9 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast updated this revision to Diff 99632. hubert.reinterpretcast added a comment. Remove stray ellipsis treatment entirely https://reviews.llvm.org/D9 Files: lib/Parse/ParseTentative.cpp test/Parser/cxx0x-ambig.cpp Index: test/Parser/cxx0x-ambig.cpp ==

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In https://reviews.llvm.org/D9#759797, @rsmith wrote: > In https://reviews.llvm.org/D9#759146, @hubert.reinterpretcast wrote: > > > The `check-all` target passes even if the ellipsis-after-declarator-id > > disambiguation as a declarator is removed

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-19 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D9#759146, @hubert.reinterpretcast wrote: > The `check-all` target passes even if the ellipsis-after-declarator-id > disambiguation as a declarator is removed entirely. [...] > So, on the whole, the stray ellipsis treatment is both too c

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In https://reviews.llvm.org/D9#759125, @rsmith wrote: > Should I assume our "misplaced ellipsis" diagnostic requires that we > disambiguate the ill-formed ellipsis-after-declarator-id as a declarator in > some cases? If so, do we have tests for that s

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-18 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. Should I assume our "misplaced ellipsis" diagnostic requires that we disambiguate the ill-formed ellipsis-after-declarator-id as a declaration in some cases? If so, do we have tests for that somewhere? Comment at: include/clang/Parse/Parser.h:2138 + T

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Parse/ParseTentative.cpp:542 + (Tok.is(tok::greatergreater) || + (Tok.is(tok::ellipsis) && + NextToken().isOneOf(tok::greater, tok::greatergreater, Th

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. The trial parse for declarative syntax accepts an invalid pack declaration syntax, which is ambiguous with valid pack expansions of expressions. This commit restricts the invalid pack declaration syntax to avoid mistaking valid pack expansions as in