Skip to content

[NFC] Fix typos #106817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 1, 2024
Merged

[NFC] Fix typos #106817

merged 2 commits into from
Sep 1, 2024

Conversation

c8ef
Copy link
Contributor

@c8ef c8ef commented Aug 31, 2024

Fixes #106761.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang-format labels Aug 31, 2024
@llvmbot
Copy link
Member

llvmbot commented Aug 31, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-format

Author: None (c8ef)

Changes

Fixes #106761.


Full diff: https://github.com/llvm/llvm-project/pull/106817.diff

4 Files Affected:

  • (modified) clang/lib/Tooling/Refactoring/AtomicChange.cpp (+4-4)
  • (modified) clang/tools/clang-format/ClangFormat.cpp (+1-1)
  • (modified) clang/tools/scan-build-py/tests/functional/cases/test_create_cdb.py (+1-1)
  • (modified) llvm/examples/ExceptionDemo/ExceptionDemo.cpp (+1-2)
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

@c8ef c8ef changed the title [Chore] Fix formating typos. [Chore] Fix formating typos. NFC. Aug 31, 2024
@c8ef

This comment was marked as resolved.

@c8ef
Copy link
Contributor Author

c8ef commented Sep 1, 2024

Hi, could you please take a look? @owenca

@owenca owenca changed the title [Chore] Fix formating typos. NFC. [NFC] Fix typos Sep 1, 2024
@owenca owenca merged commit 4f4bd41 into llvm:main Sep 1, 2024
8 checks passed
@c8ef c8ef deleted the typo branch September 1, 2024 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category clang-format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typo in Clang-Format output
3 participants