]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR translation/90156 - add linter check suggesting to replace %<%s%> with %qs
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Jun 2019 19:08:24 +0000 (19:08 +0000)
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 19 Jun 2019 19:08:24 +0000 (19:08 +0000)
commitcc90adc200d93167d8b9a90b2053abd0b2481347
treeb96003c3241a11305bffd62138ebc12d78091107
parent98b03e045877176a56499ecd3ca7f078810ebf88
PR translation/90156 - add linter check suggesting to replace %<%s%> with %qs

gcc/c-family/ChangeLog:

PR translation/90156
* c-format.c (function_format_info::format_type): Adjust type.
(function_format_info::is_raw): New member.
(decode_format_type): Adjust signature.  Handle "raw" diag attributes.
(decode_format_attr): Adjust call to decode_format_type.
Avoid a redundant call to convert_format_name_to_system_name.
Avoid abbreviating the word "arguments" in a diagnostic.
(format_warning_substr): New function.
(avoid_dollar_number): Quote dollar sign in a diagnostic.
(finish_dollar_format_checking): Same.
(check_format_info): Same.
(struct baltoks_t): New.
(c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
(maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
functions.
(check_format_info_main): Call check_plain.  Use baltoks_t.  Call
maybe_diag_unbalanced_tokens.
(handle_format_attribute): Spell out the word "arguments" in
a diagnostic.

gcc/testsuite/ChangeLog:

PR translation/90156
* gcc.dg/format/gcc_diag-11.c: Enable.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272483 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/c-family/ChangeLog
gcc/c-family/c-format.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format/gcc_diag-11.c