[all-commits] [llvm/llvm-project] 62328f: Implement WG21 P2156R1/WG14 N2557 on duplicate att...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Tue Apr 13 09:30:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 62328f2f29b432dadbd327ff91ba3914c478e3fc
      https://github.com/llvm/llvm-project/commit/62328f2f29b432dadbd327ff91ba3914c478e3fc
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2021-04-13 (Tue, 13 Apr 2021)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticParseKinds.td
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.depend/p1.cpp
    M clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.fallthrough/p1.cpp
    M clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p1.cpp
    M clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.noreturn/p1.cpp
    M clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p1.cpp
    M clang/test/Sema/c2x-fallthrough.c
    M clang/test/Sema/c2x-maybe_unused-errors.c
    M clang/test/Sema/c2x-nodiscard.c
    M clang/test/SemaCXX/cxx2a-no-unique-address.cpp

  Log Message:
  -----------
  Implement WG21 P2156R1/WG14 N2557 on duplicate attributes

These proposals make the same changes to both C++ and C and remove a
restriction on standard attributes appearing multiple times in the same
attribute list.

We could warn on the duplicate attributes, but do not. This is for
consistency as we do not warn on attributes duplicated within the
attribute specifier sequence. If we want to warn on duplicated
standard attributes, we should do so both for both situations:
[[foo, foo]] and [[foo]][[foo]].




More information about the All-commits mailing list