#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Tooling/Tooling.h"
#include "gtest/gtest.h"
#include <map>
#include <string>
usingnamespaceclang::tooling;
namespace {
VarInfoMap;
class EvaluateConstantInitializersVisitor
: public clang::RecursiveASTVisitor<EvaluateConstantInitializersVisitor> { … };
class EvaluateConstantInitializersAction : public clang::ASTFrontendAction { … };
}
TEST(EvaluateAsRValue, FailsGracefullyForUnknownTypes) { … }
class CheckLValueToRValueConversionVisitor
: public clang::RecursiveASTVisitor<CheckLValueToRValueConversionVisitor> { … };
class CheckConversionAction : public clang::ASTFrontendAction { … };
TEST(EvaluateAsRValue, LValueToRValueConversionWorks) { … }