Skip to content

Commit 0cee5b2

Browse files
committed
Fixed flag checking for lexical borrow scopes.
Previously the following pairs were prohibited incorrectly: - -enable-lexical-borrow-scopes=true, -enable-experimental-move-only - -enable-lexical-lifetimes=true, -enable-experimental-move-only and the following pairs were allowed incorrectly: - -enable-lexical-borrow-scopes=false, -enable-experimental-move-only - -enable-lexical-lifetimes=false, -enable-experimental-move-only Here, that's fixed. The first two pairs are allowed and the second two pairs prohibited.
1 parent 5e95304 commit 0cee5b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Frontend/CompilerInvocation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
14951495
}
14961496

14971497
if (Args.hasArg(OPT_enable_experimental_move_only) &&
1498-
(enableLexicalBorrowScopesFlag.getValueOr(false))) {
1498+
!enableLexicalBorrowScopesFlag.getValueOr(true)) {
14991499
// Error if move-only is enabled and lexical borrow scopes--on which it
15001500
// depends--has been disabled.
15011501
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_combination,
@@ -1505,7 +1505,7 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
15051505
}
15061506

15071507
if (Args.hasArg(OPT_enable_experimental_move_only) &&
1508-
(enableLexicalLifetimesFlag.getValueOr(false))) {
1508+
!enableLexicalLifetimesFlag.getValueOr(true)) {
15091509
// Error if move-only is enabled and lexical lifetimes--on which it
15101510
// depends--has been disabled.
15111511
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_combination,

0 commit comments

Comments
 (0)