clang  3.9.0
Attributes.cpp
Go to the documentation of this file.
3 #include "llvm/ADT/StringSwitch.h"
4 using namespace clang;
5 
7  const IdentifierInfo *Attr, const TargetInfo &Target,
8  const LangOptions &LangOpts) {
9  StringRef Name = Attr->getName();
10  // Normalize the attribute name, __foo__ becomes foo.
11  if (Name.size() >= 4 && Name.startswith("__") && Name.endswith("__"))
12  Name = Name.substr(2, Name.size() - 4);
13 
14 #include "clang/Basic/AttrHasAttributeImpl.inc"
15 
16  return 0;
17 }
One of these records is kept for each identifier that is lexed.
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
Definition: Type.h:4549
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:48
AttrSyntax
Definition: Attributes.h:20
Scope - A scope is a transient data structure that is used while parsing the program.
Definition: Scope.h:39
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...
Definition: Attributes.cpp:6
Exposes information about the current target.
StringRef getName() const
Return the actual identifier string.
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
Attr - This represents one attribute.
Definition: Attr.h:45