[clang] [llvm] [Chore] Fix `formating` typos. NFC. (PR #106817)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 31 04:34:27 PDT 2024
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/106817
>From dc9e84136e33c6ab35b1263382b740ff9a9dcd68 Mon Sep 17 00:00:00 2001
From: c8ef <c8ef at outlook.com>
Date: Sat, 31 Aug 2024 09:30:49 +0800
Subject: [PATCH] fix formating typo
---
clang/lib/Tooling/Refactoring/AtomicChange.cpp | 8 ++++----
clang/tools/clang-format/ClangFormat.cpp | 2 +-
.../tests/functional/cases/test_create_cdb.py | 2 +-
llvm/examples/ExceptionDemo/ExceptionDemo.cpp | 3 +--
4 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/clang/lib/Tooling/Refactoring/AtomicChange.cpp b/clang/lib/Tooling/Refactoring/AtomicChange.cpp
index dfc98355c6642b..5bafe43aa92d6f 100644
--- a/clang/lib/Tooling/Refactoring/AtomicChange.cpp
+++ b/clang/lib/Tooling/Refactoring/AtomicChange.cpp
@@ -104,9 +104,9 @@ bool violatesColumnLimit(llvm::StringRef Code, unsigned ColumnLimit,
}
std::vector<Range>
-getRangesForFormating(llvm::StringRef Code, unsigned ColumnLimit,
- ApplyChangesSpec::FormatOption Format,
- const clang::tooling::Replacements &Replaces) {
+getRangesForFormatting(llvm::StringRef Code, unsigned ColumnLimit,
+ ApplyChangesSpec::FormatOption Format,
+ const clang::tooling::Replacements &Replaces) {
// kNone suppresses formatting entirely.
if (Format == ApplyChangesSpec::kNone)
return {};
@@ -352,7 +352,7 @@ applyAtomicChanges(llvm::StringRef FilePath, llvm::StringRef Code,
AllReplaces = AllReplaces.merge(HeaderSortingReplacements);
- std::vector<Range> FormatRanges = getRangesForFormating(
+ std::vector<Range> FormatRanges = getRangesForFormatting(
*ChangedCode, Spec.Style.ColumnLimit, Spec.Format, AllReplaces);
if (!FormatRanges.empty()) {
Replacements FormatReplacements =
diff --git a/clang/tools/clang-format/ClangFormat.cpp b/clang/tools/clang-format/ClangFormat.cpp
index 54b1dacbbe854a..6aed46328f3469 100644
--- a/clang/tools/clang-format/ClangFormat.cpp
+++ b/clang/tools/clang-format/ClangFormat.cpp
@@ -703,7 +703,7 @@ int main(int argc, const char **argv) {
FileNames.push_back(Line);
LineNo++;
}
- errs() << "Clang-formating " << LineNo << " files\n";
+ errs() << "Clang-formatting " << LineNo << " files\n";
}
if (FileNames.empty())
diff --git a/clang/tools/scan-build-py/tests/functional/cases/test_create_cdb.py b/clang/tools/scan-build-py/tests/functional/cases/test_create_cdb.py
index 1675be3dc963d5..03f0da4ac6de30 100644
--- a/clang/tools/scan-build-py/tests/functional/cases/test_create_cdb.py
+++ b/clang/tools/scan-build-py/tests/functional/cases/test_create_cdb.py
@@ -121,7 +121,7 @@ def test_append_to_existing_cdb(self):
self.assertEqual(5, self.count_entries(result))
-class ResultFormatingTest(unittest.TestCase):
+class ResultFormattingTest(unittest.TestCase):
@staticmethod
def run_intercept(tmpdir, command):
result = os.path.join(tmpdir, "cdb.json")
diff --git a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp
index 27acb9a155ecd8..58367a2319981d 100644
--- a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp
+++ b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp
@@ -879,7 +879,6 @@ void generateStringPrint(llvm::LLVMContext &context,
builder.CreateCall(printFunct, cast);
}
-
/// Generates code to print given runtime integer according to constant
/// string format, and a given print function.
/// @param context llvm context
@@ -887,7 +886,7 @@ void generateStringPrint(llvm::LLVMContext &context,
/// @param builder builder instance
/// @param printFunct function used to "print" integer
/// @param toPrint string to print
-/// @param format printf like formating string for print
+/// @param format printf like formatting string for print
/// @param useGlobal A value of true (default) indicates a GlobalValue is
/// generated, and is used to hold the constant string. A value of
/// false indicates that the constant string will be stored on the
More information about the cfe-commits
mailing list