From 7c44da279e399d302a685c500e7f802f8adf9762 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 31 Oct 2018 03:48:47 +0000 Subject: Create ConstantExpr class A ConstantExpr class represents a full expression that's in a context where a constant expression is required. This class reflects the path the evaluator took to reach the expression rather than the syntactic context in which the expression occurs. In the future, the class will be expanded to cache the result of the evaluated expression so that it's not needlessly re-evaluated Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D53475 llvm-svn: 345692 --- clang/lib/AST/ItaniumMangle.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/AST/ItaniumMangle.cpp') diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index d276ccce3c3..99a9e87afb4 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -3507,6 +3507,10 @@ recurse: case Expr::CXXInheritedCtorInitExprClass: llvm_unreachable("unexpected statement kind"); + case Expr::ConstantExprClass: + E = cast(E)->getSubExpr(); + goto recurse; + // FIXME: invent manglings for all these. case Expr::BlockExprClass: case Expr::ChooseExprClass: -- cgit v1.2.3