Author: Baranov Victor
Date: 2026-01-21T12:10:03+03:00
New Revision: fa98edd447de3b7c772d4d73e1a4c937491c0a4c

URL: 
https://github.com/llvm/llvm-project/commit/fa98edd447de3b7c772d4d73e1a4c937491c0a4c
DIFF: 
https://github.com/llvm/llvm-project/commit/fa98edd447de3b7c772d4d73e1a4c937491c0a4c.diff

LOG: [clang-tidy][NFC] Enable RemoveSemicolon in clang-format config (#176926)

Welcome everyone to YAFI (yet another format improvements) in 2026:)
Starting from `clang-format-16` we have quite useful option
`RemoveSemicolon`.

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/.clang-format
    clang-tools-extra/clang-tidy/ClangTidy.cpp
    clang-tools-extra/clang-tidy/GlobList.h
    clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
    clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp
    clang-tools-extra/clang-tidy/modernize/UseDesignatedInitializersCheck.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clang-tidy/.clang-format 
b/clang-tools-extra/clang-tidy/.clang-format
index 96fb7ce8fce61..1b342d3f71f71 100644
--- a/clang-tools-extra/clang-tidy/.clang-format
+++ b/clang-tools-extra/clang-tidy/.clang-format
@@ -7,3 +7,4 @@ KeepEmptyLines:
 LineEnding: LF
 QualifierAlignment: Left
 RemoveBracesLLVM: true
+RemoveSemicolon: true

diff  --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp 
b/clang-tools-extra/clang-tidy/ClangTidy.cpp
index da2b4e577c9ed..c6498521be2d9 100644
--- a/clang-tools-extra/clang-tidy/ClangTidy.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp
@@ -339,7 +339,7 @@ class ClangTidyASTConsumer : public MultiplexConsumer {
   std::unique_ptr<ClangTidyProfiling> Profiling;
   std::unique_ptr<ast_matchers::MatchFinder> Finder;
   std::vector<std::unique_ptr<ClangTidyCheck>> Checks;
-  void anchor() override {};
+  void anchor() override {}
 };
 
 } // namespace

diff  --git a/clang-tools-extra/clang-tidy/GlobList.h 
b/clang-tools-extra/clang-tidy/GlobList.h
index c9086df2b7973..9567abf6b1d10 100644
--- a/clang-tools-extra/clang-tidy/GlobList.h
+++ b/clang-tools-extra/clang-tidy/GlobList.h
@@ -49,7 +49,7 @@ class GlobList {
   SmallVector<GlobListItem, 0> Items;
 
 public:
-  const SmallVectorImpl<GlobListItem> &getItems() const { return Items; };
+  const SmallVectorImpl<GlobListItem> &getItems() const { return Items; }
 };
 
 /// A \p GlobList that caches search results, so that search is performed only

diff  --git 
a/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp 
b/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
index 6e1626668d7f1..eec567dfb2a61 100644
--- a/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp
@@ -679,7 +679,7 @@ void 
NotNullTerminatedResultCheck::registerMatchers(MatchFinder *Finder) {
                 std::optional<unsigned> SourcePos, unsigned LengthPos,
                 bool WithIncrease)
         : Name(Name), DestinationPos(DestinationPos), SourcePos(SourcePos),
-          LengthPos(LengthPos), WithIncrease(WithIncrease) {};
+          LengthPos(LengthPos), WithIncrease(WithIncrease) {}
 
     StringRef Name;
     std::optional<unsigned> DestinationPos;

diff  --git 
a/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp 
b/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp
index 701c0e56e6f99..e3cb824deb5e2 100644
--- a/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp
+++ b/clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp
@@ -104,7 +104,7 @@ class CharExpressionDetector {
   // Returns true if `E` is an character constant.
   bool isCharConstant(const Expr *E) const {
     return isCharTyped(E) && isCharValuedConstant(E);
-  };
+  }
 
   // Returns true if `E` is an integer constant which fits in `CharType`.
   bool isCharValuedConstant(const Expr *E) const {
@@ -114,13 +114,13 @@ class CharExpressionDetector {
     if (!E->EvaluateAsInt(EvalResult, Ctx, Expr::SE_AllowSideEffects))
       return false;
     return EvalResult.Val.getInt().getActiveBits() <= 
Ctx.getTypeSize(CharType);
-  };
+  }
 
   // Returns true if `E` has the right character type.
   bool isCharTyped(const Expr *E) const {
     return E->getType().getCanonicalType().getTypePtr() ==
            CharType.getTypePtr();
-  };
+  }
 
   const QualType CharType;
   const ASTContext &Ctx;

diff  --git 
a/clang-tools-extra/clang-tidy/modernize/UseDesignatedInitializersCheck.cpp 
b/clang-tools-extra/clang-tidy/modernize/UseDesignatedInitializersCheck.cpp
index e798f6f6bbd1e..5a8f3e3c9e922 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseDesignatedInitializersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseDesignatedInitializersCheck.cpp
@@ -51,7 +51,7 @@ namespace {
 struct Designators {
   Designators(const InitListExpr *InitList) : InitList(InitList) {
     assert(InitList->isSyntacticForm());
-  };
+  }
 
   unsigned size() { return getCached().size(); }
 


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to