[clang] b90e1e1 - [AST] Remove an unnecessary cast (NFC) (#151278)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 30 07:29:53 PDT 2025
Author: Kazu Hirata
Date: 2025-07-30T07:29:49-07:00
New Revision: b90e1e186b303b4a551c0fd7722be8f5f4ddbfcf
URL: https://github.com/llvm/llvm-project/commit/b90e1e186b303b4a551c0fd7722be8f5f4ddbfcf
DIFF: https://github.com/llvm/llvm-project/commit/b90e1e186b303b4a551c0fd7722be8f5f4ddbfcf.diff
LOG: [AST] Remove an unnecessary cast (NFC) (#151278)
getSignificantBits() already returns unsigned.
Added:
Modified:
clang/include/clang/AST/ASTContext.h
Removed:
################################################################################
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index 0273109f8a698..3b98274a80420 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -1818,7 +1818,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
NumPositiveBits = std::max({NumPositiveBits, ActiveBits, 1u});
} else {
NumNegativeBits =
- std::max(NumNegativeBits, (unsigned)InitVal.getSignificantBits());
+ std::max(NumNegativeBits, InitVal.getSignificantBits());
}
MembersRepresentableByInt &= isRepresentableIntegerValue(InitVal, IntTy);
More information about the cfe-commits
mailing list