Skip to content

[Diagnostic verifier] Reject diagnostics at '<unknown>:0' by default #7197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/swift/Basic/DiagnosticOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ class DiagnosticOptions {
VerifyAndApplyFixes
} VerifyMode = NoVerify;

/// Indicates whether to allow diagnostics for \c <unknown> locations if
/// \c VerifyMode is not \c NoVerify.
bool VerifyIgnoreUnknown = false;

/// Indicates whether diagnostic passes should be skipped.
bool SkipDiagnosticPasses = false;

Expand Down
2 changes: 1 addition & 1 deletion include/swift/Frontend/DiagnosticVerifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace swift {
///
/// This returns true if there are any mismatches found.
bool verifyDiagnostics(SourceManager &SM, ArrayRef<unsigned> BufferIDs,
bool autoApplyFixes);
bool autoApplyFixes, bool ignoreUnknown);
}

#endif
2 changes: 2 additions & 0 deletions include/swift/Option/FrontendOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def verify : Flag<["-"], "verify">,
"annotations">;
def verify_apply_fixes : Flag<["-"], "verify-apply-fixes">,
HelpText<"Like -verify, but updates the original source file">;
def verify_ignore_unknown: Flag<["-"], "verify-ignore-unknown">,
HelpText<"Allow diagnostics for '<unknown>' location in verify mode">;

