[all-commits] [llvm/llvm-project] a8bef8: [Clang] Implement P2169 A nice placeholder with no...

cor3ntin via All-commits all-commits at lists.llvm.org
Fri Aug 4 07:51:31 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a8bef8865e4a4226ee608df327fddd380870c620
      https://github.com/llvm/llvm-project/commit/a8bef8865e4a4226ee608df327fddd380870c620
  Author: Corentin Jabot <corentinjabot at gmail.com>
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/Decl.h
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Basic/IdentifierTable.h
    M clang/include/clang/Sema/Lookup.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/Decl.cpp
    M clang/lib/Frontend/InitPreprocessor.cpp
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/lib/Parse/ParseTemplate.cpp
    M clang/lib/Parse/Parser.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaInit.cpp
    M clang/lib/Sema/SemaLambda.cpp
    M clang/lib/Sema/SemaLookup.cpp
    M clang/test/Lexer/cxx-features.cpp
    M clang/test/Lexer/unicode.c
    M clang/test/SemaCXX/anonymous-union-export.cpp
    A clang/test/SemaCXX/cxx2c-placeholder-vars.cpp
    M clang/www/cxx_status.html

  Log Message:
  -----------
  [Clang] Implement P2169 A nice placeholder with no name

This is a C++ feature that allows the use of `_` to
declare multiple variable of that name in the same scope;
these variables can then not be referred to.

In addition, while P2169 does not extend to parameter
declarations, we stop warning on unused parameters of that name,
for consistency.

The feature is backported to all C++ language modes.

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

Differential Revision: https://reviews.llvm.org/D153536




More information about the All-commits mailing list