diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-11-22 13:21:46 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-11-22 13:21:46 +0000 |
commit | 4d45b34a8ad55041191973a711c0d2dd8ab18b95 (patch) | |
tree | 8b92a7a13f478069d20fadf1c33dbc7a680eaf24 /clang/lib/Analysis/GRExprEngine.cpp | |
parent | 3b0f3ef97eee2c21f03d66885b2d89e592f53545 (diff) | |
download | bcm5719-llvm-4d45b34a8ad55041191973a711c0d2dd8ab18b95.tar.gz bcm5719-llvm-4d45b34a8ad55041191973a711c0d2dd8ab18b95.zip |
Initial support for checking out of bound memory access. Only support
ConcreteInt index for now.
llvm-svn: 59869
Diffstat (limited to 'clang/lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | clang/lib/Analysis/GRExprEngine.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index db325fb9f9a..6de910fc171 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/lib/Analysis/GRExprEngine.cpp @@ -1084,9 +1084,14 @@ const GRState* GRExprEngine::EvalLocation(Stmt* Ex, NodeTy* Pred, bool isFeasibleOutBound = false; const GRState* StOutBound = AssumeInBound(StNotNull, Idx, NumElements, false, isFeasibleOutBound); - StInBound = StOutBound = 0; // FIXME: squeltch warning. - // Report warnings ... + if (isFeasibleOutBound) { + // Report warning. + + StOutBound = 0; + } + + return isFeasibleInBound ? StInBound : NULL; } } |