//===--- EvaluatedExprVisitor.h - Evaluated expression visitor --*- C++ -*-===// // // 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 // //===----------------------------------------------------------------------===// // // This file defines the EvaluatedExprVisitor class template, which visits // the potentially-evaluated subexpressions of a potentially-evaluated // expression. // //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_AST_EVALUATEDEXPRVISITOR_H #define LLVM_CLANG_AST_EVALUATEDEXPRVISITOR_H #include "clang/AST/DeclCXX.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/StmtVisitor.h" #include "llvm/ADT/STLExtras.h" namespace clang { class ASTContext; /// Given a potentially-evaluated expression, this visitor visits all /// of its potentially-evaluated subexpressions, recursively. template<template <typename> class Ptr, typename ImplClass> class EvaluatedExprVisitorBase : public StmtVisitorBase<Ptr, ImplClass, void> { … }; /// EvaluatedExprVisitor - This class visits 'Expr *'s template <typename ImplClass> class EvaluatedExprVisitor : public EvaluatedExprVisitorBase<std::add_pointer, ImplClass> { … }; /// ConstEvaluatedExprVisitor - This class visits 'const Expr *'s. template <typename ImplClass> class ConstEvaluatedExprVisitor : public EvaluatedExprVisitorBase<llvm::make_const_ptr, ImplClass> { … }; } #endif // LLVM_CLANG_AST_EVALUATEDEXPRVISITOR_H