]> granicus.if.org Git - clang/commitdiff
Get the right location to insert the synthesized block literals/functions.
authorSteve Naroff <snaroff@apple.com>
Fri, 3 Oct 2008 00:12:09 +0000 (00:12 +0000)
committerSteve Naroff <snaroff@apple.com>
Fri, 3 Oct 2008 00:12:09 +0000 (00:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56987 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteBlocks.cpp

index 89b1466846b8d8aa5fde7668a87bcf4bee8f5415..1cecc79aa9c954c98f9ac91797dd9a929f70dfa6 100644 (file)
@@ -554,7 +554,7 @@ void RewriteBlocks::SynthesizeBlockLiterals(SourceLocation FunLocStart,
 }
 
 void RewriteBlocks::InsertBlockLiteralsWithinFunction(FunctionDecl *FD) {
-  SourceLocation FunLocStart = FD->getLocation();
+  SourceLocation FunLocStart = FD->getTypeSpecStartLoc();
   const char *FuncName = FD->getName();
   
   SynthesizeBlockLiterals(FunLocStart, FuncName);