diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-29 00:50:52 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-29 00:50:52 +0000 |
commit | 51f4708c00110940ca3f337961915f2ca1668375 (patch) | |
tree | 8507a7dfb0f17042f2373b7fa309b00967283c2c /lib/Sema/SemaDecl.cpp | |
parent | 7800212ef29be314d55814e8dcc568ff8beed106 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index fb00c918ab..6bd0d25f75 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -3445,7 +3445,7 @@ static QualType TryToFixInvalidVariablyModifiedType(QualType T, Expr::EvalResult EvalResult; if (!VLATy->getSizeExpr() || - !VLATy->getSizeExpr()->Evaluate(EvalResult, Context) || + !VLATy->getSizeExpr()->EvaluateAsRValue(EvalResult, Context) || !EvalResult.Val.isInt()) return QualType(); |