r295320 - Silence sign compare warning. NFC.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 16 06:08:42 PST 2017
Author: d0k
Date: Thu Feb 16 08:08:41 2017
New Revision: 295320
URL: http://llvm.org/viewvc/llvm-project?rev=295320&view=rev
Log:
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<Expr *const *>::difference_type' (aka 'long')
[-Wsign-compare]
Modified:
cfe/trunk/lib/AST/ExprConstant.cpp
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=295320&r1=295319&r2=295320&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Thu Feb 16 08:08:41 2017
@@ -6340,12 +6340,12 @@ bool RecordExprEvaluator::VisitLambdaExp
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.
More information about the cfe-commits
mailing list