Skip to content

Commit d88162f

Browse files
committed
[Gardening][.def] Add MARK annotations for better nav
1 parent 3d1bfcb commit d88162f

File tree

3 files changed

+89
-89
lines changed

3 files changed

+89
-89
lines changed

include/swift/AST/DiagnosticsParse.def

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#endif
3838

3939
//==============================================================================
40-
// Lexing and Parsing diagnostics
40+
// MARK: Lexing and Parsing diagnostics
4141
//==============================================================================
4242

4343
NOTE(opening_brace,none,
@@ -99,7 +99,7 @@ WARNING(escaped_parameter_name,none,
9999
(StringRef))
100100

101101
//------------------------------------------------------------------------------
102-
// Lexer diagnostics
102+
// MARK: Lexer diagnostics
103103
//------------------------------------------------------------------------------
104104

105105
WARNING(lex_nul_character,none,
@@ -186,7 +186,7 @@ WARNING(lex_editor_placeholder_in_playground,none,
186186
ERROR(lex_conflict_marker_in_file,none,
187187
"source control conflict marker in source file", ())
188188
//------------------------------------------------------------------------------
189-
// Declaration parsing diagnostics
189+
// MARK: Declaration parsing diagnostics
190190
//------------------------------------------------------------------------------
191191

192192
NOTE(note_in_decl_extension,none,
@@ -702,7 +702,7 @@ ERROR(sil_coverage_invalid_operator, none,
702702
"expected '+' or '-'", ())
703703

704704
//------------------------------------------------------------------------------
705-
// Type parsing diagnostics
705+
// MARK: Type parsing diagnostics
706706
//------------------------------------------------------------------------------
707707

708708
ERROR(expected_type,PointsToFirstBadToken,
@@ -800,7 +800,7 @@ ERROR(sil_box_expected_r_angle,none,
800800
"expected '>' to complete SIL box generic argument list", ())
801801

802802
//------------------------------------------------------------------------------
803-
// Layout constraint diagnostics
803+
// MARK: Layout constraint diagnostics
804804
//------------------------------------------------------------------------------
805805

806806
ERROR(layout_size_should_be_positive,none,
@@ -813,7 +813,7 @@ ERROR(layout_constraints_only_inside_specialize_attr,none,
813813
"layout constraints are only allowed inside '_specialize' attributes", ())
814814

815815
//------------------------------------------------------------------------------
816-
// Pattern parsing diagnostics
816+
// MARK: Pattern parsing diagnostics
817817
//------------------------------------------------------------------------------
818818

819819
ERROR(expected_pattern,PointsToFirstBadToken,
@@ -1079,7 +1079,7 @@ ERROR(try_on_var_let,none,
10791079
"'try' must be placed on the initial value expression", ())
10801080

10811081
//------------------------------------------------------------------------------
1082-
// Expression parsing diagnostics
1082+
// MARK: Expression parsing diagnostics
10831083
//------------------------------------------------------------------------------
10841084

10851085
ERROR(expected_expr,none,
@@ -1257,7 +1257,7 @@ ERROR(expr_dynamictype_deprecated,PointsToFirstBadToken,
12571257
"'.dynamicType' is deprecated. Use 'type(of: ...)' instead", ())
12581258

12591259
//------------------------------------------------------------------------------
1260-
// Attribute-parsing diagnostics
1260+
// MARK: Attribute-parsing diagnostics
12611261
//------------------------------------------------------------------------------
12621262

12631263
ERROR(replace_equal_with_colon_for_value,none,
@@ -1456,7 +1456,7 @@ ERROR(attr_implements_expected_member_name,PointsToFirstBadToken,
14561456
"expected a member name as second parameter in '_implements' attribute", ())
14571457

14581458
//------------------------------------------------------------------------------
1459-
// Generics parsing diagnostics
1459+
// MARK: Generics parsing diagnostics
14601460
//------------------------------------------------------------------------------
14611461
ERROR(expected_rangle_generics_param,PointsToFirstBadToken,
14621462
"expected '>' to complete generic parameter list", ())
@@ -1490,7 +1490,7 @@ ERROR(where_inside_brackets,none,
14901490
"must be written following the declaration's type", ())
14911491

14921492
//------------------------------------------------------------------------------
1493-
// Conditional compilation parsing diagnostics
1493+
// MARK: Conditional compilation parsing diagnostics
14941494
//------------------------------------------------------------------------------
14951495
ERROR(unsupported_conditional_compilation_binary_expression,none,
14961496
"expected '&&' or '||' expression", ())
@@ -1545,7 +1545,7 @@ WARNING(likely_simulator_platform_condition,none,
15451545
())
15461546

15471547
//------------------------------------------------------------------------------
1548-
// Availability query parsing diagnostics
1548+
// MARK: Availability query parsing diagnostics
15491549
//------------------------------------------------------------------------------
15501550
ERROR(avail_query_expected_condition,PointsToFirstBadToken,
15511551
"expected availability condition", ())
@@ -1586,7 +1586,7 @@ ERROR(availability_query_repeated_platform, none,
15861586
"version for '%0' already specified", (StringRef))
15871587

15881588
//------------------------------------------------------------------------------
1589-
// syntax parsing diagnostics
1589+
// MARK: syntax parsing diagnostics
15901590
//------------------------------------------------------------------------------
15911591
ERROR(unknown_syntax_entity, PointsToFirstBadToken,
15921592
"unknown %0 syntax exists in the source", (StringRef))

include/swift/AST/DiagnosticsSema.def

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ NOTE(extended_type_declared_here,none,
4848
"extended type declared here", ())
4949

5050
//------------------------------------------------------------------------------
51-
// Constraint solver diagnostics
51+
// MARK: Constraint solver diagnostics
5252
//------------------------------------------------------------------------------
5353

5454
ERROR(ambiguous_member_overload_set,none,
@@ -547,7 +547,7 @@ ERROR(cannot_return_value_from_void_func,none,
547547
"unexpected non-void return value in void function", ())
548548

549549
//------------------------------------------------------------------------------
550-
// Name Binding
550+
// MARK: Name Binding
551551
//------------------------------------------------------------------------------
552552

553553
ERROR(sema_no_import,Fatal,
@@ -767,14 +767,14 @@ NOTE(previous_precedence_group_decl,none,
767767
"previous precedence group declaration here", ())
768768

769769
//------------------------------------------------------------------------------
770-
// Type Check Coercions
770+
// MARK: Type Check Coercions
771771
//------------------------------------------------------------------------------
772772

773773
ERROR(tuple_conversion_not_expressible,none,
774774
"cannot express tuple conversion %0 to %1", (Type, Type))
775775

776776
//------------------------------------------------------------------------------
777-
// Expression Type Checking Errors
777+
// MARK: Expression Type Checking Errors
778778
//------------------------------------------------------------------------------
779779
ERROR(types_not_convertible,none,
780780
"%1 is not %select{convertible to|a subtype of}0 %2",
@@ -1009,7 +1009,7 @@ ERROR(c_function_pointer_from_function_with_context,none,
10091009
(bool, unsigned))
10101010

10111011
//------------------------------------------------------------------------------
1012-
// Type Check Declarations
1012+
// MARK: Type Check Declarations
10131013
//------------------------------------------------------------------------------
10141014

10151015
ERROR(var_type_not_materializable,none,
@@ -2295,7 +2295,7 @@ ERROR(property_behavior_conformance_broken,none,
22952295
"property behavior for %0 in type %1 is broken", (DeclName, Type))
22962296

22972297
//------------------------------------------------------------------------------
2298-
// Type Check Attributes
2298+
// MARK: Type Check Attributes
22992299
//------------------------------------------------------------------------------
23002300

23012301
ERROR(attr_only_one_decl_kind,none,
@@ -2437,7 +2437,7 @@ ERROR(implements_attr_protocol_not_conformed_to,none,
24372437
(DeclName, DeclName))
24382438

24392439
//------------------------------------------------------------------------------
2440-
// Type Check Expressions
2440+
// MARK: Type Check Expressions
24412441
//------------------------------------------------------------------------------
24422442

24432443
NOTE(found_candidate,none,
@@ -2900,7 +2900,7 @@ ERROR(capture_across_type_decl,none,
29002900
(DescriptiveDeclKind, Identifier))
29012901

29022902
//------------------------------------------------------------------------------
2903-
// Type Check Statements
2903+
// MARK: Type Check Statements
29042904
//------------------------------------------------------------------------------
29052905

29062906
ERROR(jump_out_of_defer,none,
@@ -3039,7 +3039,7 @@ ERROR(trailing_closure_requires_parens,none,
30393039
" context", ())
30403040

30413041
//------------------------------------------------------------------------------
3042-
// Type Check Patterns
3042+
// MARK: Type Check Patterns
30433043
//------------------------------------------------------------------------------
30443044

30453045
ERROR(cannot_infer_type_for_pattern,none,
@@ -3126,7 +3126,7 @@ WARNING(swift3_ignore_specialized_enum_element_call,none,
31263126
"which will be rejected in future version of Swift", ())
31273127

31283128
//------------------------------------------------------------------------------
3129-
// Error-handling diagnostics
3129+
// MARK: Error-handling diagnostics
31303130
//------------------------------------------------------------------------------
31313131

31323132

@@ -3202,7 +3202,7 @@ WARNING(no_throw_in_do_with_catch,none,
32023202
"'catch' block is unreachable because no errors are thrown in 'do' block", ())
32033203

32043204
//------------------------------------------------------------------------------
3205-
// Type Check Types
3205+
// MARK: Type Check Types
32063206
//------------------------------------------------------------------------------
32073207

32083208
ERROR(unsupported_recursive_struct,none,
@@ -3360,7 +3360,7 @@ ERROR(sil_metatype_multiple_reprs,none,
33603360
())
33613361

33623362
//------------------------------------------------------------------------------
3363-
// @objc and @nonobjc
3363+
// MARK: @objc and @nonobjc
33643364
//------------------------------------------------------------------------------
33653365

33663366
ERROR(objc_interop_disabled,none,
@@ -3662,7 +3662,7 @@ ERROR(nonobjc_not_allowed,none,
36623662
#undef OBJC_ATTR_SELECT
36633663

36643664
//------------------------------------------------------------------------------
3665-
// dynamic
3665+
// MARK: dynamic
36663666
//------------------------------------------------------------------------------
36673667

36683668
ERROR(dynamic_not_in_class,none,
@@ -3678,7 +3678,7 @@ ERROR(dynamic_requires_objc,none,
36783678
(DescriptiveDeclKind, DeclName))
36793679

36803680
//------------------------------------------------------------------------------
3681-
// @available
3681+
// MARK: @available
36823682
//------------------------------------------------------------------------------
36833683

36843684
ERROR(availability_decl_unavailable, none,
@@ -3803,15 +3803,15 @@ ERROR(availabilty_string_subscript_migration, none,
38033803
"subscripts returning String were obsoleted in Swift 4; explicitly construct a String from subscripted result", ())
38043804

38053805
//------------------------------------------------------------------------------
3806-
// @discardableResult
3806+
// MARK: @discardableResult
38073807
//------------------------------------------------------------------------------
38083808

38093809
WARNING(discardable_result_on_void_never_function, none,
38103810
"@discardableResult declared on a function returning %select{Never|Void}0 is unnecessary",
38113811
(bool))
38123812

38133813
//------------------------------------------------------------------------------
3814-
// Resilience diagnostics
3814+
// MARK: Resilience diagnostics
38153815
//------------------------------------------------------------------------------
38163816

38173817
ERROR(fixed_layout_attr_on_internal_type,
@@ -3875,7 +3875,7 @@ ERROR(inlinable_decl_not_public,
38753875
(DeclBaseName, AccessLevel))
38763876

38773877
//------------------------------------------------------------------------------
3878-
// @_specialize diagnostics
3878+
// MARK: @_specialize diagnostics
38793879
//------------------------------------------------------------------------------
38803880

38813881
ERROR(specialize_attr_nongeneric_trailing_where,none,
@@ -3904,7 +3904,7 @@ ERROR(specialize_attr_unsupported_kind_of_req,none,
39043904
"Only same-type and layout requirements are supported by '_specialize' attribute", ())
39053905

39063906
//------------------------------------------------------------------------------
3907-
// Variable usage diagnostics
3907+
// MARK: Variable usage diagnostics
39083908
//------------------------------------------------------------------------------
39093909

39103910
WARNING(pbd_never_used_stmtcond, none,
@@ -3944,7 +3944,7 @@ WARNING(variable_never_read, none,
39443944
(Identifier, unsigned))
39453945

39463946
//------------------------------------------------------------------------------
3947-
// Circular reference diagnostics
3947+
// MARK: Circular reference diagnostics
39483948
//------------------------------------------------------------------------------
39493949
ERROR(circular_reference, none,
39503950
"circular reference", ())
@@ -3956,7 +3956,7 @@ NOTE(circular_reference_through, none,
39563956
"through reference here", ())
39573957

39583958
//------------------------------------------------------------------------------
3959-
// Debug diagnostics
3959+
// MARK: Debug diagnostics
39603960
//------------------------------------------------------------------------------
39613961

39623962
WARNING(debug_long_function_body, none,
@@ -3970,7 +3970,7 @@ WARNING(debug_long_expression, none,
39703970
(unsigned, unsigned))
39713971

39723972
//------------------------------------------------------------------------------
3973-
// Pattern match diagnostics
3973+
// MARK: Pattern match diagnostics
39743974
//------------------------------------------------------------------------------
39753975

39763976

0 commit comments

Comments
 (0)