Skip to content

Commit 2423b7d

Browse files
committed
Update ASTMerge FileCheck test expectations
I belive many of these diagnostics changed from errors to warnings in r357394. I've simply mechanically updated the tests, but whoever owns this code should probably audit for unintented behavior changes. I wasn't able to find a flag to make these warnings errors again. llvm-svn: 360701
1 parent 48c4e4f commit 2423b7d

File tree

11 files changed

+64
-84
lines changed

11 files changed

+64
-84
lines changed

clang/test/ASTMerge/category/test.m

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// FIXME: Errors are now warnings.
2-
// XFAIL: *
31
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/category1.m
42
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/category2.m
5-
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
3+
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
64

7-
// CHECK: category2.m:18:1: error: instance method 'method2' has incompatible result types in different translation units ('float' vs. 'int')
5+
// CHECK: category2.m:18:1: warning: instance method 'method2' has incompatible result types in different translation units ('float' vs. 'int')
86
// CHECK: category1.m:16:1: note: instance method 'method2' also declared here
9-
// CHECK: category2.m:26:1: error: instance method 'method3' has incompatible result types in different translation units ('float' vs. 'int')
7+
// CHECK: category2.m:26:1: warning: instance method 'method3' has incompatible result types in different translation units ('float' vs. 'int')
108
// CHECK: category1.m:24:1: note: instance method 'method3' also declared here
11-
// CHECK: category2.m:48:1: error: instance method 'blah' has incompatible result types in different translation units ('int' vs. 'float')
9+
// CHECK: category2.m:48:1: warning: instance method 'blah' has incompatible result types in different translation units ('int' vs. 'float')
1210
// CHECK: category1.m:46:1: note: instance method 'blah' also declared here
13-
// CHECK: 3 errors generated.
11+
// CHECK: 3 warnings generated.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// FIXME: Errors are now warnings.
1+
// FIXME: Crashes after r357394
22
// XFAIL: *
33
// RUN: %clang_cc1 -emit-pch -std=c++1z -o %t.1.ast %S/Inputs/class-template-partial-spec1.cpp
44
// RUN: %clang_cc1 -emit-pch -std=c++1z -o %t.2.ast %S/Inputs/class-template-partial-spec2.cpp
5-
// RUN: not %clang_cc1 -std=c++1z -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
5+
// RUN: %clang_cc1 -std=c++1z -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
66

77
static_assert(sizeof(**SingleSource.member) == sizeof(**SingleDest.member));
88
static_assert(sizeof(SecondDoubleSource.member) == sizeof(SecondDoubleDest.member));
@@ -11,17 +11,17 @@ static_assert(sizeof(Z0Source.member) == sizeof(char));
1111
static_assert(sizeof(Dst::Z0Dst.member) == sizeof(double));
1212
static_assert(sizeof(One::Child1<double, One::Two::Three::Parent<double>>::member) == sizeof(double));
1313

14-
// CHECK: class-template-partial-spec2.cpp:21:32: error: external variable 'X1' declared with incompatible types in different translation units ('TwoOptionTemplate<int, double>' vs. 'TwoOptionTemplate<int, float>')
14+
// CHECK: class-template-partial-spec2.cpp:21:32: warning: external variable 'X1' declared with incompatible types in different translation units ('TwoOptionTemplate<int, double>' vs. 'TwoOptionTemplate<int, float>')
1515
// CHECK: class-template-partial-spec1.cpp:21:31: note: declared here with type 'TwoOptionTemplate<int, float>'
1616

17-
// CHECK: class-template-partial-spec2.cpp:24:29: error: external variable 'X4' declared with incompatible types in different translation units ('TwoOptionTemplate<int, int>' vs. 'TwoOptionTemplate<float, float>')
17+
// CHECK: class-template-partial-spec2.cpp:24:29: warning: external variable 'X4' declared with incompatible types in different translation units ('TwoOptionTemplate<int, int>' vs. 'TwoOptionTemplate<float, float>')
1818
// CHECK: class-template-partial-spec1.cpp:24:33: note: declared here with type 'TwoOptionTemplate<float, float>'
1919

2020
// CHECK: class-template-partial-spec1.cpp:38:8: warning: type 'IntTemplateSpec<5, void *>' has incompatible definitions in different translation units
2121
// CHECK: class-template-partial-spec1.cpp:39:7: note: field 'member' has type 'int' here
2222
// CHECK: class-template-partial-spec2.cpp:39:10: note: field 'member' has type 'double' here
2323

