profile
viewpoint

apple/swift 51830

The Swift Programming Language

apple/swift-evolution 11155

This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.

apple/swift-package-manager 7754

The Package Manager for the Swift Programming Language

apple/swift-corelibs-foundation 3888

The Foundation Project, providing core utilities, internationalization, and OS independence

apple/swift-corelibs-xctest 822

The XCTest Project, A Swift core library for providing unit test support

apple/swift-llbuild 771

A low-level build system, used by Xcode and the Swift Package Manager

apple/swift-lldb 643

This is the version of LLDB that supports the Swift programming language & REPL.

rintaro/Plack-Middleware-CSRFBlock 11

CSRF are never propageted to app

pull request commentapple/swift

[CodeCompletion] Skip to '=' after completion in 'if'/'guard' pattern

@swift-ci Please smoke test Linux

rintaro

comment created time in 2 days

pull request commentapple/swift

[CodeCompletion] Skip to '=' after completion in 'if'/'guard' pattern

@swift-ci Please smoke test

rintaro

comment created time in 2 days

push eventrintaro/swift

Valeriy Van

commit sha a0b651727246c02107fc4051c45800345d587f31

Fixes filter function of RangeReplaceableCollection. Addresses ticket SR-12648

view details

Martin Boehme

commit sha 6bf0f26ecd7add55c31e8027be15435b1248a6de

Emit `/DEFAULTLIB` directive for `#pragma comment(lib, ...)` in a C module. This is important, for example, for linking correctly to the C++ standard library on Windows, which uses `#pragma comment(lib, ...)` in its headers to specify the correct library to link against.

view details

Owen Voorhees

commit sha c4e67e29edeb60c195726812a8317707b45ab258

[Diagnostics] Add -diagnostic-style=(llvm|swift) to control printed output This default formatting style remains the same "LLVM style". "Swift style" is what was previously enabled via -enable-experimental-diagnostic-formatting

view details

Nate Chandler

commit sha ccf6209a6b75f9327c2bc5e18988171cc75a4558

[prespecialized metadata] Allow existential arguments.

view details

martinboehme

commit sha d867c88d2c830ff4036109ccf60e3eb099df710a

Update WindowsBuild.md Added note on which edition of Visual Studio to get.

view details

Owen Voorhees

commit sha dd0b1ebd3d5da725b29e3f3f213863808b8533c6

[Gardening] Remove dead code in SerializeDoc.cpp

view details

Erik Eckstein

commit sha 9722578df69e886006db241f665f9ced03f40b33

SILOptimizer: a new optimization for copy-on-write Constant folds the uniqueness result of begin_cow_mutation instructions, if it can be proved that the buffer argument is uniquely referenced. For example: %buffer = end_cow_mutation %mutable_buffer // ... // %buffer does not escape here // ... (%is_unique, %mutable_buffer2) = begin_cow_mutation %buffer cond_br %is_unique, ... is replaced with %buffer = end_cow_mutation [keep_unique] %mutable_buffer // ... (%not_used, %mutable_buffer2) = begin_cow_mutation %buffer %true = integer_literal 1 cond_br %true, ... Note that the keep_unique flag is set on the end_cow_mutation because the code now relies on that the buffer is really uniquely referenced. The optimization can also handle def-use chains between end_cow_mutation and begin_cow_mutation which involve phi-arguments. An additional peephole optimization is performed: if the begin_cow_mutation is the only use of the end_cow_mutation, the whole pair of instructions is eliminated.

view details

Erik Eckstein

commit sha e3ac98cdbfd33c2223fa4c098dcf0bd0a7ba0b73

FunctionSignatureTransforms: add a semantics attribute to prevent the owned-to-guarantee transformation. If a function is annotated with @_semantics("optimize.sil.specialize.owned2guarantee.never") its arguments will not be converted from owned to guaranteed.

view details

Erik Eckstein

commit sha 4ca6b31500f931f8aa5d1772d8f3b99c09faf1eb

SILCombine: remove dead casts and end_cow_mutation instructions which are only destroyed. If the only use of an upcast, unchecked_ref_cast or end_cow_mutation is a destroy/release, just destroy the operand and remove the cast/end_cow_mutation.

view details

Erik Eckstein

commit sha 01465d9ba4aac774596d67e59dead3c4a95ef784

SILCombine: Remove a cast if it's only used by an end_cow_mutation. (end_cow_mutation (upcast X)) -> (end_cow_mutation X) (end_cow_mutation (unchecked_ref_cast X)) -> (end_cow_mutation X)

view details

Erik Eckstein

commit sha 2403e56eb5253295dc6785693b03d0b77c9d96e9

SIL: new "array.end_mutation" and "array.finalize_intrinsic" array semantics Used to "finalize" an array literal. It's not used, yet. So this is NFC. Also handle the "array.finalize_intrinsic" function in various array specific optimizations.

view details

Erik Eckstein

commit sha 33c8e16ce04300f792c995b7f611d14fe3f4b0a0

SIL optimizer: Support begin_cow_mutation and end_cow_mutation in some optimizations. Mostly this is about "looking through" a begin_cow_mutation or end_cow_mutation.

view details

Erik Eckstein

commit sha 16bd756f7beebbd4e6dbff8f5ea031a823074e1d

tests: make some test more robust for optimizer changes. This is in preparation for COW support. More optimizer tests require an optimized non-assert stdlib build.

view details

Erik Eckstein

commit sha 99f4d854292e22213330c1eca36c5ce0bcdab42b

ArraySemantics: support "array.check_subscript" as a two-parameter function. Support a version of Array._checkSubscript which has no wasNativeTypeChecked parameter.

view details

Erik Eckstein

commit sha 216eec2d211d5d5c541405070eea86d9aaeb0601

SIL optimizer: add an additional LICM pass to the pipeline. The COWOpts optimization relies more on LICM. This additional run of the pass ensures that there is no phase ordering issue between LICM and COWOpts

view details

Erik Eckstein

commit sha 3f42ad704c3c7f5b575d845438a0509747602048

DeadObjectElimination: don't let fix_lifetime prevent dead array elimination

view details

Owen Voorhees

commit sha 8b4d9ef3eb946e2378ea8aad489ca8668b69e939

[Profiler] Don't use presumed line numbers for profiling

view details

Pavel Yaskevich

