Mercurial > hg > CbC > CbC_llvm
annotate clang/test/Analysis/svalbuilder-logic.c @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children | 0572611fdcc8 |
rev | line source |
---|---|
150 | 1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -verify %s |
2 // expected-no-diagnostics | |
3 | |
4 // Testing core functionality of the SValBuilder. | |
5 | |
6 int SValBuilderLogicNoCrash(int *x) { | |
7 return 3 - (int)(x +3); | |
8 } | |
9 | |
10 // http://llvm.org/bugs/show_bug.cgi?id=15863 | |
11 // Don't crash when mixing 'bool' and 'int' in implicit comparisons to 0. | |
12 void pr15863() { | |
13 extern int getBool(); | |
14 _Bool a = getBool(); | |
15 (void)!a; // no-warning | |
16 } |