24-
// CHECK: class-template-partial-spec2.cpp:52:25: error: external variable 'Y3' declared with incompatible types in different translation units ('IntTemplateSpec<2, int>' vs. 'IntTemplateSpec<3, int>')
24+
// CHECK: class-template-partial-spec2.cpp:52:25: warning: external variable 'Y3' declared with incompatible types in different translation units ('IntTemplateSpec<2, int>' vs. 'IntTemplateSpec<3, int>')
2525
// CHECK: class-template-partial-spec1.cpp:52:25: note: declared here with type 'IntTemplateSpec<3, int>'
2626

2727
// CHECK-NOT: static_assert
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
1-
// FIXME: Errors are now warnings.
2-
// XFAIL: *
31
// RUN: %clang_cc1 -std=c++1z -emit-pch -o %t.1.ast %S/Inputs/class-template1.cpp
42
// RUN: %clang_cc1 -std=c++1z -emit-pch -o %t.2.ast %S/Inputs/class-template2.cpp
5-
// RUN: not %clang_cc1 -std=c++1z -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
3+
// RUN: %clang_cc1 -std=c++1z -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
64

75
static_assert(sizeof(X0<char>().getValue(1)) == sizeof(char));
86
static_assert(sizeof(X0<int>().getValue(1)) == sizeof(int));
97

10-
// CHECK: class-template1.cpp:9:14: error: non-type template parameter declared with incompatible types in different translation units ('int' vs. 'long')
8+
// CHECK: class-template1.cpp:9:14: warning: non-type template parameter declared with incompatible types in different translation units ('int' vs. 'long')
119
// CHECK: class-template2.cpp:9:15: note: declared here with type 'long'
1210

13-
// CHECK: class-template1.cpp:12:14: error: template parameter has different kinds in different translation units
11+
// CHECK: class-template1.cpp:12:14: warning: template parameter has different kinds in different translation units
1412
// CHECK: class-template2.cpp:12:10: note: template parameter declared here
1513

16-
// CHECK: class-template1.cpp:18:23: error: non-type template parameter declared with incompatible types in different translation units ('long' vs. 'int')
14+
// CHECK: class-template1.cpp:18:23: warning: non-type template parameter declared with incompatible types in different translation units ('long' vs. 'int')
1715
// CHECK: class-template2.cpp:18:23: note: declared here with type 'int'
1816

19-
// CHECK: class-template1.cpp:21:10: error: template parameter has different kinds in different translation units
17+
// CHECK: class-template1.cpp:21:10: warning: template parameter has different kinds in different translation units
2018
// CHECK: class-template2.cpp:21:10: note: template parameter declared here
2119

22-
// CHECK: class-template2.cpp:27:20: error: external variable 'x0r' declared with incompatible types in different translation units ('X0<double> *' vs. 'X0<float> *')
20+
// CHECK: class-template2.cpp:27:20: warning: external variable 'x0r' declared with incompatible types in different translation units ('X0<double> *' vs. 'X0<float> *')
2321
// CHECK: class-template1.cpp:26:19: note: declared here with type 'X0<float> *'
2422

2523
// CHECK: class-template1.cpp:35:8: warning: type 'X0<wchar_t>' has incompatible definitions in different translation units
2624
// CHECK: class-template1.cpp:36:7: note: field 'member' has type 'int' here
2725
// CHECK: class-template2.cpp:36:9: note: field 'member' has type 'float' here
2826

29-
// CHECK: 1 warning and 5 errors generated.
27+
// CHECK: 6 warnings generated.
3028
// CHECK-NOT: static_assert

clang/test/ASTMerge/enum/test.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
// FIXME: Errors are now warnings.
2-
// XFAIL: *
31
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/enum1.c
42
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/enum2.c
5-
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
3+
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
64

