Skip to content

Commit eee97f1

Browse files
committed
[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.
1 parent 5c238be commit eee97f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/Address.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ template <typename T> class AddressImpl<T, true> {
6666
llvm::Type *getElementType() const { return ElementType.getPointer(); }
6767
CharUnits getAlignment() const {
6868
unsigned AlignLog = (Pointer.getInt() << 3) | ElementType.getInt();
69-
return CharUnits::fromQuantity(1UL << AlignLog);
69+
return CharUnits::fromQuantity(CharUnits::QuantityType(1) << AlignLog);
7070
}
7171
};
7272

0 commit comments

Comments
 (0)