summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-common.h
diff options
context:
space:
mode:
authorppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-02 17:31:55 +0000
committerppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-02 17:31:55 +0000
commit9255be07ea1ac0e2f2991aa11cfc892474add3b2 (patch)
tree4382b53b305ac8e976613091b7987f093d40123f /gcc/c-family/c-common.h
parent3d5db02d5211cdce46bee1d872af87315c1b9ba6 (diff)
downloadgcc-9255be07ea1ac0e2f2991aa11cfc892474add3b2.tar.gz
Refactor entry point to -Wmisleading-indentation
gcc/c-family/ChangeLog: * c-indentation.h (struct token_indent_info): Define. (get_token_indent_info): Define. (warn_for_misleading_information): Declare. * c-common.h (warn_for_misleading_information): Remove. * c-identation.c (warn_for_misleading_indentation): Change declaration to take three token_indent_infos. Adjust accordingly. * c-identation.c (should_warn_for_misleading_indentation): Likewise. Bail out early if the body is a compound statement. (guard_tinfo_to_string): Define. gcc/c/ChangeLog: * c-parser.c (c_parser_if_body): Take token_indent_info argument. Call warn_for_misleading_indentation even when the body is a semicolon. Extract token_indent_infos corresponding to the guard, body and next tokens. Adjust call to warn_for_misleading_indentation accordingly. (c_parser_else_body): Likewise. (c_parser_if_statement): Likewise. (c_parser_while_statement): Likewise. (c_parser_for_statement): Likewise. gcc/cp/ChangeLog: * parser.c (cp_parser_selection_statement): Move handling of semicolon body to ... (cp_parser_implicitly_scoped_statement): .. here. Call warn_for_misleading_indentation even when the body is a semicolon. Extract token_indent_infos corresponding to the guard, body and next tokens. Adjust call to warn_for_misleading_indentation accordingly. Take token_indent_info argument. (cp_parser_already_scoped_statement): Likewise. (cp_parser_selection_statement, cp_parser_iteration_statement): Extract a token_indent_info corresponding to the guard token. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226477 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-common.h')
-rw-r--r--gcc/c-family/c-common.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index f0640c7f86c..ff74e53c708 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -1431,12 +1431,5 @@ extern bool contains_cilk_spawn_stmt (tree);
extern tree cilk_for_number_of_iterations (tree);
extern bool check_no_cilk (tree, const char *, const char *,
location_t loc = UNKNOWN_LOCATION);
-/* In c-indentation.c. */
-extern void
-warn_for_misleading_indentation (location_t guard_loc,
- location_t body_loc,
- location_t next_stmt_loc,
- enum cpp_ttype next_tok_type,
- const char *guard_kind);
#endif /* ! GCC_C_COMMON_H */