aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/SValuator.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-01-05 09:27:03 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-01-05 09:27:03 +0000
commit5ea95fc163e9fb4fd7506b6a0c26decd67022943 (patch)
treed0cdcddedf410e2acde9fde2cfcf195bd25d9e22 /lib/Analysis/SValuator.cpp
parentc1ae0a8b0022a9fbb50d3413139f36ec5d8a63be (diff)
Revert r92318. Instead fix the analyzer: do not call
ASTContext::hasSameUnqualifiedType() when one of the type is VariableArrayType. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92723 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/SValuator.cpp')
-rw-r--r--lib/Analysis/SValuator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/SValuator.cpp b/lib/Analysis/SValuator.cpp
index 49bc0c4c59..0e56026bb4 100644
--- a/lib/Analysis/SValuator.cpp
+++ b/lib/Analysis/SValuator.cpp
@@ -62,8 +62,9 @@ SValuator::CastResult SValuator::EvalCast(SVal val, const GRState *state,
ASTContext &C = ValMgr.getContext();
// For const casts, just propagate the value.
- if (C.hasSameUnqualifiedType(castTy, originalTy))
- return CastResult(state, val);
+ if (!castTy->isVariableArrayType() && !originalTy->isVariableArrayType())
+ if (C.hasSameUnqualifiedType(castTy, originalTy))
+ return CastResult(state, val);
// Check for casts from pointers to integers.
if (castTy->isIntegerType() && Loc::IsLocType(originalTy))