Skip to content

Commit b6a7449

Browse files
authored
Merge pull request #12706 from DougGregor/reenable-parse-stdlib-test-macos
2 parents 161dd6a + d17059c commit b6a7449

22 files changed

+44
-65
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2233,11 +2233,6 @@ ERROR(autoclosure_function_type,none,
22332233
ERROR(autoclosure_function_input_nonunit,none,
22342234
"argument type of @autoclosure parameter must be '()'", ())
22352235

2236-
// FIXME: drop these when we drop @noescape
2237-
ERROR(noescape_implied_by_autoclosure,none,
2238-
"@noescape is implied by @autoclosure and should not be "
2239-
"redundantly specified", ())
2240-
22412236
ERROR(escaping_non_function_parameter,none,
22422237
"@escaping attribute may only be used in function parameter position", ())
22432238

include/swift/Syntax/Trivia.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
#include "swift/Basic/OwnedString.h"
8383
#include "llvm/Support/raw_ostream.h"
8484

85-
#include <deque>
85+
#include <vector>
8686

8787
namespace swift {
8888
namespace syntax {
@@ -204,7 +204,7 @@ struct TriviaPiece {
204204
}
205205
};
206206

207-
using TriviaList = std::deque<TriviaPiece>;
207+
using TriviaList = std::vector<TriviaPiece>;
208208

209209
/// A collection of leading or trailing trivia. This is the main data structure
210210
/// for thinking about trivia.
@@ -228,7 +228,7 @@ struct Trivia {
228228

229229
/// Add a piece to the beginning of the collection.
230230
void push_front(const TriviaPiece &Piece) {
231-
Pieces.push_front(Piece);
231+
Pieces.insert(Pieces.begin(), Piece);
232232
}
233233

234234
/// Return a reference to the first piece.

lib/Parse/Lexer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,8 @@ static bool rangeContainsPlaceholderEnd(const char *CurPtr,
740740
syntax::RawTokenInfo Lexer::fullLex() {
741741
if (NextToken.isEscapedIdentifier()) {
742742
LeadingTrivia.push_back(syntax::TriviaPiece::backtick());
743-
TrailingTrivia.push_front(syntax::TriviaPiece::backtick());
743+
TrailingTrivia.insert(TrailingTrivia.begin(),
744+
syntax::TriviaPiece::backtick());
744745
}
745746
auto Loc = NextToken.getLoc();
746747
auto Result = syntax::RawTokenSyntax::make(NextToken.getKind(),

lib/Parse/ParseDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,7 +1683,7 @@ bool Parser::parseTypeAttribute(TypeAttributes &Attributes, bool justChecking) {
16831683
.fixItReplace(autoclosureEscapingParenRange, " @escaping ");
16841684
}
16851685
Attributes.setAttr(TAK_escaping, Loc);
1686-
} else if (Attributes.has(TAK_noescape)) {
1686+
} else if (Attributes.has(TAK_noescape) && !isInSILMode()) {
16871687
diagnose(Loc, diag::attr_noescape_implied_by_autoclosure);
16881688
}
16891689
break;
@@ -1696,7 +1696,7 @@ bool Parser::parseTypeAttribute(TypeAttributes &Attributes, bool justChecking) {
16961696
}
16971697

16981698
// @noescape after @autoclosure is redundant.
1699-
if (Attributes.has(TAK_autoclosure)) {
1699+
if (Attributes.has(TAK_autoclosure) && !isInSILMode()) {
17001700
diagnose(Loc, diag::attr_noescape_implied_by_autoclosure);
17011701
}
17021702

validation-test/SIL/Inputs/gen_parse_stdlib_tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ for id in $(seq 0 $process_id_max); do
1818
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=$process_count -ast-verifier-process-id=$id > /dev/null
1919
// REQUIRES: long_test
2020
// REQUIRES: nonexecutable_test
21-
22-
// FIXME: Re-enable when we're no longer running out of memory.
23-
// REQUIRES: rdar34771322
21+
//
22+
// FIXME: Re-enable on Linux when we're no long running out of memory.
23+
// REQUIRES: OS=macosx
2424
__EOF__
2525

2626
done

validation-test/SIL/parse_stdlib_0.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=0 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_1.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=1 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_10.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=10 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_11.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=11 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_12.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=12 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_13.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=13 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_14.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=14 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_15.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=15 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_16.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=16 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_2.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=2 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_3.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=3 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_4.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=4 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_5.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=5 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_6.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=6 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_7.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=7 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_8.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=8 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

validation-test/SIL/parse_stdlib_9.sil

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false %t.sil -ast-verifier-process-count=17 -ast-verifier-process-id=9 > /dev/null
1111
// REQUIRES: long_test
1212
// REQUIRES: nonexecutable_test
13-
14-
// FIXME: Re-enable when we're no longer running out of memory.
15-
// REQUIRES: rdar34771322
13+
// FIXME: Re-enable on Linux when we're no long running out of memory.
14+
// REQUIRES: OS=macosx

0 commit comments

Comments
 (0)