From: Fariborz Jahanian Date: Tue, 5 Jan 2010 23:06:29 +0000 (+0000) Subject: Fixed a bug where initializer is a macro in rewrite. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=791b10d03570ca8c5d3e344cc09900d1a8313999;p=clang Fixed a bug where initializer is a macro in rewrite. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92801 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp index fd3efe560b..b145297d11 100644 --- a/lib/Frontend/RewriteObjC.cpp +++ b/lib/Frontend/RewriteObjC.cpp @@ -4540,6 +4540,7 @@ void RewriteObjC::RewriteByRefVar(VarDecl *ND) { } else { SourceLocation startLoc = ND->getInit()->getLocStart(); + startLoc = SM->getInstantiationLoc(startLoc); ByrefType += " " + Name; ReplaceText(DeclLoc, endBuf-startBuf, ByrefType.c_str(), ByrefType.size());