minix/external/bsd/llvm/dist/clang/test/Analysis/svalbuilder-logic.c
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

16 lines
425 B
C

// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix -verify %s
// expected-no-diagnostics
// Testing core functionality of the SValBuilder.
int SValBuilderLogicNoCrash(int *x) {
return 3 - (int)(x +3);
}
// http://llvm.org/bugs/show_bug.cgi?id=15863
// Don't crash when mixing 'bool' and 'int' in implicit comparisons to 0.
void pr15863() {
extern int getBool();
_Bool a = getBool();
(void)!a; // no-warning
}