File tree Expand file tree Collapse file tree 4 files changed +40
-14
lines changed Expand file tree Collapse file tree 4 files changed +40
-14
lines changed Original file line number Diff line number Diff line change 1
- //RUN: rm -rf %t*
2
- //RUN: not 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes1b.c -- 2>%t.stderr
3
- //RUN: grep -q "merging failed" %t.stderr
1
+ // Since the RUN commands in difftypes1a.c and difftypes1b.c process the two
2
+ // files in different orders and the location where the error is reported
3
+ // depends on the order, we need to use a different diagnostic verification
4
+ // prefix (and set of corresponding comments) for each RUN command. Verification
5
+ // is per translation unit, so the translation unit with no diagnostic needs
6
+ // `expected-no-diagnostics`.
4
7
5
- // The desired behavior in this case is to fail, so other checks are omitted
8
+ //RUN: rm -rf %t*
9
+ //RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes1b.c -- -Xclang -verify=ab-expected
6
10
11
+ // ab-expected-no-diagnostics
12
+ // ba-expected-error@+1 {{merging failed for 'foo'}}
7
13
_Ptr < int > foo (int , char ) ;
Original file line number Diff line number Diff line change 1
- //RUN: rm -rf %t*
2
- //RUN: not 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes1a.c -- 2>%t.stderr
3
- //RUN: grep -q "merging failed" %t.stderr
1
+ // Since the RUN commands in difftypes1a.c and difftypes1b.c process the two
2
+ // files in different orders and the location where the error is reported
3
+ // depends on the order, we need to use a different diagnostic verification
4
+ // prefix (and set of corresponding comments) for each RUN command. Verification
5
+ // is per translation unit, so the translation unit with no diagnostic needs
6
+ // `expected-no-diagnostics`.
4
7
5
- // The desired behavior in this case is to fail, so other checks are omitted
8
+ //RUN: rm -rf %t*
9
+ //RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes1a.c -- -Xclang -verify=ba-expected
6
10
11
+ // ba-expected-no-diagnostics
12
+ // ab-expected-error@+1 {{merging failed for 'foo'}}
7
13
int * foo (int , char * );
Original file line number Diff line number Diff line change
1
+ // Since the RUN commands in difftypes2a.c and difftypes2b.c process the two
2
+ // files in different orders and the location where the error is reported
3
+ // depends on the order, we need to use a different diagnostic verification
4
+ // prefix (and set of corresponding comments) for each RUN command. Verification
5
+ // is per translation unit, so the translation unit with no diagnostic needs
6
+ // `expected-no-diagnostics`.
7
+
1
8
// RUN: rm -rf %t*
2
- // RUN: not 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes2b.c -- 2>%t.stderr
3
- // RUN: grep -q "merging failed" %t.stderr
9
+ // RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes2b.c -- -Xclang -verify=ab-expected
4
10
5
11
// The desired behavior in this case is to fail, so other checks are omitted
6
12
7
13
// Test no body vs body
8
14
15
+ // ab-expected-no-diagnostics
16
+ // ba-expected-error@+1 {{merging failed for 'foo'}}
9
17
void foo (char * x );
Original file line number Diff line number Diff line change 1
- // RUN: rm -rf %t*
2
- // RUN: not 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes2a.c -- 2>%t.stderr
3
- // RUN: grep -q "merging failed" %t.stderr
1
+ // Since the RUN commands in difftypes2a.c and difftypes2b.c process the two
2
+ // files in different orders and the location where the error is reported
3
+ // depends on the order, we need to use a different diagnostic verification
4
+ // prefix (and set of corresponding comments) for each RUN command. Verification
5
+ // is per translation unit, so the translation unit with no diagnostic needs
6
+ // `expected-no-diagnostics`.
4
7
5
- // The desired behavior in this case is to fail, so other checks are omitted
8
+ // RUN: rm -rf %t*
9
+ // RUN: 3c -base-dir=%S -output-dir=%t.checked %s %S/difftypes2a.c -- -Xclang -verify=ba-expected
6
10
7
11
// Test body vs no body
8
12
13
+ // ba-expected-no-diagnostics
14
+ // ab-expected-error@+1 {{merging failed for 'foo'}}
9
15
void foo (char * * y ) {
10
16
// this is the body
11
17
}
You can’t perform that action at this time.
0 commit comments