#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTNodeTraverser.h"
#include "clang/AST/TextNodeDumper.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Tooling/Tooling.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
usingnamespaceclang::tooling;
usingnamespaceclang::ast_matchers;
namespace clang {
class NodeTreePrinter : public TextTreeStructure { … };
class TestASTDumper : public ASTNodeTraverser<TestASTDumper, NodeTreePrinter> { … };
template <typename... NodeType> std::string dumpASTString(NodeType &&... N) { … }
template <typename... NodeType>
std::string dumpASTString(TraversalKind TK, NodeType &&... N) { … }
const FunctionDecl *getFunctionNode(clang::ASTUnit *AST,
const std::string &Name) { … }
template <typename T> struct Verifier { … };
Verifier<T *>;
template <typename T>
void verifyWithDynNode(T Node, const std::string &DumpString) { … }
TEST(Traverse, Dump) { … }
TEST(Traverse, IgnoreUnlessSpelledInSourceVars) { … }
TEST(Traverse, IgnoreUnlessSpelledInSourceStructs) { … }
TEST(Traverse, IgnoreUnlessSpelledInSourceReturnStruct) { … }
TEST(Traverse, IgnoreUnlessSpelledInSourceReturns) { … }
TEST(Traverse, LambdaUnlessSpelledInSource) { … }
TEST(Traverse, IgnoreUnlessSpelledInSourceImplicit) { … }
TEST(Traverse, IgnoreUnlessSpelledInSourceTemplateInstantiations) { … }
TEST(Traverse, CXXRewrittenBinaryOperator) { … }
}