[cfe-commits] r150407 - /cfe/trunk/lib/AST/ExprCXX.cpp

Matt Beaumont-Gay matthewbg at google.com
Mon Feb 13 11:29:45 PST 2012


Author: matthewbg
Date: Mon Feb 13 13:29:45 2012
New Revision: 150407

URL: http://llvm.org/viewvc/llvm-project?rev=150407&view=rev
Log:
Sink variable into assert

Modified:
    cfe/trunk/lib/AST/ExprCXX.cpp

Modified: cfe/trunk/lib/AST/ExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprCXX.cpp?rev=150407&r1=150406&r2=150407&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprCXX.cpp (original)
+++ cfe/trunk/lib/AST/ExprCXX.cpp Mon Feb 13 13:29:45 2012
@@ -857,11 +857,11 @@
 
 ArrayRef<VarDecl *> 
 LambdaExpr::getCaptureInitIndexVars(capture_init_iterator Iter) const {
-  CXXRecordDecl::LambdaDefinitionData &Data = getLambdaClass()->getLambdaData();
   assert(HasArrayIndexVars && "No array index-var data?");
   
   unsigned Index = Iter - capture_init_begin();
-  assert(Index < Data.NumCaptures && "Capture index out-of-range");
+  assert(Index < getLambdaClass()->getLambdaData().NumCaptures &&
+         "Capture index out-of-range");
   VarDecl **IndexVars = getArrayIndexVars();
   unsigned *IndexStarts = getArrayIndexStarts();
   return ArrayRef<VarDecl *>(IndexVars + IndexStarts[Index],





More information about the cfe-commits mailing list