75
// CHECK: enum1.c:9:6: warning: type 'enum E2' has incompatible definitions in different translation units
86
// CHECK: enum1.c:11:3: note: enumerator 'E2Enumerator2' with value 3 here
97
// CHECK: enum2.c:11:3: note: enumerator 'E2Enumerator2' with value 4 here
10-
// CHECK: enum2.c:13:3: error: external variable 'x2' declared with incompatible types in different translation units ('enum E2' vs. 'enum E2')
8+
// CHECK: enum2.c:13:3: warning: external variable 'x2' declared with incompatible types in different translation units ('enum E2' vs. 'enum E2')
119
// CHECK: enum1.c:13:3: note: declared here with type 'enum E2'
1210
// CHECK: enum1.c:16:6: warning: type 'enum E3' has incompatible definitions in different translation units
1311
// CHECK: enum1.c:18:3: note: enumerator 'E3Enumerator2' with value 3 here
1412
// CHECK: enum2.c:18:3: note: enumerator 'E3Enumerator' with value 3 here
15-
// CHECK: enum2.c:20:3: error: external variable 'x3' declared with incompatible types in different translation units ('enum E3' vs. 'enum E3')
13+
// CHECK: enum2.c:20:3: warning: external variable 'x3' declared with incompatible types in different translation units ('enum E3' vs. 'enum E3')
1614
// CHECK: enum1.c:20:3: note: declared here with type 'enum E3'
1715
// CHECK: enum1.c:23:6: warning: type 'enum E4' has incompatible definitions in different translation units
1816
// CHECK: enum1.c:26:3: note: enumerator 'E4Enumerator3' with value 2 here
1917
// CHECK: enum2.c:23:6: note: no corresponding enumerator here
20-
// CHECK: enum2.c:26:3: error: external variable 'x4' declared with incompatible types in different translation units ('enum E4' vs. 'enum E4')
18+
// CHECK: enum2.c:26:3: warning: external variable 'x4' declared with incompatible types in different translation units ('enum E4' vs. 'enum E4')
2119
// CHECK: enum1.c:27:3: note: declared here with type 'enum E4'
2220
// CHECK: enum1.c:30:6: warning: type 'enum E5' has incompatible definitions in different translation units
2321
// CHECK: enum2.c:33:3: note: enumerator 'E5Enumerator4' with value 3 here
2422
// CHECK: enum1.c:30:6: note: no corresponding enumerator here
25-
// CHECK: enum2.c:34:3: error: external variable 'x5' declared with incompatible types in different translation units ('enum E5' vs. 'enum E5')
23+
// CHECK: enum2.c:34:3: warning: external variable 'x5' declared with incompatible types in different translation units ('enum E5' vs. 'enum E5')
2624
// CHECK: enum1.c:34:3: note: declared here with type 'enum E5'
27-
// CHECK: 4 warnings and 4 errors generated
25+
// CHECK: 8 warnings generated

clang/test/ASTMerge/function/test.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
// FIXME: Errors are now warnings.
2-
// XFAIL: *
31
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/function1.c
42
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/function2.c
5-
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
3+
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
64
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only -verify %s
75

8-
// CHECK: function2.c:3:6: error: external function 'f1' declared with incompatible types in different translation units ('void (Int, double)' (aka 'void (int, double)') vs. 'void (int, float)')
6+
// CHECK: function2.c:3:6: warning: external function 'f1' declared with incompatible types in different translation units ('void (Int, double)' (aka 'void (int, double)') vs. 'void (int, float)')
97
// CHECK: function1.c:2:6: note: declared here with type 'void (int, float)'
10-
// CHECK: function2.c:5:6: error: external function 'f3' declared with incompatible types in different translation units ('void (int)' vs. 'void (void)')
8+
// CHECK: function2.c:5:6: warning: external function 'f3' declared with incompatible types in different translation units ('void (int)' vs. 'void (void)')
119
// CHECK: function1.c:4:6: note: declared here with type 'void (void)'
12-
// CHECK: 2 errors generated
10+
// CHECK: 2 warnings generated
1311

14-
// expected-error@Inputs/function2.c:3 {{external function 'f1' declared with incompatible types}}
12+
// expected-warning@Inputs/function2.c:3 {{external function 'f1' declared with incompatible types}}
1513
// expected-note@Inputs/function1.c:2 {{declared here}}
16-
// expected-error@Inputs/function2.c:5 {{external function 'f3' declared with incompatible types}}
14+
// expected-warning@Inputs/function2.c:5 {{external function 'f3' declared with incompatible types}}
1715
// expected-note@Inputs/function1.c:4 {{declared here}}

clang/test/ASTMerge/interface/test.m

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
1-
// FIXME: Errors are now warnings.
2-
// XFAIL: *
31
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/interface1.m
42
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/interface2.m
5-
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
3+
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
64

