[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-27 Thread Oleksandr T. via cfe-commits
@@ -292,6 +297,45 @@ inline bool doesKeywordAttributeTakeArgs(tok::TokenKind Kind) { } } +inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, + const AttributeCommonInfo &CI) { + DB.AddTaggedVal(reinterpre

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-27 Thread Oleksandr T. via cfe-commits
@@ -292,6 +297,45 @@ inline bool doesKeywordAttributeTakeArgs(tok::TokenKind Kind) { } } +inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, + const AttributeCommonInfo &CI) { + DB.AddTaggedVal(reinterpre

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-27 Thread Oleksandr T. via cfe-commits
@@ -4694,9 +4695,9 @@ def note_protocol_decl : Note< "protocol is declared here">; def note_protocol_decl_undefined : Note< "protocol %0 has no definition">; -def err_attribute_preferred_name_arg_invalid : Error< - "argument %0 to 'preferred_name' attribute is not a typede

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-27 Thread Oleksandr T. via cfe-commits
@@ -1382,6 +1382,15 @@ bool SemaHLSL::handleResourceTypeAttr(QualType T, const ParsedAttr &AL) { return false; Attr *A = nullptr; + + AttributeCommonInfo ACI( a-tarasyuk wrote: I'll double-check to be sure, but my understanding is that `AttributeComm

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-27 Thread Oleksandr T. via cfe-commits
@@ -506,7 +506,15 @@ void clang::FormatASTNodeDiagnosticArgument( case DiagnosticsEngine::ak_attr: { const Attr *At = reinterpret_cast(Val); assert(At && "Received null Attr object!"); - OS << '\'' << At->getSpelling() << '\''; + + OS << '\''; + i

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-26 Thread Aaron Ballman via cfe-commits
@@ -292,6 +297,45 @@ inline bool doesKeywordAttributeTakeArgs(tok::TokenKind Kind) { } } +inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, + const AttributeCommonInfo &CI) { + DB.AddTaggedVal(reinterpre

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-26 Thread Aaron Ballman via cfe-commits
@@ -3275,10 +3275,11 @@ def err_attribute_wrong_number_arguments : Error< def err_attribute_wrong_number_arguments_for : Error < "%0 attribute references function %1, which %plural{0:takes no arguments|1:takes one argument|" ":takes exactly %2 arguments}2">; -def err_callb

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-26 Thread Aaron Ballman via cfe-commits
@@ -292,6 +297,45 @@ inline bool doesKeywordAttributeTakeArgs(tok::TokenKind Kind) { } } +inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, + const AttributeCommonInfo &CI) { + DB.AddTaggedVal(reinterpre

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-26 Thread Aaron Ballman via cfe-commits
@@ -1382,6 +1382,15 @@ bool SemaHLSL::handleResourceTypeAttr(QualType T, const ParsedAttr &AL) { return false; Attr *A = nullptr; + + AttributeCommonInfo ACI( AaronBallman wrote: Does this variable live long enough to make it to the diagnostics engine

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-26 Thread Aaron Ballman via cfe-commits
@@ -506,7 +506,15 @@ void clang::FormatASTNodeDiagnosticArgument( case DiagnosticsEngine::ak_attr: { const Attr *At = reinterpret_cast(Val); assert(At && "Received null Attr object!"); - OS << '\'' << At->getSpelling() << '\''; + + OS << '\''; + i

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-26 Thread Aaron Ballman via cfe-commits
@@ -4694,9 +4695,9 @@ def note_protocol_decl : Note< "protocol is declared here">; def note_protocol_decl_undefined : Note< "protocol %0 has no definition">; -def err_attribute_preferred_name_arg_invalid : Error< - "argument %0 to 'preferred_name' attribute is not a typede

[clang] [Clang] include attribute scope in diagnostics (PR #144619)

2025-06-17 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/144619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits