summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorGauthier Harnisch <tyker1@outlook.com>2019-06-21 08:26:21 +0000
committerGauthier Harnisch <tyker1@outlook.com>2019-06-21 08:26:21 +0000
commitdea9d57d95b94f3305338e4c4123569b1a8f245c (patch)
treed207e85f6bb0571449d76b98f3faf9305c6b7408 /clang/lib/Sema/SemaDeclCXX.cpp
parent38a2f500702323c99c12b0f9dc94670381e2fb90 (diff)
downloadbcm5719-llvm-dea9d57d95b94f3305338e4c4123569b1a8f245c.tar.gz
bcm5719-llvm-dea9d57d95b94f3305338e4c4123569b1a8f245c.zip
[clang] Small improvments after Adding APValue to ConstantExpr
Summary: this patch has multiple small improvements related to the APValue in ConstantExpr. changes: - APValue in ConstantExpr are now cleaned up using ASTContext::addDestruction instead of there own system. - ConstantExprBits Stores the ValueKind of the result beaing stored. - VerifyIntegerConstantExpression now stores the evaluated value in ConstantExpr. - the Constant Evaluator uses the stored value of ConstantExpr when available. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63376 llvm-svn: 364011
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 6dda693c6ad..0fda8ea515b 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -14013,8 +14013,6 @@ Decl *Sema::BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc,
ExprResult Converted = PerformContextuallyConvertToBool(AssertExpr);
if (Converted.isInvalid())
Failed = true;
- else
- Converted = ConstantExpr::Create(Context, Converted.get());
llvm::APSInt Cond;
if (!Failed && VerifyIntegerConstantExpression(Converted.get(), &Cond,
OpenPOWER on IntegriCloud