diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-07-20 20:03:43 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-07-20 20:03:43 +0000 |
commit | 649aecf55670682efb2a04a85810eef4d038c527 (patch) | |
tree | 2e2641c513065bfe4308d73eb84dc0b16c68d1ff | |
parent | 6ba9aaed5eb612402d69117a0b63351272b4ae2e (diff) |
Rename diagnostic so that it can be reused with scanf checking. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108896 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index d3c33e62f1..24b326ae1f 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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< diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 72939e6e59..811a9d8724 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -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(), |