aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/SourceManager.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-13 23:31:51 +0000
committerChris Lattner <sabre@nondot.org>2009-06-13 23:31:51 +0000
commit0d456588acac0713a7c33063922d35a8cc8c658e (patch)
tree2ba4caadff4f6e875b12861dd4a69b10a18106a8 /include/clang/Basic/SourceManager.h
parenta1e6de9171d10c3a3dde7fc2e8cf72cc98bf6362 (diff)
add a handy predicate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73310 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r--include/clang/Basic/SourceManager.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 4336982938..57ae9a4511 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -593,6 +593,12 @@ public:
return getFileCharacteristic(Loc) != SrcMgr::C_User;
}
+ /// isInExternCSystemHeader - Returns if a SourceLocation is in an "extern C"
+ /// system header.
+ bool isInExternCSystemHeader(SourceLocation Loc) const {
+ return getFileCharacteristic(Loc) == SrcMgr::C_ExternCSystem;
+ }
+
//===--------------------------------------------------------------------===//
// Line Table Manipulation Routines
//===--------------------------------------------------------------------===//