diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-25 03:18:57 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-25 03:18:57 +0000 |
| commit | 33f13595c90c69e8e4938200f7777df5930b8880 (patch) | |
| tree | 9bff791619a5aa48e8112e53b674f3eb59b60aa6 /clang/test/Analysis | |
| parent | 7514633c2665048fa7797152b69bea7d149ee821 (diff) | |
| download | bcm5719-llvm-33f13595c90c69e8e4938200f7777df5930b8880.tar.gz bcm5719-llvm-33f13595c90c69e8e4938200f7777df5930b8880.zip | |
handle CXXFunctionalCastExpr in visitLValue and Environment.
llvm-svn: 120143
Diffstat (limited to 'clang/test/Analysis')
| -rw-r--r-- | clang/test/Analysis/method-call.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Analysis/method-call.cpp b/clang/test/Analysis/method-call.cpp index 6cfbda895de..8c6b9da0f40 100644 --- a/clang/test/Analysis/method-call.cpp +++ b/clang/test/Analysis/method-call.cpp @@ -17,3 +17,14 @@ void f1() { } } +void f2() { + const A &x = A(3); + if (x.getx() == 3) { + int *p = 0; + *p = 3; // expected-warning{{Dereference of null pointer}} + } else { + int *p = 0; + *p = 3; // no-warning + } +} + |

