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
diff --git a/lib/Lex/Pragma.cpp b/lib/Lex/Pragma.cpp
index 87410f9..73d3641 100644
--- a/lib/Lex/Pragma.cpp
+++ b/lib/Lex/Pragma.cpp
@@ -117,7 +117,6 @@
   
   // Remember the string.
   std::string StrVal = getSpelling(Tok);
-  SourceLocation StrLoc = Tok.getLocation();
 
   // Read the ')'.
   Lex(Tok);
@@ -126,6 +125,8 @@
     return;
   }
   
+  SourceLocation RParenLoc = Tok.getLocation();
+  
   // The _Pragma is lexically sound.  Destringize according to C99 6.10.9.1:
   // "The string literal is destringized by deleting the L prefix, if present,
   // deleting the leading and trailing double-quotes, replacing each escape
@@ -163,7 +164,7 @@
 
   // Make and enter a lexer object so that we lex and expand the tokens just
   // like any others.
-  Lexer *TL = Lexer::Create_PragmaLexer(TokLoc, StrLoc,
+  Lexer *TL = Lexer::Create_PragmaLexer(TokLoc, PragmaLoc, RParenLoc,
                                         // do not include the null in the count.
                                         StrVal.size()-1, *this);