]> granicus.if.org Git - clang/commitdiff
Silence sign compare warning. NFC.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 16 Feb 2017 14:08:41 +0000 (14:08 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 16 Feb 2017 14:08:41 +0000 (14:08 +0000)
ExprConstant.cpp:6344:20: warning: comparison of integers of different
signs: 'const size_t' (aka 'const unsigned long') and 'typename
iterator_traits<Expr *const *>::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

index f364f6f3107d9c84fe88bbb6b8ddc7cce1c22ac8..1bb252d2d1ce7de4b44cbd99d9de676f3974e9f3 100644 (file)
@@ -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.