4 #include "llvm/ADT/StringSwitch.h" 10 StringRef Name = Attr->
getName();
12 if (Name.size() >= 4 && Name.startswith(
"__") && Name.endswith(
"__"))
13 Name = Name.substr(2, Name.size() - 4);
16 StringRef ScopeName = Scope ? Scope->
getName() :
"";
17 if (ScopeName ==
"__gnu__")
19 else if (ScopeName ==
"_Clang")
22 #include "clang/Basic/AttrHasAttributeImpl.inc" 29 #define ATTR_MATCH_RULE(NAME, SPELLING, IsAbstract) \ 32 #include "clang/Basic/AttrSubMatchRulesList.inc" 34 llvm_unreachable(
"Invalid subject match rule");
One of these records is kept for each identifier that is lexed.
SubjectMatchRule
A list of all the recognized kinds of attributes.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Scope - A scope is a transient data structure that is used while parsing the program.
int hasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope, const IdentifierInfo *Attr, const TargetInfo &Target, const LangOptions &LangOpts)
Return the version number associated with the attribute if we recognize and implement the attribute s...
Exposes information about the current target.
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
const char * getSubjectMatchRuleSpelling(SubjectMatchRule Rule)
StringRef getName() const
Return the actual identifier string.
Dataflow Directional Tag Classes.
Attr - This represents one attribute.