diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-21 16:56:35 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-12-21 16:56:35 +0000 |
commit | cee5ec9df479994e4ba27fb65b7ded5bb5a980eb (patch) | |
tree | cba89b1ff5ac561dc90b48ce5da0a3ff3c7e8455 /include | |
parent | d7711ec430fde5706f85ba6c4b85283a8e743ff7 (diff) |
Fix bugs in SourceManager::computeMacroArgsCache() and add a unit test for it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-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 4aed17ac13..375aea0ee9 100644 --- a/include/clang/Basic/SourceManager.h +++ b/include/clang/Basic/SourceManager.h @@ -300,6 +300,11 @@ namespace SrcMgr { SourceLocation::getFromRawEncoding(ExpansionLocEnd).isInvalid(); } + bool isFunctionMacroExpansion() const { + return getExpansionLocStart().isValid() && + getExpansionLocStart() != getExpansionLocEnd(); + } + /// create - Return a ExpansionInfo for an expansion. Start and End specify /// the expansion range (where the macro is expanded), and SpellingLoc /// specifies the spelling location (where the characters from the token |