aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ExprEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-03-22 21:42:31 +0000
committerTed Kremenek <kremenek@apple.com>2012-03-22 21:42:31 +0000
commit5aac0b6ae95f137b1783f3e6227241fb457b8f8b (patch)
tree5383ff9509cccf706c2301c1ac4c61cc7bec1f57 /lib/StaticAnalyzer/Core/ExprEngine.cpp
parent638e2d31fceed041e7e16aada4188c94cb5797bb (diff)
Fix static analyzer crash on code taking the address of a field. Fixes PR 11146.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngine.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 051c31a554..1bbcf1e689 100644
--- a/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -1384,6 +1384,13 @@ void ExprEngine::VisitCommonDeclRefExpr(const Expr *Ex, const NamedDecl *D,
ProgramPoint::PostLValueKind);
return;
}
+ if (isa<FieldDecl>(D)) {
+ // FIXME: Compute lvalue of fields.
+ Bldr.generateNode(Ex, Pred, state->BindExpr(Ex, LCtx, UnknownVal()),
+ false, 0, ProgramPoint::PostLValueKind);
+ return;
+ }
+
assert (false &&
"ValueDecl support for this ValueDecl not implemented.");
}