@@ -475,9 +475,11 @@ func stringliterals(_ d: [String: Int]) {
475475 let x = 4
476476 " Hello \( x+ 1 ) world " // expected-warning {{string literal is unused}}
477477
478- " Error: \( x+ 1 " ; // expected-error {{unterminated string literal}}
479-
480- " Error: \( x+ 1 // expected-error {{unterminated string literal}}
478+ // expected-error @+1 {{unterminated string literal}}
479+ " Error: \( x+ 1 " ; // expected-error {{cannot find ')' to match opening '(' in string interpolation}}
480+
481+ // expected-error @+1 {{unterminated string literal}}
482+ " Error: \( x+ 1 // expected-error {{cannot find ')' to match opening '(' in string interpolation}}
481483 ; // expected-error {{';' statements are not allowed}}
482484
483485 // rdar://14050788 [DF] String Interpolations can't contain quotes
@@ -488,15 +490,16 @@ func stringliterals(_ d: [String: Int]) {
488490 " test \( " quoted-paren ( " ) "
489491 " test \( " \\ " ) "
490492 " test \( " \n " ) "
491- " test \( " \" ) " // expected-error {{unterminated string literal}}
493+ " test \( " \" ) " // expected-error {{cannot find ')' to match opening '(' in string interpolation}} expected-error {{ unterminated string literal}}
492494
493495 " test \
494496 // expected-error @-1 {{unterminated string literal}} expected-error @-1 {{invalid escape sequence in literal}}
495497 " test \( " \
496- // expected-error @-1 {{unterminated string literal}}
498+ // expected-error @-1 {{cannot find ')' to match opening '(' in string interpolation}} expected-error @-1 {{ unterminated string literal}}
497499 " test newline \( " something " +
498500 " something else " ) "
499- // expected-error @-2 {{unterminated string literal}} expected-error @-1 {{unterminated string literal}}
501+ // expected-error @-2 {{cannot find ')' to match opening '(' in string interpolation}}
502+ // expected-error @-2 {{unterminated string literal}} expected-error @-3 {{unterminated string literal}}
500503
501504 // expected-warning @+2 {{variable 'x2' was never used; consider replacing with '_' or removing it}}
502505 // expected-error @+1 {{unterminated string literal}}
@@ -939,10 +942,10 @@ let _ = 0xFFF_FFFF_FFFF_FFFF as Int64
939942
940943// rdar://problem/20289969 - string interpolation with comment containing ')' or '"'
941944let _ = " foo \( 42 /* ) " ) */) "
942- let _ = " foo \( foo // ) " // expected-error {{unterminated string literal}}
945+ let _ = " foo \( foo // ) " // expected-error {{cannot find ')' to match opening '(' in string interpolation}} expected-error {{ unterminated string literal}}
943946let _ = " foo \( 42 /*
944947 * multiline comment
945948 */) end "
946- // expected-error @-3 {{unterminated string literal}}
949+ // expected-error @-3 {{cannot find ')' to match opening '(' in string interpolation}} expected-error @-3 {{ unterminated string literal}}
947950// expected-error @-2 {{expected expression}}
948951// expected-error @-3 {{unterminated string literal}}
0 commit comments