Skip to content

Commit 2d37507

Browse files
committed
tests updated for expression_unused_result_unknown diagnostic new text
1 parent eb995be commit 2d37507

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

test/ClangImporter/objc_parse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func testProtocolMethods(_ b: B, p2m: P2.Type) {
215215

216216
func testId(_ x: AnyObject) {
217217
x.perform!("foo:", with: x) // expected-warning{{no method declared with Objective-C selector 'foo:'}}
218-
// expected-warning @-1 {{result of call is unused, but produces 'Unmanaged<AnyObject>?'}}
218+
// expected-warning @-1 {{result of call to function returning 'Unmanaged<AnyObject>?' is unused}}
219219

220220
_ = x.performAdd(1, withValue: 2, withValue: 3, withValue2: 4)
221221
_ = x.performAdd!(1, withValue: 2, withValue: 3, withValue2: 4)

test/Constraints/diagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ f7(1)(b: 1.0) // expected-error{{extraneous argument label 'b:' in call}}
335335

336336
let f8 = f7(2)
337337
_ = f8(1)
338-
f8(10) // expected-warning {{result of call is unused, but produces 'Int'}}
338+
f8(10) // expected-warning {{result of call to function returning 'Int' is unused}}
339339
f8(1.0) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}}
340340
f8(b: 1.0) // expected-error {{extraneous argument label 'b:' in call}}
341341

test/Parse/recovery.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func missingControllingExprInRepeatWhile() {
128128
}
129129

130130
repeat {
131-
} while { true }() // expected-error{{missing condition in a 'while' statement}} expected-error{{consecutive statements on a line must be separated by ';'}} {{10-10=;}} expected-warning {{result of call is unused, but produces 'Bool'}}
131+
} while { true }() // expected-error{{missing condition in a 'while' statement}} expected-error{{consecutive statements on a line must be separated by ';'}} {{10-10=;}} expected-warning {{result of call to function returning 'Bool' is unused}}
132132
}
133133

134134
// SR-165

test/attr/attr_discardableResult.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func f(a : () -> Int) {
149149
42 // expected-warning {{integer literal is unused}}
150150

151151
4 + 5 // expected-warning {{result of operator '+' is unused}}
152-
a() // expected-warning {{result of call is unused, but produces 'Int'}}
152+
a() // expected-warning {{result of call to function returning 'Int' is unused}}
153153
}
154154

155155
@warn_unused_result func g() -> Int { } // expected-warning {{'warn_unused_result' attribute behavior is now the default}} {{1-21=}}

test/expr/expressions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ func lvalue_processing() {
669669

670670
var n = 42
671671
fn(n, 12) // expected-error {{passing value of type 'Int' to an inout parameter requires explicit '&'}} {{6-6=&}}
672-
fn(&n, 12) // expected-warning {{result of call is unused, but produces 'Int'}}
672+
fn(&n, 12) // expected-warning {{result of call to function returning 'Int' is unused}}
673673

674674
n +-+= 12
675675

0 commit comments

Comments
 (0)