Skip to content

Commit 384ab78

Browse files
committed
[Diagnostic verifier] Make '<unknown>' check optional
Added frontend option '-verify-ignore-unknown'
1 parent 827c6e7 commit 384ab78

35 files changed

+81
-98
lines changed

include/swift/Basic/DiagnosticOptions.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class DiagnosticOptions {
3030
VerifyAndApplyFixes
3131
} VerifyMode = NoVerify;
3232

33+
/// Indicates whether to allow diagnostics for \c <unknown> locations if
34+
/// \c VerifyMode is not \c NoVerify.
35+
bool VerifyIgnoreUnknown = false;
36+
3337
/// Indicates whether diagnostic passes should be skipped.
3438
bool SkipDiagnosticPasses = false;
3539

include/swift/Frontend/DiagnosticVerifier.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace swift {
3333
///
3434
/// This returns true if there are any mismatches found.
3535
bool verifyDiagnostics(SourceManager &SM, ArrayRef<unsigned> BufferIDs,
36-
bool autoApplyFixes);
36+
bool autoApplyFixes, bool ignoreUnknown);
3737
}
3838

3939
#endif

include/swift/Option/FrontendOptions.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def verify : Flag<["-"], "verify">,
6363
"annotations">;
6464
def verify_apply_fixes : Flag<["-"], "verify-apply-fixes">,
6565
HelpText<"Like -verify, but updates the original source file">;
66+
def verify_ignore_unknown: Flag<["-"], "verify-ignore-unknown">,
67+
HelpText<"Allow diagnostics for '<unknown>' location in verify mode">;
6668

6769
def show_diagnostics_after_fatal : Flag<["-"], "show-diagnostics-after-fatal">,
6870
HelpText<"Keep emitting subsequent diagnostics after a fatal error">;

lib/Frontend/CompilerInvocation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,7 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
10671067
Opts.VerifyMode = DiagnosticOptions::Verify;
10681068
if (Args.hasArg(OPT_verify_apply_fixes))
10691069
Opts.VerifyMode = DiagnosticOptions::VerifyAndApplyFixes;
1070+
Opts.VerifyIgnoreUnknown |= Args.hasArg(OPT_verify_ignore_unknown);
10701071
Opts.SkipDiagnosticPasses |= Args.hasArg(OPT_disable_diagnostic_passes);
10711072
Opts.ShowDiagnosticsAfterFatalError |=
10721073
Args.hasArg(OPT_show_diagnostics_after_fatal);

lib/Frontend/DiagnosticVerifier.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,15 +715,16 @@ void swift::enableDiagnosticVerifier(SourceManager &SM) {
715715
}
716716

