Skip to content

Commit ed5e22d

Browse files
committed
AST: Make -Xllvm -swift-diagnostics-assert-on-error and -Xllvm -swift-diagnostics-assert-on-warning work in noassert builds
1 parent 0c7e7f3 commit ed5e22d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/AST/DiagnosticEngine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,8 +1251,8 @@ DiagnosticBehavior DiagnosticState::determineBehavior(const Diagnostic &diag) {
12511251
anyErrorOccurred = true;
12521252
}
12531253

1254-
assert((!AssertOnError || !anyErrorOccurred) && "We emitted an error?!");
1255-
assert((!AssertOnWarning || (lvl != DiagnosticBehavior::Warning)) &&
1254+
ASSERT((!AssertOnError || !anyErrorOccurred) && "We emitted an error?!");
1255+
ASSERT((!AssertOnWarning || (lvl != DiagnosticBehavior::Warning)) &&
12561256
"We emitted a warning?!");
12571257

12581258
previousBehavior = lvl;

0 commit comments

Comments
 (0)