summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2011-11-01 20:38:59 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2011-11-01 20:38:59 +0000
commit1f1f2d8ca39f038e6f6d52771efe62b319efcdb2 (patch)
treeaf5d65343b78e089b584a3b92d93ad4239026e9d /clang/lib/AST/ExprConstant.cpp
parentfa7d9360f00a4a07ac6783aca4ff7908df7598b8 (diff)
downloadbcm5719-llvm-1f1f2d8ca39f038e6f6d52771efe62b319efcdb2.tar.gz
bcm5719-llvm-1f1f2d8ca39f038e6f6d52771efe62b319efcdb2.zip
Temporarily disable lvalue-to-rvalue conversions on const pointers while an
apparent miscompile triggered by this is investigated. This is essentially a revert of r143298. llvm-svn: 143491
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r--clang/lib/AST/ExprConstant.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 7fe03b58a05..4dd49c91250 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -461,7 +461,8 @@ bool HandleLValueToRValueConversion(EvalInfo &Info, QualType Type,
// them are not permitted.
const VarDecl *VD = dyn_cast<VarDecl>(D);
if (!VD || !(IsConstNonVolatile(VD->getType()) || isa<ParmVarDecl>(VD)) ||
- !Type->isLiteralType() || !EvaluateVarDeclInit(Info, VD, Frame, RVal))
+ !(Type->isIntegralOrEnumerationType() || Type->isRealFloatingType()) ||
+ !EvaluateVarDeclInit(Info, VD, Frame, RVal))
return false;
if (isa<ParmVarDecl>(VD) || !VD->getAnyInitializer()->isLValue())
OpenPOWER on IntegriCloud