@@ -99,6 +99,11 @@ WARNING(escaped_parameter_name,none,
9999 " keyword '%0' does not need to be escaped in argument list" ,
100100 (StringRef))
101101
102+ ERROR(forbidden_interpolated_string,none,
103+ " %0 cannot be an interpolated string literal" , (StringRef))
104+ ERROR(forbidden_extended_escaping_string,none,
105+ " %0 cannot be an extended escaping string literal" , (StringRef))
106+
102107// ------------------------------------------------------------------------------
103108// MARK: Lexer diagnostics
104109// ------------------------------------------------------------------------------
@@ -1263,6 +1268,17 @@ ERROR(expr_typeof_expected_rparen,PointsToFirstBadToken,
12631268ERROR(expr_dynamictype_deprecated,PointsToFirstBadToken,
12641269 " '.dynamicType' is deprecated. Use 'type(of: ...)' instead" , ())
12651270
1271+ ERROR(pound_assert_disabled,PointsToFirstBadToken,
1272+ " #assert is an experimental feature that is currently disabled" , ())
1273+ ERROR(pound_assert_expected_lparen,PointsToFirstBadToken,
1274+ " expected '(' in #assert directive" , ())
1275+ ERROR(pound_assert_expected_rparen,PointsToFirstBadToken,
1276+ " expected ')' in #assert directive" , ())
1277+ ERROR(pound_assert_expected_expression,PointsToFirstBadToken,
1278+ " expected a condition expression" , ())
1279+ ERROR(pound_assert_expected_string_literal,PointsToFirstBadToken,
1280+ " expected a string literal" , ())
1281+
12661282// ------------------------------------------------------------------------------
12671283// MARK: Attribute-parsing diagnostics
12681284// ------------------------------------------------------------------------------
@@ -1311,11 +1327,6 @@ ERROR(alignment_must_be_positive_integer,none,
13111327ERROR(swift_native_objc_runtime_base_must_be_identifier,none,
13121328 " @_swift_native_objc_runtime_base class name must be an identifier" , ())
13131329
1314- ERROR(attr_interpolated_string,none,
1315- " '%0' cannot be an interpolated string literal" , (StringRef))
1316- ERROR(attr_extended_escaping_string,none,
1317- " '%0' cannot be an extended escaping string literal" , (StringRef))
1318-
13191330ERROR(attr_only_at_non_local_scope, none,
13201331 " attribute '%0' can only be used in a non-local scope" , (StringRef))
13211332
@@ -1417,6 +1428,15 @@ ERROR(attr_dynamic_replacement_expected_for,none,
14171428ERROR(attr_dynamic_replacement_expected_colon,none,
14181429 " expected ':' after @_dynamicReplacement(for" , ())
14191430
1431+ ERROR(attr_private_import_expected_rparen,none,
1432+ " expected ')' after function name for @_private" , ())
1433+ ERROR(attr_private_import_expected_sourcefile, none,
1434+ " expected 'sourceFile' in '_private' attribute" , ())
1435+ ERROR(attr_private_import_expected_sourcefile_name,none,
1436+ " expected a source file name in @_private(sourceFile:)" , ())
1437+ ERROR(attr_private_import_expected_colon,none,
1438+ " expected ':' after @_private(sourceFile" , ())
1439+
14201440// opened
14211441ERROR(opened_attribute_expected_lparen,none,
14221442 " expected '(' after 'opened' attribute" , ())
0 commit comments