clang API Documentation
00001 #include "clang/Basic/Attributes.h" 00002 #include "clang/Basic/IdentifierTable.h" 00003 #include "llvm/ADT/StringSwitch.h" 00004 using namespace clang; 00005 00006 int clang::hasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope, 00007 const IdentifierInfo *Attr, const llvm::Triple &T, 00008 const LangOptions &LangOpts) { 00009 StringRef Name = Attr->getName(); 00010 // Normalize the attribute name, __foo__ becomes foo. 00011 if (Name.size() >= 4 && Name.startswith("__") && Name.endswith("__")) 00012 Name = Name.substr(2, Name.size() - 4); 00013 00014 #include "clang/Basic/AttrHasAttributeImpl.inc" 00015 00016 return 0; 00017 }