1 // RUN: %clang_cc1 -verify -ast-print %s -xc -DDEF_BOOL_CBOOL \
2 // RUN: | FileCheck %s --check-prefixes=BOOL-AS-CBOOL,CBOOL
4 // RUN: %clang_cc1 -verify -ast-print %s -xc -DDEF_BOOL_CBOOL -DDIAG \
5 // RUN: | FileCheck %s --check-prefixes=BOOL-AS-CBOOL,CBOOL
7 // RUN: %clang_cc1 -verify -ast-print %s -xc -DDEF_BOOL_INT \
8 // RUN: | FileCheck %s --check-prefixes=BOOL-AS-INT,CBOOL
10 // RUN: %clang_cc1 -verify -ast-print %s -xc -DDEF_BOOL_INT -DDIAG \
11 // RUN: | FileCheck %s --check-prefixes=BOOL-AS-INT,CBOOL
13 // RUN: %clang_cc1 -verify -ast-print %s -xc++ \
14 // RUN: | FileCheck %s --check-prefixes=BOOL-AS-BOOL
16 // RUN: %clang_cc1 -verify -ast-print %s -xc++ -DDIAG \
17 // RUN: | FileCheck %s --check-prefixes=BOOL-AS-BOOL
25 // BOOL-AS-CBOOL: _Bool i;
26 // BOOL-AS-INT: int i;
27 // BOOL-AS-BOOL: bool i;
35 // Induce a diagnostic (and verify we actually managed to do so), which used to
36 // permanently alter the -ast-print printing policy for _Bool. How bool is
37 // defined by the preprocessor is examined only once per compilation, when the
38 // diagnostic is emitted, and it used to affect the entirety of -ast-print, so
39 // test only one definition of bool per compilation.
41 void fn(void) { 1; } // expected-warning {{expression result unused}}
43 // expected-no-diagnostics