[all-commits] [llvm/llvm-project] 1b0ba1: [Clang] Fix parsing of `(auto(x))`.

cor3ntin via All-commits all-commits at lists.llvm.org
Sat May 20 04:23:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1b0ba1c12fcc86dcf4097b3b8941260e8c6361fa
      https://github.com/llvm/llvm-project/commit/1b0ba1c12fcc86dcf4097b3b8941260e8c6361fa
  Author: Corentin Jabot <corentinjabot at gmail.com>
  Date:   2023-05-20 (Sat, 20 May 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Parse/Parser.h
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Parse/ParseTentative.cpp
    M clang/lib/Parse/Parser.cpp
    M clang/test/CXX/drs/dr12xx.cpp
    M clang/test/Parser/cxx-ambig-decl-expr.cpp
    M clang/test/Parser/cxx1z-decomposition.cpp
    M clang/test/Parser/cxx2b-auto-x.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list