717717
bool swift::verifyDiagnostics(SourceManager &SM, ArrayRef<unsigned> BufferIDs,
718-
bool autoApplyFixes) {
718+
bool autoApplyFixes, bool ignoreUnknown) {
719719
auto *Verifier = (DiagnosticVerifier*)SM.getLLVMSourceMgr().getDiagContext();
720720
SM.getLLVMSourceMgr().setDiagHandler(nullptr, nullptr);
721721

722722
bool HadError = false;
723723

724724
for (auto &BufferID : BufferIDs)
725725
HadError |= Verifier->verifyFile(BufferID, autoApplyFixes);
726-
HadError |= Verifier->verifyUnknown();
726+
if (!ignoreUnknown)
727+
HadError |= Verifier->verifyUnknown();
727728

728729
delete Verifier;
729730

lib/FrontendTool/FrontendTool.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,8 @@ int swift::performFrontend(ArrayRef<const char *> Args,
992992
HadError = verifyDiagnostics(
993993
Instance->getSourceMgr(),
994994
Instance->getInputBufferIDs(),
995-
diagOpts.VerifyMode == DiagnosticOptions::VerifyAndApplyFixes);
995+
diagOpts.VerifyMode == DiagnosticOptions::VerifyAndApplyFixes,
996+
diagOpts.VerifyIgnoreUnknown);
996997

997998
DiagnosticEngine &diags = Instance->getDiags();
998999
if (diags.hasFatalErrorOccurred() &&

test/APINotes/basic.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -I %S/Inputs/custom-modules -F %S/Inputs/custom-frameworks
1+
// RUN: %target-typecheck-verify-swift -I %S/Inputs/custom-modules -F %S/Inputs/custom-frameworks -verify-ignore-unknown
22
import APINotesTest
33
import APINotesFrameworkTest
44

@@ -24,8 +24,7 @@ func testSwiftName() {
2424
jumpTo(0, 0, 0) // expected-error{{missing argument labels 'x:y:z:' in call}}
2525
}
2626

27-
// XFAIL: *
28-
// FIXME: unknown location errors
27+
// FIXME: Remove -verify-ignore-unknown.
2928
// <unknown>:0: error: unexpected note produced: 'ANTGlobalValue' was obsoleted in Swift 3
3029
// <unknown>:0: error: unexpected note produced: 'PointStruct' was obsoleted in Swift 3
3130
// <unknown>:0: error: unexpected note produced: 'real_t' was obsoleted in Swift 3

test/ClangImporter/MixedSource/import-mixed-framework.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -F %t -typecheck %s
77

88
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t/Mixed.framework/Modules/Mixed.swiftmodule/%target-swiftmodule-name %S/Inputs/mixed-framework/Mixed.swift -import-underlying-module -F %t -module-name Mixed -disable-objc-attr-requires-foundation-module
9-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -F %t -typecheck %s -verify
9+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -F %t -typecheck %s -verify -verify-ignore-unknown
1010

1111
// XFAIL: linux
1212

@@ -36,6 +36,5 @@ func testAnyObject(_ obj: AnyObject) {
3636
_ = obj.protoProperty
3737
}
3838

39-
// XFAIL: *
40-
// FIXME: unknown location errors
39+
// FIXME: Remove -verify-ignore-unknown.
4140
// <unknown>:0: error: unexpected note produced: 'SwiftClassWithCustomName' was obsoleted in Swift 3

test/ClangImporter/SceneKit_test.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift
1+
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown
22

33
// REQUIRES: objc_interop
44
// REQUIRES: OS=macosx
@@ -236,8 +236,7 @@ func useRenamedAPIs(actionable: SCNActionable, action: SCNAction, data: Data,
236236
handler: bufferBindingBlock)
237237
}
238238

239-
// XFAIL: *
240-
// FIXME: unknown location errors
239+
// FIXME: Remove -verify-ignore-unknown.
241240
// <unknown>:0: error: unexpected note produced: 'SCNGeometrySourceSemantic' was obsoleted in Swift 3
242241
// <unknown>:0: error: unexpected note produced: 'SCNLightType' was obsoleted in Swift 3
243242
// <unknown>:0: error: unexpected note produced: 'SCNLightingModel' was obsoleted in Swift 3

test/ClangImporter/attr-swift_name_renaming.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/custom-modules -Xcc -w -typecheck -verify %s
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/custom-modules -Xcc -w -typecheck -verify -verify-ignore-unknown %s
22

33
// XFAIL: linux
44

@@ -52,8 +52,7 @@ func test() {
5252
Foo.accepts {}
5353
}
5454

55-
// XFAIL: *
56-
// FIXME: unknown location errors
55+
// FIXME: Remove -verify-ignore-unknown.
5756
// <unknown>:0: error: unexpected note produced: 'ColorType' was obsoleted in Swift 3
5857
// <unknown>:0: error: unexpected note produced: did you mean 'Overslept'?
5958
// <unknown>:0: error: unexpected note produced: did you mean 'TooHard'?

test/ClangImporter/attr-swift_private.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t && mkdir -p %t
22
// RUN: %build-clang-importer-objc-overlays
33

4-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -I %S/Inputs/custom-modules -typecheck %s -verify
4+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -I %S/Inputs/custom-modules -typecheck %s -verify -verify-ignore-unknown
55
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -Xllvm -new-mangling-for-tests -I %S/Inputs/custom-modules -emit-ir %s -D IRGEN | %FileCheck %s
66

77
// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk-nosource -I %t) -I %S/Inputs/custom-modules -print-module -source-filename="%s" -module-to-print SwiftPrivateAttr > %t.txt
@@ -140,8 +140,7 @@ func testRawNames() {
140140
}
141141
#endif
142142

143-
// XFAIL: *
144-
// FIXME: unknown location errors
143+
// FIXME: Remove -verify-ignore-unknown.
145144
// <unknown>:0: error: unexpected note produced: '__PrivCFTypeRef' was obsoleted in Swift 3
146145
// <unknown>:0: error: unexpected note produced: '__PrivCFSubRef' was obsoleted in Swift 3
147146
// <unknown>:0: error: unexpected note produced: '__fooWithOneArg' has been explicitly marked unavailable here

test/ClangImporter/availability.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules %s
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules %s -verify-ignore-unknown
22

33
// REQUIRES: objc_interop
44

@@ -116,8 +116,7 @@ func testUnavailableRenamedEnum() {
116116
_ = NSClothingStyleOfficeCasual // expected-error{{'NSClothingStyleOfficeCasual' has been renamed to 'NSClothingStyle.semiFormal'}} {{7-34=NSClothingStyle.semiFormal}}
117117
}
118118

119-
// XFAIL: *
120-
// FIXME: unknown location errors
119+
// FIXME: Remove -verify-ignore-unknown.
121120
// <unknown>:0: error: unexpected warning produced: imported declaration 'dispatch_sync' could not be mapped to 'DispatchQueue.sync(self:execute:)'
122121
// <unknown>:0: error: unexpected note produced: 'NSConnectionDidDieNotification' has been explicitly marked unavailable here
123122
// <unknown>:0: error: unexpected note produced: 'CGColorCreateGenericGray' was obsoleted in Swift 3

test/ClangImporter/cf.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -typecheck -verify -import-cf-types -I %S/Inputs/custom-modules %s
1+
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -typecheck -verify -import-cf-types -I %S/Inputs/custom-modules %s -verify-ignore-unknown
22

33
// REQUIRES: objc_interop
44

@@ -161,7 +161,6 @@ protocol SwiftProto {}
161161
extension CCRefrigerator: ObjCProto {} // expected-error {{Core Foundation class 'CCRefrigerator' cannot conform to @objc protocol 'ObjCProto' because Core Foundation types are not classes in Objective-C}}
162162
extension CCRefrigerator: SwiftProto {}
163163

164-
// XFAIL: *
165-
// FIXME: unknown location errors
164+
// FIXME: Remove -verify-ignore-unknown.
166165
// <unknown>:0: error: unexpected note produced: 'CCFridgeRef' was obsoleted in Swift 3
167166
// <unknown>:0: error: unexpected note produced: 'NotAProblemRef' was obsoleted in Swift 3

test/ClangImporter/objc_factory_method.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: rm -rf %t && mkdir -p %t
22
// RUN: %build-clang-importer-objc-overlays
33

4-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -target x86_64-apple-macosx10.51 -typecheck %s -verify
4+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -target x86_64-apple-macosx10.51 -typecheck %s -verify -verify-ignore-unknown
55

66
// REQUIRES: OS=macosx
77
// REQUIRES: objc_interop
@@ -111,8 +111,7 @@ func testURL() {
111111
_ = NSURLRequest.URLRequestWithURL(url as URL) // expected-error{{'URLRequestWithURL' is unavailable: use object construction 'NSURLRequest(url:)'}}
112112
}
113113

114-
// XFAIL: *
115-
// FIXME: unknown location errors
114+
// FIXME: Remove -verify-ignore-unknown.
116115
// <unknown>:0: error: unexpected note produced: 'hiveWithQueen' has been explicitly marked unavailable here
117116
// <unknown>:0: error: unexpected note produced: 'decimalNumberWithMantissa(_:exponent:isNegative:)' has been explicitly marked unavailable here
118117
// <unknown>:0: error: unexpected note produced: 'URLWithString' has been explicitly marked unavailable here

test/ClangImporter/objc_implicit_with.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify -verify-ignore-unknown
22

33
// REQUIRES: objc_interop
44

@@ -63,6 +63,5 @@ func testFactoryMethodWithKeywordArgument() {
6363
_ = NSXPCInterface(with: prot) // not "protocol:"
6464
}
6565

66-
// XFAIL: *
67-
// FIXME: unknown location errors
66+
// FIXME: Remove -verify-ignore-unknown.
6867
// <unknown>:0: error: unexpected note produced: 'hiveWithQueen' has been explicitly marked unavailable here

test/ClangImporter/objc_init.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown
22

33
// REQUIRES: objc_interop
44
// REQUIRES: OS=macosx
@@ -172,6 +172,5 @@ func classPropertiesAreNotInit() -> ProcessInfo {
172172
return procInfo
173173
}
174174

175-
// XFAIL: *
176-
// FIXME: unknown location errors
175+
// FIXME: Remove -verify-ignore-unknown.
177176
// <unknown>:0: error: unexpected note produced: 'NSProcessInfo' was obsoleted in Swift 3

test/ClangImporter/objc_override.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown
22

33
// REQUIRES: objc_interop
44

@@ -88,7 +88,6 @@ class FailSub : FailBase {
8888
override class func processValue() {} // expected-error {{overriding a throwing @objc method with a non-throwing method is not supported}}
8989
}
9090

91-
// XFAIL: *
92-
// FIXME: unknown location errors
91+
// FIXME: Remove -verify-ignore-unknown.
9392
// <unknown>:0: error: unexpected note produced: overridden declaration is here
9493
// <unknown>:0: error: unexpected note produced: setter for 'boolProperty' declared here

test/ClangImporter/objc_parse.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown
22

33
// REQUIRES: objc_interop
44

@@ -613,6 +613,5 @@ class NewtypeUser {
613613
@objc func intNewtypeOptional(a: MyInt?) {} // expected-error {{method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C}}
614614
}
615615

616-
// XFAIL: *
617-
// FIXME: unknown location errors
616+
// FIXME: Remove -verify-ignore-unknown.
618617
// <unknown>:0: error: unexpected note produced: did you mean 'makingHoney'?

test/ClangImporter/protocol-member-renaming.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -typecheck -import-objc-header %S/Inputs/protocol-member-renaming.h -verify %s
1+
// RUN: %target-swift-frontend -typecheck -import-objc-header %S/Inputs/protocol-member-renaming.h -verify %s -verify-ignore-unknown
22

33
// REQUIRES: objc_interop
44

@@ -17,6 +17,5 @@ class OptionalButUnavailableImpl : OptionalButUnavailable {
1717
func doTheThing(object: Any) {} // no-warning
1818
}
1919

20-
// XFAIL: *
21-
// FIXME: unknown location errors
20+
// FIXME: Remove -verify-ignore-unknown.
2221
// <unknown>:0: error: unexpected note produced: 'foo(_:willConsumeObject:)' was obsoleted in Swift 3

test/ClangImporter/swift2_warnings.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk -I %S/../IDE/Inputs/custom-modules) -emit-sil -I %S/Inputs/custom-modules %s -verify
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk -I %S/../IDE/Inputs/custom-modules) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown
22

