Skip to content

Commit cb8a510

Browse files
committed
---
yaml --- r: 335838 b: refs/heads/rxwei-patch-1 c: 03f7fb7 h: refs/heads/master
1 parent da4caf3 commit cb8a510

File tree

11 files changed

+94
-119
lines changed

11 files changed

+94
-119
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: cdffaf3a07a9b10cee82eb3a5ca117942a92378f
1018+
refs/heads/rxwei-patch-1: 03f7fb75e044f9b9c8b74b5c3f8ab1b0b153cf77
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/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ static void addMandatoryOptPipeline(SILPassPipelinePlan &P) {
9999
// optimizer pipeline is run implying we can put a pass that requires OSSA
100100
// there.
101101
const auto &Options = P.getOptions();
102-
P.addClosureLifetimeFixup();
103-
if (Options.shouldOptimize()) {
102+
if (Options.EnableMandatorySemanticARCOpts && Options.shouldOptimize()) {
104103
P.addSemanticARCOpts();
105104
}
105+
P.addClosureLifetimeFixup();
106106
if (Options.StripOwnershipDuringDiagnosticsPipeline)
107107
P.addOwnershipModelEliminator();
108108
P.addMandatoryInlining();

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,10 +1063,8 @@ static Type diagnoseUnknownType(TypeResolution resolution,
10631063
AbstractFunctionDecl *methodDecl = dc->getInnermostMethodContext();
10641064
bool declaringMethod = methodDecl &&
10651065
methodDecl->getDeclContext() == dc->getParentForLookup();
1066-
bool isPropertyOfClass = insideClass &&
1067-
options.is(TypeResolverContext::PatternBindingDecl);
10681066

1069-
if (((!insideClass || !declaringMethod) && !isPropertyOfClass &&
1067+
if (((!insideClass || !declaringMethod) &&
10701068
!options.is(TypeResolverContext::GenericRequirement)) ||
10711069
options.is(TypeResolverContext::ExplicitCastExpr)) {
10721070
Type SelfType = nominal->getSelfInterfaceType();

branches/rxwei-patch-1/test/Frontend/dependencies.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// CHECK-BASIC-LABEL: - :
1111
// CHECK-BASIC: Inputs/empty\ file.swift
1212
// CHECK-BASIC: Swift.swiftmodule
13-
// CHECK-BASIC-NOT: {{ }}:{{ }}
13+
// CHECK-BASIC-NOT: {{[^\\]}}:
1414

1515
// CHECK-BASIC-YAML-LABEL: depends-external:
1616
// CHECK-BASIC-YAML-NOT: empty\ file.swift
@@ -37,7 +37,7 @@
3737
// CHECK-MULTIPLE-OUTPUTS-LABEL: empty\ file.h :
3838
// CHECK-MULTIPLE-OUTPUTS: Inputs/empty\ file.swift
3939
// CHECK-MULTIPLE-OUTPUTS: Swift.swiftmodule
40-
// CHECK-MULTIPLE-OUTPUTS-NOT: {{ }}:{{ }}
40+
// CHECK-MULTIPLE-OUTPUTS-NOT: {{[^\\]}}:
4141

4242
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/dependencies/extra-header.h -emit-dependencies-path - -resolve-imports %s | %FileCheck -check-prefix=CHECK-IMPORT %s
4343
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/dependencies/extra-header.h -track-system-dependencies -emit-dependencies-path - -resolve-imports %s | %FileCheck -check-prefix=CHECK-IMPORT-TRACK-SYSTEM %s
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
2-
#ifndef FooHelperSub_FooHelperSub_h
3-
#define FooHelperSub_FooHelperSub_h
4-
51
int fooHelperSubFunc1(int a);
62

73
enum FooHelperSubEnum1 {
@@ -13,5 +9,3 @@ enum {
139
FooHelperSubUnnamedEnumeratorA1
1410
};
1511

16-
#endif
17-
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
2-
#ifndef FooHelper_FooHelper_h
3-
#define FooHelper_FooHelper_h
4-
5-
#include <FooHelperSub/FooHelperSub.h>
1+
#import <FooHelperSub/FooHelperSub.h>
62

73
int fooHelperFunc1(int a);
84

@@ -11,5 +7,3 @@ enum {
117
FooHelperUnnamedEnumeratorA2,
128
};
139

14-
#endif
15-

branches/rxwei-patch-1/test/Index/Store/output-failure.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %empty-directory(%t)
22
// RUN: mkdir %t/idx
3-
// UNSUPPORTED: OS=windows-msvc
43

54
// Before indexing, do a dry-run to ensure any clang modules are cached. We
65
// want to isolate the error that comes from swift's indexing support, not

branches/rxwei-patch-1/test/Misc/dump_api.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %target-swift-frontend -typecheck %s -dump-api-path %t.dump
2-
// RUN: diff -du %S/Inputs/dumped_api.swift %t.dump/dump_api.swift
2+
// RUN: diff -u %S/Inputs/dumped_api.swift %t.dump/dump_api.swift
33

44
public class _AnyIteratorBase {}
55

branches/rxwei-patch-1/test/type/self.swift

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,6 @@ class A<T> {
7070
// expected-warning@-1 {{conditional cast from 'Self' to 'Self' always succeeds}}
7171
// expected-warning@-2 {{conditional downcast from 'Self?' to 'A<T>' is equivalent to an implicit conversion to an optional 'A<T>'}}
7272
}
73-
func copy() -> Self {
74-
let copy = Self.init(a: 11)
75-
return copy
76-
}
77-
78-
var copied: Self { // expected-error {{'Self' is only available in a protocol or as the result of a method in a class; did you mean 'A'?}}
79-
let copy = Self.init(a: 11)
80-
return copy
81-
}
8273
}
8374

8475
class B: A<Int> {
@@ -97,14 +88,6 @@ class B: A<Int> {
9788
override class func y() {
9889
print("override \(Self.self).\(#function)")
9990
}
100-
override func copy() -> Self {
101-
let copy = super.copy() as! Self // supported
102-
return copy
103-
}
104-
override var copied: Self { // expected-error {{'Self' is only available in a protocol or as the result of a method in a class; did you mean 'B'?}}
105-
let copy = super.copied as! Self // unsupported
106-
return copy
107-
}
10891
}
10992

11093
class C {
@@ -138,15 +121,6 @@ struct S2 {
138121
// expected-warning@-1 {{conditional cast from 'S2.S3<T>' to 'S2.S3<T>' always succeeds}}
139122
}
140123
}
141-
func copy() -> Self {
142-
let copy = Self.init()
143-
return copy
144-
}
145-
146-
var copied: Self {
147-
let copy = Self.init()
148-
return copy
149-
}
150124
}
151125

152126
extension S2 {

branches/rxwei-patch-1/tools/swift-api-digester/ModuleAnalyzerNodes.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
#include "swift/AST/USRGeneration.h"
3939
#include "swift/AST/GenericSignature.h"
4040
#include "swift/AST/ProtocolConformance.h"
41-
#include "swift/AST/DiagnosticsModuleDiffer.h"
4241
#include "swift/Basic/ColorUtils.h"
4342
#include "swift/Basic/JSONSerialization.h"
4443
#include "swift/Basic/LLVMInitialize.h"
@@ -196,7 +195,6 @@ class SDKContext {
196195
bool shouldIgnore(Decl *D, const Decl* Parent = nullptr) const;
197196
ArrayRef<BreakingAttributeInfo> getBreakingAttributeInfo() const { return BreakingAttrs; }
198197
Optional<uint8_t> getFixedBinaryOrder(ValueDecl *VD) const;
199-
200198
template<class YAMLNodeTy, typename ...ArgTypes>
201199
void diagnose(YAMLNodeTy node, Diag<ArgTypes...> ID,
202200
typename detail::PassArgument<ArgTypes>::type... args) {
@@ -338,19 +336,6 @@ class SDKNodeDecl: public SDKNode {
338336
uint8_t getFixedBinaryOrder() const { return *FixedBinaryOrder; }
339337
virtual void jsonize(json::Output &Out) override;
340338
virtual void diagnose(SDKNode *Right) override;
341-
342-
// The first argument of the diag is always screening info.
343-
template<typename ...ArgTypes>
344-
void emitDiag(Diag<StringRef, ArgTypes...> ID,
345-
typename detail::PassArgument<ArgTypes>::type... Args) const {
346-
// Don't emit objc decls if we care about swift exclusively
347-
if (Ctx.getOpts().SwiftOnly) {
348-
if (isObjc())
349-
return;
350-
}
351-
Ctx.getDiags().diagnose(SourceLoc(), ID, getScreenInfo(),
352-
std::move(Args)...);
353-
}
354339
};
355340

356341
class SDKNodeRoot: public SDKNode {

0 commit comments

Comments
 (0)