#include "clang/AST/Attr.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Basic/AttrKinds.h"
#include "clang/Tooling/Tooling.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
usingnamespaceclang;
namespace {
constantExpr;
equals;
functionDecl;
has;
hasDescendant;
hasName;
integerLiteral;
match;
selectFirst;
stringLiteral;
varDecl;
buildASTFromCode;
buildASTFromCodeWithArgs;
TEST(Attr, Doc) { … }
const FunctionDecl *getFunctionNode(ASTUnit *AST, const std::string &Name) { … }
const VarDecl *getVariableNode(ASTUnit *AST, const std::string &Name) { … }
template <class ModifiedTypeLoc>
void AssertAnnotatedAs(TypeLoc TL, llvm::StringRef annotation,
ModifiedTypeLoc &ModifiedTL,
const AnnotateTypeAttr **AnnotateOut = nullptr) { … }
TEST(Attr, AnnotateType) { … }
TEST(Attr, RegularKeywordAttribute) { … }
}