annotate clang/test/Frontend/verify2.c @ 165:597b3f1c2c93

fix call createTailCallEliminationPass
author anatofuz
date Tue, 24 Mar 2020 15:30:52 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 #if 0
anatofuz
parents:
diff changeset
2 // RUN: not %clang_cc1 -verify %s 2>&1 | FileCheck %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 // Please note that all comments are inside "#if 0" blocks so that
anatofuz
parents:
diff changeset
5 // VerifyDiagnosticConsumer sees no comments while processing this
anatofuz
parents:
diff changeset
6 // test-case (and hence no expected-* directives).
anatofuz
parents:
diff changeset
7 #endif
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 #include "verify2.h"
anatofuz
parents:
diff changeset
10 #error source
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 #if 0
anatofuz
parents:
diff changeset
13 // expected-error {{should be ignored}}
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 // CHECK: error: no expected directives found: consider use of 'expected-no-diagnostics'
anatofuz
parents:
diff changeset
16 // CHECK-NEXT: error: 'error' diagnostics seen but not expected:
anatofuz
parents:
diff changeset
17 // CHECK-NEXT: Line 5: header
anatofuz
parents:
diff changeset
18 // CHECK-NEXT: Line 10: source
anatofuz
parents:
diff changeset
19 // CHECK-NEXT: 3 errors generated.
anatofuz
parents:
diff changeset
20 #endif
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 #ifdef CHECK2
anatofuz
parents:
diff changeset
23 // RUN: not %clang_cc1 -DCHECK2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 // The following checks that -verify can match "any line" in an included file.
anatofuz
parents:
diff changeset
26 // The location of the diagnostic need therefore only match in the file, not to
anatofuz
parents:
diff changeset
27 // a specific line number. This is useful where -verify is used as a testing
anatofuz
parents:
diff changeset
28 // tool for 3rd-party libraries where headers may change and the specific line
anatofuz
parents:
diff changeset
29 // number of a diagnostic in a header is not important.
anatofuz
parents:
diff changeset
30
anatofuz
parents:
diff changeset
31 // expected-error@verify2.h:* {{header}}
anatofuz
parents:
diff changeset
32 // expected-error@verify2.h:* {{unknown}}
anatofuz
parents:
diff changeset
33
anatofuz
parents:
diff changeset
34 // CHECK2: error: 'error' diagnostics expected but not seen:
anatofuz
parents:
diff changeset
35 // CHECK2-NEXT: File {{.*}}verify2.h Line * (directive at {{.*}}verify2.c:32): unknown
anatofuz
parents:
diff changeset
36 // CHECK2-NEXT: error: 'error' diagnostics seen but not expected:
anatofuz
parents:
diff changeset
37 // CHECK2-NEXT: File {{.*}}verify2.c Line 10: source
anatofuz
parents:
diff changeset
38 // CHECK2-NEXT: 2 errors generated.
anatofuz
parents:
diff changeset
39 #endif