commit sha c884068bfa82c3647bdc3e298753ed7c0657494b

[ConstraintSystem] Tally implicit optional wraps into impact of pointer mismatch Impact of cases where pointer types mismatch after implict optional wrap(s) should be higher than mismatch alone. Distinguishing that helps to disambiguate following case (and other similar ones) without using ranking: ```swift func foo(_: UnsafePointer<Int>) {} func foo(_: UnsafePointer<Int>?) {} func test(_ ptr: UnsafePointer<Float>) { foo(ptr) } ```

view details

Alexis Laferrière

commit sha 6bead5c436a91b9275e20977a808f625465824be

[Parse] Fix source range of SPI attributes rdar://problem/63554849

view details

Arnold Schwaighofer

commit sha 532f0cb865cccae01abb5b1c933b8510b27dcd81

Type substitution: When substituting SILFunctionTypes we substitute unbound Objective-C generic for bound ones IRGen does so. So don't assert on this case. rdar://63509292

view details

push time in 2 days

pull request commentapple/swift

[CodeCompletion] Suggest 'Self' inside struct, enum and classe

@swift-ci Please smoke test Linux

rintaro

comment created time in 2 days

pull request commentapple/swift

[CodeCompletion] Suggest 'Self' inside struct, enum and classe

@benlangmuir I guess you were suggesting test cases in where clause or somewhere else?

rintaro

comment created time in 2 days

pull request commentapple/swift

[CodeCompletion] Skip type checking unrelated statements in function body

@swift-ci Please smoke test

rintaro

comment created time in 2 days

push eventrintaro/swift

Rintaro Ishizaki

commit sha c5743ef26192cf9f9e020d1d5073ae12c1413b2f

[TypeChecker] Rename 'typeCheckAbstractFunctionBodyUntil()' to 'typeCheckAbstractFunctionBodyNodeAt()' because that only typecheck a statement at the position.

view details

Rintaro Ishizaki

commit sha 71eb1221d170a12ec6e9c82e3c06674724c4a31b

[CodeCompletion] Skip typechecking preceding top level decls

view details

push time in 2 days

pull request commentapple/swift

[CodeCompletion] Skip type checking unrelated statements in function body

@swift-ci Please smoke test

rintaro

comment created time in 2 days

push eventrintaro/swift

Rintaro Ishizaki

commit sha a06cdd23ef921aaf15a09529b683a40ad530377a

[TypeChecker] Typecheck statement condition on demand from NamingPatternRequest.

view details

Rintaro Ishizaki

commit sha 474b3d47a74c1d6596792248ce0380f90ac55817

[TypeChecker] Rename 'typeCheckAbstractFunctionBodyUntil()' to 'typeCheckAbstractFunctionBodyNodeAt()' because that only typecheck a statement at the position.

view details

Rintaro Ishizaki

commit sha 3287f24660032f6bdec380a87bda1ddc1c466cec

[CodeCompletion] Skip typechecking preceding top level decls

view details

push time in 2 days

pull request commentapple/swift

[CodeCompletion] Skip type checking unrelated statements in function body

@swift-ci Please smoke test macOS

rintaro

comment created time in 2 days

pull request commentapple/swift

[CodeCompletion] Skip type checking unrelated statements in function body

@swift-ci Please smoke test macOS

rintaro

comment created time in 2 days

pull request commentapple/swift

[CodeCompletion] Skip type checking unrelated statements in function body

@swift-ci Please smoke test macOS

rintaro

comment created time in 2 days

pull request commentapple/swift

[CodeCompletion] Skip type checking unrelated statements in function body

@swift-ci Please smoke test macOS

rintaro

comment created time in 2 days

pull request commentapple/swift

[CodeCompletion] Skip type checking unrelated statements in function body

@swift-ci Please smoke test

rintaro

comment created time in 2 days

PR opened apple/swift

[CodeCompletion] Skip type checking unrelated statements in function body

For example:

func foo(x: Int) {
  var unrelatedVar = 1 + ...
  _ = x.<HERE>
}

We don't need to type check unrelatedVar because it doesn't affect the completion result at all.

  • In StmtChecker::visitBraceStmt(), skip elements until the target source location. Only type check the element at the location, and let it typechecking dependent declarations on demand.
  • Renamed typeCheckAbstractFunctionBodyUntil() to typeCheckAbstractFunctionBodyNodeAt() because "until" is not relevant now.
  • In NamingPatternRequest, type check statement conditions on demand.

rdar://problem/58687608

+154 -86

0 comment

14 changed files

pr created time in 2 days

create barnchrintaro/swift

branch : ide-completion-skipbody-rdar58687608

created branch time in 2 days

push eventrintaro/swift

Valeriy Van

commit sha a0b651727246c02107fc4051c45800345d587f31

Fixes filter function of RangeReplaceableCollection. Addresses ticket SR-12648

view details

Owen Voorhees

commit sha c4e67e29edeb60c195726812a8317707b45ab258

[Diagnostics] Add -diagnostic-style=(llvm|swift) to control printed output This default formatting style remains the same "LLVM style". "Swift style" is what was previously enabled via -enable-experimental-diagnostic-formatting

view details

Nate Chandler

commit sha ccf6209a6b75f9327c2bc5e18988171cc75a4558

[prespecialized metadata] Allow existential arguments.

view details

David Zarzycki

commit sha eab7cb7d38609b02ed0d69d38e0b7a21ff8732e0

[IRGen] NFC: Clean up Alignment type 1) Shrink from 4 bytes to 1 byte. 2) Assert that alignments are power-of-two at run time. 3) Assert that alignments are power-of-two at compile time when possible. 4) Eliminate "isZero"/"no alignment" from the type. Use llvm::Optional.

view details

Owen Voorhees

commit sha dd0b1ebd3d5da725b29e3f3f213863808b8533c6

[Gardening] Remove dead code in SerializeDoc.cpp

view details

Erik Eckstein

commit sha 9722578df69e886006db241f665f9ced03f40b33

