blob: 1595acb9356944617e1fc69ebd85a2fe4c1e10a5 [file] [log] [blame]
Dominic Chen184c6242017-03-03 18:02:02 +00001// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s
Andy Gibbsc6e68da2012-10-19 12:44:48 +00002// expected-no-diagnostics
Anna Zaks06be9112012-05-02 00:05:23 +00003
4// Testing core functionality of the SValBuilder.
5
6int SValBuilderLogicNoCrash(int *x) {
7 return 3 - (int)(x +3);
8}
Jordan Rosedc166282013-05-01 18:19:59 +00009
10// http://llvm.org/bugs/show_bug.cgi?id=15863
11// Don't crash when mixing 'bool' and 'int' in implicit comparisons to 0.
12void pr15863() {
13 extern int getBool();
14 _Bool a = getBool();
15 (void)!a; // no-warning
16}