diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-08-21 20:52:19 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-08-21 20:52:19 +0000 |
commit | 81125c449708be9fa520ee6e823dd29f9023e930 (patch) | |
tree | 090d996d97409a9e1dfcae0bf8ad7d24340618cc /clang/test/Analysis/reference.cpp | |
parent | da32944cac23abc9d4f4c2766d70c2fda38b56da (diff) | |
download | llvm-81125c449708be9fa520ee6e823dd29f9023e930.zip llvm-81125c449708be9fa520ee6e823dd29f9023e930.tar.gz llvm-81125c449708be9fa520ee6e823dd29f9023e930.tar.bz2 |
[analyzer] Push "references are non-null" knowledge up to the common parent.
This reduces duplication across the Basic and Range constraint managers, and
keeps their internals free of dealing with the semantics of C++. It's still
a little unfortunate that the constraint manager is dealing with this at all,
but this is pretty much the only place to put it so that it will apply to all
symbolic values, even when embedded in larger expressions.
llvm-svn: 162313
Diffstat (limited to 'clang/test/Analysis/reference.cpp')
-rw-r--r-- | clang/test/Analysis/reference.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Analysis/reference.cpp b/clang/test/Analysis/reference.cpp index d901bfe..f9a7e66 100644 --- a/clang/test/Analysis/reference.cpp +++ b/clang/test/Analysis/reference.cpp @@ -119,6 +119,9 @@ void testReferenceAddress(int &x) { extern S *getS(); clang_analyzer_eval(&getS()->x != 0); // expected-warning{{TRUE}} + + // This actually takes a different path, because it's not a BinaryOperator. + clang_analyzer_eval(&getS()->x); // expected-warning{{TRUE}} } |