diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-03 22:01:32 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-02-03 22:01:32 +0000 |
commit | 58f8b590e132dd74ad9035a82369205a95d807e8 (patch) | |
tree | 2e1ea4a7b3b6ad11160c515d0234bc91e5b7686d /clang/lib | |
parent | 4e03719cce3ce3d23f245ab3260bb3619005220f (diff) | |
download | bcm5719-llvm-58f8b590e132dd74ad9035a82369205a95d807e8.tar.gz bcm5719-llvm-58f8b590e132dd74ad9035a82369205a95d807e8.zip |
[analyzer] Fix a crash until we can handle temporary struct objects properly.
llvm-svn: 124822
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp index 79d2a2b2fc0..2dd2202f03f 100644 --- a/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/ExprEngine.cpp @@ -1716,7 +1716,11 @@ void ExprEngine::VisitMemberExpr(const MemberExpr* M, ExplodedNode* Pred, const GRState* state = GetState(*I); SVal baseExprVal = state->getSVal(baseExpr); if (isa<nonloc::LazyCompoundVal>(baseExprVal) || - isa<nonloc::CompoundVal>(baseExprVal)) { + isa<nonloc::CompoundVal>(baseExprVal) || + // FIXME: This can originate by conjuring a symbol for an unknown + // temporary struct object, see test/Analysis/fields.c: + // (p = getit()).x + isa<nonloc::SymbolVal>(baseExprVal)) { MakeNode(Dst, M, *I, state->BindExpr(M, UnknownVal())); continue; } |