aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Attributes.cpp
blob: da9ac793f163b6b26cf459bc5cb5e83c5fa82f4b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "clang/Basic/Attributes.h"
#include "clang/Basic/IdentifierTable.h"
#include "llvm/ADT/StringSwitch.h"
using namespace clang;

int clang::hasAttribute(AttrSyntax Syntax, const IdentifierInfo *Scope,
                         const IdentifierInfo *Attr, const llvm::Triple &T,
                         const LangOptions &LangOpts) {
  StringRef Name = Attr->getName();
  // Normalize the attribute name, __foo__ becomes foo.
  if (Name.size() >= 4 && Name.startswith("__") && Name.endswith("__"))
    Name = Name.substr(2, Name.size() - 4);

#include "clang/Basic/AttrHasAttributeImpl.inc"

  return 0;
}