[clang] 6e26e49 - [analyzer] NFC: Fix wrong parameter name in printFormattedEntry.
Artem Dergachev via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 27 12:15:43 PDT 2020
Author: Yang Fan
Date: 2020-08-27T12:15:26-07:00
New Revision: 6e26e49edf0d509fb3e76d984f2cbc8288fd6dc5
URL: https://github.com/llvm/llvm-project/commit/6e26e49edf0d509fb3e76d984f2cbc8288fd6dc5
DIFF: https://github.com/llvm/llvm-project/commit/6e26e49edf0d509fb3e76d984f2cbc8288fd6dc5.diff
LOG: [analyzer] NFC: Fix wrong parameter name in printFormattedEntry.
Parameters were in a different order in the header and in the implementation.
Fix surrounding comments a bit.
Differential Revision: https://reviews.llvm.org/D86691
Added:
Modified:
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h b/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
index d2df24a6e21b..4907b0757a8a 100644
--- a/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
+++ b/clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
@@ -177,23 +177,23 @@ class AnalyzerOptions : public RefCountedBase<AnalyzerOptions> {
/// description in a formatted manner. If \p MinLineWidth is set to 0, no line
/// breaks are introduced for the description.
///
- /// Format, depending whether the option name's length is less then
- /// \p OptionWidth:
+ /// Format, depending whether the option name's length is less than
+ /// \p EntryWidth:
///
/// <padding>EntryName<padding>Description
/// <---------padding--------->Description
/// <---------padding--------->Description
///
- /// <padding>VeryVeryLongOptionName
+ /// <padding>VeryVeryLongEntryName
/// <---------padding--------->Description
/// <---------padding--------->Description
- /// ^~~~~~~~ InitialPad
- /// ^~~~~~~~~~~~~~~~~~~~~~~~~~ EntryWidth
+ /// ^~~~~~~~~InitialPad
+ /// ^~~~~~~~~~~~~~~~~~EntryWidth
/// ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~MinLineWidth
- static void printFormattedEntry(
- llvm::raw_ostream &Out,
- std::pair<StringRef, StringRef> EntryDescPair,
- size_t EntryWidth, size_t InitialPad, size_t MinLineWidth = 0);
+ static void printFormattedEntry(llvm::raw_ostream &Out,
+ std::pair<StringRef, StringRef> EntryDescPair,
+ size_t InitialPad, size_t EntryWidth,
+ size_t MinLineWidth = 0);
/// Pairs of checker/package name and enable/disable.
std::vector<std::pair<std::string, bool>> CheckersAndPackages;
diff --git a/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp b/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
index 01ac2bc83bb6..8cd7f75e4e38 100644
--- a/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
+++ b/clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
@@ -40,7 +40,7 @@ void AnalyzerOptions::printFormattedEntry(
const size_t PadForDesc = InitialPad + EntryWidth;
FOut.PadToColumn(InitialPad) << EntryDescPair.first;
- // If the buffer's length is greater then PadForDesc, print a newline.
+ // If the buffer's length is greater than PadForDesc, print a newline.
if (FOut.getColumn() > PadForDesc)
FOut << '\n';
More information about the cfe-commits
mailing list