Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Clang] raise extension warning for unknown namespaced attributes #120925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

a-tarasyuk
Copy link
Member

@a-tarasyuk a-tarasyuk commented Dec 23, 2024

Fixes #120875


This patch improves Clang's diagnostics for attributes by:

  • Diagnosing unknown attribute namespaces
  • Providing typo correction suggestions for unrecognized attribute and namespace names

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:modules C++20 modules and Clang Header Modules clang:openmp OpenMP related changes to Clang labels Dec 23, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 23, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-modules

Author: Oleksandr T. (a-tarasyuk)

Changes

Fixes #120875


Full diff: https://github.com/llvm/llvm-project/pull/120925.diff

12 Files Affected:

  • (modified) clang/docs/ReleaseNotes.rst (+2)
  • (modified) clang/include/clang/Basic/DiagnosticCommonKinds.td (+2)
  • (modified) clang/lib/Sema/SemaDeclAttr.cpp (+2)
  • (modified) clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp (+2-2)
  • (modified) clang/test/CXX/module/module.interface/p3.cpp (+1-1)
  • (modified) clang/test/Lexer/cxx2a-spaceship.cpp (+1-1)
  • (modified) clang/test/OpenMP/openmp_attribute_parsing.cpp (+1-1)
  • (modified) clang/test/Parser/c2x-attributes.c (+1-1)
  • (modified) clang/test/Parser/cxx0x-attributes.cpp (+1-1)
  • (modified) clang/test/Sema/patchable-function-entry-attr.cpp (+1-1)
  • (added) clang/test/Sema/unknown-attributes.c (+10)
  • (modified) clang/test/SemaCXX/cxx2a-ms-no-unique-address.cpp (+2-2)
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 6b9e1109f3906e..e2cf90aecf3666 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -552,6 +552,8 @@ Attribute Changes in Clang
 - Clang now permits the usage of the placement new operator in ``[[msvc::constexpr]]``
   context outside of the std namespace. (#GH74924)
 
+- Clang now raises warnings for unknown namespaced attributes only in pedantic mode (#GH120875).
+
 Improvements to Clang's diagnostics
 -----------------------------------
 
diff --git a/clang/include/clang/Basic/DiagnosticCommonKinds.td b/clang/include/clang/Basic/DiagnosticCommonKinds.td
index f4a155bb00bb37..85653429aa5332 100644
--- a/clang/include/clang/Basic/DiagnosticCommonKinds.td
+++ b/clang/include/clang/Basic/DiagnosticCommonKinds.td
@@ -179,6 +179,8 @@ def err_opencl_unknown_type_specifier : Error<
 
 def warn_unknown_attribute_ignored : Warning<
   "unknown attribute %0 ignored">, InGroup<UnknownAttributes>;
+def ext_unknown_attribute_ignored : Extension<
+  "unknown attribute %0 ignored">, InGroup<UnknownAttributes>;
 def warn_attribute_ignored : Warning<"%0 attribute ignored">,
   InGroup<IgnoredAttributes>;
 def err_keyword_not_supported_on_target : Error<
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index bb4d33560b93b8..9b1ffebe0804a5 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -6548,6 +6548,8 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL,
                ? (unsigned)diag::err_keyword_not_supported_on_target
            : AL.isDeclspecAttribute()
                ? (unsigned)diag::warn_unhandled_ms_attribute_ignored
+           : AL.getScopeName()
+               ? (unsigned)diag::ext_unknown_attribute_ignored
                : (unsigned)diag::warn_unknown_attribute_ignored)
         << AL << AL.getRange();
     return;
diff --git a/clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp b/clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp
index 192fa126109873..c7e66649fb7b22 100644
--- a/clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp
+++ b/clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.grammar/p2-1z.cpp
@@ -12,5 +12,5 @@
 [[using clang:]] extern int n; // ok
 [[using blah: clang::optnone]] extern int n; // expected-error {{attribute with scope specifier cannot follow}} expected-warning {{only applies to functions}}
 
-[[using clang: unknown_attr]] extern int n; // expected-warning {{unknown attribute}}
-[[using unknown_ns: something]] extern int n; // expected-warning {{unknown attribute}}
+[[using clang: unknown_attr]] extern int n;
+[[using unknown_ns: something]] extern int n;
diff --git a/clang/test/CXX/module/module.interface/p3.cpp b/clang/test/CXX/module/module.interface/p3.cpp
index 32819b2dccb11d..3cde92c1a2cf34 100644
--- a/clang/test/CXX/module/module.interface/p3.cpp
+++ b/clang/test/CXX/module/module.interface/p3.cpp
@@ -40,7 +40,7 @@ export { // No diagnostic after P2615R1 DR
   extern "C++" {} // No diagnostic after P2615R1 DR
 }
 export [[]]; // No diagnostic after P2615R1 DR
-export [[example::attr]]; // expected-warning {{unknown attribute 'attr'}}
+export [[example::attr]]; // expected-error {{unknown attribute 'attr'}}
 
 // [...] shall not declare a name with internal linkage
 export static int a; // expected-error {{declaration of 'a' with internal linkage cannot be exported}}
diff --git a/clang/test/Lexer/cxx2a-spaceship.cpp b/clang/test/Lexer/cxx2a-spaceship.cpp
index 2163a0bf190f90..505f2f47c8ffb8 100644
--- a/clang/test/Lexer/cxx2a-spaceship.cpp
+++ b/clang/test/Lexer/cxx2a-spaceship.cpp
@@ -61,7 +61,7 @@ static_assert(__builtin_strcmp(b, "<=>") == 0);
 // CXX20: preprocess8: <=>=
 
 #define ID(x) x
-[[some_vendor::some_attribute( // expected-warning {{unknown attribute}}
+[[some_vendor::some_attribute(
 preprocess1: ID(<)ID(=>),
 preprocess2: ID(<=)ID(>),
 preprocess3: ID(<)ID(=)ID(>),
diff --git a/clang/test/OpenMP/openmp_attribute_parsing.cpp b/clang/test/OpenMP/openmp_attribute_parsing.cpp
index e273702dfadcb3..4a3a885e407a75 100644
--- a/clang/test/OpenMP/openmp_attribute_parsing.cpp
+++ b/clang/test/OpenMP/openmp_attribute_parsing.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++17 -fopenmp -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++17 -Wunknown-attributes -fopenmp -fsyntax-only -verify %s
 
 // This file tests the custom parsing logic for the OpenMP 5.1 attribute
 // syntax. It does not test actual OpenMP directive syntax, just the attribute
diff --git a/clang/test/Parser/c2x-attributes.c b/clang/test/Parser/c2x-attributes.c
index be039e40f98ef1..30653e2e6f67a6 100644
--- a/clang/test/Parser/c2x-attributes.c
+++ b/clang/test/Parser/c2x-attributes.c
@@ -133,7 +133,7 @@ void f11(void) {
 }
 
 [[attr]] void f12(void); // expected-warning {{unknown attribute 'attr' ignored}}
-[[vendor::attr]] void f13(void); // expected-warning {{unknown attribute 'attr' ignored}}
+[[vendor::attr]] void f13(void);
 
 // Ensure that asm statements properly handle double colons.
 void test_asm(void) {
diff --git a/clang/test/Parser/cxx0x-attributes.cpp b/clang/test/Parser/cxx0x-attributes.cpp
index fad3010c98b9c2..41e4ac4907ef54 100644
--- a/clang/test/Parser/cxx0x-attributes.cpp
+++ b/clang/test/Parser/cxx0x-attributes.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fcxx-exceptions -fdeclspec -fexceptions -fsyntax-only -verify -std=c++11 -Wc++14-compat -Wc++14-extensions -Wc++17-extensions %s
+// RUN: %clang_cc1 -fcxx-exceptions -fdeclspec -fexceptions -fsyntax-only -verify -std=c++11 -Wc++14-compat -Wc++14-extensions -Wc++17-extensions -Wunknown-attributes %s
 
 // Need std::initializer_list
 namespace std {
diff --git a/clang/test/Sema/patchable-function-entry-attr.cpp b/clang/test/Sema/patchable-function-entry-attr.cpp
index bd4d57a7e30936..8c988b453749e9 100644
--- a/clang/test/Sema/patchable-function-entry-attr.cpp
+++ b/clang/test/Sema/patchable-function-entry-attr.cpp
@@ -8,7 +8,7 @@
 // RUN: %clang_cc1 -triple riscv64 -fsyntax-only -verify=silence %s
 // RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fsyntax-only -verify=silence %s
 // RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -fsyntax-only -verify=silence %s
-// RUN: %clang_cc1 -triple ppc64le -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple ppc64le -fsyntax-only -verify=silence %s
 // RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -fsyntax-only -verify=AIX %s
 // RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -fsyntax-only -verify=AIX %s
 
diff --git a/clang/test/Sema/unknown-attributes.c b/clang/test/Sema/unknown-attributes.c
new file mode 100644
index 00000000000000..26fa0258302a38
--- /dev/null
+++ b/clang/test/Sema/unknown-attributes.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c23 -verify=pedantic -pedantic %s
+// RUN: %clang_cc1 -fsyntax-only -std=c23 -verify %s
+
+// expected-no-diagnostics
+
+[[unknown::a(b((c)) d(e((f)))), unknown::g(h k)]] // pedantic-warning {{unknown attribute 'a' ignored}} \
+                                                  // pedantic-warning {{unknown attribute 'g' ignored}}
+int main(void) {
+    return 0;
+}
diff --git a/clang/test/SemaCXX/cxx2a-ms-no-unique-address.cpp b/clang/test/SemaCXX/cxx2a-ms-no-unique-address.cpp
index 822ed752fa9c75..90c814a6a7774a 100644
--- a/clang/test/SemaCXX/cxx2a-ms-no-unique-address.cpp
+++ b/clang/test/SemaCXX/cxx2a-ms-no-unique-address.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -std=c++2a %s -verify=unsupported -triple x86_64-linux-gnu
-// RUN: %clang_cc1 -std=c++2a %s -verify -triple x86_64-windows -fms-compatibility
+// RUN: %clang_cc1 -std=c++2a %s -verify=unsupported -triple x86_64-linux-gnu -Wunknown-attributes
+// RUN: %clang_cc1 -std=c++2a %s -verify -triple x86_64-windows -fms-compatibility -Wunknown-attributes
 
 [[msvc::no_unique_address]] int a; // expected-error {{only applies to non-bit-field non-static data members}} unsupported-warning {{unknown}}
 [[msvc::no_unique_address]] void f(); // expected-error {{only applies to non-bit-field non-static data members}} unsupported-warning {{unknown}}

Copy link

github-actions bot commented Dec 23, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@namandixit
Copy link

namandixit commented Dec 23, 2024

Hi, will it be possible to add a separate warning -Wunknown-attribute-prefix for unknown prefixes? Enabling pedantic mode is usually considered a best practice, and mixing useful warnings (unknown attribute) and less useful ones (unknown attribute prefix) will only drive people to either disable the pedantic mode or disable the warning altogether (which is something that can already be done).

@a-tarasyuk
Copy link
Member Author

@namandixit it is possible. I'm not confident about the new option., @AaronBallman @erichkeane - should unknown namespaced attributes be separated by the new option?

@erichkeane erichkeane requested a review from cor3ntin January 2, 2025 14:16
@cor3ntin
Copy link
Contributor

cor3ntin commented Jan 24, 2025

Thanks for this patch.

Sorry I did not see this sooner.

I am not convinced this the best way to resolve #120875 - and I suspect in practice it would be a bit difficult to use/be under used.
I think the general desire is for users to have a way (maybe a file) where they can list all the attributes they want the implementation to ignore when unknown (with their namespaces).
Additionally this should be used to typo correct.
I am not convinced that the current subset that just allows a list of namespace hidden in a warning flag is sufficient / worth it.


I think we should definitely display the namespace name in the current diagnostic, but for the opt-out mechanism, i think we should have a better sense of a solution that covers all the use cases and then implement that.

Note that I haven't chatted to @AaronBallman and @erichkeane yet, but I think that's worth discussing before proceeding.


P.S: Please offer a description in your non-trivial changes, explaining your design choices and so forth. thanks a lot

@erichkeane
Copy link
Collaborator

Thanks for this patch.

Sorry I did not see this sooner.

I am not convinced this the best way to resolve #120875 - and I suspect in practice it would be a bit difficult to use/be under used.

I'm not convinced here? I think a flag that says "warn me about unknown namespaces" is particularly useful, but the effect of "don't warn me about unknown namespaces, but warn me about attributes in known namespaces" IS also particularly useful. (that is, if you don't know the namespace, shush, else tell me about it).

I think the general desire is for users to have a way (maybe a file) where they can list all the attributes they want the implementation to ignore when unknown (with their namespaces).

If anything, a list on a command line as an extension to this (that is, don't warn me about THIS LIST of unknown namespaces) would be incredibly useful, something like: -Wno-unknown-namespace-attributes=my_static_analysis_tool,my_annotation. But I think this is independently useful without it .

Additionally this should be used to typo correct. I am not convinced that the current subset that just allows a list of namespace hidden in a warning flag is sufficient / worth it.

THAT is the downside unfortunately to our diagnostics system in general, and I'm particularly upset in this case that we don't have a way of differentiating between 'typo' and 'intentionally ignored. Which is why the flag you propose I believe is a REALLY good idea, but I'm hesitent to make it required in this patch.

I think we should definitely display the namespace name in the current diagnostic, but for the opt-out mechanism, i think we should have a better sense of a solution that covers all the use cases and then implement that.

Note that I haven't chatted to @AaronBallman and @erichkeane yet, but I think that's worth discussing before proceeding.

P.S: Please offer a description in your non-trivial changes, explaining your design choices and so forth. thanks a lot

@AaronBallman
Copy link
Collaborator

Thanks for this patch.
Sorry I did not see this sooner.
I am not convinced this the best way to resolve #120875 - and I suspect in practice it would be a bit difficult to use/be under used.

I'm not convinced here? I think a flag that says "warn me about unknown namespaces" is particularly useful, but the effect of "don't warn me about unknown namespaces, but warn me about attributes in known namespaces" IS also particularly useful. (that is, if you don't know the namespace, shush, else tell me about it).

+1

I think the general desire is for users to have a way (maybe a file) where they can list all the attributes they want the implementation to ignore when unknown (with their namespaces).

If anything, a list on a command line as an extension to this (that is, don't warn me about THIS LIST of unknown namespaces) would be incredibly useful, something like: -Wno-unknown-namespace-attributes=my_static_analysis_tool,my_annotation. But I think this is independently useful without it .

That's how this already works in this patch:

// RUN: %clang_cc1 -fsyntax-only -Wunknown-attribute-namespaces=foo,bar -std=c23 \
// RUN:   %s 2>&1 | FileCheck %s --check-prefixes=CHECK_UNKNOWN_ATTR_NS

I think what Corentin is asking for is a similar (follow-up?) feature that allows you to say "warn me about unknown attributes, but not of unknown attributes." that can take attributes with or without a namespace.

Btw, I just realized we only have tests for -Wunknown-attribute-namespaces=foo,bar but not for -Wno-unknown-attribute-namespaces=foo,bar; we should test that behavior too.

I think we should definitely display the namespace name in the current diagnostic

I'm in total support of that, though not as part of this PR.

@erichkeane
Copy link
Collaborator

That's how this already works in this patch:
AH! I missed that this was doing that. Awesome! Though I think the 'no' flag is the one that makes sense in a "turn it on for all BUT these". The flag as typed there isn't particularly useful (that is, ONLY warn me for the ones that I know about).

I think what Corentin is asking for is a similar (follow-up?) feature that allows you to say "warn me about unknown attributes, but not of unknown attributes." that can take attributes with or without a namespace.

I'm not hearing a difference?

@AaronBallman
Copy link
Collaborator

That's how this already works in this patch:
AH! I missed that this was doing that. Awesome! Though I think the 'no' flag is the one that makes sense in a "turn it on for all BUT these". The flag as typed there isn't particularly useful (that is, ONLY warn me for the ones that I know about).

I think what Corentin is asking for is a similar (follow-up?) feature that allows you to say "warn me about unknown attributes, but not of unknown attributes." that can take attributes with or without a namespace.

I'm not hearing a difference?

Wow. My fingers are obviously not listening to my brain very well. :-D

I mean "warn me about unknown attribute, but not these particular unknown attributes." e.g., (fake warning group name)

// -Wwarn-about-unknown-attributes-except-these=foo,bar::baz
[[foo, bar::baz, quux]] int x; // warning: unknown attribute 'quux'

@erichkeane
Copy link
Collaborator

That's how this already works in this patch:
AH! I missed that this was doing that. Awesome! Though I think the 'no' flag is the one that makes sense in a "turn it on for all BUT these". The flag as typed there isn't particularly useful (that is, ONLY warn me for the ones that I know about).

I think what Corentin is asking for is a similar (follow-up?) feature that allows you to say "warn me about unknown attributes, but not of unknown attributes." that can take attributes with or without a namespace.

I'm not hearing a difference?

Wow. My fingers are obviously not listening to my brain very well. :-D

I mean "warn me about unknown attribute, but not these particular unknown attributes." e.g., (fake warning group name)

// -Wwarn-about-unknown-attributes-except-these=foo,bar::baz
[[foo, bar::baz, quux]] int x; // warning: unknown attribute 'quux'

Ah, hrm. I see much less value in that. How likely is it that you have an attribute in a 'known' namespace that is 'unknown' but valid? I thought the whole point of namespaces was that this is NOT particularly useful?

@AaronBallman
Copy link
Collaborator

That's how this already works in this patch:
AH! I missed that this was doing that. Awesome! Though I think the 'no' flag is the one that makes sense in a "turn it on for all BUT these". The flag as typed there isn't particularly useful (that is, ONLY warn me for the ones that I know about).

I think what Corentin is asking for is a similar (follow-up?) feature that allows you to say "warn me about unknown attributes, but not of unknown attributes." that can take attributes with or without a namespace.

I'm not hearing a difference?

Wow. My fingers are obviously not listening to my brain very well. :-D
I mean "warn me about unknown attribute, but not these particular unknown attributes." e.g., (fake warning group name)

// -Wwarn-about-unknown-attributes-except-these=foo,bar::baz
[[foo, bar::baz, quux]] int x; // warning: unknown attribute 'quux'

Ah, hrm. I see much less value in that. How likely is it that you have an attribute in a 'known' namespace that is 'unknown' but valid?

For example, we know about the gnu namespace, but there are a ton of attributes GCC supports but we do not.

@erichkeane
Copy link
Collaborator

For example, we know about the gnu namespace, but there are a ton of attributes GCC supports but we do not.

Sure, but we've never needed/wanted that before for general attributes, right? I am seeing THAT as particularly novel for this patch. I would be open to reviewing that, but don't see it as necessary for this patch.

@cor3ntin
Copy link
Contributor

Ultimately we want

  1. I know all of these attributes, don't tell me about them
  2. I know all of these attribute namespaces, don't tell me about them - which this patch is doing
  3. Have a way to disable unknown attributes warnings for all unknown namespaces - which this patch is doing by introducing a separate flag

I sort of question the last bullet point (the original issue), as it's a bit of a nuclear option. But maybe that's fine.
Then there is the question of whether 1. and 2. should have separate interfaces.

I will also point out that -Wunknown-attribute-namespaces=foo is a very weird way to spell "I know about foo, don't warn on it" - and I am concerned about discoverability.

And again, I apologize I did not see this patch sooner @a-tarasyuk.
What do people think about landing it early in the Clang 21 cycle, in case we find a better long term interface in the next few months?

@AaronBallman
Copy link
Collaborator

Ultimately we want

1. I know all of these attributes, don't tell me about them

2. I know all of these attribute namespaces, don't tell me about them - which this patch is doing

3. Have a way to disable unknown attributes warnings for all unknown namespaces - which this patch is doing by introducing a separate flag

I sort of question the last bullet point (the original issue), as it's a bit of a nuclear option. But maybe that's fine. Then there is the question of whether 1. and 2. should have separate interfaces.

I will also point out that -Wunknown-attribute-namespaces=foo is a very weird way to spell "I know about foo, don't warn on it" - and I am concerned about discoverability.

Yeah, I was thinking about the converse: -Wno-unknown-attribute-namespaces=foo seems almost like it's how we'd want to spell it, but that's pretty novel.

And again, I apologize I did not see this patch sooner @a-tarasyuk. What do people think about landing it early in the Clang 21 cycle, in case we find a better long term interface in the next few months?

I think it makes sense to not land this for Clang 20 so we can get the interface right the first time.

Let's see if we have some agreement on where we're at.

  1. We want -Wunknown-attributes to print attribute namespace names, but that's a separate PR from this one.
  2. We have a user who wants a way to silence diagnostics about all unknown attributes if the attribute namespace itself is unknown.
  3. We don't necessarily need to let the user specify a set of which unknown attribute namespaces to warn about. We could wait on this until there's user demand with a real world example.
  4. Given that unknown attribute namespaces are uncommon, nothing needs to be done in a rush, we may even decide we don't need this option at all despite (2).

Does that seem like an accurate summary?

@namandixit
Copy link

namandixit commented Jan 28, 2025

Hi, original issue submitter here. Personally, just being able to silence warnings about specific unknown prefixes is fine, the "nuclear" option is not necessary.

The reason behind the issue was that I am annotating type definitions, etc. with custom attributes so that I can generate meta-programming information using my own tools, and I want Clang to not warn about those attributes. Being able to prevent warnings about a few specific prefixes will suffice, if the so called "nuclear" option is undesirable.

@a-tarasyuk
Copy link
Member Author

@erichkeane @AaronBallman @cor3ntin, just checking if there are any updates on this, as the Clang 20 release was landed.

@AaronBallman
Copy link
Collaborator

@erichkeane @AaronBallman @cor3ntin, just checking if there are any updates on this, as the Clang 20 release was landed.

Erich and I discussed this more offline and our thinking is:

  • It's useful for -Wunknown-attributes to print the attribute namespace
  • We think there should be typo correction for -Wunknown-attributes, for both the attribute namespace and the attribute name
  • We're both struggling to find "warn about unknown attribute namespaces" to be motivating because we don't think there are a lot of unknown attribute namespaces in the wild. Does anyone know of a static analysis tool which supplies custom attributes? Or is this currently limited to just plugin attributes in practice? If plugin attributes, we weakly think it might be worth holding off on a separate warning. If there are static analysis tools with custom attributes, then we think that diagnostic is a bit more motivated.

@a-tarasyuk a-tarasyuk removed clang:modules C++20 modules and Clang Header Modules clang:openmp OpenMP related changes to Clang labels May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clang (C23): Attributes with unknown "attribute-prefix" should not raise "-Wunknown-attributes"
6 participants