[all-commits] [llvm/llvm-project] 61b435: [Clang] show attribute namespace in diagnostics (#...

Oleksandr T. via All-commits all-commits at lists.llvm.org
Thu May 8 14:49:23 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 61b435ec4de6b2a4139afce5195a01717436184c
      https://github.com/llvm/llvm-project/commit/61b435ec4de6b2a4139afce5195a01717436184c
  Author: Oleksandr T. <oleksandr.tarasiuk at outlook.com>
  Date:   2025-05-09 (Fri, 09 May 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/AttributeCommonInfo.h
    M clang/lib/Basic/Attributes.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/test/CXX/module/module.interface/p3.cpp
    M clang/test/OpenMP/openmp_attribute_parsing.cpp
    M clang/test/Parser/c2x-attributes.c
    M clang/test/Parser/cxx0x-attributes.cpp
    M clang/test/Sema/patchable-function-entry-attr.cpp
    A clang/test/Sema/unknown-attributes.c
    M clang/test/SemaCXX/cxx2a-ms-no-unique-address.cpp

  Log Message:
  -----------
  [Clang] show attribute namespace in diagnostics (#138519)

This patch enhances Clang's diagnosis of an unknown attribute by
printing the attribute's namespace in the diagnostic text. e.g.,

```cpp
[[foo::nodiscard]] int f(); // warning: unknown attribute 'foo::nodiscard' ignored
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list