[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Misc / diag-presumed.c
blob2f0506981440368a7d3a0870b6ce5bbf13493b22
1 // RUN: not %clang_cc1 -fsyntax-only -pedantic-errors %s 2>&1 | FileCheck %s --check-prefix=PRESUMED
2 // RUN: not %clang_cc1 -fsyntax-only -pedantic-errors -fno-diagnostics-use-presumed-location %s 2>&1 | FileCheck %s --check-prefix=SPELLING
4 #line 100
5 #define X(y) y
6 X(int n = error);
8 // PRESUMED: diag-presumed.c:101:11: error: use of undeclared identifier 'error'
9 // SPELLING: diag-presumed.c:6:11: error: use of undeclared identifier 'error'
12 // PRESUMED: diag-presumed.c:106:1: error: extra ';' outside of a functio
13 // SPELLING: diag-presumed.c:11:1: error: extra ';' outside of a functio
15 # 1 "thing1.cc" 1
16 # 1 "thing1.h" 1
17 # 1 "systemheader.h" 1 3
19 // No diagnostic here: we're in a system header, even if we're using spelling
20 // locations for the diagnostics..
21 // PRESUMED-NOT: extra ';'
22 // SPELLING-NOT: extra ';'
24 another error;
25 // PRESUMED: included from {{.*}}diag-presumed.c:110:
26 // PRESUMED: from thing1.cc:1:
27 // PRESUMED: from thing1.h:1:
28 // PRESUMED: systemheader.h:7:1: error: unknown type name 'another'
30 // SPELLING-NOT: included from
31 // SPELLING: diag-presumed.c:24:1: error: unknown type name 'another'
33 # 1 "thing1.h" 2
34 # 1 "thing1.cc" 2