Skip to content

[gardening] Remove 16 unused diagnostics #7912

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 1 commit into from
Mar 5, 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
2 changes: 0 additions & 2 deletions include/swift/AST/DiagnosticsCommon.def
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ NOTE(brace_stmt_suggest_do,none,
// Generic disambiguation
NOTE(while_parsing_as_left_angle_bracket,none,
"while parsing this '<' as a type parameter bracket", ())
NOTE(while_parsing_as_less_operator,none,
"while parsing this '<' as an operator", ())


// FIXME: This is used both as a parse error (a literal "super" outside a
Expand Down
2 changes: 0 additions & 2 deletions include/swift/AST/DiagnosticsParse.def
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,6 @@ ERROR(no_default_arg_subscript,none,
"default arguments are not allowed in subscripts", ())
ERROR(no_default_arg_curried,none,
"default arguments are not allowed in curried parameter lists", ())
WARNING(let_on_param_is_redundant, none,
"'let' keyword is unnecessary; function parameters are immutable by default", (unsigned))
ERROR(var_pattern_in_var,none,
"'%select{var|let}0' cannot appear nested inside another 'var' or "
"'let' pattern", (unsigned))
Expand Down
36 changes: 1 addition & 35 deletions include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ NOTE(decl_declared_here,none,
NOTE(extended_type_declared_here,none,
"extended type declared here", ())

NOTE(while_converting_default_tuple_value,none,
"while converting default tuple value to element type %0", (Type))
NOTE(while_converting_subscript_index,none,
"while converting subscript index to expected type %0", (Type))

//------------------------------------------------------------------------------
// Constraint solver diagnostics
//------------------------------------------------------------------------------
Expand Down Expand Up @@ -915,8 +910,6 @@ ERROR(c_function_pointer_from_function_with_context,none,
"%select{local function|closure}0 that captures "
"%select{context|generic parameters|dynamic Self type}1",
(bool, unsigned))
NOTE(c_function_pointer_captures_here,none,
"%0 captured here", (Identifier))

//------------------------------------------------------------------------------
// Type Check Declarations
Expand Down Expand Up @@ -1508,18 +1501,13 @@ NOTE(declared_protocol_conformance_here,none,

ERROR(redundant_conformance,none,
"redundant conformance of %0 to protocol %1", (Type, DeclName))
NOTE(protocol_conformance_implied_here,none,
"implied protocol conformance %0 here can be made explicit", (Identifier))

// "Near matches"
WARNING(optional_req_near_match,none,
"%0 %1 nearly matches optional requirement %2 of protocol %3",
(DescriptiveDeclKind, DeclName, DeclName, DeclName))
NOTE(optional_req_nonobjc_near_match_add_objc,none,
"add '@objc' to provide an Objective-C entrypoint", ())
NOTE(optional_req_nonobjc_to_objc,none,
"rename to %0 to satisfy this requirement",
(DeclName))
NOTE(optional_req_near_match_move,none,
"move %0 to %select{an|another}1 extension to silence this warning",
(DeclName, unsigned))
Expand Down Expand Up @@ -1775,8 +1763,6 @@ ERROR(decl_already_final,none,
"static declarations are already final", ())
ERROR(open_decl_cannot_be_final,none,
"%0 cannot be declared both 'final' and 'open'", (DescriptiveDeclKind))
NOTE(decl_init_here,none,
"initial value is here", ())


// Inheritance
Expand Down Expand Up @@ -2069,9 +2055,6 @@ ERROR(nscopying_doesnt_conform,none,
#define SELECT_APPLICATION_MAIN "select{'UIApplicationMain'|'NSApplicationMain'}"
#define SELECT_APPLICATION_DELEGATE "select{'UIApplicationDelegate'|'NSApplicationDelegate'}"

ERROR(attr_ApplicationMain_not_class,none,
"%" SELECT_APPLICATION_MAIN "0 attribute may only be used on classes",
(unsigned))
ERROR(attr_ApplicationMain_not_ApplicationDelegate,none,
"%" SELECT_APPLICATION_MAIN "0 class must conform to the %" SELECT_APPLICATION_DELEGATE "0 protocol",
(unsigned))
Expand Down Expand Up @@ -2125,17 +2108,7 @@ NOTE(found_candidate,none,
"found this candidate", ())
NOTE(found_candidate_type,none,
"found candidate with type %0", (Type))
NOTE(first_declaration,none,
"first declaration", ())
NOTE(second_declaration,none,
"second declaration", ())

ERROR(no_IntegerLiteralType_found,none,
"standard library error: IntegerLiteralType not defined", ())
ERROR(no_FloatLiteralType_found,none,
"standard library error: FloatLiteralType not defined", ())
ERROR(no_StringLiteralType_found,none,
"standard library error: StringLiteralType not defined", ())

ERROR(no_MaxBuiltinIntegerType_found,none,
"standard library error: _MaxBuiltinIntegerType is not properly defined", ())
ERROR(no_MaxBuiltinFloatType_found,none,
Expand Down Expand Up @@ -2241,9 +2214,6 @@ ERROR(try_assign_rhs_noncovering,none,
"'" TRY_KIND_SELECT(0) "' following assignment operator does not cover "
"everything to its right", (unsigned))

NOTE(subscript_decl_here,none,
"subscript operator declared here", ())

ERROR(broken_bool,none, "type 'Bool' is broken", ())

WARNING(inject_forced_downcast,none,
Expand Down Expand Up @@ -3465,10 +3435,6 @@ WARNING(variable_never_read, none,
"%select{variable|parameter}1 %0 was written to, but never read",
(Identifier, unsigned))

WARNING(extraneous_default_args_in_call, none,
"call to %0 has extraneous arguments that could use defaults",
(DeclName))

//------------------------------------------------------------------------------
// Circular reference diagnostics
//------------------------------------------------------------------------------
Expand Down