r196740 - Rename a variable that I missed in the previous refactoring.

Faisal Vali faisalv at yahoo.com
Sun Dec 8 16:15:23 PST 2013


Author: faisalv
Date: Sun Dec  8 18:15:23 2013
New Revision: 196740

URL: http://llvm.org/viewvc/llvm-project?rev=196740&view=rev
Log:
Rename a variable that I missed in the previous refactoring.

Modified:
    cfe/trunk/lib/Sema/SemaLambda.cpp

Modified: cfe/trunk/lib/Sema/SemaLambda.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLambda.cpp?rev=196740&r1=196739&r2=196740&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLambda.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLambda.cpp Sun Dec  8 18:15:23 2013
@@ -172,13 +172,13 @@ Optional<unsigned> clang::getStackIndexO
     ArrayRef<const sema::FunctionScopeInfo *> FunctionScopes,
     VarDecl *VarToCapture, Sema &S) {
 
-  const Optional<unsigned> FailDistance;
+  const Optional<unsigned> NoLambdaIsCaptureCapable;
   
   const Optional<unsigned> OptionalStackIndex =
       getStackIndexOfNearestEnclosingCaptureReadyLambda(FunctionScopes,
                                                         VarToCapture);
   if (!OptionalStackIndex)
-    return FailDistance;
+    return NoLambdaIsCaptureCapable;
 
   const unsigned IndexOfCaptureReadyLambda = OptionalStackIndex.getValue();
   assert(((IndexOfCaptureReadyLambda != (FunctionScopes.size() - 1)) ||
@@ -206,7 +206,7 @@ Optional<unsigned> clang::getStackIndexO
                               /*BuildAndDiagnose*/ false, CaptureType,
                               DeclRefType, &IndexOfCaptureReadyLambda);
     if (!CanCaptureVariable)
-      return FailDistance;
+      return NoLambdaIsCaptureCapable;
   } else {
     // Check if the capture-ready lambda can truly capture 'this' by checking
     // whether all enclosing lambdas of the capture-ready lambda can capture
@@ -217,7 +217,7 @@ Optional<unsigned> clang::getStackIndexO
              /*Explicit*/ false, /*BuildAndDiagnose*/ false,
              &IndexOfCaptureReadyLambda);
     if (!CanCaptureThis)
-      return FailDistance;
+      return NoLambdaIsCaptureCapable;
   } 
   return IndexOfCaptureReadyLambda;
 }





More information about the cfe-commits mailing list