SILOptimizer: a new optimization for copy-on-write Constant folds the uniqueness result of begin_cow_mutation instructions, if it can be proved that the buffer argument is uniquely referenced. For example: %buffer = end_cow_mutation %mutable_buffer // ... // %buffer does not escape here // ... (%is_unique, %mutable_buffer2) = begin_cow_mutation %buffer cond_br %is_unique, ... is replaced with %buffer = end_cow_mutation [keep_unique] %mutable_buffer // ... (%not_used, %mutable_buffer2) = begin_cow_mutation %buffer %true = integer_literal 1 cond_br %true, ... Note that the keep_unique flag is set on the end_cow_mutation because the code now relies on that the buffer is really uniquely referenced. The optimization can also handle def-use chains between end_cow_mutation and begin_cow_mutation which involve phi-arguments. An additional peephole optimization is performed: if the begin_cow_mutation is the only use of the end_cow_mutation, the whole pair of instructions is eliminated.

view details

Erik Eckstein

commit sha e3ac98cdbfd33c2223fa4c098dcf0bd0a7ba0b73

FunctionSignatureTransforms: add a semantics attribute to prevent the owned-to-guarantee transformation. If a function is annotated with @_semantics("optimize.sil.specialize.owned2guarantee.never") its arguments will not be converted from owned to guaranteed.

view details

Erik Eckstein

commit sha 4ca6b31500f931f8aa5d1772d8f3b99c09faf1eb

SILCombine: remove dead casts and end_cow_mutation instructions which are only destroyed. If the only use of an upcast, unchecked_ref_cast or end_cow_mutation is a destroy/release, just destroy the operand and remove the cast/end_cow_mutation.

view details

Erik Eckstein

commit sha 01465d9ba4aac774596d67e59dead3c4a95ef784

SILCombine: Remove a cast if it's only used by an end_cow_mutation. (end_cow_mutation (upcast X)) -> (end_cow_mutation X) (end_cow_mutation (unchecked_ref_cast X)) -> (end_cow_mutation X)

view details

Erik Eckstein

commit sha 2403e56eb5253295dc6785693b03d0b77c9d96e9

SIL: new "array.end_mutation" and "array.finalize_intrinsic" array semantics Used to "finalize" an array literal. It's not used, yet. So this is NFC. Also handle the "array.finalize_intrinsic" function in various array specific optimizations.

view details

Erik Eckstein

commit sha 33c8e16ce04300f792c995b7f611d14fe3f4b0a0

SIL optimizer: Support begin_cow_mutation and end_cow_mutation in some optimizations. Mostly this is about "looking through" a begin_cow_mutation or end_cow_mutation.

view details

Erik Eckstein

commit sha 16bd756f7beebbd4e6dbff8f5ea031a823074e1d

tests: make some test more robust for optimizer changes. This is in preparation for COW support. More optimizer tests require an optimized non-assert stdlib build.

view details

Erik Eckstein

commit sha 99f4d854292e22213330c1eca36c5ce0bcdab42b

ArraySemantics: support "array.check_subscript" as a two-parameter function. Support a version of Array._checkSubscript which has no wasNativeTypeChecked parameter.

view details

Erik Eckstein

commit sha 216eec2d211d5d5c541405070eea86d9aaeb0601

SIL optimizer: add an additional LICM pass to the pipeline. The COWOpts optimization relies more on LICM. This additional run of the pass ensures that there is no phase ordering issue between LICM and COWOpts

view details

Erik Eckstein

commit sha 3f42ad704c3c7f5b575d845438a0509747602048

DeadObjectElimination: don't let fix_lifetime prevent dead array elimination

view details

Pavel Yaskevich

commit sha c884068bfa82c3647bdc3e298753ed7c0657494b

[ConstraintSystem] Tally implicit optional wraps into impact of pointer mismatch Impact of cases where pointer types mismatch after implict optional wrap(s) should be higher than mismatch alone. Distinguishing that helps to disambiguate following case (and other similar ones) without using ranking: ```swift func foo(_: UnsafePointer<Int>) {} func foo(_: UnsafePointer<Int>?) {} func test(_ ptr: UnsafePointer<Float>) { foo(ptr) } ```

view details

Alexis Laferrière

commit sha 6bead5c436a91b9275e20977a808f625465824be

[Parse] Fix source range of SPI attributes rdar://problem/63554849

view details

Robert Widmann

commit sha 369b2aba8c97b142824687add3b79ff9e1dce119

Add a Regression Test For Scenario Improved By Private Dependencies The basic setup is this - Suppose that three files define four types: // File 1 struct A {} // File 2 struct B { let x: A } struct C { } // File 3 struct D { let x: C } If type 'A' is perturbed, we could expect that File 2 would rebuild because B has a member of type A. What we don't expect is for File 3 to rebuild, but thanks to cascading edges that is precisely that happens! This is because the member x in File 3 creates a cascading edge to File 2, and that edge is traversed while evaluating the cascading edge from File 2 to File 1. With private dependencies, the expected rebuild behavior is restored. Commit a regression test to this effect.

view details

Erik Eckstein

commit sha aed0d91fc9d1110b801f362afc68cf60dd4927a1

tests: temporarily disable Runtime/linux-fatal-backtrace.swift It's blocking linux PR testing rdar://problem/63666780

view details

David Zarzycki

commit sha e05d4e94c5f53c546eed23e28186f92a71506aef

Merge pull request #32018 from davezarzycki/pr32018 [IRGen] NFC: Clean up Alignment type

view details

push time in 2 days

Pull request review commentapple/swift

