summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-04-05 05:56:31 +0000
committerTed Kremenek <kremenek@apple.com>2012-04-05 05:56:31 +0000
commit34ac1cf3cdc49e122ec2a3a5769057f54c4e66c7 (patch)
treec1c00c9b1be366c64f71f0659d453af911ede8d5 /clang/lib
parent00fa5968cbd2f7709da707f3a31c53e3f6c34537 (diff)
downloadbcm5719-llvm-34ac1cf3cdc49e122ec2a3a5769057f54c4e66c7.tar.gz
bcm5719-llvm-34ac1cf3cdc49e122ec2a3a5769057f54c4e66c7.zip
Handle symbolicating a reference in an initializer expression that we don't understand.
llvm-svn: 154084
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index f277a2eaacb..ee2d052f281 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -375,7 +375,12 @@ void ExprEngine::VisitDeclStmt(const DeclStmt *DS, ExplodedNode *Pred,
// Recover some path-sensitivity if a scalar value evaluated to
// UnknownVal.
if (InitVal.isUnknown()) {
- InitVal = svalBuilder.getConjuredSymbolVal(NULL, InitEx, LC,
+ QualType Ty = InitEx->getType();
+ if (InitEx->isLValue()) {
+ Ty = getContext().getPointerType(Ty);
+ }
+
+ InitVal = svalBuilder.getConjuredSymbolVal(NULL, InitEx, LC, Ty,
currentBuilderContext->getCurrentBlockCount());
}
B.takeNodes(N);
OpenPOWER on IntegriCloud