diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-03-17 13:52:19 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-03-17 13:52:19 +0100 |
commit | 700d4cb08c88aec37c13e21e63dd61fd698baabc (patch) | |
tree | f02b4d3954543ef1a100a1f0e3b8757451885799 /gcc/cp | |
parent | f582ca0fd70c5de7f1bcb532241d58f9e7f0090a (diff) | |
download | gcc-700d4cb08c88aec37c13e21e63dd61fd698baabc.zip gcc-700d4cb08c88aec37c13e21e63dd61fd698baabc.tar.gz gcc-700d4cb08c88aec37c13e21e63dd61fd698baabc.tar.bz2 |
Fix up duplicated duplicated words mostly in comments
In the r10-7197-gbae7b38cf8a21e068ad5c0bab089dedb78af3346 commit I've
noticed duplicated word in a message, which lead me to grep for those and
we have a tons of them.
I've used
grep -v 'long long\|optab optab\|template template\|double double' *.[chS] */*.[chS] *.def config/*/* 2>/dev/null | grep ' \([a-zA-Z]\+\) \1 '
Note, the command will not detect the doubled words at the start or end of
line or when one of the words is at the end of line and the next one at the
start of another one.
Some of it is fairly obvious, e.g. all the "the the" cases which is
something I've posted and committed patch for already e.g. in 2016,
other cases are often valid, e.g. "that that" seems to look mostly ok to me.
Some cases are quite hard to figure out, I've left out some of them from the
patch (e.g. "and and" in some cases isn't talking about bitwise/logical and
and so looks incorrect, but in other cases it is talking about those
operations).
In most cases the right solution seems to be to remove one of the duplicated
words, but not always.
I think most important are the ones with user visible messages (in the patch
3 of the first 4 hunks), the rest is just comments (and internal
documentation; for that see the doc/tm.texi changes).
2020-03-17 Jakub Jelinek <jakub@redhat.com>
* lra-spills.c (remove_pseudos): Fix up duplicated word issue in
a dump message.
* tree-sra.c (create_access_replacement): Fix up duplicated word issue
in a comment.
* read-rtl-function.c (find_param_by_name,
function_reader::parse_enum_value, function_reader::get_insn_by_uid):
Likewise.
* spellcheck.c (get_edit_distance_cutoff): Likewise.
* tree-data-ref.c (create_ifn_alias_checks): Likewise.
* tree.def (SWITCH_EXPR): Likewise.
* selftest.c (assert_str_contains): Likewise.
* ipa-param-manipulation.h (class ipa_param_body_adjustments):
Likewise.
* tree-ssa-math-opts.c (convert_expand_mult_copysign): Likewise.
* tree-ssa-loop-split.c (find_vdef_in_loop): Likewise.
* langhooks.h (struct lang_hooks_for_decls): Likewise.
* ipa-prop.h (struct ipa_param_descriptor): Likewise.
* tree-ssa-strlen.c (handle_builtin_string_cmp, handle_store):
Likewise.
* tree-ssa-dom.c (simplify_stmt_for_jump_threading): Likewise.
* tree-ssa-reassoc.c (reassociate_bb): Likewise.
* tree.c (component_ref_size): Likewise.
* hsa-common.c (hsa_init_compilation_unit_data): Likewise.
* gimple-ssa-sprintf.c (get_string_length, format_string,
format_directive): Likewise.
* omp-grid.c (grid_process_kernel_body_copy): Likewise.
* input.c (string_concat_db::get_string_concatenation,
test_lexer_string_locations_ucn4): Likewise.
* cfgexpand.c (pass_expand::execute): Likewise.
* gimple-ssa-warn-restrict.c (builtin_memref::offset_out_of_bounds,
maybe_diag_overlap): Likewise.
* rtl.c (RTX_CODE_HWINT_P_1): Likewise.
* shrink-wrap.c (spread_components): Likewise.
* tree-ssa-dse.c (initialize_ao_ref_for_dse, valid_ao_ref_for_dse):
Likewise.
* tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
Likewise.
* dwarf2out.c (dwarf2out_early_finish): Likewise.
* gimple-ssa-store-merging.c: Likewise.
* ira-costs.c (record_operand_costs): Likewise.
* tree-vect-loop.c (vectorizable_reduction): Likewise.
* target.def (dispatch): Likewise.
(validate_dims, gen_ccmp_first): Fix up duplicated word issue
in documentation text.
* doc/tm.texi: Regenerated.
* config/i386/x86-tune.def (X86_TUNE_PARTIAL_FLAG_REG_STALL): Fix up
duplicated word issue in a comment.
* config/i386/i386.c (ix86_test_loading_unspec): Likewise.
* config/i386/i386-features.c (remove_partial_avx_dependency):
Likewise.
* config/msp430/msp430.c (msp430_select_section): Likewise.
* config/gcn/gcn-run.c (load_image): Likewise.
* config/aarch64/aarch64-sve.md (sve_ld1r<mode>): Likewise.
* config/aarch64/aarch64.c (aarch64_gen_adjusted_ldpstp): Likewise.
* config/aarch64/falkor-tag-collision-avoidance.c
(single_dest_per_chain): Likewise.
* config/nvptx/nvptx.c (nvptx_record_fndecl): Likewise.
* config/fr30/fr30.c (fr30_arg_partial_bytes): Likewise.
* config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Likewise.
* config/rs6000/rs6000-p8swap.c (replace_swapped_load_constant):
Likewise.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Likewise.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Likewise.
* config/rs6000/rs6000-logue.c
(rs6000_emit_probe_stack_range_stack_clash): Likewise.
* config/nds32/nds32-md-auxiliary.c (nds32_split_ashiftdi3): Likewise.
Fix various other issues in the comment.
c-family/
* c-common.c (resolve_overloaded_builtin): Fix up duplicated word
issue in a diagnostic message.
cp/
* pt.c (tsubst): Fix up duplicated word issue in a diagnostic message.
(lookup_template_class_1, tsubst_expr): Fix up duplicated word issue
in a comment.
* parser.c (cp_parser_statement, cp_parser_linkage_specification,
cp_parser_placeholder_type_specifier,
cp_parser_constraint_requires_parens): Likewise.
* name-lookup.c (suggest_alternative_in_explicit_scope): Likewise.
fortran/
* array.c (gfc_check_iter_variable): Fix up duplicated word issue
in a comment.
* arith.c (gfc_arith_concat): Likewise.
* resolve.c (gfc_resolve_ref): Likewise.
* frontend-passes.c (matmul_lhs_realloc): Likewise.
* module.c (gfc_match_submodule, load_needed): Likewise.
* trans-expr.c (gfc_init_se): Likewise.
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cp/name-lookup.c | 2 | ||||
-rw-r--r-- | gcc/cp/parser.c | 10 | ||||
-rw-r--r-- | gcc/cp/pt.c | 6 |
4 files changed, 19 insertions, 9 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 661ba2b..15b3ccc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +2020-03-17 Jakub Jelinek <jakub@redhat.com> + + * pt.c (tsubst): Fix up duplicated word issue in a diagnostic message. + (lookup_template_class_1, tsubst_expr): Fix up duplicated word issue + in a comment. + * parser.c (cp_parser_statement, cp_parser_linkage_specification, + cp_parser_placeholder_type_specifier, + cp_parser_constraint_requires_parens): Likewise. + * name-lookup.c (suggest_alternative_in_explicit_scope): Likewise. + 2020-03-15 Iain Sandoe <iain@sandoe.co.uk> * coroutines.cc (co_await_expander): Fix indentation. diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index e5638d2..d00bb5f 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -5938,7 +5938,7 @@ maybe_suggest_missing_header (location_t location, tree name, tree scope) /* Generate a name_hint at LOCATION for NAME, an IDENTIFIER_NODE for which name lookup failed within the explicitly provided SCOPE. - Suggest the the best meaningful candidates (if any), otherwise + Suggest the best meaningful candidates (if any), otherwise an empty name_hint is returned. */ name_hint diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 0c7db8b..58a1bea 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -11346,8 +11346,8 @@ cp_parser_statement (cp_parser* parser, tree in_statement_expr, /* This must be a namespace alias definition. */ if (std_attrs != NULL_TREE) { - /* Attributes should be parsed as part of the the - declaration, so let's un-parse them. */ + /* Attributes should be parsed as part of the + declaration, so let's un-parse them. */ saved_tokens.rollback(); std_attrs = NULL_TREE; } @@ -14554,7 +14554,7 @@ cp_parser_linkage_specification (cp_parser* parser) /* We're now using the new linkage. */ push_lang_context (linkage); - /* Preserve the location of the the innermost linkage specification, + /* Preserve the location of the innermost linkage specification, tracking the locations of nested specifications via a local. */ location_t saved_location = parser->innermost_linkage_specification_location; @@ -18316,7 +18316,7 @@ cp_parser_placeholder_type_specifier (cp_parser *parser, location_t loc, } /* A type constraint constrains a contextually determined type or type - parameter pack. However, the the Concepts TS does allow concepts + parameter pack. However, the Concepts TS does allow concepts to introduce non-type and template template parameters. */ if (TREE_CODE (proto) != TYPE_DECL) { @@ -27339,7 +27339,7 @@ cp_parser_constraint_requires_parens (cp_parser *parser, bool lambda_p) case CPP_EQ: { - /* An equal sign may be part of the the definition of a function, + /* An equal sign may be part of the definition of a function, and not an assignment operator, when parsing the expression for a trailing requires-clause. For example: diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 48ac486..c57d570 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -9682,7 +9682,7 @@ lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context, if (entry) return entry->spec; - /* If the the template's constraints are not satisfied, + /* If the template's constraints are not satisfied, then we cannot form a valid type. Note that the check is deferred until after the hash @@ -15688,7 +15688,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) else if (TYPENAME_IS_CLASS_P (t) && !CLASS_TYPE_P (f)) { if (complain & tf_error) - error ("%qT resolves to %qT, which is is not a class type", + error ("%qT resolves to %qT, which is not a class type", t, f); else return error_mark_node; @@ -17855,7 +17855,7 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl, case RANGE_FOR_STMT: { /* Construct another range_for, if this is not a final - substitution (for inside inside a generic lambda of a + substitution (for inside a generic lambda of a template). Otherwise convert to a regular for. */ tree decl, expr; stmt = (processing_template_decl |