Skip to content

Commit 06419c6

Browse files
committed
---
yaml --- r: 347203 b: refs/heads/master c: 351c380 h: refs/heads/master i: 347201: 76a0906 347199: 0110c1c
1 parent 2b84736 commit 06419c6

File tree

9 files changed

+1
-274
lines changed

9 files changed

+1
-274
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: c6a831ad5ed1a6f08a33769d8a4ede8f7fc74b92
2+
refs/heads/master: 351c38018b21c35194f036213c1fe72645d5bbe5
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/include/swift/Basic/LangOptions.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,6 @@ namespace swift {
274274
std::shared_ptr<llvm::Regex> OptimizationRemarkPassedPattern;
275275
std::shared_ptr<llvm::Regex> OptimizationRemarkMissedPattern;
276276

277-
/// When a conversion from String to Substring fails, emit a fix-it to append
278-
/// the void subscript '[]'.
279-
/// FIXME: Remove this flag when void subscripts are implemented.
280-
/// This is used to guard preemptive testing for the fix-it.
281-
bool FixStringToSubstringConversions = false;
282-
283277
/// Whether collect tokens during parsing for syntax coloring.
284278
bool CollectParsedToken = false;
285279

trunk/include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,6 @@ def validate_tbd_against_ir_EQ: Joined<["-"], "validate-tbd-against-ir=">,
533533
HelpText<"Compare the symbols in the IR against the TBD file that would be generated.">,
534534
MetaVarName<"<level>">;
535535

536-
// FIXME: Remove this flag when void subscripts are implemented.
537-
// This is used to guard preemptive testing for the fix-it.
538-
def fix_string_substring_conversion: Flag<["-"], "fix-string-substring-conversion">,
539-
HelpText<"Emit a fix-it to append '[]' to String expressions when converting to Substring.">;
540-
541536
def bypass_batch_mode_checks: Flag<["-"], "bypass-batch-mode-checks">,
542537
HelpText<"Bypass checks for batch-mode errors.">;
543538

trunk/lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
201201
const FrontendOptions &FrontendOpts) {
202202
using namespace options;
203203

204-
/// FIXME: Remove this flag when void subscripts are implemented.
205-
/// This is used to guard preemptive testing for the fix-it.
206-
if (Args.hasArg(OPT_fix_string_substring_conversion)) {
207-
Opts.FixStringToSubstringConversions = true;
208-
}
209-
210204
if (auto A = Args.getLastArg(OPT_swift_version)) {
211205
auto vers = version::Version::parseVersionString(
212206
A->getValue(), SourceLoc(), &Diags);

trunk/lib/Sema/CSDiagnostics.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,19 +1364,6 @@ bool ContextualFailure::trySequenceSubsequenceFixIts(InFlightDiagnostic &diag,
13641364
if (!String || !Substring)
13651365
return false;
13661366

1367-
/// FIXME: Remove this flag when void subscripts are implemented.
1368-
/// Make this unconditional and remove the if statement.
1369-
if (CS.TC.getLangOpts().FixStringToSubstringConversions) {
1370-
// String -> Substring conversion
1371-
// Add '[]' void subscript call to turn the whole String into a Substring
1372-
if (fromType->isEqual(String)) {
1373-
if (toType->isEqual(Substring)) {
1374-
diag.fixItInsertAfter(expr->getEndLoc(), "[]");
1375-
return true;
1376-
}
1377-
}
1378-
}
1379-
13801367
// Substring -> String conversion
13811368
// Wrap in String.init
13821369
if (fromType->isEqual(Substring)) {

trunk/test/Migrator/Inputs/string_to_substring_conversion.swift

Lines changed: 0 additions & 80 deletions
This file was deleted.

trunk/test/Migrator/string_to_substring_conversion.swift

Lines changed: 0 additions & 3 deletions
This file was deleted.

trunk/test/Migrator/string_to_substring_conversion.swift.expected

Lines changed: 0 additions & 80 deletions
This file was deleted.

trunk/test/Sema/string_to_substring_conversion.swift

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)