[Clang] Fix parsing of `(auto(x))`.
authorCorentin Jabot <corentinjabot@gmail.com>
Wed, 26 Apr 2023 18:09:13 +0000 (20:09 +0200)
committerCorentin Jabot <corentinjabot@gmail.com>
Tue, 16 May 2023 06:13:54 +0000 (08:13 +0200)
commitef47318ec3615e83c328b07341046dfb9d869414
treee06dc0ba523c54ac6e1ab3e24611d9ea27903d98
parent617c31c6a1ddd57c6b750b3882c177175067a735
[Clang] Fix parsing of `(auto(x))`.

Allow auto(x) to appear in a parenthesis
expression.

The pattern (auto( can appear as part of a declarator,
so the parser is modified to avoid the ambiguity,
in a way consistent with the proposed resolution to CWG1223.

Reviewed By: aaron.ballman, #clang-language-wg

Differential Revision: https://reviews.llvm.org/D149276
clang/docs/ReleaseNotes.rst
clang/include/clang/Parse/Parser.h
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseTentative.cpp
clang/lib/Parse/Parser.cpp
clang/test/Parser/cxx1z-decomposition.cpp
clang/test/Parser/cxx2b-auto-x.cpp