]> granicus.if.org Git - clang/commitdiff
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 3 Oct 2019 15:10:47 +0000 (15:10 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 3 Oct 2019 15:10:47 +0000 (15:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373613 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index 6370561b83a06047e67fd8efd7f54e52042518a7..f8b4ffa024f2b7d4735378727858e985e33b8fc9 100644 (file)
@@ -1600,7 +1600,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
 
   if (!D->hasAttr<AlignedAttr>())
     if (LangOpts.FunctionAlignment)
-      F->setAlignment(llvm::Align(1 << LangOpts.FunctionAlignment));
+      F->setAlignment(llvm::Align(1ull << LangOpts.FunctionAlignment));
 
   // Some C++ ABIs require 2-byte alignment for member functions, in order to
   // reserve a bit for differentiating between virtual and non-virtual member