forked from OSchip/llvm-project
Rename diagnostic so that it can be reused with scanf checking. No functionality change.
llvm-svn: 108896
This commit is contained in:
parent
4e8e93f142
commit
b65a9d5a1a
|
@ -2980,7 +2980,7 @@ def warn_printf_nonsensical_optional_amount: Warning<
|
|||
def warn_printf_nonsensical_flag: Warning<
|
||||
"flag '%0' results in undefined behavior with '%1' conversion specifier">,
|
||||
InGroup<Format>;
|
||||
def warn_printf_nonsensical_length: Warning<
|
||||
def warn_format_nonsensical_length: Warning<
|
||||
"length modifier '%0' results in undefined behavior or no effect with '%1' conversion specifier">,
|
||||
InGroup<Format>;
|
||||
def warn_printf_ignored_flag: Warning<
|
||||
|
|
|
@ -1518,7 +1518,7 @@ CheckPrintfHandler::HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier
|
|||
const LengthModifier &LM = FS.getLengthModifier();
|
||||
if (!FS.hasValidLengthModifier())
|
||||
S.Diag(getLocationOfByte(LM.getStart()),
|
||||
diag::warn_printf_nonsensical_length)
|
||||
diag::warn_format_nonsensical_length)
|
||||
<< LM.toString() << CS.toString()
|
||||
<< getSpecifierRange(startSpecifier, specifierLen)
|
||||
<< FixItHint::CreateRemoval(getSpecifierRange(LM.getStart(),
|
||||
|
|
Loading…
Reference in New Issue