[clang] [Clang] include attribute scope in diagnostics (PR #144619)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 26 04:28:32 PDT 2025
================
@@ -292,6 +297,45 @@ inline bool doesKeywordAttributeTakeArgs(tok::TokenKind Kind) {
}
}
+inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
+ const AttributeCommonInfo &CI) {
+ DB.AddTaggedVal(reinterpret_cast<uint64_t>(&CI),
+ DiagnosticsEngine::ak_attr_info);
+ return DB;
----------------
AaronBallman wrote:
It might be a bit cleaner to implement this in terms of the other `operator<<` and pass `&CI` instead; then if we decide to add any extra logic, we only have to do it in one place. Similar suggestion for the other two helpers as well.
https://github.com/llvm/llvm-project/pull/144619
More information about the cfe-commits
mailing list