Skip to content

Re-enable parse_stdlib tests for macOS #12706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -2233,11 +2233,6 @@ ERROR(autoclosure_function_type,none,
ERROR(autoclosure_function_input_nonunit,none,
"argument type of @autoclosure parameter must be '()'", ())

// FIXME: drop these when we drop @noescape
ERROR(noescape_implied_by_autoclosure,none,
"@noescape is implied by @autoclosure and should not be "
"redundantly specified", ())

ERROR(escaping_non_function_parameter,none,
"@escaping attribute may only be used in function parameter position", ())

Expand Down
6 changes: 3 additions & 3 deletions include/swift/Syntax/Trivia.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#include "swift/Basic/OwnedString.h"
#include "llvm/Support/raw_ostream.h"

#include <deque>
#include <vector>

namespace swift {
namespace syntax {
Expand Down Expand Up @@ -204,7 +204,7 @@ struct TriviaPiece {
}
};

using TriviaList = std::deque<TriviaPiece>;
using TriviaList = std::vector<TriviaPiece>;

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

/// Add a piece to the beginning of the collection.
void push_front(const TriviaPiece &Piece) {
Pieces.push_front(Piece);
Pieces.insert(Pieces.begin(), Piece);
}

/// Return a reference to the first piece.
Expand Down
3 changes: 2 additions & 1 deletion lib/Parse/Lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,8 @@ static bool rangeContainsPlaceholderEnd(const char *CurPtr,
syntax::RawTokenInfo Lexer::fullLex() {
if (NextToken.isEscapedIdentifier()) {
LeadingTrivia.push_back(syntax::TriviaPiece::backtick());
TrailingTrivia.push_front(syntax::TriviaPiece::backtick());
TrailingTrivia.insert(TrailingTrivia.begin(),
syntax::TriviaPiece::backtick());
}
auto Loc = NextToken.getLoc();
auto Result = syntax::RawTokenSyntax::make(NextToken.getKind(),
Expand Down
4 changes: 2 additions & 2 deletions lib/Parse/ParseDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@ bool Parser::parseTypeAttribute(TypeAttributes &Attributes, bool justChecking) {
.fixItReplace(autoclosureEscapingParenRange, " @escaping ");
}
Attributes.setAttr(TAK_escaping, Loc);
} else if (Attributes.has(TAK_noescape)) {
} else if (Attributes.has(TAK_noescape) && !isInSILMode()) {
diagnose(Loc, diag::attr_noescape_implied_by_autoclosure);
}
break;
Expand All @@ -1696,7 +1696,7 @@ bool Parser::parseTypeAttribute(TypeAttributes &Attributes, bool justChecking) {
}

// @noescape after @autoclosure is redundant.
if (Attributes.has(TAK_autoclosure)) {
if (Attributes.has(TAK_autoclosure) && !isInSILMode()) {
diagnose(Loc, diag::attr_noescape_implied_by_autoclosure);
}

Expand Down
6 changes: 3 additions & 3 deletions validation-test/SIL/Inputs/gen_parse_stdlib_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ for id in $(seq 0 $process_id_max); do
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
//
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
__EOF__

done
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_0.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_1.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_10.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_11.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_12.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_13.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_14.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_15.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_16.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_2.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_3.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_4.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_5.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_6.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_7.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_8.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx
5 changes: 2 additions & 3 deletions validation-test/SIL/parse_stdlib_9.sil
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
// 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
// REQUIRES: long_test
// REQUIRES: nonexecutable_test

// FIXME: Re-enable when we're no longer running out of memory.
// REQUIRES: rdar34771322
// FIXME: Re-enable on Linux when we're no long running out of memory.
// REQUIRES: OS=macosx