summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
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/tools/libclang
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/tools/libclang')
-rw-r--r--clang/tools/libclang/CXSourceLocation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/tools/libclang/CXSourceLocation.cpp b/clang/tools/libclang/CXSourceLocation.cpp
index 71e425d1f7f..a33c9d4f269 100644
--- a/clang/tools/libclang/CXSourceLocation.cpp
+++ b/clang/tools/libclang/CXSourceLocation.cpp
@@ -217,7 +217,7 @@ int clang_Location_isFromMainFile(CXSourceLocation location) {
const SourceManager &SM =
*static_cast<const SourceManager*>(location.ptr_data[0]);
- return SM.isFromMainFile(Loc);
+ return SM.isWrittenInMainFile(Loc);
}
void clang_getExpansionLocation(CXSourceLocation location,
OpenPOWER on IntegriCloud