]> granicus.if.org Git - clang/commit
track "just a little more" location information for macro instantiations.
authorChris Lattner <sabre@nondot.org>
Sun, 15 Feb 2009 20:52:18 +0000 (20:52 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 15 Feb 2009 20:52:18 +0000 (20:52 +0000)
commite7fb48466afcbf2c4ccdfa658824282fdc3c512c
tree4c2ea5e76f59eb02d41ce34a981cf1c19227ec87
parent3ada6ffd92e02b02f1cdb3c2044aab24dbe0b755
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
12 files changed:
include/clang/Basic/SourceManager.h
include/clang/Lex/Lexer.h
include/clang/Lex/Preprocessor.h
include/clang/Lex/TokenLexer.h
lib/Basic/SourceManager.cpp
lib/Lex/Lexer.cpp
lib/Lex/PPLexerChange.cpp
lib/Lex/PPMacroExpansion.cpp
lib/Lex/Pragma.cpp
lib/Lex/Preprocessor.cpp
lib/Lex/TokenLexer.cpp
test/Preprocessor/_Pragma-dependency.c