diff options
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index b1fb78ea56..038b8c65d0 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -1087,6 +1087,11 @@ public: return getFileCharacteristic(Loc) == SrcMgr::C_ExternCSystem; } + /// \brief Returns whether \p Loc is expanded from a macro in a system header. + bool isInSystemMacro(SourceLocation loc) { + return loc.isMacroID() && isInSystemHeader(getSpellingLoc(loc)); + } + /// \brief The size of the SLocEnty that \p FID represents. unsigned getFileIDSize(FileID FID) const; |