Jordan Rose | ee04959 | 2012-08-21 21:44:07 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Zhongxing Xu | 1c625f2 | 2010-05-06 03:38:27 +0000 | [diff] [blame] | 3 | |
Zhongxing Xu | 7b73b92 | 2010-04-05 13:16:29 +0000 | [diff] [blame] | 4 | int g(int a) { |
| 5 | return a; |
| 6 | } |
| 7 | |
| 8 | int f(int a) { |
| 9 | // Do not remove block-level expression bindings of caller when analyzing |
| 10 | // in the callee. |
| 11 | if (1 && g(a)) // The binding of '1 && g(a)' which is an UndefinedVal |
| 12 | // carries important information. |
| 13 | return 1; |
| 14 | return 0; |
| 15 | } |