7-
// CHECK: interface2.m:16:9: error: instance variable 'ivar2' declared with incompatible types in different translation units ('float' vs. 'int')
5+
// CHECK: interface2.m:16:9: warning: instance variable 'ivar2' declared with incompatible types in different translation units ('float' vs. 'int')
86
// CHECK: interface1.m:16:7: note: declared here with type 'int'
9-
// CHECK: interface1.m:21:12: error: class 'I4' has incompatible superclasses
7+
// CHECK: interface1.m:21:12: warning: class 'I4' has incompatible superclasses
108
// CHECK: interface1.m:21:17: note: inherits from superclass 'I2' here
119
// CHECK: interface2.m:21:17: note: inherits from superclass 'I1' here
12-
// CHECK: interface2.m:33:1: error: class method 'foo' has incompatible result types in different translation units ('float' vs. 'int')
10+
// CHECK: interface2.m:33:1: warning: class method 'foo' has incompatible result types in different translation units ('float' vs. 'int')
1311
// CHECK: interface1.m:34:1: note: class method 'foo' also declared here
14-
// CHECK: interface2.m:39:19: error: class method 'bar:' has a parameter with a different types in different translation units ('float' vs. 'int')
12+
// CHECK: interface2.m:39:19: warning: class method 'bar:' has a parameter with a different types in different translation units ('float' vs. 'int')
1513
// CHECK: interface1.m:40:17: note: declared here with type 'int'
16-
// CHECK: interface2.m:45:1: error: class method 'bar:' is variadic in one translation unit and not variadic in another
14+
// CHECK: interface2.m:45:1: warning: class method 'bar:' is variadic in one translation unit and not variadic in another
1715
// CHECK: interface1.m:46:1: note: class method 'bar:' also declared here
18-
// CHECK: interface2.m:57:20: error: instance method 'bar:' has a parameter with a different types in different translation units ('double' vs. 'float')
16+
// CHECK: interface2.m:57:20: warning: instance method 'bar:' has a parameter with a different types in different translation units ('double' vs. 'float')
1917
// CHECK: interface1.m:58:19: note: declared here with type 'float'
20-
// CHECK: interface1.m:100:17: error: class 'I15' has incompatible superclasses
18+
// CHECK: interface1.m:100:17: warning: class 'I15' has incompatible superclasses
2119
// CHECK: interface1.m:100:17: note: inherits from superclass 'I12' here
2220
// CHECK: interface2.m:99:17: note: inherits from superclass 'I11' here
23-
// CHECK: 8 errors generated
21+
// CHECK: 8 warnings generated
2422

clang/test/ASTMerge/namespace/test.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// FIXME: Errors are now warnings.
2-
// XFAIL: *
31
// RUN: %clang_cc1 -emit-pch -std=c++1z -o %t.1.ast %S/Inputs/namespace1.cpp
42
// RUN: %clang_cc1 -emit-pch -std=c++1z -o %t.2.ast %S/Inputs/namespace2.cpp
53
// RUN: not %clang_cc1 -std=c++1z -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
@@ -15,5 +13,5 @@ void testImport() {
1513
}
1614

1715

18-
// CHECK: namespace2.cpp:16:17: error: external variable 'z' declared with incompatible types in different translation units ('double' vs. 'float')
16+
// CHECK: namespace2.cpp:16:17: warning: external variable 'z' declared with incompatible types in different translation units ('double' vs. 'float')
1917
// CHECK: namespace1.cpp:16:16: note: declared here with type 'float'

clang/test/ASTMerge/property/test.m

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
// FIXME: Errors are now warnings.
2-
// XFAIL: *
31
// RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/property1.m
42
// RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/property2.m
5-
// RUN: not %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
3+
// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s
64

7-
// CHECK: property2.m:12:26: error: property 'Prop1' declared with incompatible types in different translation units ('int' vs. 'float')
5+
// CHECK: property2.m:12:26: warning: property 'Prop1' declared with incompatible types in different translation units ('int' vs. 'float')
86
// CHECK: property1.m:10:28: note: declared here with type 'float'
9-
// CHECK: property2.m:12:26: error: instance method 'Prop1' has incompatible result types in different translation units ('int' vs. 'float')
7+
// CHECK: property2.m:12:26: warning: instance method 'Prop1' has incompatible result types in different translation units ('int' vs. 'float')
108
// CHECK: property1.m:10:28: note: instance method 'Prop1' also declared here
11-
// CHECK: property1.m:28:21: error: property 'Prop2' is synthesized to different ivars in different translation units ('ivar3' vs. 'ivar2')
9+
// CHECK: property1.m:28:21: warning: property 'Prop2' is synthesized to different ivars in different translation units ('ivar3' vs. 'ivar2')
1210
// CHECK: property2.m:29:21: note: property is synthesized to ivar 'ivar2' here
13-
// CHECK: property1.m:29:10: error: property 'Prop3' is implemented with @dynamic in one translation but @synthesize in another translation unit
11+
// CHECK: property1.m:29:10: warning: property 'Prop3' is implemented with @dynamic in one translation but @synthesize in another translation unit
1412
// CHECK: property2.m:31:13: note: property 'Prop3' is implemented with @synthesize here
15-
// CHECK: 4 errors generated.
13+
// CHECK: 4 warnings generated.

0 commit comments

Comments
 (0)