diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-05-21 15:48:33 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-05-21 15:48:33 +0000 |
commit | b120ff1b954cf1cc2e9cc4bc5d8118f92162f85d (patch) | |
tree | 3ce085daeed11cbf9d03e3d3b37749ad71601a18 /clang/lib/Analysis/GRExprEngine.cpp | |
parent | 78d66e4ac1435959f12e1d868188bf5295557d50 (diff) | |
download | bcm5719-llvm-b120ff1b954cf1cc2e9cc4bc5d8118f92162f85d.tar.gz bcm5719-llvm-b120ff1b954cf1cc2e9cc4bc5d8118f92162f85d.zip |
Fixed bug in the transfer function for dereferences: the loaded value from EvalLoad should bind to the UnaryOperator*, not its subexpression.
Added test case to exercise this fix when checking for uses of uninitialized values.
Patch by Zhongxing Xu!
llvm-svn: 51377
Diffstat (limited to 'clang/lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | clang/lib/Analysis/GRExprEngine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index 71d7ed34035..ce64875797c 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/lib/Analysis/GRExprEngine.cpp @@ -1596,7 +1596,7 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, NodeTy* Pred, if (asLVal) MakeNode(Dst, U, *I, SetRVal(St, U, location)); else - EvalLoad(Dst, Ex, *I, St, location); + EvalLoad(Dst, U, *I, St, location); } return; |