]> granicus.if.org Git - clang/commitdiff
Fixed a bug where initializer is a macro in rewrite.
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 5 Jan 2010 23:06:29 +0000 (23:06 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Tue, 5 Jan 2010 23:06:29 +0000 (23:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92801 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/RewriteObjC.cpp

index fd3efe560b6217e9ab12aacd04139afc2f58223d..b145297d11f7c5e32e5361e57510d01d109bd718 100644 (file)
@@ -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());