33
// REQUIRES: objc_interop
44

@@ -105,8 +105,7 @@ func useLowercasedEnumCase(x: NSRuncingMode) {
105105
}
106106
}
107107

108-
// XFAIL: *
109-
// FIXME: unknown location errors
108+
// FIXME: Remove -verify-ignore-unknown.
110109
// <unknown>:0: error: unexpected note produced: 'NSProgressReporting' was obsoleted in Swift 3
111110
// <unknown>:0: error: unexpected note produced: 'NSPostingStyle' was obsoleted in Swift 3
112111
// <unknown>:0: error: unexpected note produced: 'NSPostingStyle' was obsoleted in Swift 3

test/Constraints/dynamic_lookup.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: rm -rf %t && mkdir -p %t
22
// RUN: %target-swift-frontend -emit-module %S/Inputs/PrivateObjC.swift -o %t
3-
// RUN: %target-typecheck-verify-swift -I %t
3+
// RUN: %target-typecheck-verify-swift -I %t -verify-ignore-unknown
44

55
// REQUIRES: objc_interop
66
import Foundation
@@ -248,7 +248,6 @@ func rdar29960565(_ o: AnyObject) {
248248
}
249249
}
250250

251-
// XFAIL: *
252-
// FIXME: unknown location errors
251+
// FIXME: Remove -verify-ignore-unknown.
253252
// <unknown>:0: error: unexpected note produced: 'privateFoo' declared here
254253
// <unknown>:0: error: unexpected note produced: 'internalFoo' declared here

