Skip to content

Commit c376913

Browse files
committed
---
yaml --- r: 340926 b: refs/heads/rxwei-patch-1 c: f596392 h: refs/heads/master
1 parent a22f082 commit c376913

File tree

5 files changed

+24
-46
lines changed

5 files changed

+24
-46
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: 21cbc868efc17209567b985128db7f2279b1c648
1018+
refs/heads/rxwei-patch-1: f5963923de41d011c25f6bc9e2badc3bb92eae7b
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/lib/Sema/CSDiagnostics.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,31 +2671,21 @@ bool ClosureParamDestructuringFailure::diagnoseAsError() {
26712671
auto bodyStmts = closureBody->getElements();
26722672

26732673
SourceLoc bodyLoc;
2674-
SourceLoc inLoc = closure->getInLoc();
2675-
// If location for `in` is unknown we can't proceed
2676-
// since we'll not be able to figure out source line
2677-
// to place the fix-it on.
2678-
if (inLoc.isInvalid())
2679-
return true;
2680-
26812674
// If the body is empty let's put the cursor
26822675
// right after "in", otherwise make it start
26832676
// location of the first statement in the body.
26842677
if (bodyStmts.empty())
2685-
bodyLoc = Lexer::getLocForEndOfToken(sourceMgr, inLoc);
2678+
bodyLoc = Lexer::getLocForEndOfToken(sourceMgr, closure->getInLoc());
26862679
else
26872680
bodyLoc = bodyStmts.front().getStartLoc();
26882681

2689-
if (bodyLoc.isInvalid())
2690-
return true;
2691-
26922682
SmallString<64> fixIt;
26932683
llvm::raw_svector_ostream OS(fixIt);
26942684

26952685
// If this is multi-line closure we'd have to insert new lines
26962686
// in the suggested 'let' to keep the structure of the code intact,
26972687
// otherwise just use ';' to keep everything on the same line.
2698-
auto inLine = sourceMgr.getLineNumber(inLoc);
2688+
auto inLine = sourceMgr.getLineNumber(closure->getInLoc());
26992689
auto bodyLine = sourceMgr.getLineNumber(bodyLoc);
27002690
auto isMultiLineClosure = bodyLine > inLine;
27012691
auto indent =

branches/rxwei-patch-1/test/IRGen/abi_v7k.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func testClike8(t: Int, x: CLike8) -> Int {
142142
// assigned values in the data area of the enum in declaration order
143143
// CHECK-LABEL: define hidden swiftcc double @"$s8test_v7k0A7SingleP{{.*}}"(i32, i32, i8)
144144
// CHECK: br i1
145-
// CHECK: switch i64 [[ID:%[0-9]+]]
145+
// CHECK: switch i32 [[ID:%[0-9]+]]
146146
// CHECK: [[FIRST:%[0-9]+]] = zext i32 %0 to i64
147147
// CHECK: [[SECOND:%[0-9]+]] = zext i32 %1 to i64
148148
// CHECK: [[TEMP:%[0-9]+]] = shl i64 [[SECOND]], 32

branches/rxwei-patch-1/utils/update_checkout/update_checkout/update_checkout.py

Lines changed: 20 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import re
1818
import sys
1919
import traceback
20-
2120
from functools import reduce
2221
from multiprocessing import freeze_support
2322

@@ -309,49 +308,42 @@ def obtain_all_additional_swift_sources(args, config, with_ssh, scheme_name,
309308
args.n_processes)
310309

311310

312-
def dump_repo_hashes(config):
311+
def dump_repo_hashes(config, branch_scheme_name='repro'):
313312
"""
314313
Dumps the current state of the repo into a new config file that contains a
315314
master branch scheme with the relevant branches set to the appropriate
316315
hashes.
317316
"""
318-
branch_scheme_name = 'repro'
319317
new_config = {}
320318
config_copy_keys = ['ssh-clone-pattern', 'https-clone-pattern', 'repos']
321319
for config_copy_key in config_copy_keys:
322320
new_config[config_copy_key] = config[config_copy_key]
323321
repos = {}
322+
repos = repo_hashes(config)
324323
branch_scheme = {'aliases': [branch_scheme_name], 'repos': repos}
325324
new_config['branch-schemes'] = {branch_scheme_name: branch_scheme}
326-
for repo_name, repo_info in sorted(config['repos'].items(),
327-
key=lambda x: x[0]):
328-
with shell.pushd(os.path.join(SWIFT_SOURCE_ROOT, repo_name),
329-
dry_run=False,
330-
echo=False):
331-
h = shell.capture(["git", "rev-parse", "HEAD"],
332-
echo=False).strip()
333-
repos[repo_name] = str(h)
334325
json.dump(new_config, sys.stdout, indent=4)
335326

336327

337-
def dump_hashes_config(args, config):
338-
branch_scheme_name = args.dump_hashes_config
339-
new_config = {}
340-
config_copy_keys = ['ssh-clone-pattern', 'https-clone-pattern', 'repos']
341-
for config_copy_key in config_copy_keys:
342-
new_config[config_copy_key] = config[config_copy_key]
328+
def repo_hashes(config):
343329
repos = {}
344-
branch_scheme = {'aliases': [branch_scheme_name], 'repos': repos}
345-
new_config['branch-schemes'] = {args.dump_hashes_config: branch_scheme}
346330
for repo_name, repo_info in sorted(config['repos'].items(),
347331
key=lambda x: x[0]):
348-
with shell.pushd(os.path.join(SWIFT_SOURCE_ROOT, repo_name),
349-
dry_run=False,
350-
echo=False):
351-
h = shell.capture(["git", "rev-parse", "HEAD"],
352-
echo=False).strip()
353-
repos[repo_name] = str(h)
354-
json.dump(new_config, sys.stdout, indent=4)
332+
repo_path = os.path.join(SWIFT_SOURCE_ROOT, repo_name)
333+
if os.path.exists(repo_path):
334+
with shell.pushd(repo_path, dry_run=False, echo=False):
335+
h = shell.capture(["git", "rev-parse", "HEAD"],
336+
echo=False).strip()
337+
else:
338+
h = 'skip'
339+
repos[repo_name] = str(h)
340+
return repos
341+
342+
343+
def print_repo_hashes(config):
344+
repos = repo_hashes(config)
345+
for repo_name, repo_hash in repos.iteritems():
346+
print("{:<35}: {:<35}".format(repo_name, repo_hash))
355347

356348

357349
def validate_config(config):
@@ -520,7 +512,7 @@ def main():
520512
return (None, None)
521513

522514
if args.dump_hashes_config:
523-
dump_hashes_config(args, config)
515+
dump_repo_hashes(config, args.dump_hashes_config)
524516
return (None, None)
525517

526518
cross_repos_pr = {}
@@ -563,4 +555,5 @@ def main():
563555
print("update-checkout failed, fix errors and try again")
564556
else:
565557
print("update-checkout succeeded")
558+
print_repo_hashes(config)
566559
sys.exit(fail_count)

branches/rxwei-patch-1/validation-test/Sema/type_checker_crashers_fixed/rdar51576862.swift

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

0 commit comments

Comments
 (0)