diff options
author | Richard Trieu <rtrieu@google.com> | 2015-09-24 01:21:01 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2015-09-24 01:21:01 +0000 |
commit | 9fed9c10d9fd6d6cff915080b104f3d481ac10aa (patch) | |
tree | 86e4ab58b553cb2829b7bcc199a7c9a57e0aae09 /include/clang/Basic/SourceManager.h | |
parent | 0461540c59362540245492dccc0883dea485554c (diff) |
Improve the printing of ranges when macros are involved.
Trace the ranges through the macro backtrace better. This allows better
range highlighting through all levels of the macro bracktrace. Also some
improvements to backtrace printer for omitting different backtraces.
Patch by Zhengkai Wu.
Differential Revision: http://reviews.llvm.org/D12379
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r-- | include/clang/Basic/SourceManager.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h index ec8903e139..8efcd79cbc 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -1146,10 +1146,14 @@ public: /// \brief Tests whether the given source location represents a macro /// argument's expansion into the function-like macro definition. /// + /// \param StartLoc If non-null and function returns true, it is set to the + /// start location of the macro argument expansion. + /// /// Such source locations only appear inside of the expansion /// locations representing where a particular function-like macro was /// expanded. - bool isMacroArgExpansion(SourceLocation Loc) const; + bool isMacroArgExpansion(SourceLocation Loc, + SourceLocation *StartLoc = nullptr) const; /// \brief Tests whether the given source location represents the expansion of /// a macro body. |