[llvm] 4b7523d - [llvm][NFC] Fix extra semicolon warnings (#224317)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 06:52:29 PDT 2026


Author: Sergey Semenov
Date: 2026-09-23T15:52:22+02:00
New Revision: 4b7523d301eac1c7e3b6491f99836e22dc5e804a

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

LOG: [llvm][NFC] Fix extra semicolon warnings (#224317)

Found while cleaning up additional warnings enabled for libsycl.

Added: 
    

Modified: 
    llvm/include/llvm/ADT/APInt.h
    llvm/include/llvm/IR/DebugProgramInstruction.h
    llvm/include/llvm/Object/Binary.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h
index 4b9c23a6082c6..e9862ffe4f14f 100644
--- a/llvm/include/llvm/ADT/APInt.h
+++ b/llvm/include/llvm/ADT/APInt.h
@@ -1572,7 +1572,7 @@ class [[nodiscard]] APInt {
   std::optional<uint64_t> tryZExtValue() const {
     return (getActiveBits() <= 64) ? std::optional<uint64_t>(getZExtValue())
                                    : std::nullopt;
-  };
+  }
 
   /// Get sign extended value
   ///
@@ -1594,7 +1594,7 @@ class [[nodiscard]] APInt {
   std::optional<int64_t> trySExtValue() const {
     return (getSignificantBits() <= 64) ? std::optional<int64_t>(getSExtValue())
                                         : std::nullopt;
-  };
+  }
 
   /// Get bits required for string value.
   ///

diff  --git a/llvm/include/llvm/IR/DebugProgramInstruction.h b/llvm/include/llvm/IR/DebugProgramInstruction.h
index 08cfcbed50f41..ac8a5ebedcf9d 100644
--- a/llvm/include/llvm/IR/DebugProgramInstruction.h
+++ b/llvm/include/llvm/IR/DebugProgramInstruction.h
@@ -263,7 +263,7 @@ class DbgLabelRecord : public DbgRecord {
 
   void setLabel(DILabel *NewLabel) { Label = NewLabel; }
   DILabel *getLabel() const { return Label.get(); }
-  MDNode *getRawLabel() const { return Label.getAsMDNode(); };
+  MDNode *getRawLabel() const { return Label.getAsMDNode(); }
 
   /// Support type inquiry through isa, cast, and dyn_cast.
   static bool classof(const DbgRecord *E) {
@@ -397,7 +397,7 @@ class DbgVariableRecord : public DbgRecord, protected DebugValueUser {
                                  ? cast<ValueAsMetadata *>(I)
                                  : *cast<ValueAsMetadata **>(I);
       return VAM->getValue();
-    };
+    }
     Value *operator*() {
       ValueAsMetadata *VAM = isa<ValueAsMetadata *>(I)
                                  ? cast<ValueAsMetadata *>(I)
@@ -465,7 +465,7 @@ class DbgVariableRecord : public DbgRecord, protected DebugValueUser {
   LLVM_ABI bool isKillLocation() const;
 
   void setVariable(DILocalVariable *NewVar) { Variable = NewVar; }
-  DILocalVariable *getVariable() const { return Variable.get(); };
+  DILocalVariable *getVariable() const { return Variable.get(); }
   MDNode *getRawVariable() const { return Variable.getAsMDNode(); }
 
   void setExpression(DIExpression *NewExpr) { Expression = NewExpr; }

diff  --git a/llvm/include/llvm/Object/Binary.h b/llvm/include/llvm/Object/Binary.h
index a531ba6a812c4..d2d6896a43761 100644
--- a/llvm/include/llvm/Object/Binary.h
+++ b/llvm/include/llvm/Object/Binary.h
@@ -96,7 +96,7 @@ class LLVM_ABI Binary {
   Binary(const Binary &other) = delete;
   virtual ~Binary();
 
-  virtual Error initContent() { return Error::success(); };
+  virtual Error initContent() { return Error::success(); }
 
   StringRef getData() const;
   StringRef getFileName() const;


        


More information about the llvm-commits mailing list