aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/RewriteObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-01-05 23:06:29 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-01-05 23:06:29 +0000
commit791b10d03570ca8c5d3e344cc09900d1a8313999 (patch)
treeee77ebdd8999127e735f909af82b96c064cc7019 /lib/Frontend/RewriteObjC.cpp
parent1b6869a1831ef66b5024dd23160dc9519c99555d (diff)
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
Diffstat (limited to 'lib/Frontend/RewriteObjC.cpp')
-rw-r--r--lib/Frontend/RewriteObjC.cpp1
1 files changed, 1 insertions, 0 deletions
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());