test/Constraints/same_types.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift
1+
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown
22

33
protocol Fooable {
44
associatedtype Foo
@@ -203,6 +203,5 @@ struct S4<T : P> {
203203

204204
S4<QQ>().foo(x: SS())
205205

206-
// XFAIL: *
207-
// FIXME: unknown location errors
206+
// FIXME: Remove -verify-ignore-unknown.
208207
// <unknown>:0: error: unexpected error produced: generic parameter τ_0_0.Bar.Foo cannot be equal to both 'Y.Foo' (aka 'X') and 'Z'

test/IDE/import_as_member.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
// PRINTB-NOT: static var globalVar: Double
5151

52-
// RUN: %target-typecheck-verify-swift -I %S/Inputs/custom-modules
52+
// RUN: %target-typecheck-verify-swift -I %S/Inputs/custom-modules -verify-ignore-unknown
5353

5454
import ImportAsMember.A
5555
import ImportAsMember.B
@@ -79,8 +79,7 @@ iamStruct = Struct1.zero
7979
// Global properties
8080
currentStruct1.x += 1.5
8181

82-
// XFAIL: *
83-
// FIXME: unknown location errors
82+
// FIXME: Remove -verify-ignore-unknown.
8483
// <unknown>:0: error: unexpected note produced: 'IAMStruct1CreateSimple' declared here
8584
// <unknown>:0: error: unexpected note produced: 'IAMStruct1GlobalVar' was obsoleted in Swift 3
8685
// <unknown>:0: error: unexpected note produced: 'IAMStruct1CreateSimple' was obsoleted in Swift 3

test/IDE/newtype.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %build-clang-importer-objc-overlays
44
// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk-nosource) -I %t -I %S/Inputs/custom-modules -print-module -source-filename %s -module-to-print=Newtype > %t.printed.A.txt
55
// RUN: %FileCheck %s -check-prefix=PRINT -strict-whitespace < %t.printed.A.txt
6-
// RUN: %target-typecheck-verify-swift -sdk %clang-importer-sdk -I %S/Inputs/custom-modules -I %t
6+
// RUN: %target-typecheck-verify-swift -sdk %clang-importer-sdk -I %S/Inputs/custom-modules -I %t -verify-ignore-unknown
77
// REQUIRES: objc_interop
88

99
// PRINT-LABEL: struct ErrorDomain : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable {
@@ -181,6 +181,5 @@ func testFixit() {
181181
// expected-error@-1{{'NSMyContextName' has been renamed to 'NSSomeContext.Name.myContextName'}} {{10-25=NSSomeContext.Name.myContextName}}
182182
}
183183

184-
// XFAIL: *
185-
// FIXME: unknown location errors
184+
// FIXME: Remove -verify-ignore-unknown.
186185
// <unknown>:0: error: unexpected note produced: 'NSMyContextName' was obsoleted in Swift 3

test/Interpreter/SDK/submodules_smoke_test.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-build-swift -typecheck %s -Xfrontend -verify
1+
// RUN: %target-build-swift -typecheck %s -Xfrontend -verify -Xfrontend -verify-ignore-unknown
22
// RUN: %target-build-swift -emit-ir -g %s -DNO_ERROR > /dev/null
33
// REQUIRES: executable_test
44

@@ -23,8 +23,7 @@ typealias PanRecognizer2 = AppKit.NSPanGestureRecognizer
2323
_ = glVertexPointer // expected-error{{use of unresolved identifier 'glVertexPointer'}}
2424
#endif
2525

26-
// XFAIL: *
27-
// FIXME: unknown location errors
26+
// FIXME: Remove -verify-ignore-unknown.
2827
// <unknown>:0: error: unexpected warning produced: 'cacheParamsComputed' is deprecated
2928
// <unknown>:0: error: unexpected warning produced: 'cacheAlphaComputed' is deprecated
3029
// <unknown>:0: error: unexpected warning produced: 'keepCacheWindow' is deprecated

test/NameBinding/accessibility.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33

44
// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/has_accessibility.swift -D DEFINE_VAR_FOR_SCOPED_IMPORT -enable-testing
5-
// RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -I %t -sdk "" -enable-access-control -verify
5+
// RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -I %t -sdk "" -enable-access-control -verify -verify-ignore-unknown
66
// RUN: %target-swift-frontend -typecheck -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -I %t -sdk "" -disable-access-control -D ACCESS_DISABLED
77
// RUN: not %target-swift-frontend -typecheck -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -I %t -sdk "" -D TESTABLE 2>&1 | %FileCheck -check-prefix=TESTABLE %s
88

@@ -162,8 +162,7 @@ public class TestablePublicSub: InternalBase {} // expected-error {{undeclared t
162162
// TESTABLE-NOT: undeclared type 'InternalBase'
163163
#endif
164164

165-
// XFAIL: *
166-
// FIXME: unknown location errors
165+
// FIXME: Remove -verify-ignore-unknown.
167166
// <unknown>:0: error: unexpected note produced: 'y' declared here
168167
// <unknown>:0: error: unexpected note produced: 'z' declared here
169168
// <unknown>:0: error: unexpected note produced: 'init()' declared here

0 commit comments

Comments
 (0)