diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-04-05 13:16:29 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-04-05 13:16:29 +0000 |
| commit | faa4905e0c5e40b5131793cab909f3ecd913dd9b (patch) | |
| tree | c5b65f338e0c1995b285dc25dc47d730c98f7949 /clang/test/Analysis/inline4.c | |
| parent | 973b5f55f85428085c2206920a96d2c5496a8615 (diff) | |
| download | bcm5719-llvm-faa4905e0c5e40b5131793cab909f3ecd913dd9b.tar.gz bcm5719-llvm-faa4905e0c5e40b5131793cab909f3ecd913dd9b.zip | |
Always assume block-level expressions in the caller are alive when analyzing
the callee.
llvm-svn: 100429
Diffstat (limited to 'clang/test/Analysis/inline4.c')
| -rw-r--r-- | clang/test/Analysis/inline4.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Analysis/inline4.c b/clang/test/Analysis/inline4.c new file mode 100644 index 00000000000..dd2379f0438 --- /dev/null +++ b/clang/test/Analysis/inline4.c @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -analyze -inline-call -analyzer-store region -analyze-function f -verify %s + +int g(int a) { + return a; +} + +int f(int a) { + // Do not remove block-level expression bindings of caller when analyzing + // in the callee. + if (1 && g(a)) // The binding of '1 && g(a)' which is an UndefinedVal + // carries important information. + return 1; + return 0; +} |

