From b65a9d5a1a0b09f67836217e5e0f3c877be71a9f Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 20 Jul 2010 20:03:43 +0000 Subject: [PATCH] Rename diagnostic so that it can be reused with scanf checking. No functionality change. llvm-svn: 108896 --- clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 +- clang/lib/Sema/SemaChecking.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index d3c33e62f1f8..24b326ae1f62 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/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; -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; def warn_printf_ignored_flag: Warning< diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 72939e6e592d..811a9d8724f5 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/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(),