summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite/RewriteObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Rewrite/RewriteObjC.cpp')
-rw-r--r--clang/lib/Rewrite/RewriteObjC.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Rewrite/RewriteObjC.cpp b/clang/lib/Rewrite/RewriteObjC.cpp
index 64e5309c4bf..585b43cf548 100644
--- a/clang/lib/Rewrite/RewriteObjC.cpp
+++ b/clang/lib/Rewrite/RewriteObjC.cpp
@@ -933,8 +933,8 @@ void RewriteObjC::RewriteMethodDeclaration(ObjCMethodDecl *Method) {
SourceLocation LocStart = Method->getLocStart();
SourceLocation LocEnd = Method->getLocEnd();
- if (SM->getInstantiationLineNumber(LocEnd) >
- SM->getInstantiationLineNumber(LocStart)) {
+ if (SM->getExpansionLineNumber(LocEnd) >
+ SM->getExpansionLineNumber(LocStart)) {
InsertText(LocStart, "#if 0\n");
ReplaceText(LocEnd, 1, ";\n#endif\n");
} else {
OpenPOWER on IntegriCloud