diff options
Diffstat (limited to 'clang/lib/Lex/PPMacroExpansion.cpp')
-rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 81e44f4823f..6c4096de6cc 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -244,7 +244,7 @@ bool Preprocessor::HandleMacroExpandedIdentifier(Token &Identifier, Identifier.setFlagValue(Token::StartOfLine , isAtStartOfLine); Identifier.setFlagValue(Token::LeadingSpace, hasLeadingSpace); - // Update the tokens location to include both its logical and physical + // Update the tokens location to include both its instantiation and physical // locations. SourceLocation Loc = SourceMgr.getInstantiationLoc(Identifier.getLocation(), InstantiateLoc); @@ -453,7 +453,7 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { // it will tokenize as a number (and not run into stuff after it in the temp // buffer). sprintf(TmpBuffer, "%u ", - SourceMgr.getLogicalLineNumber(Tok.getLocation())); + SourceMgr.getInstantiationLineNumber(Tok.getLocation())); unsigned Length = strlen(TmpBuffer)-1; Tok.setKind(tok::numeric_constant); Tok.setLength(Length); @@ -470,7 +470,7 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { } // Escape this filename. Turn '\' -> '\\' '"' -> '\"' - std::string FN = SourceMgr.getSourceName(SourceMgr.getLogicalLoc(Loc)); + std::string FN =SourceMgr.getSourceName(SourceMgr.getInstantiationLoc(Loc)); FN = '"' + Lexer::Stringify(FN) + '"'; Tok.setKind(tok::string_literal); Tok.setLength(FN.size()); |