diff options
author | George Karpenkov <ekarpenkov@apple.com> | 2018-02-09 23:30:07 +0000 |
---|---|---|
committer | George Karpenkov <ekarpenkov@apple.com> | 2018-02-09 23:30:07 +0000 |
commit | 791a735f8ce9abbad83d7cd14c1543d58c1ed829 (patch) | |
tree | ec19e3523f4455424b6830040a2d2f17edee1d6f /include/clang/Basic/SourceManager.h | |
parent | 96146791456d66ac778b04138ec057ddfc5ce231 (diff) |
[NFC] Extract method to SourceManager for traversing the macro "stack"
The code for going up the macro arg expansion is duplicated in many
places (and we need it for the analyzer as well, so I did not want to
duplicate it two more times).
This patch is an NFC, so the semantics should remain the same.
Differential Revision: https://reviews.llvm.org/D42458
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324780 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index fe5aedaf20..17601b8293 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -1646,6 +1646,9 @@ public: return getImmediateExpansionRange(Loc).first; } + /// \return Location of the top-level macro caller. + SourceLocation getTopMacroCallerLoc(SourceLocation Loc) const; + private: friend class ASTReader; friend class ASTWriter; |