track "just a little more" location information for macro instantiations.
Now instead of just tracking the expansion history, also track the full range of the macro that got replaced. For object-like macros, this doesn't change anything. For _Pragma and function-like macros, this means we track the locations of the ')'. This is required for PR3579 because apparently GCC uses the line of the ')' of a function-like macro as the location to expand __LINE__ to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64601 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/SourceManager.h 35 additions, 9 deletionsinclude/clang/Basic/SourceManager.h
- include/clang/Lex/Lexer.h 2 additions, 1 deletioninclude/clang/Lex/Lexer.h
- include/clang/Lex/Preprocessor.h 6 additions, 2 deletionsinclude/clang/Lex/Preprocessor.h
- include/clang/Lex/TokenLexer.h 11 additions, 7 deletionsinclude/clang/Lex/TokenLexer.h
- lib/Basic/SourceManager.cpp 18 additions, 7 deletionslib/Basic/SourceManager.cpp
- lib/Lex/Lexer.cpp 15 additions, 5 deletionslib/Lex/Lexer.cpp
- lib/Lex/PPLexerChange.cpp 4 additions, 3 deletionslib/Lex/PPLexerChange.cpp
- lib/Lex/PPMacroExpansion.cpp 15 additions, 6 deletionslib/Lex/PPMacroExpansion.cpp
- lib/Lex/Pragma.cpp 3 additions, 2 deletionslib/Lex/Pragma.cpp
- lib/Lex/Preprocessor.cpp 2 additions, 1 deletionlib/Lex/Preprocessor.cpp
- lib/Lex/TokenLexer.cpp 10 additions, 8 deletionslib/Lex/TokenLexer.cpp
- test/Preprocessor/_Pragma-dependency.c 3 additions, 3 deletionstest/Preprocessor/_Pragma-dependency.c
Loading
Please register or sign in to comment