]> granicus.if.org Git - clang/commitdiff
Provide blockDecl's startLoc to startFunction. This fixes hidden bug exposed by recen...
authorDevang Patel <dpatel@apple.com>
Fri, 25 Mar 2011 21:26:13 +0000 (21:26 +0000)
committerDevang Patel <dpatel@apple.com>
Fri, 25 Mar 2011 21:26:13 +0000 (21:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128303 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBlocks.cpp

index 8351d36f2550829e5dc7282e7617c3b6dcce1e8b..20350c8e6ab466efa42affab627760b84f3839b3 100644 (file)
@@ -914,7 +914,7 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD,
 
   // Begin generating the function.
   StartFunction(blockDecl, fnType->getResultType(), fn, fnInfo, args,
-                blockInfo.getBlockExpr()->getBody()->getLocEnd());
+                blockInfo.getBlockExpr()->getBody()->getLocStart());
   CurFuncDecl = outerFnDecl; // StartFunction sets this to blockDecl
 
   // Okay.  Undo some of what StartFunction did.