From 7b553f1b19221fceb3d90a1a010e0f59e14c2fa7 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Sat, 29 Oct 2011 00:50:52 +0000 Subject: Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will implicitly perform an lvalue-to-rvalue conversion if used on an lvalue expression. Also improve the documentation of Expr::Evaluate* to indicate which of them will accept expressions with side-effects. llvm-svn: 143263 --- clang/lib/CodeGen/CGExprConstant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGExprConstant.cpp') diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 31e0f2c3b0e..0622c101651 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -957,7 +957,7 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E, if (DestType->isReferenceType()) Success = E->EvaluateAsLValue(Result, Context); else - Success = E->Evaluate(Result, Context); + Success = E->EvaluateAsRValue(Result, Context); if (Success && !Result.HasSideEffects) { switch (Result.Val.getKind()) { -- cgit v1.2.3