From eee97f1617c94b88e9f0a964c47dc6003173f818 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Wed, 26 Jan 2022 17:54:37 -0800 Subject: [PATCH] [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. --- clang/lib/CodeGen/Address.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/Address.h b/clang/lib/CodeGen/Address.h index 6a22e567d399..3ac0f4f0d7e5 100644 --- a/clang/lib/CodeGen/Address.h +++ b/clang/lib/CodeGen/Address.h @@ -66,7 +66,7 @@ public: 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); } };