diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-04-27 05:04:02 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-04-27 05:04:02 +0000 |
commit | b7d98d35ea723624345f06e5895ddce2e0388ef0 (patch) | |
tree | aabd233e19ac179216d6a8c569d2405f6afe5d8b /include/clang/Lex/Preprocessor.h | |
parent | 3b887354b1b667c97d070ddc67b5354353c4c07b (diff) |
If a null statement was preceded by an empty macro keep its instantiation source location
in NullStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130289 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index af3631de52..86f9c43c3f 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -218,6 +218,10 @@ class Preprocessor : public llvm::RefCountedBase<Preprocessor> { /// previous macro value. llvm::DenseMap<IdentifierInfo*, std::vector<MacroInfo*> > PragmaPushMacroInfo; + /// \brief Instantiation source location for the last macro that expanded + /// to no tokens. + SourceLocation LastEmptyMacroInstantiationLoc; + // Various statistics we track for performance analysis. unsigned NumDirectives, NumIncluded, NumDefined, NumUndefined, NumPragma; unsigned NumIf, NumElse, NumEndif; @@ -366,6 +370,12 @@ public: macro_iterator macro_begin(bool IncludeExternalMacros = true) const; macro_iterator macro_end(bool IncludeExternalMacros = true) const; + /// \brief Instantiation source location for the last macro that expanded + /// to no tokens. + SourceLocation getLastEmptyMacroInstantiationLoc() const { + return LastEmptyMacroInstantiationLoc; + } + const std::string &getPredefines() const { return Predefines; } /// setPredefines - Set the predefines for this Preprocessor. These /// predefines are automatically injected when parsing the main file. |