From: Steve Naroff Date: Fri, 3 Oct 2008 00:12:09 +0000 (+0000) Subject: Get the right location to insert the synthesized block literals/functions. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ad29e254222c0ab551b80089d9f3e018d95b591;p=clang Get the right location to insert the synthesized block literals/functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56987 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/RewriteBlocks.cpp b/Driver/RewriteBlocks.cpp index 89b1466846..1cecc79aa9 100644 --- a/Driver/RewriteBlocks.cpp +++ b/Driver/RewriteBlocks.cpp @@ -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);