Skip to content

Commit 9a97d50

Browse files
swift-cijrose-apple
authored andcommitted
Merge pull request #10643 from CodaFi/distant-early-warning
1 parent 11b14fd commit 9a97d50

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ ERROR(invalid_conditional_compilation_flag,none,
198198
"conditional compilation flags must be valid Swift identifiers (rather than '%0')",
199199
(StringRef))
200200

201-
ERROR(cannot_assign_value_to_conditional_compilation_flag,none,
202-
"conditional compilation flags do not have values in Swift; they are either present or absent"
203-
" (rather than '%0')", (StringRef))
201+
WARNING(cannot_assign_value_to_conditional_compilation_flag,none,
202+
"conditional compilation flags do not have values in Swift; they are "
203+
"either present or absent (rather than '%0')", (StringRef))
204204

205205
#ifndef DIAG_NO_UNDEF
206206
# if defined(DIAG)

test/Frontend/unknown-arguments.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99

1010
// RUN: not %swiftc_driver -D Correct -DAlsoCorrect -D@#%! -D Swift=Cool -D-D -c %s -o %t.o 2>&1 | %FileCheck -check-prefix=INVALID-COND %s
1111
// INVALID-COND: <unknown>:0: error: conditional compilation flags must be valid Swift identifiers (rather than '@#%!')
12-
// INVALID-COND-NEXT: <unknown>:0: error: conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'Swift=Cool')
12+
// INVALID-COND-NEXT: <unknown>:0: warning: conditional compilation flags do not have values in Swift; they are either present or absent (rather than 'Swift=Cool')
1313
// INVALID-COND-NEXT: <unknown>:0: error: conditional compilation flags must be valid Swift identifiers (rather than '-D')
1414

0 commit comments

Comments
 (0)