From: Chris Lattner Date: Sat, 13 Jun 2009 23:31:51 +0000 (+0000) Subject: add a handy predicate. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d456588acac0713a7c33063922d35a8cc8c658e;p=clang add a handy predicate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73310 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 //===--------------------------------------------------------------------===//