def show_diagnostics_after_fatal : Flag<["-"], "show-diagnostics-after-fatal">,
HelpText<"Keep emitting subsequent diagnostics after a fatal error">;
Expand Down
1 change: 1 addition & 0 deletions lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,7 @@ static bool ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
Opts.VerifyMode = DiagnosticOptions::Verify;
if (Args.hasArg(OPT_verify_apply_fixes))
Opts.VerifyMode = DiagnosticOptions::VerifyAndApplyFixes;
Opts.VerifyIgnoreUnknown |= Args.hasArg(OPT_verify_ignore_unknown);
Opts.SkipDiagnosticPasses |= Args.hasArg(OPT_disable_diagnostic_passes);
Opts.ShowDiagnosticsAfterFatalError |=
Args.hasArg(OPT_show_diagnostics_after_fatal);
Expand Down
25 changes: 24 additions & 1 deletion lib/Frontend/DiagnosticVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ namespace {
/// unexpected ones.
bool verifyFile(unsigned BufferID, bool autoApplyFixes);

/// diagnostics for '<unknown>:0' should be considered as unexpected.
bool verifyUnknown();

/// If there are any -verify errors (e.g. differences between expectations
/// and actual diagnostics produced), apply fixits to the original source
/// file and drop it back in place.
Expand Down Expand Up @@ -623,6 +626,24 @@ bool DiagnosticVerifier::verifyFile(unsigned BufferID,
return !Errors.empty();
}

bool DiagnosticVerifier::verifyUnknown() {
bool HadError = false;
for (unsigned i = 0, e = CapturedDiagnostics.size(); i != e; ++i) {
if (CapturedDiagnostics[i].getFilename() != "<unknown>")
continue;

HadError = true;
std::string Message =
"unexpected "+getDiagKindString(CapturedDiagnostics[i].getKind())+
" produced: "+CapturedDiagnostics[i].getMessage().str();

auto diag = SM.GetMessage({}, llvm::SourceMgr::DK_Error, Message,
{}, {});
SM.getLLVMSourceMgr().PrintMessage(llvm::errs(), diag);
}
return HadError;
}

/// If there are any -verify errors (e.g. differences between expectations
/// and actual diagnostics produced), apply fixits to the original source
/// file and drop it back in place.
Expand Down Expand Up @@ -694,14 +715,16 @@ void swift::enableDiagnosticVerifier(SourceManager &SM) {
}

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

bool HadError = false;

for (auto &BufferID : BufferIDs)
HadError |= Verifier->verifyFile(BufferID, autoApplyFixes);
if (!ignoreUnknown)
HadError |= Verifier->verifyUnknown();

delete Verifier;

Expand Down
3 changes: 2 additions & 1 deletion lib/FrontendTool/FrontendTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,8 @@ int swift::performFrontend(ArrayRef<const char *> Args,
HadError = verifyDiagnostics(
Instance->getSourceMgr(),
Instance->getInputBufferIDs(),
diagOpts.VerifyMode == DiagnosticOptions::VerifyAndApplyFixes);
diagOpts.VerifyMode == DiagnosticOptions::VerifyAndApplyFixes,
diagOpts.VerifyIgnoreUnknown);

DiagnosticEngine &diags = Instance->getDiags();
if (diags.hasFatalErrorOccurred() &&
Expand Down
8 changes: 7 additions & 1 deletion test/APINotes/basic.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-typecheck-verify-swift -I %S/Inputs/custom-modules -F %S/Inputs/custom-frameworks
// RUN: %target-typecheck-verify-swift -I %S/Inputs/custom-modules -F %S/Inputs/custom-frameworks -verify-ignore-unknown
import APINotesTest
import APINotesFrameworkTest

Expand All @@ -23,3 +23,9 @@ func testSwiftName() {
jumpTo(x: 0, y: 0, z: 0)
jumpTo(0, 0, 0) // expected-error{{missing argument labels 'x:y:z:' in call}}
}

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: 'ANTGlobalValue' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'PointStruct' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'real_t' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'RectStruct' was obsoleted in Swift 3
5 changes: 4 additions & 1 deletion test/ClangImporter/MixedSource/import-mixed-framework.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// RUN: not %target-swift-frontend(mock-sdk: %clang-importer-sdk) -F %t -typecheck %s

// 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
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -F %t -typecheck %s -verify
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -F %t -typecheck %s -verify -verify-ignore-unknown

// XFAIL: linux

Expand Down Expand Up @@ -35,3 +35,6 @@ func testAnyObject(_ obj: AnyObject) {
obj.protoMethod()
_ = obj.protoProperty
}

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: 'SwiftClassWithCustomName' was obsoleted in Swift 3
47 changes: 46 additions & 1 deletion test/ClangImporter/SceneKit_test.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-typecheck-verify-swift
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown

// REQUIRES: objc_interop
// REQUIRES: OS=macosx
Expand Down Expand Up @@ -235,3 +235,48 @@ func useRenamedAPIs(actionable: SCNActionable, action: SCNAction, data: Data,
program.handleBinding(ofBufferNamed: "str", frequency: bufferFrequency,
handler: bufferBindingBlock)
}

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: 'SCNGeometrySourceSemantic' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNLightType' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNLightingModel' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNParticleProperty' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPhysicsShapeOption' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPhysicsShapeType' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPhysicsTestOption' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPhysicsTestSearchMode' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneAttribute' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceAnimationImportPolicy' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceLoadingOption' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNViewOption' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNHitTestFirstFoundOnlyKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNHitTestSortResultsKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNHitTestClipToZRangeKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNHitTestBackFaceCullingKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNHitTestBoundingBoxOnlyKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNHitTestIgnoreChildNodesKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNHitTestRootNodeKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNHitTestIgnoreHiddenNodesKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPhysicsShapeTypeKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPhysicsShapeKeepAsCompoundKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPhysicsShapeScaleKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPhysicsTestCollisionBitMaskKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPhysicsTestSearchModeKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPhysicsTestBackfaceCullingKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneStartTimeAttributeKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneEndTimeAttributeKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneFrameRateAttributeKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneUpAxisAttributeKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceCreateNormalsIfAbsentKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceCheckConsistencyKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceFlattenSceneKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceUseSafeModeKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceAssetDirectoryURLsKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceOverrideAssetURLsKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceStrictConformanceKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceConvertUnitsToMetersKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceConvertToYUpKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNSceneSourceAnimationImportPolicyKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPreferredRenderingAPIKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPreferredDeviceKey' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'SCNPreferLowPowerDeviceKey' was obsoleted in Swift 3
13 changes: 12 additions & 1 deletion test/ClangImporter/attr-swift_name_renaming.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/custom-modules -Xcc -w -typecheck -verify %s
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/custom-modules -Xcc -w -typecheck -verify -verify-ignore-unknown %s

// XFAIL: linux

Expand Down Expand Up @@ -51,3 +51,14 @@ func test() {
Foo.accepts() {}
Foo.accepts {}
}

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: 'ColorType' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: did you mean 'Overslept'?
// <unknown>:0: error: unexpected note produced: did you mean 'TooHard'?
// <unknown>:0: error: unexpected note produced: 'my_int_t' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'acceptsClosure' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'acceptsClosure' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'acceptsClosureStatic' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'acceptsClosureStatic' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'acceptsClosureStatic' was obsoleted in Swift 3
8 changes: 7 additions & 1 deletion test/ClangImporter/attr-swift_private.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: rm -rf %t && mkdir -p %t
// RUN: %build-clang-importer-objc-overlays

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -I %S/Inputs/custom-modules -typecheck %s -verify
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -I %S/Inputs/custom-modules -typecheck %s -verify -verify-ignore-unknown
// 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

// 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
Expand Down Expand Up @@ -139,3 +139,9 @@ func testRawNames() {
let _ = Foo.__foo // expected-error{{'__foo' is unavailable: use object construction 'Foo(__:)'}}
}
#endif

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: '__PrivCFTypeRef' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: '__PrivCFSubRef' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: '__fooWithOneArg' has been explicitly marked unavailable here
// <unknown>:0: error: unexpected note produced: '__foo' has been explicitly marked unavailable here
7 changes: 6 additions & 1 deletion test/ClangImporter/availability.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules %s
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules %s -verify-ignore-unknown

// REQUIRES: objc_interop

Expand Down Expand Up @@ -115,3 +115,8 @@ func testUnavailableRenamedEnum() {
_ = NSClothingStyle.hipster
_ = NSClothingStyleOfficeCasual // expected-error{{'NSClothingStyleOfficeCasual' has been renamed to 'NSClothingStyle.semiFormal'}} {{7-34=NSClothingStyle.semiFormal}}
}

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected warning produced: imported declaration 'dispatch_sync' could not be mapped to 'DispatchQueue.sync(self:execute:)'
// <unknown>:0: error: unexpected note produced: 'NSConnectionDidDieNotification' has been explicitly marked unavailable here
// <unknown>:0: error: unexpected note produced: 'CGColorCreateGenericGray' was obsoleted in Swift 3
6 changes: 5 additions & 1 deletion test/ClangImporter/cf.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -typecheck -verify -import-cf-types -I %S/Inputs/custom-modules %s
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -typecheck -verify -import-cf-types -I %S/Inputs/custom-modules %s -verify-ignore-unknown

// REQUIRES: objc_interop

Expand Down Expand Up @@ -160,3 +160,7 @@ protocol SwiftProto {}
@objc protocol ObjCProto {}
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}}
extension CCRefrigerator: SwiftProto {}

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: 'CCFridgeRef' was obsoleted in Swift 3
// <unknown>:0: error: unexpected note produced: 'NotAProblemRef' was obsoleted in Swift 3
9 changes: 8 additions & 1 deletion test/ClangImporter/objc_factory_method.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: rm -rf %t && mkdir -p %t
// RUN: %build-clang-importer-objc-overlays

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

