diff options
author | Anna Zaks <ganna@apple.com> | 2012-05-07 19:40:49 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-05-07 19:40:49 +0000 |
commit | 386e832c07a32c6e82dc3ec25907bccfd2e08261 (patch) | |
tree | f1214821bd30d0102f7be88dd39f4f1cb5d6fc62 /clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | |
parent | e65f4e66ac752d5ca75720d9ae1a94f39c52a75d (diff) | |
download | bcm5719-llvm-386e832c07a32c6e82dc3ec25907bccfd2e08261.tar.gz bcm5719-llvm-386e832c07a32c6e82dc3ec25907bccfd2e08261.zip |
[analyzer] Fix a crash in triggered by OSAtomicChecker.
SValBuilder should return an UnknownVal() when comparison of int and ptr
fails. Previous to this commit, it went on assuming that we are dealing
with pointer arithmetic.
PR12509, radar://11390991
llvm-svn: 156320
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp b/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp index 34e8aaf071b..9c5590bf1ce 100644 --- a/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp +++ b/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp @@ -875,6 +875,7 @@ SVal SimpleSValBuilder::evalBinOpLN(ProgramStateRef state, return evalBinOpLL(state, op, lhs, loc::ConcreteInt(*x), resultTy); } } + return UnknownVal(); } // We are dealing with pointer arithmetic. |