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";


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to