swift-ci
430744b2f3
Merge remote-tracking branch 'origin/master' into master-next
2018-04-06 12:12:17 -07:00
Slava Pestov
c35d508600
Merge pull request #15731 from slavapestov/decl-checker-cleanup-part-6
...
Nuke DeclChecker::IsFirstPass
2018-04-06 12:03:48 -07:00
Slava Pestov
5e4f5a4fd5
Sema: Remove DeclChecker::IsFirstPass
2018-04-06 00:55:43 -07:00
Slava Pestov
435d66f70b
Sema: Add separate pass for checkConformancesInContext()
...
I tried doing this directly from typeCheckDecl(), but it breaks
associated type inference. We can figure this out later when
declaration checking becomes lazier and more incremental.
Note that typo correction does not force witnesses of
synthesized conformances. This means that a typo correction
from a top-level form will no longer pick up synthesized
witnesses, and will find the protocol requirement instead.
To give a test the same behavior as before, I put the
expression in a function body instead of a top-level form.
Note that we already had the same behavior with typo
correction from pattern binding initializers and other
contexts that are type checked before conformances.
2018-04-06 00:55:43 -07:00
Slava Pestov
ec42da0ba7
Sema: Fix quadratic checkFunctionErrorHandling() in WMO mode
2018-04-06 00:54:22 -07:00
Slava Pestov
b4e145dc34
SE-0193: @inlinable implies @usableFromInline
2018-04-06 00:02:29 -07:00
Slava Pestov
618cbca27d
Sema: Rename some 'versioned' diagnostics
2018-04-06 00:02:29 -07:00
Slava Pestov
fb0233aae5
Sema: Clean up createDesignatedInitOverride()
2018-04-06 00:02:29 -07:00
swift-ci
2fda5ce1f5
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 22:53:22 -07:00
Doug Gregor
431dd1c6df
Merge pull request #15758 from ikesyo/serialization-using-over-typedef
...
[gardening][Serialization] Replace `typedef` with `using`
2018-04-05 22:43:11 -07:00
swift-ci
b9b0db1f42
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 22:36:21 -07:00
Slava Pestov
86fef48e5d
Merge pull request #15784 from slavapestov/concrete-witness-method-fix
...
Preliminary "opaque conformance" support in SIL
2018-04-05 22:21:20 -07:00
swift-ci
3d96bd77d1
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 19:49:57 -07:00
Slava Pestov
a4b91d252d
Merge pull request #15666 from slavapestov/se-0193-default-args
...
SE-0193: Public default argument generators cannot reference declarations that are @usableFromInline
2018-04-05 19:46:20 -07:00
swift-ci
58b2cad4ee
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 19:11:48 -07:00
Joe Groff
78899a5f83
Merge pull request #15766 from jckarter/dont-deserialize-into-lowered-sil
...
SIL Deserializer: Don't deserialize during "lowered" stage.
2018-04-05 18:54:37 -07:00
swift-ci
c991563cad
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 18:51:37 -07:00
swift-ci
5e74cdabd7
Merge pull request #15773 from vedantk/cov-decls
2018-04-05 18:42:40 -07:00
Slava Pestov
7147d35c90
IRGen: Remove apparently-dead workaround
2018-04-05 18:28:08 -07:00
Slava Pestov
4017baa5cb
SIL Parser: Simplify witness_method parsing
2018-04-05 18:28:08 -07:00
Vedant Kumar
88a966d580
Move some assertion logic into a helper, NFC
2018-04-05 17:52:41 -07:00
swift-ci
667a95084b
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 17:29:30 -07:00
Slava Pestov
b2e85f7eb5
SILGen: Use a concrete conformance if we have a witness_method call on a concrete type
2018-04-05 17:17:24 -07:00
Slava Pestov
0d1a0a694a
SIL: Tweak SIL verifier condition for witness_method conformance
...
- Existential type cannot appear here at all, don't handle it explicitly
- Archetypes can have concrete conformances via their superclass
2018-04-05 17:17:24 -07:00
Jordan Rose
2cedf1c86a
[ClangImporter] Bulk up some comments per Graydon's feedback. ( #15780 )
...
DavidU would probably say this function needs to be split up more too,
and he wouldn't be wrong, but that's a bigger change. (The original
change is getting cherry-picked.)
2018-04-05 17:09:14 -07:00
swift-ci
ff888b55b5
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 17:08:21 -07:00
Slava Pestov
96901f1983
SE-0193: Public default argument generators cannot reference declarations that are @usableFromInline
2018-04-05 16:56:34 -07:00
Arnold Schwaighofer
25498ea4a7
Merge pull request #15772 from aschwaighofer/irgen_scalar_checked_cast_fix
...
IRGen: Add nil checks to scalarCheckedCasts
2018-04-05 16:49:34 -07:00
Slava Pestov
4af8ff6872
Sema: TypeChecker::getFragileFunctionKind() returns if @usableFromInline references are allowed
...
For now, always true, soon, default arguments of public functions
will return false here.
2018-04-05 16:47:26 -07:00
swift-ci
1a918cd7bd
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 16:44:36 -07:00
Slava Pestov
b280f61f83
Sema: Resilience diagnostics pre-compute a few things
2018-04-05 16:42:45 -07:00
Xi Ge
6067b65edb
Merge pull request #15778 from nkcsgexi/digester-clean
...
swift-api-digester: minor refactoring. NFC
2018-04-05 16:40:28 -07:00
Slava Pestov
05ea885465
AST: More renaming of 'versioned' things
2018-04-05 16:09:44 -07:00
swift-ci
880857452c
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 15:59:28 -07:00
Xi Ge
4705e0790c
swift-api-digester: rename SDK nodes internally. NFC
2018-04-05 15:55:41 -07:00
Slava Pestov
6198f309be
Merge pull request #15762 from slavapestov/versioned-is-gone
...
Versioned is gone
2018-04-05 15:49:53 -07:00
Doug Gregor
c8ab588fb1
Merge pull request #15776 from DougGregor/anyobject-lookup-unavailable
...
[Type checker] Prefer available declarations in AnyObject lookup.
2018-04-05 15:41:47 -07:00
Xi Ge
72f49e2351
swift-api-digester: separate internal and external names for node kinds. NFC
2018-04-05 15:38:17 -07:00
Doug Gregor
d20bcf14c2
[Type checker] Prefer available declarations in AnyObject lookup.
...
When we perform AnyObject lookup, we can find multiple declarations with
the same signature. When we do so, we pick fairly arbitrarily among them.
However, make sure that we don’t pick an unavailable declaration when
an available declaration is… available.
Fixes rdar://problem/39115471.
2018-04-05 14:44:13 -07:00
Slava Pestov
ff56a074af
AST: Clean up the terminology around @usableFromInline in a couple of places
2018-04-05 14:31:32 -07:00
Joe Groff
f24fd24026
SIL: Don't attempt to deserialize witness tables on lookup in lowered SIL.
2018-04-05 14:26:12 -07:00
swift-ci
859319606a
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 14:25:28 -07:00
Joe Groff
e9f1225055
Merge pull request #15767 from jckarter/future-proof-symbolic-references
...
Demangler: Reserve space for more kinds of symbolic reference in the future.
2018-04-05 14:19:20 -07:00
Jordan Rose
c3fc74e10c
[ClangImporter] Honor -Xcc -W* flags for en/disabling Clang warnings ( #15771 )
...
Previously we set up the diagnostic options too early for these flags
to be honored, in order to diagnose problems in parsing the arguments
being passed to Clang. The solution is to decide that that diagnostic
engine is a temporary one and to create a proper one later. (And if
this sounds like a lousy solution, I don't disagree, but it's what
Clang does too.)
rdar://problem/39197895 and possibly something older but I can't find it
2018-04-05 14:08:03 -07:00
Vedant Kumar
dded2b9b99
[PGO] Remove a null check, NFC
...
The else subexpression of an IfExpr should never be null. The AST
verifier checks for this.
2018-04-05 13:38:09 -07:00
Vedant Kumar
daa094e5e0
[Coverage] Only instrument functions which are definitions
...
The ASTs for functions which aren't definitions may not be fully
typechecked or well-formed, so: avoid looking at them.
This fixes at least one assertion failure seen while building a project
with coverage, and is probably good for some substantial compile-time
improvements with coverage enabled.
rdar://39069115
2018-04-05 13:33:43 -07:00
Arnold Schwaighofer
0f8548153f
IRGen: Add nil checks to scalarCheckedCasts
...
We claim to handle optional input types but not all paths of this function actually do.
rdar://39195672
2018-04-05 13:04:27 -07:00
swift-ci
0906bc78a1
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 12:36:44 -07:00
Pavel Yaskevich
5c82eaa287
Merge pull request #15761 from xedin/rdar-38272904
...
[CSBindings] Look through non-value types earlier to avoid producing …
2018-04-05 12:32:53 -07:00
swift-ci
d48f8491a1
Merge remote-tracking branch 'origin/master' into master-next
2018-04-05 11:34:36 -07:00