From 1bafb2d5a96efe7310f7330ad2d3cedf9171e2d8 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 16 Feb 2017 14:08:41 +0000 Subject: [PATCH] Silence sign compare warning. NFC. ExprConstant.cpp:6344:20: warning: comparison of integers of different signs: 'const size_t' (aka 'const unsigned long') and 'typename iterator_traits::difference_type' (aka 'long') [-Wsign-compare] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295320 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ExprConstant.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index f364f6f310..1bb252d2d1 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -6340,12 +6340,12 @@ bool RecordExprEvaluator::VisitLambdaExpr(const LambdaExpr *E) { const size_t NumFields = std::distance(ClosureClass->field_begin(), ClosureClass->field_end()); - - assert(NumFields == - std::distance(E->capture_init_begin(), E->capture_init_end()) && - "The number of lambda capture initializers should equal the number of " - "fields within the closure type"); - + + assert(NumFields == (size_t)std::distance(E->capture_init_begin(), + E->capture_init_end()) && + "The number of lambda capture initializers should equal the number of " + "fields within the closure type"); + Result = APValue(APValue::UninitStruct(), /*NumBases*/0, NumFields); // Iterate through all the lambda's closure object's fields and initialize // them. -- 2.40.0