From 1069b731a0dc872069c2d6572eefe424b0cceff3 Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Tue, 14 May 2013 23:41:50 +0000 Subject: [PATCH] Add static_cast to assertion to silence sign/unsigned comparison warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181849 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ASTContext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index c385d6cf3a..b19150f048 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -1353,7 +1353,8 @@ static getConstantArrayInfoInChars(const ASTContext &Context, std::pair EltInfo = Context.getTypeInfoInChars(CAT->getElementType()); uint64_t Size = CAT->getSize().getZExtValue(); - assert((Size == 0 || EltInfo.first.getQuantity() <= (uint64_t)(-1)/Size) && + assert((Size == 0 || static_cast(EltInfo.first.getQuantity()) <= + (uint64_t)(-1)/Size) && "Overflow in array type char size evaluation"); uint64_t Width = EltInfo.first.getQuantity() * Size; unsigned Align = EltInfo.second.getQuantity(); -- 2.40.0