mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/master' into master-next
This commit is contained in:
@@ -1711,9 +1711,8 @@ void DifferentiableAttr::setParameterIndices(IndexSubset *paramIndices) {
|
||||
|
||||
GenericEnvironment *DifferentiableAttr::getDerivativeGenericEnvironment(
|
||||
AbstractFunctionDecl *original) const {
|
||||
GenericEnvironment *derivativeGenEnv = original->getGenericEnvironment();
|
||||
if (auto derivativeGenSig = getDerivativeGenericSignature())
|
||||
return derivativeGenEnv = derivativeGenSig->getGenericEnvironment();
|
||||
return derivativeGenSig->getGenericEnvironment();
|
||||
return original->getGenericEnvironment();
|
||||
}
|
||||
|
||||
|
||||
@@ -1406,8 +1406,8 @@ void ConstraintSystem::solveForCodeCompletion(
|
||||
SolverState state(cs, FreeTypeVariableBinding::Disallow);
|
||||
|
||||
// Enable "diagnostic mode" by default, this means that
|
||||
// solver would produce "fixed" solutions along side of
|
||||
// valid ones, which helps code completion to rank choices.
|
||||
// solver would produce "fixed" solutions alongside valid
|
||||
// ones, which helps code completion to rank choices.
|
||||
state.recordFixes = true;
|
||||
|
||||
cs.solveImpl(solutions);
|
||||
|
||||
@@ -4731,17 +4731,16 @@ public:
|
||||
/// Construct and solve a system of constraints based on the given expression
|
||||
/// and its contextual information.
|
||||
///
|
||||
/// This menthod is designed to be used for code completion which means that
|
||||
/// This method is designed to be used for code completion which means that
|
||||
/// it doesn't mutate given expression, even if there is a single valid
|
||||
/// solution, and constraint solver is allowed to produce partially correct
|
||||
/// solutions, such solutions can have any number of holes in them, alongside
|
||||
/// with valid ones.
|
||||
/// solutions. Such solutions can have any number of holes in them.
|
||||
///
|
||||
/// \param expr The expression involved in code completion.
|
||||
///
|
||||
/// \param DC The declaration context this expression is found in.
|
||||
///
|
||||
/// \param contextualType The type expression is being converted to.
|
||||
/// \param contextualType The type \p expr is being converted to.
|
||||
///
|
||||
/// \param CTP When contextualType is specified, this indicates what
|
||||
/// the conversion is doing.
|
||||
|
||||
@@ -703,10 +703,10 @@ FunctionType *getTypeOfCompletionOperator(DeclContext *DC, Expr *LHS,
|
||||
/// Type check the given expression and provide results back to code completion
|
||||
/// via specified callback.
|
||||
///
|
||||
/// This menthod is designed to be used for code completion which means that
|
||||
/// it doesn't mutate AST and constraint solver is allowed to produce partially
|
||||
/// correct solutions, such solutions can have any number of holes in them,
|
||||
/// alongside with valid ones.
|
||||
/// This method is designed to be used for code completion which means that
|
||||
/// it doesn't mutate given expression, even if there is a single valid
|
||||
/// solution, and constraint solver is allowed to produce partially correct
|
||||
/// solutions. Such solutions can have any number of holes in them.
|
||||
void typeCheckForCodeCompletion(
|
||||
Expr *expr, DeclContext *DC, Type contextualType, ContextualTypePurpose CTP,
|
||||
llvm::function_ref<void(const constraints::Solution &)> callback);
|
||||
|
||||
@@ -26,9 +26,7 @@ cake: InfixOperator ..*.. has been changed to a PrefixOperator
|
||||
cake: Protocol ProtocolToEnum has been changed to a Enum
|
||||
|
||||
/* Renamed Decls */
|
||||
cake: Class SwiftObjcClass has ObjC name change from OldObjCClass to NewObjCClass
|
||||
cake: Func S1.foo5(x:y:) has been renamed to Func foo5(x:y:z:)
|
||||
cake: Func SwiftObjcClass.foo(a:b:c:) has ObjC name change from OldObjCFool:OldObjCA:OldObjCB: to NewObjCFool:NewObjCA:NewObjCB:
|
||||
cake: Struct Somestruct2 has been renamed to Struct NSSomestruct2
|
||||
|
||||
/* Type Changes */
|
||||
@@ -54,7 +52,6 @@ cake: Accessor GlobalLetChangedToVar.Set() is a new API without @available attri
|
||||
cake: Accessor fixedLayoutStruct2.BecomeFixedBinaryOrder.Modify() is a new API without @available attribute
|
||||
cake: Accessor fixedLayoutStruct2.BecomeFixedBinaryOrder.Set() is a new API without @available attribute
|
||||
cake: Class C0 is a new API without @available attribute
|
||||
cake: Class C5 is now without @objc
|
||||
cake: Class C8 is a new API without @available attribute
|
||||
cake: Constructor C1.init(_:) is a new API without @available attribute
|
||||
cake: Constructor ClassWithMissingDesignatedInits.init() is a new API without @available attribute
|
||||
@@ -62,7 +59,6 @@ cake: Constructor SubclassWithMissingDesignatedInits.init() is a new API without
|
||||
cake: Enum IceKind is now without @frozen
|
||||
cake: EnumElement FrozenKind.AddedCase is a new API without @available attribute
|
||||
cake: Func C1.foo1() is now not static
|
||||
cake: Func C5.dy_foo() is now with dynamic
|
||||
cake: Func FinalFuncContainer.NewFinalFunc() is now with final
|
||||
cake: Func FinalFuncContainer.NoLongerFinalFunc() is now without final
|
||||
cake: Func Float.floatHigher() is a new API without @available attribute
|
||||
@@ -94,8 +90,6 @@ cake: Var fixedLayoutStruct2.NoLongerWithFixedBinaryOrder is no longer a stored
|
||||
/* Protocol Conformance Change */
|
||||
cake: Class C7 has added a conformance to an existing protocol P1
|
||||
cake: Class SuperClassChange has added a conformance to an existing protocol P1
|
||||
cake: Func ObjCProtocol.addOptional() is now an optional requirement
|
||||
cake: Func ObjCProtocol.removeOptional() is no longer an optional requirement
|
||||
cake: Protocol P3 has added inherited protocol P4
|
||||
cake: Protocol P3 has removed inherited protocol P2
|
||||
cake: Struct fixedLayoutStruct has added a conformance to an existing protocol P2
|
||||
@@ -110,7 +104,6 @@ cake: Func RequiementChanges.addedFunc() has been added as a protocol requiremen
|
||||
cake: Var RequiementChanges.addedVar has been added as a protocol requirement
|
||||
|
||||
/* Class Inheritance Change */
|
||||
cake: Class C4 has changed its super class from APINotesTest.OldType to APINotesTest.NewType
|
||||
cake: Class SubGenericClass has changed its super class from cake.GenericClass<cake.P1> to cake.GenericClass<cake.P2>
|
||||
cake: Class SuperClassRemoval has removed its super class cake.C3
|
||||
cake: Class SuperClassRemoval no longer inherits convenience inits from its superclass
|
||||
|
||||
@@ -18,8 +18,5 @@
|
||||
// RUN: not %api-digester -diagnose-sdk -print-module -baseline-dir %t.baseline -module cake -I %t.mod2 -I %S/Inputs/APINotesLeft -module-cache-path %t.module-cache %clang-importer-sdk-nosource -abi -o %t.result -compiler-style-diags 2> %t.abi.compiler.diags
|
||||
// RUN: %FileCheck %s < %t.abi.compiler.diags
|
||||
|
||||
// CHECK: cake_current/cake.swift:31:14: error: cake: Class C4 has changed its super class from APINotesTest.OldType to APINotesTest.NewType
|
||||
// CHECK: cake_current/cake.swift:33:14: error: cake: Class C5 is now without @objc
|
||||
// CHECK: cake_current/cake.swift:35:23: error: cake: Func C5.dy_foo() is now with dynamic
|
||||
// CHECK: cake_current/cake.swift:39:15: error: cake: Struct C6 is now with @frozen
|
||||
// CHECK: cake_current/cake.swift:41:13: error: cake: Enum IceKind is now without @frozen
|
||||
|
||||
@@ -1573,6 +1573,7 @@ SwiftDeclCollector::constructInitNode(ConstructorDecl *CD) {
|
||||
bool swift::ide::api::
|
||||
SDKContext::shouldIgnore(Decl *D, const Decl* Parent) const {
|
||||
// Exclude all clang nodes if we're comparing Swift decls specifically.
|
||||
// FIXME: isFromClang also excludes Swift decls with @objc. We should allow those.
|
||||
if (Opts.SwiftOnly && isFromClang(D)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2653,7 +2653,9 @@ static CheckerOptions getCheckOpts(int argc, char *argv[]) {
|
||||
Opts.AbortOnModuleLoadFailure = options::AbortOnModuleLoadFailure;
|
||||
Opts.LocationFilter = options::LocationFilter;
|
||||
Opts.PrintModule = options::PrintModule;
|
||||
Opts.SwiftOnly = options::SwiftOnly;
|
||||
// When ABI checking is enabled, we should only include Swift symbols because
|
||||
// the checking logics are language-specific.
|
||||
Opts.SwiftOnly = options::Abi || options::SwiftOnly;
|
||||
Opts.SkipOSCheck = options::DisableOSChecks;
|
||||
for (int i = 1; i < argc; ++i)
|
||||
Opts.ToolArgs.push_back(argv[i]);
|
||||
|
||||
Reference in New Issue
Block a user