[PATCH] D141324: [clang] extend external_source_symbol attribute with the USR clause
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 18 12:31:37 PST 2023
aaron.ballman added inline comments.
================
Comment at: clang/include/clang/Basic/AttrDocs.td:1764
+ the ``external_source_symbol`` attribute with
+ ``__has_attribute(external_source_symbol_with_usr)``.
+
----------------
erichkeane wrote:
> I don't think we can do this. __has_attribute needs to take the actual name of the attribute.
+1
================
Comment at: clang/lib/Basic/Attributes.cpp:30-32
+ // Special case additions of new clauses to existing attributes.
+ if (Name == "external_source_symbol_with_usr")
+ return 1;
----------------
This is handled automagically for you in Attr.td, but under the correct attribute name instead of an invented name.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141324/new/
https://reviews.llvm.org/D141324
More information about the cfe-commits
mailing list