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

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 18 14:28:56 PDT 2017


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 invalid declarator components.

Additionally, have the trial parse of a //template-argument-list// handle the optional ellipsis that is part of that grammar, as opposed to relying on the trial parse for declarators accepting stray ellipses.


https://reviews.llvm.org/D33339

Files:
  include/clang/Parse/Parser.h
  lib/Parse/ParseTentative.cpp
  test/Parser/cxx0x-ambig.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33339.99495.patch
Type: text/x-patch
Size: 6741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170518/0a56e221/attachment.bin>


More information about the cfe-commits mailing list