1
- // RUN: not %target-swift-frontend -typecheck -diagnostic-style llvm -warnings-as-errors %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WAE-ALL
2
- // RUN: not %target-swift-frontend -typecheck -diagnostic-style llvm -warning-as-error availability_deprecated %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WAE-GROUP
3
- // RUN: not %target-swift-frontend -typecheck -diagnostic-style llvm -warning-as-error deprecated %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WAE-SUPERGROUP
4
- // RUN: %target-swift-frontend -typecheck -diagnostic-style llvm -warnings-as-errors -no-warnings-as-errors %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WAE-ALL-NWAE-ALL
5
- // RUN: %target-swift-frontend -typecheck -diagnostic-style llvm -warnings-as-errors -no-warning-as-error availability_deprecated %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WAE-ALL-NWAE-GROUP
6
- // RUN: %target-swift-frontend -typecheck -diagnostic-style llvm -warnings-as-errors -no-warning-as-error deprecated %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WAE-ALL-NWAE-SUPERGROUP
7
- // RUN: %target-swift-frontend -typecheck -diagnostic-style llvm -warning-as-error deprecated -no-warning-as-error availability_deprecated %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WAE-SUPERGROUP-NWAE-GROUP
1
+ // RUN: not %target-swift-frontend -typecheck -diagnostic-style llvm -warnings-as-errors %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WAE
2
+ // RUN: not %target-swift-frontend -typecheck -diagnostic-style llvm -Werror availability_deprecated %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WE-GROUP
3
+ // RUN: not %target-swift-frontend -typecheck -diagnostic-style llvm -Werror deprecated %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WE-SUPERGROUP
4
+ // RUN: %target-swift-frontend -typecheck -diagnostic-style llvm -warnings-as-errors -no-warnings-as-errors %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WAE-NWAE
5
+ // RUN: %target-swift-frontend -typecheck -diagnostic-style llvm -warnings-as-errors -Wwarning availability_deprecated %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WAE-WW-GROUP
6
+ // RUN: %target-swift-frontend -typecheck -diagnostic-style llvm -warnings-as-errors -Wwarning deprecated %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WAE-WW-SUPERGROUP
7
+ // RUN: %target-swift-frontend -typecheck -diagnostic-style llvm -Werror deprecated -Wwarning availability_deprecated %s 2>&1 | %FileCheck %s --check-prefix=CHECK-WE-SUPERGROUP-WW-GROUP
8
+
9
+ // This test verifies that the warning control flags apply with respect to
10
+ // the order they are specified in the cmd line.
11
+ // Naming:
12
+ // WAE: -warnings-as-errors
13
+ // NWAE: -no-warnings-as-errors
14
+ // WE-xxxx: -Werror xxxx
15
+ // WW-xxxx: -Wwarning xxxx
16
+ // GROUP - refers to a narrower group
17
+ // SUPERGROUP - refers to a broader group that includes GROUP
8
18
9
19
10
20
@available ( * , deprecated)
@@ -16,35 +26,35 @@ func bar() {
16
26
}
17
27
18
28
19
- // CHECK-WAE-ALL : error: 'foo()' is deprecated
20
- // CHECK-WAE-ALL- NOT: warning: 'foo()' is deprecated
21
- // CHECK-WAE -GROUP: error: 'foo()' is deprecated
22
- // CHECK-WAE -GROUP-NOT: warning: 'foo()' is deprecated
23
- // CHECK-WAE -SUPERGROUP: error: 'foo()' is deprecated
24
- // CHECK-WAE -SUPERGROUP-NOT: warning: 'foo()' is deprecated
25
- // CHECK-WAE-ALL- NWAE-ALL : warning: 'foo()' is deprecated
26
- // CHECK-WAE-ALL- NWAE-ALL -NOT: error: 'foo()' is deprecated
27
- // CHECK-WAE-ALL-NWAE -GROUP: warning: 'foo()' is deprecated
28
- // CHECK-WAE-ALL-NWAE -GROUP-NOT: error: 'foo()' is deprecated
29
- // CHECK-WAE-ALL-NWAE -SUPERGROUP: warning: 'foo()' is deprecated
30
- // CHECK-WAE-ALL-NWAE -SUPERGROUP-NOT: error: 'foo()' is deprecated
31
- // CHECK-WAE -SUPERGROUP-NWAE -GROUP: warning: 'foo()' is deprecated
32
- // CHECK-WAE -SUPERGROUP-NWAE -GROUP-NOT: error: 'foo()' is deprecated
29
+ // CHECK-WAE: error: 'foo()' is deprecated
30
+ // CHECK-WAE-NOT: warning: 'foo()' is deprecated
31
+ // CHECK-WE -GROUP: error: 'foo()' is deprecated
32
+ // CHECK-WE -GROUP-NOT: warning: 'foo()' is deprecated
33
+ // CHECK-WE -SUPERGROUP: error: 'foo()' is deprecated
34
+ // CHECK-WE -SUPERGROUP-NOT: warning: 'foo()' is deprecated
35
+ // CHECK-WAE-NWAE: warning: 'foo()' is deprecated
36
+ // CHECK-WAE-NWAE-NOT: error: 'foo()' is deprecated
37
+ // CHECK-WAE-WW -GROUP: warning: 'foo()' is deprecated
38
+ // CHECK-WAE-WW -GROUP-NOT: error: 'foo()' is deprecated
39
+ // CHECK-WAE-WW -SUPERGROUP: warning: 'foo()' is deprecated
40
+ // CHECK-WAE-WW -SUPERGROUP-NOT: error: 'foo()' is deprecated
41
+ // CHECK-WE -SUPERGROUP-WW -GROUP: warning: 'foo()' is deprecated
42
+ // CHECK-WE -SUPERGROUP-WW -GROUP-NOT: error: 'foo()' is deprecated
33
43
foo ( )
34
44
35
45
36
- // CHECK-WAE-ALL : error: 'bar()' is deprecated: renamed to 'bar2'
37
- // CHECK-WAE-ALL- NOT: warning: 'bar()' is deprecated: renamed to 'bar2'
38
- // CHECK-WAE -GROUP: error: 'bar()' is deprecated: renamed to 'bar2'
39
- // CHECK-WAE -GROUP-NOT: warning: 'bar()' is deprecated: renamed to 'bar2'
40
- // CHECK-WAE -SUPERGROUP: error: 'bar()' is deprecated: renamed to 'bar2'
41
- // CHECK-WAE -SUPERGROUP-NOT: warning: 'bar()' is deprecated: renamed to 'bar2'
42
- // CHECK-WAE-ALL- NWAE-ALL : warning: 'bar()' is deprecated: renamed to 'bar2'
43
- // CHECK-WAE-ALL- NWAE-ALL -NOT: error: 'bar()' is deprecated: renamed to 'bar2'
44
- // CHECK-WAE-ALL-NWAE -GROUP: warning: 'bar()' is deprecated: renamed to 'bar2'
45
- // CHECK-WAE-ALL-NWAE -GROUP-NOT: error: 'bar()' is deprecated: renamed to 'bar2'
46
- // CHECK-WAE-ALL-NWAE -SUPERGROUP: warning: 'bar()' is deprecated: renamed to 'bar2'
47
- // CHECK-WAE-ALL-NWAE -SUPERGROUP-NOT: error: 'bar()' is deprecated: renamed to 'bar2'
48
- // CHECK-WAE -SUPERGROUP-NWAE -GROUP: warning: 'bar()' is deprecated: renamed to 'bar2'
49
- // CHECK-WAE -SUPERGROUP-NWAE -GROUP-NOT: error: 'bar()' is deprecated: renamed to 'bar2'
46
+ // CHECK-WAE: error: 'bar()' is deprecated: renamed to 'bar2'
47
+ // CHECK-WAE-NOT: warning: 'bar()' is deprecated: renamed to 'bar2'
48
+ // CHECK-WE -GROUP: error: 'bar()' is deprecated: renamed to 'bar2'
49
+ // CHECK-WE -GROUP-NOT: warning: 'bar()' is deprecated: renamed to 'bar2'
50
+ // CHECK-WE -SUPERGROUP: error: 'bar()' is deprecated: renamed to 'bar2'
51
+ // CHECK-WE -SUPERGROUP-NOT: warning: 'bar()' is deprecated: renamed to 'bar2'
52
+ // CHECK-WAE-NWAE: warning: 'bar()' is deprecated: renamed to 'bar2'
53
+ // CHECK-WAE-NWAE-NOT: error: 'bar()' is deprecated: renamed to 'bar2'
54
+ // CHECK-WAE-WW -GROUP: warning: 'bar()' is deprecated: renamed to 'bar2'
55
+ // CHECK-WAE-WW -GROUP-NOT: error: 'bar()' is deprecated: renamed to 'bar2'
56
+ // CHECK-WAE-WW -SUPERGROUP: warning: 'bar()' is deprecated: renamed to 'bar2'
57
+ // CHECK-WAE-WW -SUPERGROUP-NOT: error: 'bar()' is deprecated: renamed to 'bar2'
58
+ // CHECK-WE -SUPERGROUP-WW -GROUP: warning: 'bar()' is deprecated: renamed to 'bar2'
59
+ // CHECK-WE -SUPERGROUP-WW -GROUP-NOT: error: 'bar()' is deprecated: renamed to 'bar2'
50
60
bar ( )
0 commit comments