Skip to content

Commit a1716fe

Browse files
[Diagnostics] Update compiler diagnostics to use less jargon. (#31315)
Fixes rdar://problem/62375243.
1 parent a8c7ef7 commit a1716fe

File tree

184 files changed

+556
-556
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

184 files changed

+556
-556
lines changed

include/swift/AST/DiagnosticsSema.def

+10-10
Original file line numberDiff line numberDiff line change
@@ -795,19 +795,19 @@ ERROR(unspaced_unary_operator,none,
795795
"unary operators must not be juxtaposed; parenthesize inner expression",
796796
())
797797

798-
ERROR(use_unresolved_identifier,none,
799-
"use of unresolved %select{identifier|operator}1 %0", (DeclNameRef, bool))
800-
ERROR(use_unresolved_identifier_corrected,none,
801-
"use of unresolved %select{identifier|operator}1 %0; did you mean '%2'?",
798+
ERROR(cannot_find_in_scope,none,
799+
"cannot %select{find|find operator}1 %0 in scope", (DeclNameRef, bool))
800+
ERROR(cannot_find_in_scope_corrected,none,
801+
"cannot %select{find|find operator}1 %0 in scope; did you mean '%2'?",
802802
(DeclNameRef, bool, StringRef))
803803
NOTE(confusable_character,none,
804804
"%select{identifier|operator}0 '%1' contains possibly confused characters; "
805805
"did you mean to use '%2'?",
806806
(bool, StringRef, StringRef))
807-
ERROR(use_undeclared_type,none,
808-
"use of undeclared type %0", (DeclNameRef))
809-
ERROR(use_undeclared_type_did_you_mean,none,
810-
"use of undeclared type %0; did you mean to use '%1'?", (DeclNameRef, StringRef))
807+
ERROR(cannot_find_type_in_scope,none,
808+
"cannot find type %0 in scope", (DeclNameRef))
809+
ERROR(cannot_find_type_in_scope_did_you_mean,none,
810+
"cannot find type %0 in scope; did you mean to use '%1'?", (DeclNameRef, StringRef))
811811
NOTE(note_typo_candidate_implicit_member,none,
812812
"did you mean the implicitly-synthesized %1 '%0'?", (StringRef, StringRef))
813813
NOTE(note_remapped_type,none,
@@ -3669,9 +3669,9 @@ ERROR(continue_not_in_this_stmt,none,
36693669
"'continue' cannot be used with %0 statements", (StringRef))
36703670

36713671
ERROR(unresolved_label,none,
3672-
"use of unresolved label %0", (Identifier))
3672+
"cannot find label %0 in scope", (Identifier))
36733673
ERROR(unresolved_label_corrected,none,
3674-
"use of unresolved label %0; did you mean %1?",
3674+
"cannot find label %0 in scope; did you mean %1?",
36753675
(Identifier, Identifier))
36763676

36773677
ERROR(foreach_sequence_does_not_conform_to_expected_protocol,none,

lib/Sema/PCMacro.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ class Instrumenter : InstrumenterBase {
575575
Context, BeforeLoggerRef, ArgsWithSourceRange, ArgLabels);
576576
Added<ApplyExpr *> AddedBeforeLogger(BeforeLoggerCall);
577577
if (!doTypeCheck(Context, TypeCheckDC, AddedBeforeLogger)) {
578-
// typically due to 'use of unresolved identifier '__builtin_pc_before''
578+
// typically due to 'cannot find '__builtin_pc_before' in scope'
579579
return E; // return E, it will be used in recovering from TC failure
580580
}
581581

@@ -587,7 +587,7 @@ class Instrumenter : InstrumenterBase {
587587
Context, AfterLoggerRef, ArgsWithSourceRange, ArgLabels);
588588
Added<ApplyExpr *> AddedAfterLogger(AfterLoggerCall);
589589
if (!doTypeCheck(Context, TypeCheckDC, AddedAfterLogger)) {
590-
// typically due to 'use of unresolved identifier '__builtin_pc_after''
590+
// typically due to 'cannot find '__builtin_pc_after' in scope'
591591
return E; // return E, it will be used in recovering from TC failure
592592
}
593593

lib/Sema/TypeCheckAttr.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3665,7 +3665,7 @@ static AbstractFunctionDecl *findAbstractFunctionDecl(
36653665

36663666
// Otherwise, emit the appropriate diagnostic and return nullptr.
36673667
if (results.empty()) {
3668-
ctx.Diags.diagnose(funcNameLoc, diag::use_unresolved_identifier, funcName,
3668+
ctx.Diags.diagnose(funcNameLoc, diag::cannot_find_in_scope, funcName,
36693669
funcName.isOperator());
36703670
return nullptr;
36713671
}

lib/Sema/TypeCheckConstraints.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ static bool diagnoseRangeOperatorMisspell(DiagnosticEngine &Diags,
392392

393393
if (!corrected.empty()) {
394394
Diags
395-
.diagnose(UDRE->getLoc(), diag::use_unresolved_identifier_corrected,
395+
.diagnose(UDRE->getLoc(), diag::cannot_find_in_scope_corrected,
396396
UDRE->getName(), true, corrected)
397397
.highlight(UDRE->getSourceRange())
398398
.fixItReplace(UDRE->getSourceRange(), corrected);
@@ -416,7 +416,7 @@ static bool diagnoseIncDecOperator(DiagnosticEngine &Diags,
416416

417417
if (!corrected.empty()) {
418418
Diags
419-
.diagnose(UDRE->getLoc(), diag::use_unresolved_identifier_corrected,
419+
.diagnose(UDRE->getLoc(), diag::cannot_find_in_scope_corrected,
420420
UDRE->getName(), true, corrected)
421421
.highlight(UDRE->getSourceRange());
422422

@@ -537,7 +537,7 @@ Expr *TypeChecker::resolveDeclRefExpr(UnresolvedDeclRefExpr *UDRE,
537537

538538
auto emitBasicError = [&] {
539539
Context.Diags
540-
.diagnose(Loc, diag::use_unresolved_identifier, Name,
540+
.diagnose(Loc, diag::cannot_find_in_scope, Name,
541541
Name.isOperator())
542542
.highlight(UDRE->getSourceRange());
543543
};
@@ -561,7 +561,7 @@ Expr *TypeChecker::resolveDeclRefExpr(UnresolvedDeclRefExpr *UDRE,
561561

562562
if (auto typo = corrections.claimUniqueCorrection()) {
563563
auto diag = Context.Diags.diagnose(
564-
Loc, diag::use_unresolved_identifier_corrected, Name,
564+
Loc, diag::cannot_find_in_scope_corrected, Name,
565565
Name.isOperator(), typo->CorrectedName.getBaseIdentifier().str());
566566
diag.highlight(UDRE->getSourceRange());
567567
typo->addFixits(diag);

lib/Sema/TypeCheckExprObjC.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Optional<Type> TypeChecker::checkObjCKeyPathExpr(DeclContext *dc,
263263
diags.diagnose(componentNameLoc, diag::could_not_find_type_member,
264264
currentType, componentName);
265265
else
266-
diags.diagnose(componentNameLoc, diag::use_unresolved_identifier,
266+
diags.diagnose(componentNameLoc, diag::cannot_find_in_scope,
267267
componentName, false);
268268

269269
// Note all the correction candidates.

lib/Sema/TypeCheckType.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ static Type diagnoseUnknownType(TypeResolution resolution,
11371137
auto I = Remapped.find(TypeName);
11381138
if (I != Remapped.end()) {
11391139
auto RemappedTy = I->second->getString();
1140-
diags.diagnose(L, diag::use_undeclared_type_did_you_mean,
1140+
diags.diagnose(L, diag::cannot_find_type_in_scope_did_you_mean,
11411141
comp->getNameRef(), RemappedTy)
11421142
.highlight(R)
11431143
.fixItReplace(R, RemappedTy);
@@ -1154,7 +1154,7 @@ static Type diagnoseUnknownType(TypeResolution resolution,
11541154
return I->second;
11551155
}
11561156

1157-
diags.diagnose(L, diag::use_undeclared_type,
1157+
diags.diagnose(L, diag::cannot_find_type_in_scope,
11581158
comp->getNameRef())
11591159
.highlight(R);
11601160

@@ -1650,7 +1650,7 @@ Type TypeChecker::resolveIdentifierType(
16501650
if (!options.contains(TypeResolutionFlags::SilenceErrors)) {
16511651
auto moduleName = moduleTy->getModule()->getName();
16521652
diags.diagnose(Components.back()->getNameLoc(),
1653-
diag::use_undeclared_type, DeclNameRef(moduleName));
1653+
diag::cannot_find_type_in_scope, DeclNameRef(moduleName));
16541654
diags.diagnose(Components.back()->getNameLoc(),
16551655
diag::note_module_as_type, moduleName);
16561656
}

test/APINotes/versioned.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func testRenamedUnknownEnum() {
158158
}
159159

160160
func testRenamedTrueEnum() {
161-
// CHECK-DIAGS: [[@LINE+1]]:7: error: use of unresolved identifier 'TrueEnumValue'
161+
// CHECK-DIAGS: [[@LINE+1]]:7: error: cannot find 'TrueEnumValue' in scope
162162
_ = TrueEnumValue
163163

164164
// CHECK-DIAGS: [[@LINE+1]]:16: error: type 'TrueEnum' has no member 'TrueEnumValue'
@@ -169,7 +169,7 @@ func testRenamedTrueEnum() {
169169

170170
_ = TrueEnum.value // okay
171171

172-
// CHECK-DIAGS: [[@LINE+1]]:7: error: use of unresolved identifier 'TrueEnumRenamed'
172+
// CHECK-DIAGS: [[@LINE+1]]:7: error: cannot find 'TrueEnumRenamed' in scope
173173
_ = TrueEnumRenamed
174174

175175
// CHECK-DIAGS: [[@LINE+1]]:16: error: type 'TrueEnum' has no member 'TrueEnumRenamed'
@@ -190,7 +190,7 @@ func testRenamedTrueEnum() {
190190
_ = TrueEnum.renamedSwift4
191191
// CHECK-DIAGS-4-NOT: :[[@LINE-1]]:16:
192192

193-
// CHECK-DIAGS: [[@LINE+1]]:7: error: use of unresolved identifier 'TrueEnumAliasRenamed'
193+
// CHECK-DIAGS: [[@LINE+1]]:7: error: cannot find 'TrueEnumAliasRenamed' in scope
194194
_ = TrueEnumAliasRenamed
195195

196196
// CHECK-DIAGS: [[@LINE+1]]:16: error: type 'TrueEnum' has no member 'TrueEnumAliasRenamed'
@@ -213,7 +213,7 @@ func testRenamedTrueEnum() {
213213
}
214214

215215
func testRenamedOptionyEnum() {
216-
// CHECK-DIAGS: [[@LINE+1]]:7: error: use of unresolved identifier 'OptionyEnumValue'
216+
// CHECK-DIAGS: [[@LINE+1]]:7: error: cannot find 'OptionyEnumValue' in scope
217217
_ = OptionyEnumValue
218218

219219
// CHECK-DIAGS: [[@LINE+1]]:19: error: type 'OptionyEnum' has no member 'OptionyEnumValue'
@@ -224,7 +224,7 @@ func testRenamedOptionyEnum() {
224224

225225
_ = OptionyEnum.value // okay
226226

227-
// CHECK-DIAGS: [[@LINE+1]]:7: error: use of unresolved identifier 'OptionyEnumRenamed'
227+
// CHECK-DIAGS: [[@LINE+1]]:7: error: cannot find 'OptionyEnumRenamed' in scope
228228
_ = OptionyEnumRenamed
229229

230230
// CHECK-DIAGS: [[@LINE+1]]:19: error: type 'OptionyEnum' has no member 'OptionyEnumRenamed'

test/AutoDiff/Sema/DerivedConformances/class_differentiable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ where T: Differentiable {}
490490

491491
// TF-265: Test invalid initializer (that uses a non-existent type).
492492
class InvalidInitializer: Differentiable {
493-
init(filterShape: (Int, Int, Int, Int), blah: NonExistentType) {} // expected-error {{use of undeclared type 'NonExistentType'}}
493+
init(filterShape: (Int, Int, Int, Int), blah: NonExistentType) {} // expected-error {{cannot find type 'NonExistentType' in scope}}
494494
}
495495

496496
// Test memberwise initializer synthesis.

test/AutoDiff/Sema/DerivedConformances/struct_differentiable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ where T: Differentiable {}
308308

309309
// TF-265: Test invalid initializer (that uses a non-existent type).
310310
struct InvalidInitializer: Differentiable {
311-
init(filterShape: (Int, Int, Int, Int), blah: NonExistentType) {} // expected-error {{use of undeclared type 'NonExistentType'}}
311+
init(filterShape: (Int, Int, Int, Int), blah: NonExistentType) {} // expected-error {{cannot find type 'NonExistentType' in scope}}
312312
}
313313

314314
// Test memberwise initializer synthesis.

test/AutoDiff/Sema/derivative_attr_type_checking.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ func vjpSubtractWrt1(x: Float, y: Float) -> (value: Float, pullback: (Float) ->
7070

7171
// Test invalid original function.
7272

73-
// expected-error @+1 {{use of unresolved identifier 'nonexistentFunction'}}
73+
// expected-error @+1 {{cannot find 'nonexistentFunction' in scope}}
7474
@derivative(of: nonexistentFunction)
7575
func vjpOriginalFunctionNotFound(_ x: Float) -> (value: Float, pullback: (Float) -> Float) {
7676
fatalError()
7777
}
7878

7979
// Test `@derivative` attribute where `value:` result does not conform to `Differentiable`.
8080
// Invalid original function should be diagnosed first.
81-
// expected-error @+1 {{use of unresolved identifier 'nonexistentFunction'}}
81+
// expected-error @+1 {{cannot find 'nonexistentFunction' in scope}}
8282
@derivative(of: nonexistentFunction)
8383
func vjpOriginalFunctionNotFound2(_ x: Float) -> (value: Int, pullback: (Float) -> Float) {
8484
fatalError()

test/AutoDiff/compiler_crashers_fixed/tf1167-differentiable-attr-override-match.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
public protocol Base {
1212
associatedtype Input
13-
// expected-error @+1 {{use of undeclared type 'Differentiable'}}
13+
// expected-error @+1 {{cannot find type 'Differentiable' in scope}}
1414
associatedtype Output: Differentiable
1515

1616
// expected-error @+1 {{@differentiable attribute used without importing module '_Differentiation'}}

test/ClangImporter/CoreServices_test.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import CoreServices
77
func test(_ url: CFURL, ident: CSIdentity) {
88
_ = CSBackupIsItemExcluded(url, nil) // okay
99

10-
_ = nil as TypeThatDoesNotExist? // expected-error {{use of undeclared type 'TypeThatDoesNotExist'}}
10+
_ = nil as TypeThatDoesNotExist? // expected-error {{cannot find type 'TypeThatDoesNotExist' in scope}}
1111
_ = nil as CoreServices.Collection? // okay
1212

13-
_ = kCollectionNoAttributes // expected-error{{use of unresolved identifier 'kCollectionNoAttributes'}}
13+
_ = kCollectionNoAttributes // expected-error{{cannot find 'kCollectionNoAttributes' in scope}}
1414

1515
var name: Unmanaged<CFString>?
1616
_ = LSCopyDisplayNameForURL(url, &name) as OSStatus // okay
@@ -22,6 +22,6 @@ func test(_ url: CFURL, ident: CSIdentity) {
2222
_ = CSIdentityCreateCopy(nil, ident) // okay
2323

2424
var vers: UInt32 = 0
25-
_ = KCGetKeychainManagerVersion(&vers) as OSStatus// expected-error{{use of unresolved identifier 'KCGetKeychainManagerVersion'}}
25+
_ = KCGetKeychainManagerVersion(&vers) as OSStatus// expected-error{{cannot find 'KCGetKeychainManagerVersion' in scope}}
2626
_ = CoreServices.KCGetKeychainManagerVersion(&vers) as OSStatus// okay
2727
}

test/ClangImporter/Darwin_test.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import Darwin
66
import MachO
77

8-
_ = nil as Fract? // expected-error{{use of undeclared type 'Fract'}}
8+
_ = nil as Fract? // expected-error{{cannot find type 'Fract' in scope}}
99
_ = nil as Darwin.Fract? // okay
1010

1111
_ = 0 as OSErr
@@ -14,8 +14,8 @@ _ = 0 as UniChar
1414

1515
_ = ProcessSerialNumber()
1616

17-
_ = 0 as Byte // expected-error {{use of undeclared type 'Byte'}} {{10-14=UInt8}}
17+
_ = 0 as Byte // expected-error {{cannot find type 'Byte' in scope}} {{10-14=UInt8}}
1818
Darwin.fakeAPIUsingByteInDarwin() as Int // expected-error {{cannot convert value of type 'UInt8' to type 'Int' in coercion}}
1919

20-
_ = FALSE // expected-error {{use of unresolved identifier 'FALSE'}}
20+
_ = FALSE // expected-error {{cannot find 'FALSE' in scope}}
2121
_ = DYLD_BOOL.FALSE

test/ClangImporter/MixedSource/Xcc_include.swift

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
// CHECK-INCLUDE-MISSING: error: '{{.*}}this_header_does_not_exist.h' file not found
77

88
func test() {
9-
// CHECK-INCLUDE-ONLY: error: use of unresolved identifier 'includedConst'
10-
// CHECK-INCLUDE-PLUS-BRIDGING-NOT: unresolved identifier 'includedConst'
11-
// CHECK-INCLUDE-FRAMEWORK: error: use of unresolved identifier 'includedConst'
9+
// CHECK-INCLUDE-ONLY: error: cannot find 'includedConst' in scope
10+
// CHECK-INCLUDE-PLUS-BRIDGING-NOT: cannot find 'includedConst' in scope
11+
// CHECK-INCLUDE-FRAMEWORK: error: cannot find 'includedConst' in scope
1212
_ = includedConst
1313

14-
// CHECK-INCLUDE-ONLY: error: use of unresolved identifier 'errSecSuccess'
15-
// CHECK-INCLUDE-PLUS-BRIDGING: error: use of unresolved identifier 'errSecSuccess'
16-
// CHECK-INCLUDE-FRAMEWORK: error: use of unresolved identifier 'errSecSuccess'
14+
// CHECK-INCLUDE-ONLY: error: cannot find 'errSecSuccess' in scope
15+
// CHECK-INCLUDE-PLUS-BRIDGING: error: cannot find 'errSecSuccess' in scope
16+
// CHECK-INCLUDE-FRAMEWORK: error: cannot find 'errSecSuccess' in scope
1717
_ = errSecSuccess
1818

1919
#if FRAMEWORK
20-
// CHECK-INCLUDE-FRAMEWORK-NOT: error: unresolved identifier 'Base'
20+
// CHECK-INCLUDE-FRAMEWORK-NOT: error: cannot find 'Base' in scope
2121
_ = Base()
2222
#endif
2323
}

test/ClangImporter/MixedSource/broken-bridging-header.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ import HasBridgingHeader // expected-error {{failed to import bridging header}}
3232
// HEADER-ERROR: error: failed to import bridging header '{{.*}}/error-on-define.h'
3333
// HEADER-ERROR-NOT: error:
3434

35-
let _ = x // expected-error {{use of unresolved identifier 'x'}}
35+
let _ = x // expected-error {{cannot find 'x' in scope}}

test/ClangImporter/MixedSource/broken-modules.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ import BrokenClangModule
3737

3838

3939
_ = BrokenClangModule.x
40-
// CHECK: broken-modules.swift:[[@LINE-1]]:5: error: use of unresolved identifier 'BrokenClangModule'
40+
// CHECK: broken-modules.swift:[[@LINE-1]]:5: error: cannot find 'BrokenClangModule' in scope

test/ClangImporter/MixedSource/can_import_objc_idempotent.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@
1818
// current module. Only an 'import Foo' statement should do this.
1919

2020
#if canImport(AppKit)
21-
class AppKitView : NSView {} // expected-error {{use of undeclared type 'NSView'}}
21+
class AppKitView : NSView {} // expected-error {{cannot find type 'NSView' in scope}}
2222
#endif
2323

2424
#if canImport(UIKit)
25-
class UIKitView : UIView {} // expected-error {{use of undeclared type 'UIView'}}
25+
class UIKitView : UIView {} // expected-error {{cannot find type 'UIView' in scope}}
2626
#endif
2727

2828
#if canImport(CoreGraphics)
2929
let square = CGRect(x: 100, y: 100, width: 100, height: 100)
30-
// expected-error@-1 {{use of unresolved identifier 'CGRect'}}
30+
// expected-error@-1 {{cannot find 'CGRect' in scope}}
3131

3232
let (r, s) = square.divided(atDistance: 50, from: .minXEdge)
3333
#endif
3434

3535
#if canImport(MixedWithHeader)
36-
let object = NSObject() // expected-error {{use of unresolved identifier 'NSObject'}}
37-
let someAPI = Derived() // expected-error {{use of unresolved identifier 'Derived'}}
36+
let object = NSObject() // expected-error {{cannot find 'NSObject' in scope}}
37+
let someAPI = Derived() // expected-error {{cannot find 'Derived' in scope}}
3838
#endif

test/ClangImporter/MixedSource/mixed-target-using-header.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func testStruct(_ p: Point2D) -> Point2D {
4848

4949
#if !SILGEN
5050
func testSuppressed() {
51-
let _: __int128_t? = nil // expected-error{{use of undeclared type '__int128_t'}}
51+
let _: __int128_t? = nil // expected-error{{cannot find type '__int128_t' in scope}}
5252
}
5353
#endif
5454

test/ClangImporter/attr-swift_name_renaming.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func test() {
2020

2121
// Typedef-of-anonymous-type-name renaming
2222
var p = Point()
23-
var p2 = PointType() // FIXME: should provide Fix-It expected-error{{use of unresolved identifier 'PointType'}} {{none}}
23+
var p2 = PointType() // FIXME: should provide Fix-It expected-error{{cannot find 'PointType' in scope}} {{none}}
2424

2525
// Field name remapping
2626
p.x = 7

test/ClangImporter/attr-swift_private.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ public func testTopLevel() {
9494
_ = __PrivS1()
9595

9696
#if !IRGEN
97-
let _ = PrivFooSub() // expected-error {{use of unresolved identifier}}
98-
privTest() // expected-error {{use of unresolved identifier}}
99-
PrivS1() // expected-error {{use of unresolved identifier}}
97+
let _ = PrivFooSub() // expected-error {{cannot find 'PrivFooSub' in scope}}
98+
privTest() // expected-error {{cannot find 'privTest' in scope}}
99+
PrivS1() // expected-error {{cannot find 'PrivS1' in scope}}
100100
#endif
101101
}
102102

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -enable-objc-interop -import-objc-header %S/Inputs/bad-ns-extensible-string-enum.h -verify
22

3-
let string = MyString.MyStringOne // expected-error {{use of unresolved identifier 'MyString'}}
3+
let string = MyString.MyStringOne // expected-error {{cannot find 'MyString' in scope}}

test/ClangImporter/ctypes_parse.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func testFuncStructDisambiguation() {
113113
}
114114

115115
func testVoid() {
116-
var x: MyVoid // expected-error{{use of undeclared type 'MyVoid'}}
116+
var x: MyVoid // expected-error{{cannot find type 'MyVoid' in scope}}
117117
returnsMyVoid()
118118
}
119119

test/ClangImporter/ctypes_parse_objc.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func testImportCFTypes() {
8484
}
8585

8686
func testImportSEL() {
87-
var t1 : SEL // expected-error {{use of undeclared type 'SEL'}} {{12-15=Selector}}
87+
var t1 : SEL // expected-error {{cannot find type 'SEL' in scope}} {{12-15=Selector}}
8888
var t2 : ctypes.SEL // expected-error {{no type named 'SEL' in module 'ctypes'}}
8989
}
9090

test/ClangImporter/enum-objc.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ let _: Int = forwardWithUnderlyingPointer // expected-error {{cannot convert val
2121
let _: Int = forwardObjCPointer // expected-error {{cannot convert value of type '(OpaquePointer) -> Void' to specified type 'Int'}}
2222

2323
// FIXME: It would be nice to import these as unavailable somehow instead.
24-
let _: Int = forwardWithUnderlyingValue // expected-error {{use of unresolved identifier 'forwardWithUnderlyingValue'}}
25-
let _: Int = forwardObjCValue // expected-error {{use of unresolved identifier 'forwardObjCValue'}}
24+
let _: Int = forwardWithUnderlyingValue // expected-error {{cannot find 'forwardWithUnderlyingValue' in scope}}
25+
let _: Int = forwardObjCValue // expected-error {{cannot find 'forwardObjCValue' in scope}}
2626

2727
// Note that if /these/ start getting imported as unavailable, the error will
2828
// also mention that there's a missing argument, since the second argument isn't

0 commit comments

Comments
 (0)