You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Parse] Adjust diagnostic location for platform condition arguments
Previously, diagnostics for arguments of platform conditions (e.g.
'os(macOS)') used to point the condition name position instead of the
argument position.
Adjust the position to the start of the argument.
rdar://124160048
Copy file name to clipboardexpand all lines: test/Parse/ConditionalCompilation/language_version.swift
+9-6
Original file line number
Diff line number
Diff line change
@@ -53,16 +53,16 @@
53
53
%#^*&
54
54
#endif
55
55
56
-
#if swift(">=7.1") // expected-error {{unexpected platform condition argument: expected a unary comparison '>=' or '<'; for example, '>=2.2' or '<2.2'}}
56
+
#if swift(">=7.1") // expected-error@:11 {{unexpected platform condition argument: expected a unary comparison '>=' or '<'; for example, '>=2.2' or '<2.2'}}
57
57
#endif
58
58
59
-
#if swift("<7.1") // expected-error {{unexpected platform condition argument: expected a unary comparison '>=' or '<'; for example, '>=2.2' or '<2.2'}}
59
+
#if swift("<7.1") // expected-error@:11 {{unexpected platform condition argument: expected a unary comparison '>=' or '<'; for example, '>=2.2' or '<2.2'}}
60
60
#endif
61
61
62
-
#if swift(">=2n.2") // expected-error {{unexpected platform condition argument: expected a unary comparison '>=' or '<'; for example, '>=2.2' or '<2.2'}}
62
+
#if swift(">=2n.2") // expected-error@:11 {{unexpected platform condition argument: expected a unary comparison '>=' or '<'; for example, '>=2.2' or '<2.2'}}
63
63
#endif
64
64
65
-
#if swift("") // expected-error {{unexpected platform condition argument: expected a unary comparison '>=' or '<'; for example, '>=2.2' or '<2.2'}}
65
+
#if swift("") // expected-error@:11 {{unexpected platform condition argument: expected a unary comparison '>=' or '<'; for example, '>=2.2' or '<2.2'}}
66
66
#endif
67
67
68
68
#if swift(>=2.2.1)
@@ -75,10 +75,13 @@ class C {
75
75
#endif
76
76
}
77
77
78
-
#if swift(>=2.0, *) // expected-error {{expected only one argument to platform condition}}
78
+
#if swift(>=2.0, *) // expected-error@:11 {{expected only one unlabeled argument to platform condition}}
79
79
#endif
80
80
81
-
#if swift(>=, 2.0) // expected-error {{expected only one argument to platform condition}}
81
+
#if swift(>=, 2.0) // expected-error@:11 {{expected only one unlabeled argument to platform condition}}
82
+
#endif
83
+
84
+
#if swift(version: >=2.0) // expected-error@:11 {{expected only one unlabeled argument to platform condition}}
0 commit comments