[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/138519 >From cbbca4d26b8d00eb103f110c2341fab2e4a2e40d Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 5 May 2025 15:30:14 +0300 Subject: [PATCH 1/2] [Clang] diagnose unknown attribute namespaces --- c

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-06 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: > So I don't believe this is correct either. We want it to always say the > namespace. So clang::unknown will diagnose as unknown attribute > 'clang::unknown' ignored @erichkeane @AaronBallman Thanks for the feedback. I've made changes to include the _scope_ in the diagnost

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-06 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/138519 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-06 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/138519 >From cbbca4d26b8d00eb103f110c2341fab2e4a2e40d Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 5 May 2025 15:30:14 +0300 Subject: [PATCH] [Clang] diagnose unknown attribute namespaces --- clang

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-06 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/138519 >From 7d376b33f09801be504ec65a2853679dff8b726c Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 5 May 2025 15:30:14 +0300 Subject: [PATCH 1/3] [Clang] diagnose unknown attribute namespaces --- c

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Oleksandr T. via cfe-commits
@@ -6861,13 +6861,19 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, // though they were unknown attributes. if (AL.getKind() == ParsedAttr::UnknownAttribute || !AL.existsInTarget(S.Context.getTargetInfo())) { -S.Diag(AL.getLoc(), -

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/138519 >From 7d376b33f09801be504ec65a2853679dff8b726c Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 5 May 2025 15:30:14 +0300 Subject: [PATCH 1/3] [Clang] diagnose unknown attribute namespaces --- c

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > So I don't believe this is correct either. We want it to always say the > namespace. So `clang::unknown` will diagnose as `unknown attribute > 'clang::unknown' ignored` AFAIK. Right @AaronBallman ? I think what I'm seeing is correct, unless I'm missing something. Attribut

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Aaron Ballman via cfe-commits
@@ -6861,13 +6861,19 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, // though they were unknown attributes. if (AL.getKind() == ParsedAttr::UnknownAttribute || !AL.existsInTarget(S.Context.getTargetInfo())) { -S.Diag(AL.getLoc(), -

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: So I don't believe this is correct either. We want it to always say the namespace. So `clang::unknown` will diagnose as `unknown attribute 'clang::unknown' ignored` AFAIK. Right @AaronBallman ? https://github.com/llvm/llvm-project/pull/138519 ___

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Oleksandr T. via cfe-commits
@@ -385,6 +385,8 @@ related warnings within the method body. - Clang now disallows the use of attributes applied before an ``extern template`` declaration (#GH79893). +- Clang now diagnoses unknown attribute namespaces a-tarasyuk wrote: @erichkeane I’ve upd

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/138519 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/138519 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Erich Keane via cfe-commits
@@ -385,6 +385,8 @@ related warnings within the method body. - Clang now disallows the use of attributes applied before an ``extern template`` declaration (#GH79893). +- Clang now diagnoses unknown attribute namespaces erichkeane wrote: ```suggestion - Clan

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I believe our feedback on the last one was to emit the namespace in all attribute ignored diagnostics, not just if we don't know the namespace. So unknown attribute `clang::whatever` as well? Otherwise, I think this is a reasonable patch that makes thi

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/138519 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Oleksandr T. (a-tarasyuk) Changes This patch enhances Clang's attribute handling by diagnosing unknown attribute namespaces ```c++ [[foo::nodiscard]] int f(); // warning: unknown attribute namespace 'unknown'; attribute 'unknown

[clang] [Clang] diagnose unknown attribute namespaces (PR #138519)

2025-05-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/138519 This patch enhances Clang's attribute handling by diagnosing unknown attribute namespaces ```c++ [[foo::nodiscard]] int f(); // warning: unknown attribute namespace 'unknown'; attribute 'unknown::foo' igno