[CodeCompletion] Skip to '=' after completion in 'if'/'guard' pattern

 func testGuardLetBinding8(_ x: FooStruct?) { // FOOSTRUCT_LOCALVAL: Begin completions // FOOSTRUCT_LOCALVAL-DAG: Decl[LocalVar]/Local{{(/TypeRelation\[Convertible\])?}}: boundVal[#FooStruct#]; // FOOSTRUCT_LOCALVAL: End completions++// OPTIONAL_FOOSTRUCT: Begin completions, 5 items+// OPTIONAL_FOOSTRUCT: Decl[Constructor]/CurrNominal/TypeRelation[Convertible]: init()[#FooStruct#]; name=init()+// OPTIONAL_FOOSTRUCT: Decl[Constructor]/CurrNominal/TypeRelation[Convertible]: init({#Int#})[#FooStruct#]; name=init(Int)

Thank you for notifying, will do! Somehow, I thought using optional element member is accepted in matching pattern too. I was wrong.

rintaro

comment created time in 2 days

pull request commentapple/swift

[CodeCompletion] Skip to '=' after completion in 'if'/'guard' pattern

@swift-ci Please smoke test

rintaro

comment created time in 3 days

PR opened apple/swift

[CodeCompletion] Skip to '=' after completion in 'if'/'guard' pattern

So that the parser can parse the subject expresion which provides the expected type of the pattern.

rdar://problem/56802036

+23 -2

0 comment

2 changed files

pr created time in 3 days

push eventrintaro/swift

Rintaro Ishizaki

commit sha 42d4728cfc4add7570708d61d3bcc36dc7059fa1

[CodeCompletion] Skip to '=' after completion in 'if'/'guard' pattern So that the parser can parse the subject expresion which provides the expected type of the pattern. rdar://problem/56802036

view details

push time in 3 days

create barnchrintaro/swift

branch : ide-completion-rdar56802036

created branch time in 3 days

pull request commentapple/swift

[CodeCompletion] Suggest 'Self' inside struct, enum and classe

@swift-ci Please smoke test Linux

rintaro

comment created time in 3 days

pull request commentapple/swift

[CodeCompletion] Suggest 'Self' inside struct, enum and classe

@swift-ci Please smoke test Linux

rintaro

comment created time in 4 days

push eventapple/swift

Rintaro Ishizaki

commit sha ad51f4f1a8430df0e4550bbf7a29d93904cf0a69

[CodeCompletion] Fix non-determinisc failures in dependency check test cases Sleep a few seconds to ensure the timestamp of the modified files are different from the last completion. rdar://problem/62923248

view details

Rintaro Ishizaki

commit sha 45a78e4f5f58196b2ea12f5e663a7a2b4543aacf

Merge pull request #32030 from rintaro/ide-completion-rdar62923248 [CodeCompletion] Fix non-determinisc failures in dependency check test cases

view details

push time in 4 days

PR merged apple/swift

[CodeCompletion] Fix non-determinisc failures in dependency check test cases

Sleep a few seconds to ensure the timestamps of the modified files are different from the last completion.

rdar://problem/62923248

+4 -8

11 comments

4 changed files

rintaro

pr closed time in 4 days

pull request commentapple/swift

[CodeCompletion] Fix non-determinisc failures in dependency check test cases

@swift-ci Please smoke test Linux

rintaro

comment created time in 4 days

pull request commentapple/swift

[CodeCompletion] Suggest 'Self' inside struct, enum and classe

@swift-ci Please smoke test

rintaro

comment created time in 4 days

PR opened apple/swift

[CodeCompletion] Suggest 'Self' inside struct, enum and classe

In 'protocol', 'Self' is implicitly declared as a generic parameter. In 'struct' and 'enum', 'Self' is just an alias for the nominal type. In 'class', 'Self' is a dynamic type and usable only in result types and inside function bodies.

rdar://problem/61307680

+249 -2

0 comment

2 changed files

pr created time in 4 days

create barnchrintaro/swift

branch : ide-completion-sself-rdar61307680

created branch time in 4 days

pull request commentapple/swift

[CodeCompletion] Fix non-determinisc failures in dependency check test cases

@swift-ci Please smoke test Linux

rintaro

comment created time in 4 days

pull request commentapple/swift

[CodeCompletion] Fix non-determinisc failures in dependency check test cases

@swift-ci Please test Linux

rintaro

comment created time in 4 days

pull request commentapple/swift

[SR-12583] Added checks to catch 'foo() {} {}' and 'foo {} () {}'

Thank you for tackling this!

Is this the right place/method to do this? I just put an if(condition) check in two places in the parser and emitted a diagnostic. Should the check be in the CallExpr::create() instead of in the parser?

If we diagnose this, yes, the parser is the right place.

I'm not completely sure that there's not a valid parse like this. The parse tree looks like the below. It indents poorly here but it's a call with a trailing closure containing another call with a trailing closure. I'm still thinking through whether there's some legitimate Swift code that could generate that: (call_expr (call_expr (paren_expr trailing-closure)) (paren_expr trailing-closure))

At least for the current grammar, they should be valid syntax. expr {} {}, expr {} () {}, expr() {} {} and expr() {} () {} all should be parsed as call_expr (call_expr <expr> (paren_expr trailing-closure)) (paren_expr trailing-closure).

This may interfere or interact with work on multiple trailing closures

It should be "OK" because multiple trailing closures requires argument labels. For example expr {} label: {} {}, we can parse this as (expr {} label: {}) {} because the last closure doesn't have an argument label.

The swift in the examples is kind of aesthetically displeasing but logically OK. I'm not sure this should actually be disallowed.

For now, we shouldn't disallow any currently accepted syntax. As Chris says in the (SR-12583)[https://bugs.swift.org/browse/SR-12583?focusedCommentId=55629], we might want to change the grammar in the future, but for now, we can't.

So @dfsweeney, could you consider changing parser to accept expr {} {} as the valid Swift code?

dfsweeney

comment created time in 4 days

pull request commentapple/swift

[CodeCompletion] Fix non-determinisc failures in dependency check test cases

@swift-ci Please test

rintaro

comment created time in 4 days

push eventrintaro/swift

Rintaro Ishizaki

commit sha ad51f4f1a8430df0e4550bbf7a29d93904cf0a69

[CodeCompletion] Fix non-determinisc failures in dependency check test cases Sleep a few seconds to ensure the timestamp of the modified files are different from the last completion. rdar://problem/62923248

view details

push time in 4 days

pull request commentapple/swift

[CodeCompletion] Fix non-determinisc failures in dependency check test cases

@swift-ci Please test

rintaro

comment created time in 5 days

Pull request review commentapple/swift

[CodeCompletion] Fix non-determinisc failures in dependency check test cases

 func foo() { // RUN:   -req=complete -pos=5:3 %s -- ${COMPILER_ARGS[@]} == \  // RUN:   -shell -- echo '### Modify bridging header library file' == \+// RUN:   -shell -- sleep $SLEEP_TIME == \ // RUN:   -shell -- cp -R $INPUT_DIR/MyProject_mod/LocalCFunc.h %t/MyProject/ == \ // RUN:   -shell -- sleep $SLEEP_TIME == \

I believe it's not needed, but just I wanted to be on the safe side.

rintaro

comment created time in 5 days

pull request commentapple/swift

[CodeCompletion] Fix determinisc failures in dependency check test cases

@swift-ci Please test

rintaro

comment created time in 5 days

PR opened apple/swift

[CodeCompletion] Fix determinisc failures in dependency check test cases

Sleep a few seconds to ensure the timestamp of the modified files are different from the last completion.

rdar://problem/62923248

+4 -4

0 comment

4 changed files

pr created time in 5 days

create barnchrintaro/swift

branch : ide-completion-rdar62923248

created branch time in 5 days

push eventrintaro/swift

Saleem Abdulrasool

commit sha c6cc769a64c58cc820ce76699275cae5e9dd6e95

build: default the lld/gold enabling as per reality Rather than defaulting both of these to true, enable gold by default only on ELFish targets, and enable LLD by default for Windows on non-Windows hosts.

view details

Anthony Latsis

commit sha edcf7640c0dd6e53db42d8845af2335cc472da5e

[NFC] AST: Define and use IterableDeclContext::getAsGenericContext()

view details

Anthony Latsis

commit sha b3af1a03f1dc4245cd6cda7ccdfdd0d1b763dcd4

[NFC] AST: Relocate takeConformanceDiagnostics & getLocalProtocols to IterableDeclContext

view details

Anthony Latsis

commit sha bfe25fabebacb56ba7649c14cf7418b3ddea0893

[NFC] AST: Relocate getLocalConformances to IterableDeclContext

view details

Owen Voorhees

commit sha f00953c62d36c0d89b8dd8d4e0afb22bd7c07fef

[Diags-Experimental-Formatting] Fixes for printing diagnostics when #sourceLocation is used - Always use the line number in the actual source file when extracting excerpts and adding highlights/fix-its - Always use the display name when printing excerpt titles - Don't print surrounding lines when an annotated line is in a virtual file This reverts commit f919e047834eddf8863723b9db1fcb8d344d2006.

view details

Owen Voorhees

commit sha 96696c88231bebe3ed65ce164bd59bf8c94f9432

[Diag-Experimental-Formatting] Add a formatting test for Swift diags emitted in clang virtual files

view details

Rintaro Ishizaki

commit sha 0e7e4baa71b698426318ba8bb681bd7c30f41aee

[CodeCompletion] Add an already-fixed crashing test case rdar://problem/58470999

view details

Dan Zheng

commit sha 2e690e2d5e386407876759547d212fcba38bb00a

[AutoDiff] NFC: garden array differentiation. Use consistent variable naming. Reorganize code.

view details

Dan Zheng

commit sha e3938b5c7d7349d2cd149974be3ee4718144deb1

[AutoDiff] Fix `Array.append(_:)` pullback. The derivative wrt `self` should drop the last element from the incoming seed. Example: - Incoming seed: [1, 2, 3, 4] - Derivative wrt `self`: [1, 2, 3] - Derivative wrt appended element: 4

view details

Joe Groff

commit sha 94849dea8919c03aec582b1f41c41cbdcac7a07b

ReplaceOpaqueTypesWithUnderlyingTypes: Handle a type being "substituted" with itself. SIL type lowering might have already substituted away an opaque type during a SIL substitution. Fixes rdar://problem/62072397.

view details

Robert Widmann

commit sha 43d1ba9ed983f125b814fd7da08ed2d026b15b82

[Gardening] Shepherd a Fix To SetAlgebra Docs

view details

Owen Voorhees

commit sha 76282b11678910ef633e16e365dacaf8bf29c488

[update-checkout] swift-argument-parser 0.0.5 -> 0.06

view details

Anthony Latsis

commit sha 44a92a926cfddc1711ff639180a4bb490afdc7ca

[NFC] GenericSignatureImpl: Spell conformsToProtocol & getConformsTo in terms of requirements

view details

Saleem Abdulrasool

commit sha f83e537a4e5573426c58ea6ca9fdeebc4b677433

standard library: sort headers This just is using the standard formatting suggested by clang-format. This fixes the issue with forward declarations being injected into the search order.

view details

Meghana Gupta

commit sha 911ac8e45e653aa5a5d336a01723c07f9506610e

Fix code size reporting when input directory is missing a trailing '/' run_smoke_bench script fails to report code size changes if you have a trailing '/' in <old_build_dir> but not <new_build_dir>. This change appends a separator if it is missing

view details

Meghana Gupta

commit sha 0b7368d91bbf545fc91206534057b82863cf152a

Add option to cmpcodesize.py to also list segment sizes Option --additional-segments will list % change in segment sizes (__TEXT, __DATA, __LLVM_COV, __LINKEDIT)

view details

Joe Groff

commit sha 671ab5a1298b629c879fa68f0554b9830e2c42f4

Merge pull request #31773 from jckarter/replace-opaque-underlying-type-with-underlying-type ReplaceOpaqueTypesWithUnderlyingTypes: Handle a type being "substituted" with itself.

view details

Joe Groff

commit sha cf209ffa765857b98ab594a9ac8826cb31d6bed4

Relax test/SILOptimizer/optimize_keypath_objc.swift to pass on 32-bit release stdlib

view details

Argyrios Kyrtzidis

commit sha b77f8f4564dec91e197de99a1b80f3fadd1ed388

[utils/build-parser-lib] Set "LLVM_ENABLE_ZLIB=FALSE" since we don't need it for the parser library

view details

Anthony Latsis

commit sha 2643a7d8cd9ce7e86c941379d092cbbdeba79bad

Sema: Apply substitutions when checking type witnesses against associatedtype superclass bounds

view details

push time in 5 days

Pull request review commentapple/swift

[CodeCompletion] Add keypath apply subscript after open bracket

 static void collectPossibleCalleesByQualifiedLookup(     baseTy = MetatypeType::get(baseTy);    collectPossibleCalleesByQualifiedLookup(DC, baseTy, name, candidates);++  // Add 'subscript<T>(keyPath: KeyPath<Root, T>) -> T'.+  if (name.getBaseName() == DeclBaseName::createSubscript() &&+      (baseTy->getAnyNominal() || baseTy->is<ArchetypeType>())) {

As for meta type types, the only possible keypath is \.self (e.g. String.self[keyPath: \.self]) because keypath cannot refer static members. @benlangmuir Do you think limiting this to non-metatype types here makes sense?

rintaro

comment created time in 9 days

Pull request review commentapple/swift

[CodeCompletion] Add keypath apply subscript after open bracket

 static void collectPossibleCalleesByQualifiedLookup(     baseTy = MetatypeType::get(baseTy);    collectPossibleCalleesByQualifiedLookup(DC, baseTy, name, candidates);++  // Add 'subscript<T>(keyPath: KeyPath<Root, T>) -> T'.+  if (name.getBaseName() == DeclBaseName::createSubscript() &&+      (baseTy->getAnyNominal() || baseTy->is<ArchetypeType>())) {

Hm, I didn't know this works:

func foo(val: (String, Int)) {
  _ = val[keyPath: \.0]
}

This limitation is not needed.

rintaro

comment created time in 9 days

pull request commentapple/swift

[CodeCompletion] Add keypath apply subscript after open bracket

@swift-ci Please smoke test Windows

rintaro

comment created time in 9 days

pull request commentapple/swift

[CodeCompletion] Add keypath apply subscript after open bracket

@swift-ci Please smoke test

rintaro

comment created time in 9 days

pull request commentapple/swift

[CodeCompletion] Add keypath apply subscript after open bracket

@swift-ci Please smoke test

rintaro

comment created time in 9 days

PR opened apple/swift

[CodeCompletion] Add keypath apply subscript after open bracket

Add (keyPath: KeyPath<BaseType, T>) -> T type in the callee analysis for subscript expressions.

rdar://problem/61016147

+45 -17

0 comment

3 changed files

pr created time in 9 days

push eventrintaro/swift

Rintaro Ishizaki

commit sha 5fb4f13580c4c79e786527252a6d71f402b7318c

[CodeCompletion] Add keypath apply subscript after open bracket rdar://problem/61016147

view details

push time in 9 days

create barnchrintaro/swift

branch : ide-completion-keypathsubscript-rdar61016147

created branch time in 9 days

pull request commentapple/swift

[NFC][SourceManager] Rename line and column APIs for clarity

Windows bots don't support cross repo PR testing. @owenv feel free to merge this.

owenv

comment created time in 9 days

pull request commentapple/swift

[NFC][SourceManager] Rename line and column APIs for clarity

https://github.com/apple/llvm-project/pull/1252 @swift-ci Please test Windows

owenv

comment created time in 9 days

pull request commentapple/swift

[NFC][SourceManager] Rename line and column APIs for clarity

https://github.com/apple/llvm-project/pull/1252 @swift-ci Please test Windows

owenv

comment created time in 9 days

pull request commentapple/swift

[NFC][SourceManager] Rename line and column APIs for clarity

@swift-ci Please test Windows

owenv

comment created time in 9 days

pull request commentapple/swift

[5.3][NFC][SwiftSyntax] Fix 'Traling' typo

@swift-ci Please nominate

xwu

comment created time in 9 days

pull request commentapple/swift

[5.3][NFC][SwiftSyntax] Fix 'Traling' typo

https://github.com/apple/swift-syntax/pull/221 @swift-ci Please test

xwu

comment created time in 10 days

pull request commentapple/swift

[NFC][SwiftSyntax] Fix 'Traling' typo

@akyrtzi can force merge the swift-syntax PR tomorrow.

xwu

comment created time in 10 days

pull request commentapple/swift

[NFC][SourceManager] Rename line and column APIs for clarity

@owenv lldb needs to be updated.

/home/buildnode/jenkins/workspace/swift-PR-Linux-smoke-test/branch-master/llvm-project/lldb/source/Symbol/SwiftASTContext.cpp:2644:29: error: no member named 'getLineAndColumn' in 'swift::SourceManager'
      line_col = source_mgr.getLineAndColumn(source_loc);
                 ~~~~~~~~~~ ^
owenv

comment created time in 10 days

pull request commentapple/swift

[NFC][SourceManager] Rename line and column APIs for clarity

@swift-ci Please smoke test

owenv

comment created time in 10 days

PR closed apple/swift

[WIP][SourceManager] Reorganize methods for line and column

Reorganize SourceManager methods regarding filename, line and column. https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20170313/004232.html The first commit is strictly NFC.

Presumed locations ( respects #sourceLocation directive) getBufferIdentifierForLoc(Loc)getPresumedFilenameForLoc(Loc) getLineAndColumn(Loc)getPresumedLineAndColumnForLoc(Loc)

Physical locations (ignores #sourceLocation directive) getIdentifierForBuffer(BufferID) → ASIS new getIdentifierForBuffer(Loc) getLineNumber(Loc)getLineAndColumnInBuffer(Loc).first resolveFromLineCol(BufferID, Line, Column)getOffsetForLineAndColumnInBuffer(BufferID, Line, Column) getLocForLineCol(BufferID, Line, Column)getLocForLineAndColumnInBuffer(BufferID, Line, Column)


Audit checklist

  • AST
    • [ ] ASTScope::print
    • [ ] ConformanceLookupTable::compareProtocolConformances
    • [ ] DeclContext::printContext
    • [ ] GenericSignatureBuilder::RequirementSource::print
    • [x] SingleRawComment::SingleRawComment → Use physical line and column, modified
  • Basic
    • [ ] SourceLoc::printLineAndColumn
    • [x] swift::writeEditsInJson → Use physical filename, asis
  • Frontend
    • [ ] DiagnosticVerifier::verifyFile
    • [x] SourceManager::GetMessage → Use presumed filename, line and column, asis.
  • IDE
    • [ ] SerializedDiagnosticConsumer::addLocToRecord
    • [ ] CommentToXMLConverter::visitDocComment
    • [ ] swift::ide::getLocationInfo
    • [ ] swift::ide::reformat (lib/IDE/Formatting.cpp)
  • IRGen
    • [ ] PrettySourceFileEmission::print
    • [ ] IRGenDebugInfo::IRGenDebugInfo
  • Index
    • [ ] index::indexSourceFile
  • Parse
    • [x] Lexer::getLocForStartOfToken → Unused function, removed
    • [x] Parser::parseLineDirective → Use physical line, asis
    • [x] Parser::parseTrailingClosure → Use physical line, asis
    • [x] Parser::parseStmtReturn → Use physical column, modified
  • SIL
    • [ ] SILLocation::decode
  • SILGen
    • [x] SILGenFunction::emitLiteral (#file value) Use presumed filename, asis
    • [x] SILGenFunction::emitPreconditionOptionalHasValue Use presumed filename and line, modified
    • [x] RValueEmitter::visitMagicIdentifierLiteralExpr (#line and #column value) Use presumed line and column, asis
    • [ ] CoverageMapping::emitSourceRegions
  • Sema
    • [ ] NameBinder::addImport
    • [x] FailureDiagnosis::visitApplyExpr → Use physical line, asis
    • [x] swift::performStmtDiagnostics → Use physical line and column, modified
    • [ ] swift::performPCMacro
    • [ ] swift::performPlaygroundTransform
    • [x] static diagnoseAndMigrateVarParameterToBody → Use physical line, asis
  • Serialization
    • [ ] GroupNameCollectorFromJson::getGroupNameInternal
  • SourceKit
    • [ ] EditorDiagConsumer::handleDiagnostic
    • [ ] SwiftEditorSyntaxWalker::walkToNodePre
    • [ ] SwiftEditorDocument::replaceText
  • swift-ide-test
    • [ ] AnnotationPrinter::printLoc
    • [ ] ASTTypePrinter::walkToExprPre
    • [ ] ASTCommentPrinter::walkToDeclPre
    • [ ] USRPrinter::printLoc
+151 -149

2 comments

30 changed files

rintaro

pr closed time in 10 days

pull request commentapple/swift

[WIP][SourceManager] Reorganize methods for line and column

@owenv is taking over this effort in #31943 . Closing.

rintaro

comment created time in 10 days

pull request commentapple/swift

[NFC][SourceManager] Rename line and column APIs for clarity

@swift-ci Please smoke test

owenv

comment created time in 10 days

push eventapple/swift

Rintaro Ishizaki

commit sha f7aaf5bc94814b11ef985c79f35843ffb91594da

[CodeCompletion] Stop suggesting static member on a protoco meta type static members cannot be used on protocol metatypes. rdar://problem/58886969

view details

Rintaro Ishizaki

commit sha f6c62be12fde8270cf9a1701adc38ebda00fe123

Merge pull request #31933 from rintaro/ide-completion-rdar58886969 [CodeCompletion] Stop suggesting static member on a protoco meta type

view details

push time in 10 days

PR merged apple/swift

[CodeCompletion] Stop suggesting static member on a protoco meta type

Static members cannot be used on protocol metatypes.

rdar://problem/58886969

+42 -0

1 comment

2 changed files

rintaro

pr closed time in 10 days

push eventapple/swift

Rintaro Ishizaki

commit sha 2eb623ec4c7c9f8774fc0113f0340003aa9acdf4

[CodeCompletion] Handle variadic parameter in expr context analysis for call arguments. Consider variadic arguments 'skippable'. Also, don't treat 'VarargExpansionExpr' as a "context providing" expression. rdar://problem/62479469

view details

Rintaro Ishizaki

commit sha 6175c90d0ee476eaf83ff4575329468d1740702f

Merge pull request #31932 from rintaro/ide-completion-rdar62479469 [CodeCompletion] Handle variadic parameter in expr context analysis

view details

push time in 10 days

PR merged apple/swift

[CodeCompletion] Handle variadic parameter in expr context analysis

for call arguments. Consider variadic arguments 'skippable'. Also, don't treat VarargExpansionExpr as a "context providing" expression.

rdar://problem/62479469

+30 -7

1 comment

2 changed files

rintaro

pr closed time in 10 days

pull request commentapple/swift

[CodeCompletion] Stop suggesting static member on a protoco meta type

@swift-ci Please smoke test

rintaro

comment created time in 11 days

PullRequestEvent

PR closed apple/swift

[CodeCompletion] Stop suggesting static member on a protoco meta type

Static members cannot be used on protocol metatypes.

rdar://problem/58886969

+42 -0

1 comment

2 changed files

rintaro

pr closed time in 11 days

pull request commentapple/swift

[CodeCompletion] Stop suggesting static member on a protoco meta type

@swift-ci Please smoke test

rintaro

comment created time in 11 days

PR opened apple/swift

[CodeCompletion] Stop suggesting static member on a protoco meta type

Static members cannot be used on protocol metatypes.

rdar://problem/58886969

+42 -0

0 comment

2 changed files

pr created time in 11 days

create barnchrintaro/swift

branch : ide-completion-rdar58886969

created branch time in 11 days

PR opened apple/swift

[CodeCompletion] Handle variadic parameter in expr context analysis

for call arguments. Consider variadic arguments 'skippable'. Also, don't treat VarargExpansionExpr as a "context providing" expression.

rdar://problem/62479469

+30 -7

0 comment

2 changed files

pr created time in 11 days

pull request commentapple/swift

[CodeCompletion] Handle variadic parameter in expr context analysis

@swift-ci Please smoke test

rintaro

comment created time in 11 days

create barnchrintaro/swift

branch : ide-completion-rdar62479469

created branch time in 11 days

create barnchrintaro/swift

branch : sema-sanitizeexpr-rdar3254928

created branch time in 11 days

push eventapple/swift

Rintaro Ishizaki

commit sha 6116f7d528aa188e886f815bf693259cab09d9ea

[CodeCompletion] Disable fast-completion dependecy checking test cases while investigating. rdar://problem/62923248

view details

Rintaro Ishizaki

commit sha c5280c80ca13ef1c2fc777ce8bedbd5a90ceaf35

Merge pull request #31916 from rintaro/sourcekit-disabletest-rdar62923248 [CodeCompletion] Disable fast-completion dependecy checking test cases

view details

push time in 11 days

PR merged apple/swift

[CodeCompletion] Disable fast-completion dependecy checking test cases

while investigating non-deterministic failures

rdar://problem/62923248

+4 -0

1 comment

4 changed files

rintaro

pr closed time in 11 days

pull request commentapple/swift

[5.3][CodeCompletion] Avoid suggesting duplicated module names

@swift-ci Please nominate

rintaro

comment created time in 11 days

pull request commentapple/swift

[5.3][CodeCompletion] Avoid suggesting duplicated module names

@swift-ci Please test

rintaro

comment created time in 11 days

PR opened apple/swift

[5.3][CodeCompletion] Avoid suggesting duplicated module names r5.3

Cherry-pick of #31892 into release/5.3

  • Explanation: Overlay modules have the same name as the shadowed modules. For global symbol completions, we should not list both names because they are identical. Maintain a set of seen module names to avoid suggesting duplicated names.
  • Scope: Code completion for global symbols
  • Risk: Very low. The change is pretty simple.
  • Issue: rdar://problem/63370253
  • Testing: Added regression test cases
  • Reviewers: Nathan Hawes (@nathawes)
+78 -3

0 comment

6 changed files

pr created time in 11 days

create barnchrintaro/swift

branch : 5.3-ide-completion-duplicatedmodule-rdar63370253

created branch time in 11 days

push eventapple/swift

Rintaro Ishizaki

commit sha af27e8f18378769b8bb6650cb73e45df2045b50b

[CodeCompletion] Avoid suggesting duplicated module names in global completion result. Overly modules have the same name as the shadowed modules. We should not list both names because they are identical. Maintain a set of seen module names to avoid suggesting duplicated names. rdar://problem/63370253

view details

Rintaro Ishizaki

commit sha 522a9fe7c59e10807c03fd3e502d5b740146302b

Merge pull request #31892 from rintaro/ide-completion-duplicatedmodule-rdar63370253 [CodeCompletion] Avoid suggesting duplicated module names

view details

push time in 11 days

PR merged apple/swift

[CodeCompletion] Avoid suggesting duplicated module names

in global completion result. Overly modules have the same name as the shadowed modules. We should not list both names because they are identical.

Maintain a set of seen module names to avoid suggesting duplicated names.

rdar://problem/63370253

+78 -3

5 comments

6 changed files

rintaro

pr closed time in 11 days

pull request commentapple/swift

[CodeCompletion] Disable fast-completion dependecy checking test cases

@swift-ci Please smoke test

rintaro

comment created time in 11 days

PR opened apple/swift

[CodeCompletion] Disable fast-completion dependecy checking test cases

while investigating non-deterministic failures

rdar://problem/62923248

+4 -0

0 comment

4 changed files

pr created time in 11 days

create barnchrintaro/swift

branch : sourcekit-disabletest-rdar62923248

created branch time in 11 days

pull request commentapple/swift

[CodeCompletion] Avoid suggesting duplicated module names

Windows test succeeded: https://ci-external.swift.org/view/Pull%20Request/job/swift-PR-windows/3192/console

rintaro

comment created time in 12 days

pull request commentapple/swift

[CodeCompletion] Avoid suggesting duplicated module names

@swift-ci Please smoke test macOS

rintaro

comment created time in 12 days

pull request commentapple/swift

[CodeCompletion] Avoid suggesting duplicated module names

@swift-ci Please smoke test

rintaro

comment created time in 12 days

Pull request review commentapple/swift

[CodeCompletion] Avoid suggesting duplicated module names

+// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %S/Inputs/mock-sdk -F %S/Inputs/mock-sdk -code-completion-token=TYPE_GLOBAL | %FileCheck %s --check-prefix=TYPE_GLOBAL+// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %S/Inputs/mock-sdk -F %S/Inputs/mock-sdk -code-completion-token=EXPR_GLOBAL | %FileCheck %s --check-prefix=EXPR_GLOBAL+// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %S/Inputs/mock-sdk -F %S/Inputs/mock-sdk -code-completion-token=EXPR_MEMBER | %FileCheck %s --check-prefix=EXPR_MEMBER++import OverlayTest++func testGlobalType() {+    let _: #^TYPE_GLOBAL^#+// TYPE_GLOBAL: Begin completions+// TYPE_GLOBAL-NOT: OverlayTest[#Module#]+// TYPE_GLOBAL-DAG: Decl[Module]/None:                  OverlayTest[#Module#];

Yeah, I think you are right. Also, swift-idea-test doesn't sort the results. Do you know a better way to check this? Is possible, I want to avoid 2 FileCheck invocations for these checks.

rintaro

comment created time in 12 days

push eventrintaro/swift

Rintaro Ishizaki

commit sha af27e8f18378769b8bb6650cb73e45df2045b50b

[CodeCompletion] Avoid suggesting duplicated module names in global completion result. Overly modules have the same name as the shadowed modules. We should not list both names because they are identical. Maintain a set of seen module names to avoid suggesting duplicated names. rdar://problem/63370253

view details

push time in 12 days

pull request commentapple/swift

[CodeCompletion] Avoid suggesting duplicated module names

@swift-ci Please test Windows

rintaro

comment created time in 12 days

push eventrintaro/swift

Rintaro Ishizaki

commit sha 269a0cfb3368af60808247cdbaaa2d517814a8a0

[Test] Add -code-completion-diagnostics to see what's happening

view details

push time in 12 days

pull request commentapple/swift

[CodeCompletion] Avoid suggesting duplicated module names

@swift-ci Please smoke test

rintaro

comment created time in 12 days

PR opened apple/swift

[CodeCompletion] Avoid suggesting duplicated module names

in global completion result. Overly modules have the same name as the shadowed modules. We should not list both names because they are identical.

Maintain a set of seen module names to avoid suggesting duplicated names.

rdar://problem/63370253

+78 -3

0 comment

6 changed files

pr created time in 12 days

push eventrintaro/swift

Rintaro Ishizaki

commit sha 1e9d7d4dd483f9178c338236573d5cc0ee22959c

[CodeCompletion] Avoid suggesting duplicated module names in global completion result. Overly modules have the same name as the shadowed modules. We should not list both names because they are identical. Maintain a set of seen module names to avoid suggesting duplicated names. rdar://problem/63370253

view details

push time in 12 days

create barnchrintaro/swift

branch : ide-completion-duplicatedmodule-rdar63370253

created branch time in 12 days

pull request commentapple/swift

[WIP][Sema] Don't use 'DotSyntaxCallExpr' in non-typechecked synthesized body

@swift-ci Please Sourcekit Stress test

rintaro

comment created time in 13 days

push eventapple/swift

Rintaro Ishizaki

commit sha 0e7e4baa71b698426318ba8bb681bd7c30f41aee

[CodeCompletion] Add an already-fixed crashing test case rdar://problem/58470999

view details

Rintaro Ishizaki

commit sha a59a67ac5387cfa1ed5fc7c05ebda24242dffa13

Merge pull request #31787 from rintaro/ide-completion-rdar58470999 [CodeCompletion] Add an already-fixed crashing test case

view details

push time in 16 days

PR merged apple/swift

[CodeCompletion] Add an already-fixed crashing test case

rdar://problem/58470999

+9 -0

3 comments

1 changed file

rintaro

pr closed time in 16 days

more