]> granicus.if.org Git - clang/commitdiff
allow _Pragmas formed from #defines to keep their full instantiation
authorChris Lattner <sabre@nondot.org>
Mon, 26 Jan 2009 20:15:46 +0000 (20:15 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 26 Jan 2009 20:15:46 +0000 (20:15 +0000)
history

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63035 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/Lexer.cpp

index 03d81b3b9a16afc37edffd18c27649b5ca03bd7f..7f14e7a4a2df20301e8d990afea2df10169ed238 100644 (file)
@@ -321,10 +321,9 @@ static SourceLocation GetMappedTokenLoc(Preprocessor &PP,
   
   // Create a new SLoc which is expanded from Instantiation(FileLoc) but whose
   // characters come from spelling(FileLoc)+Offset.
-  SourceLocation InstLoc = SourceMgr.getInstantiationLoc(FileLoc);
   SourceLocation SpellingLoc = SourceMgr.getSpellingLoc(FileLoc);
   SpellingLoc = SpellingLoc.getFileLocWithOffset(CharNo);
-  return SourceMgr.createInstantiationLoc(SpellingLoc, InstLoc, TokLen);
+  return SourceMgr.createInstantiationLoc(SpellingLoc, FileLoc, TokLen);
 }
 
 /// getSourceLocation - Return a source location identifier for the specified