[llvm] [BitcodeReader] Remove dead increment (PR #98412)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 16:23:17 PDT 2024


https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/98412

This was found by the Clang Static Analyzer.

>From b100f15e23288961a9831e566db35503159eeb43 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Wed, 10 Jul 2024 22:34:42 +0000
Subject: [PATCH] [BitcodeReader] Remove dead increment

This was found with the Clang Static Analyzer.
---
 llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index f56b2b32ff98f..b62f4e42c59a9 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -4381,7 +4381,6 @@ Error BitcodeReader::parseGlobalIndirectSymbolRecord(
       return error("Malformed partition, too large.");
     NewGA->setPartition(
         StringRef(Strtab.data() + Record[OpNum], Record[OpNum + 1]));
-    OpNum += 2;
   }
 
   ValueList.push_back(NewGA, getVirtualTypeID(NewGA->getType(), TypeID));



More information about the llvm-commits mailing list