From 49428dbdd53172ca1172d53a505974d418ce7bf5 Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Fri, 3 Oct 2008 00:12:09 +0000 Subject: [PATCH] Get the right location to insert the synthesized block literals/functions. llvm-svn: 56987 --- clang/Driver/RewriteBlocks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/Driver/RewriteBlocks.cpp b/clang/Driver/RewriteBlocks.cpp index 89b1466846b8..1cecc79aa9c9 100644 --- a/clang/Driver/RewriteBlocks.cpp +++ b/clang/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);