[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Misc / diag-style.cpp
blob626edef9b7e614958646ad4fe3816f50ddda13d5
1 // RUN: not %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck -strict-whitespace %s
3 /// empty lines in multi-line diagnostic snippets are preserved.
4 static_assert(false &&
6 true, "");
7 // CHECK: static assertion failed
8 // CHECK-NEXT: {{^}} 4 | static_assert(false &&{{$}}
9 // CHECK-NEXT: {{^}} | ^~~~~~~~{{$}}
10 // CHECK-NEXT: {{^}} 5 | {{$}}
11 // CHECK-NEXT: {{^}} 6 | true, "");{{$}}
12 // CHECK-NEXT: {{^}} | ~~~~{{$}}
15 /// #line pragmas are respected
16 void printf(const char *a, ...) __attribute__((__format__(__printf__, 1, 2)));
17 #line 10
18 void f(int x) {
19 printf("%f",
20 x);
22 // CHECK: 12:10: warning: format specifies type
23 // CHECK-NEXT: {{^}} 11 |
24 // CHECK-NEXT: {{^}} |
25 // CHECK-NEXT: {{^}} |
26 // CHECK-NEXT: {{^}} 12 |
28 #line 10
29 int func(
30 int a, int b,
31 int&
32 r);
34 void test() {
35 func(3, 4, 5);
37 // CHECK: 10:5: note: candidate function not viable
38 // CHECK-NEXT: {{^}} 10 |
39 // CHECK-NEXT: {{^}} |
40 // CHECK-NEXT: {{^}} 11 |
41 // CHECK-NEXT: {{^}} 12 |
42 // CHECK-NEXT: {{^}} |
43 // CHECK-NEXT: {{^}} 13 |
44 // CHECK-NEXT: {{^}} |