]> granicus.if.org Git - clang/commitdiff
Clarify comment.
authorAdrian Prantl <aprantl@apple.com>
Thu, 16 May 2013 00:41:31 +0000 (00:41 +0000)
committerAdrian Prantl <aprantl@apple.com>
Thu, 16 May 2013 00:41:31 +0000 (00:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181959 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenFunction.cpp

index 3e04ae7d15338ef5bda6a297bd51e4f4fe7db148..0986ae7d6a866324071339581902c1040dd495cb 100644 (file)
@@ -192,10 +192,12 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) {
   bool OnlySimpleReturnStmts = NumSimpleReturnExprs > 0
     && NumSimpleReturnExprs == NumReturnExprs;
   // If the function contains only a simple return statement, the
-  // cleanup code may become the first breakpoint in the function. To
-  // be safe, set the debug location for it to the location of the
-  // return statement.  Otherwise point it to end of the function's
-  // lexical scope.
+  // location before the cleanup code becomes the last useful
+  // breakpoint in the function, because the simple return expression
+  // will be evaluated after the cleanup code. To be safe, set the
+  // debug location for cleanup code to the location of the return
+  // statement. Otherwise the cleanup code should be at the end of the
+  // function's lexical scope.
   if (CGDebugInfo *DI = getDebugInfo()) {
     if (OnlySimpleReturnStmts)
        DI->EmitLocation(Builder, LastStopPoint);