[clang] 1d43ec8 - [clang][Interp][NFC] Remove unnecessary if condition

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Wed May 15 01:52:02 PDT 2024


Author: Timm Bäder
Date: 2024-05-15T10:17:09+02:00
New Revision: 1d43ec8191e55d6efd552a1510ce63dbdea00cc0

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

LOG: [clang][Interp][NFC] Remove unnecessary if condition

This is already in a if(isBlockPointer()) block.

Added: 
    

Modified: 
    clang/lib/AST/Interp/Pointer.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/Pointer.cpp b/clang/lib/AST/Interp/Pointer.cpp
index d2e34f2c7f09e..ee8cedccb8d4b 100644
--- a/clang/lib/AST/Interp/Pointer.cpp
+++ b/clang/lib/AST/Interp/Pointer.cpp
@@ -191,7 +191,7 @@ void Pointer::print(llvm::raw_ostream &OS) const {
     else
       OS << Offset << ", ";
 
-    if (isBlockPointer() && PointeeStorage.BS.Pointee)
+    if (PointeeStorage.BS.Pointee)
       OS << PointeeStorage.BS.Pointee->getSize();
     else
       OS << "nullptr";


        


More information about the cfe-commits mailing list