// REQUIRES: OS=macosx
// REQUIRES: objc_interop
Expand Down Expand Up @@ -110,3 +110,10 @@ func testURL() {
_ = NSURLRequest.requestWithString("http://www.llvm.org") // expected-error{{'requestWithString' is unavailable: use object construction 'NSURLRequest(string:)'}}
_ = NSURLRequest.URLRequestWithURL(url as URL) // expected-error{{'URLRequestWithURL' is unavailable: use object construction 'NSURLRequest(url:)'}}
}

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: 'hiveWithQueen' has been explicitly marked unavailable here
// <unknown>:0: error: unexpected note produced: 'decimalNumberWithMantissa(_:exponent:isNegative:)' has been explicitly marked unavailable here
// <unknown>:0: error: unexpected note produced: 'URLWithString' has been explicitly marked unavailable here
// <unknown>:0: error: unexpected note produced: 'requestWithString' has been explicitly marked unavailable here
// <unknown>:0: error: unexpected note produced: 'URLRequestWithURL' has been explicitly marked unavailable here
5 changes: 4 additions & 1 deletion test/ClangImporter/objc_implicit_with.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify -verify-ignore-unknown

// REQUIRES: objc_interop

Expand Down Expand Up @@ -62,3 +62,6 @@ func testFactoryMethodWithKeywordArgument() {
let prot = NSCoding.self
_ = NSXPCInterface(with: prot) // not "protocol:"
}

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: 'hiveWithQueen' has been explicitly marked unavailable here
5 changes: 4 additions & 1 deletion test/ClangImporter/objc_init.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown

// REQUIRES: objc_interop
// REQUIRES: OS=macosx
Expand Down Expand Up @@ -171,3 +171,6 @@ func classPropertiesAreNotInit() -> ProcessInfo {
procInfo = ProcessInfo.processInfo // okay
return procInfo
}

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: 'NSProcessInfo' was obsoleted in Swift 3
5 changes: 4 additions & 1 deletion test/ClangImporter/objc_override.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown

// REQUIRES: objc_interop

Expand Down Expand Up @@ -88,3 +88,6 @@ class FailSub : FailBase {
override class func processValue() {} // expected-error {{overriding a throwing @objc method with a non-throwing method is not supported}}
}

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: overridden declaration is here
// <unknown>:0: error: unexpected note produced: setter for 'boolProperty' declared here
4 changes: 3 additions & 1 deletion test/ClangImporter/objc_parse.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -I %S/Inputs/custom-modules %s -verify -verify-ignore-unknown

// REQUIRES: objc_interop

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

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: did you mean 'makingHoney'?
5 changes: 4 additions & 1 deletion test/ClangImporter/protocol-member-renaming.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -typecheck -import-objc-header %S/Inputs/protocol-member-renaming.h -verify %s
// RUN: %target-swift-frontend -typecheck -import-objc-header %S/Inputs/protocol-member-renaming.h -verify %s -verify-ignore-unknown

// REQUIRES: objc_interop

Expand All @@ -16,3 +16,6 @@ class OptionalButUnavailableImpl : OptionalButUnavailable {
// Note the argument label that causes this not to match the requirement.
func doTheThing(object: Any) {} // no-warning
}

// FIXME: Remove -verify-ignore-unknown.
// <unknown>:0: error: unexpected note produced: 'foo(_:willConsumeObject:)' was obsoleted in Swift 3
Loading