diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-10 18:57:19 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-10 18:57:19 +0000 |
commit | 66c44e700fb3f244b2c443bfbd6a05b5f1843ec0 (patch) | |
tree | 6a664593073ac1cefe450e010748337f97cfc0ec /include/clang/Lex/Preprocessor.h | |
parent | 4abe3d370050d73c3f7f4bff0d70154f53e619b5 (diff) |
[preprocessor] Make sure that MacroExpands callbacks are always in source order.
Fixes assertion hit in the preprocessing record. rdar://11426523
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/Preprocessor.h')
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 055008fd44..737a152650 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -254,6 +254,15 @@ class Preprocessor : public RefCountedBase<Preprocessor> { /// encountered (e.g. a file is #included, etc). PPCallbacks *Callbacks; + struct MacroExpandsInfo { + Token Tok; + MacroInfo *MI; + SourceRange Range; + MacroExpandsInfo(Token Tok, MacroInfo *MI, SourceRange Range) + : Tok(Tok), MI(MI), Range(Range) { } + }; + SmallVector<MacroExpandsInfo, 2> DelayedMacroExpandsCallbacks; + /// Macros - For each IdentifierInfo with 'HasMacro' set, we keep a mapping /// to the actual definition of the macro. llvm::DenseMap<IdentifierInfo*, MacroInfo*> Macros; |