#ifndef LLVM_CLANG_UNITTESTS_ASTMATCHERS_ASTMATCHERSTEST_H
#define LLVM_CLANG_UNITTESTS_ASTMATCHERS_ASTMATCHERSTEST_H
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Frontend/ASTUnit.h"
#include "clang/Testing/CommandLineArgs.h"
#include "clang/Testing/TestClangConfig.h"
#include "clang/Tooling/Tooling.h"
#include "gtest/gtest.h"
namespace clang {
namespace ast_matchers {
buildASTFromCodeWithArgs;
FileContentMappings;
FrontendActionFactory;
newFrontendActionFactory;
runToolOnCodeWithArgs;
class BoundNodesCallback { … };
class VerifyMatch : public MatchFinder::MatchCallback { … };
inline ArrayRef<TestLanguage> langCxx11OrLater() { … }
inline ArrayRef<TestLanguage> langCxx14OrLater() { … }
inline ArrayRef<TestLanguage> langCxx17OrLater() { … }
inline ArrayRef<TestLanguage> langCxx20OrLater() { … }
inline ArrayRef<TestLanguage> langCxx23OrLater() { … }
template <typename T>
testing::AssertionResult matchesConditionally(
const Twine &Code, const T &AMatcher, bool ExpectMatch,
ArrayRef<std::string> CompileArgs,
const FileContentMappings &VirtualMappedFiles = FileContentMappings(),
StringRef Filename = "input.cc") { … }
template <typename T>
testing::AssertionResult
matchesConditionally(const Twine &Code, const T &AMatcher, bool ExpectMatch,
ArrayRef<TestLanguage> TestLanguages) { … }
template <typename T>
testing::AssertionResult
matches(const Twine &Code, const T &AMatcher,
ArrayRef<TestLanguage> TestLanguages = { … }
template <typename T>
testing::AssertionResult
notMatches(const Twine &Code, const T &AMatcher,
ArrayRef<TestLanguage> TestLanguages = { … }
template <typename T>
testing::AssertionResult matchesObjC(const Twine &Code, const T &AMatcher,
bool ExpectMatch = true) { … }
template <typename T>
testing::AssertionResult matchesC(const Twine &Code, const T &AMatcher) { … }
template <typename T>
testing::AssertionResult notMatchesObjC(const Twine &Code, const T &AMatcher) { … }
template <typename T>
testing::AssertionResult
matchesConditionallyWithCuda(const Twine &Code, const T &AMatcher,
bool ExpectMatch, llvm::StringRef CompileArg) { … }
template <typename T>
testing::AssertionResult matchesWithCuda(const Twine &Code, const T &AMatcher) { … }
template <typename T>
testing::AssertionResult notMatchesWithCuda(const Twine &Code,
const T &AMatcher) { … }
template <typename T>
testing::AssertionResult matchesWithOpenMP(const Twine &Code,
const T &AMatcher) { … }
template <typename T>
testing::AssertionResult notMatchesWithOpenMP(const Twine &Code,
const T &AMatcher) { … }
template <typename T>
testing::AssertionResult matchesWithOpenMP51(const Twine &Code,
const T &AMatcher) { … }
template <typename T>
testing::AssertionResult notMatchesWithOpenMP51(const Twine &Code,
const T &AMatcher) { … }
template <typename T>
testing::AssertionResult matchAndVerifyResultConditionally(
const Twine &Code, const T &AMatcher,
std::unique_ptr<BoundNodesCallback> FindResultVerifier, bool ExpectResult,
ArrayRef<std::string> Args = { … }
template <typename T>
testing::AssertionResult
matchAndVerifyResultTrue(const Twine &Code, const T &AMatcher,
std::unique_ptr<BoundNodesCallback> FindResultVerifier,
ArrayRef<std::string> Args = { … }
template <typename T>
testing::AssertionResult matchAndVerifyResultFalse(
const Twine &Code, const T &AMatcher,
std::unique_ptr<BoundNodesCallback> FindResultVerifier,
ArrayRef<std::string> Args = { … }
template <typename T> class VerifyIdIsBoundTo : public BoundNodesCallback { … };
class ASTMatchersTest : public ::testing::Test,
public ::testing::WithParamInterface<TestClangConfig> { … };
}
}
#endif