forked from OSchip/llvm-project
Fixed a bug where initializer is a macro in rewrite.
llvm-svn: 92801
This commit is contained in:
parent
8600dd3d7c
commit
b8646edecd
|
@ -4540,6 +4540,7 @@ void RewriteObjC::RewriteByRefVar(VarDecl *ND) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SourceLocation startLoc = ND->getInit()->getLocStart();
|
SourceLocation startLoc = ND->getInit()->getLocStart();
|
||||||
|
startLoc = SM->getInstantiationLoc(startLoc);
|
||||||
ByrefType += " " + Name;
|
ByrefType += " " + Name;
|
||||||
ReplaceText(DeclLoc, endBuf-startBuf,
|
ReplaceText(DeclLoc, endBuf-startBuf,
|
||||||
ByrefType.c_str(), ByrefType.size());
|
ByrefType.c_str(), ByrefType.size());
|
||||||
|
|
Loading…
Reference in New Issue