llvm/clang/unittests/AST/EvaluateAsRValueTest.cpp

//===- unittests/AST/EvaluateAsRValueTest.cpp -----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// \file
// \brief Unit tests for evaluation of constant initializers.
//
//===----------------------------------------------------------------------===//

#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 {
// For each variable name encountered, whether its initializer was a
// constant.
VarInfoMap;

/// \brief Records information on variable initializers to a map.
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) {}