[llvm] 1ae99f5 - [msan] Fix -Wunused-but-set-variable after #147839

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 9 18:14:23 PDT 2025


Author: Fangrui Song
Date: 2025-07-09T18:14:19-07:00
New Revision: 1ae99f5894d70d11545f3a657665e5a3b8437d9a

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

LOG: [msan] Fix -Wunused-but-set-variable after #147839

Added: 
    

Modified: 
    llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index 8b4276d55fa2a..666f3e51cb30f 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -4319,7 +4319,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
     assert(isPowerOf2_64(IdxVectorSize));
 
     // Compiler isn't smart enough, let's help it
-    if (auto *ConstantIdx = dyn_cast<Constant>(Idx))
+    if (isa<Constant>(Idx))
       return;
 
     Value *Truncated = IRB.CreateTrunc(


        


More information about the llvm-commits mailing list