Author: Arthur Eubanks Date: 2022-01-26T17:54:37-08:00 New Revision: eee97f1617c94b88e9f0a964c47dc6003173f818
URL: https://github.com/llvm/llvm-project/commit/eee97f1617c94b88e9f0a964c47dc6003173f818 DIFF: https://github.com/llvm/llvm-project/commit/eee97f1617c94b88e9f0a964c47dc6003173f818.diff LOG: [clang] Use proper type to left shift after D117262 Causing warnings like warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits as reported in D117262. Added: Modified: clang/lib/CodeGen/Address.h Removed: ################################################################################ diff --git a/clang/lib/CodeGen/Address.h b/clang/lib/CodeGen/Address.h index 6a22e567d399a..3ac0f4f0d7e56 100644 --- a/clang/lib/CodeGen/Address.h +++ b/clang/lib/CodeGen/Address.h @@ -66,7 +66,7 @@ template <typename T> class AddressImpl<T, true> { llvm::Type *getElementType() const { return ElementType.getPointer(); } CharUnits getAlignment() const { unsigned AlignLog = (Pointer.getInt() << 3) | ElementType.getInt(); - return CharUnits::fromQuantity(1UL << AlignLog); + return CharUnits::fromQuantity(CharUnits::QuantityType(1) << AlignLog); } }; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits