#include "ASTPrint.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/ADT/SmallString.h"
#include "gtest/gtest.h"
usingnamespaceclang;
usingnamespaceast_matchers;
usingnamespacetooling;
namespace {
enum class StdVer { … };
DeclarationMatcher FunctionBodyMatcher(StringRef ContainingFunction) { … }
static void PrintStmt(raw_ostream &Out, const ASTContext *Context,
const Stmt *S, PrintingPolicyAdjuster PolicyAdjuster) { … }
template <typename Matcher>
::testing::AssertionResult
PrintedStmtMatches(StringRef Code, const std::vector<std::string> &Args,
const Matcher &NodeMatch, StringRef ExpectedPrinted,
PrintingPolicyAdjuster PolicyAdjuster = nullptr) { … }
template <typename T>
::testing::AssertionResult
PrintedStmtCXXMatches(StdVer Standard, StringRef Code, const T &NodeMatch,
StringRef ExpectedPrinted,
PrintingPolicyAdjuster PolicyAdjuster = nullptr) { … }
template <typename T>
::testing::AssertionResult
PrintedStmtMSMatches(StringRef Code, const T &NodeMatch,
StringRef ExpectedPrinted,
PrintingPolicyAdjuster PolicyAdjuster = nullptr) { … }
template <typename T>
::testing::AssertionResult
PrintedStmtObjCMatches(StringRef Code, const T &NodeMatch,
StringRef ExpectedPrinted,
PrintingPolicyAdjuster PolicyAdjuster = nullptr) { … }
}
TEST(StmtPrinter, TestIntegerLiteral) { … }
TEST(StmtPrinter, TestMSIntegerLiteral) { … }
TEST(StmtPrinter, TestFloatingPointLiteral) { … }
TEST(StmtPrinter, TestStringLiteralOperatorTemplate_Pack) { … }
TEST(StmtPrinter, TestStringLiteralOperatorTemplate_Class) { … }
TEST(StmtPrinter, TestCXXConversionDeclImplicit) { … }
TEST(StmtPrinter, TestCXXConversionDeclExplicit) { … }
TEST(StmtPrinter, TestCXXLamda) { … }
TEST(StmtPrinter, TestNoImplicitBases) { … }
TEST(StmtPrinter, TerseOutputWithLambdas) { … }
TEST(StmtPrinter, ParamsUglified) { … }