summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-08-22 00:27:10 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-08-22 00:27:10 +0000
commit5ba37d5282d05a6ca51267534f10eac4a0a479ad (patch)
tree8d9092ab043ff8b84e479cdd4e7c97fe10edd254 /clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp
parent6a7a727174830d448cfcede4090ab7edc3b6d19a (diff)
downloadbcm5719-llvm-5ba37d5282d05a6ca51267534f10eac4a0a479ad.tar.gz
bcm5719-llvm-5ba37d5282d05a6ca51267534f10eac4a0a479ad.zip
Split isFromMainFile into two functions.
Basically, isInMainFile considers line markers, and isWrittenInMainFile doesn't. Distinguishing between the two is useful when dealing with files which are preprocessed files or rewritten with -frewrite-includes (so we don't, for example, print useless warnings). llvm-svn: 188968
Diffstat (limited to 'clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp')
-rw-r--r--clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp
index 546f9217ae1..80b6b4110cd 100644
--- a/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp
+++ b/clang/lib/Rewrite/Frontend/RewriteModernObjC.cpp
@@ -791,7 +791,7 @@ void RewriteModernObjC::HandleTopLevelSingleDecl(Decl *D) {
}
}
// If we have a decl in the main file, see if we should rewrite it.
- if (SM->isFromMainFile(Loc))
+ if (SM->isWrittenInMainFile(Loc))
return HandleDeclInMainFile(D);
}
OpenPOWER on IntegriCloud