[clang] 4bc9e60 - Removing redundant code; NFC

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 5 06:17:32 PDT 2022


Author: Aaron Ballman
Date: 2022-08-05T09:17:20-04:00
New Revision: 4bc9e603065b59976f3a16b7ecc6b5fb109f5f2d

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

LOG: Removing redundant code; NFC

The same predicate is checked on line 12962 just above the removed code.

Added: 
    

Modified: 
    clang/lib/Sema/SemaChecking.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index d71114e33f31f..293239c7b0d78 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -12976,9 +12976,6 @@ static bool AnalyzeBitFieldAssignment(Sema &S, FieldDecl *Bitfield, Expr *Init,
     }
   }
 
-  if (Bitfield->getType()->isBooleanType())
-    return false;
-
   // Ignore value- or type-dependent expressions.
   if (Bitfield->getBitWidth()->isValueDependent() ||
       Bitfield->getBitWidth()->isTypeDependent() ||


        


More information about the cfe-commits mailing list