diff options
author | Haojian Wu <hokein.wu@gmail.com> | 2022-10-11 14:58:22 +0200 |
---|---|---|
committer | Haojian Wu <hokein.wu@gmail.com> | 2022-10-11 21:34:22 +0200 |
commit | f83347b0bedb22ea676861c8e4e2ed9c31371ade (patch) | |
tree | bbbddc3416294ee84feecce3094b467c1953fa85 /clang/lib/Lex/TokenLexer.cpp | |
parent | e4d5daaf91f6719626fa36c75e553e91778b94a9 (diff) | |
download | llvm-f83347b0bedb22ea676861c8e4e2ed9c31371ade.zip llvm-f83347b0bedb22ea676861c8e4e2ed9c31371ade.tar.gz llvm-f83347b0bedb22ea676861c8e4e2ed9c31371ade.tar.bz2 |
[TokenLexer][NFC] Rename the InstLoc to ExpandLoc
We don't use the "instantiate" word for the macro expansion in LLVM,
see c9c8419c383d0b53c40973f7587003ef45daf481.
Diffstat (limited to 'clang/lib/Lex/TokenLexer.cpp')
-rw-r--r-- | clang/lib/Lex/TokenLexer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Lex/TokenLexer.cpp b/clang/lib/Lex/TokenLexer.cpp index ecbc764..0c35805 100644 --- a/clang/lib/Lex/TokenLexer.cpp +++ b/clang/lib/Lex/TokenLexer.cpp @@ -985,7 +985,7 @@ TokenLexer::getExpansionLocForMacroDefLoc(SourceLocation loc) const { /// \arg begin_tokens will be updated to a position past all the found /// consecutive tokens. static void updateConsecutiveMacroArgTokens(SourceManager &SM, - SourceLocation InstLoc, + SourceLocation ExpandLoc, Token *&begin_tokens, Token * end_tokens) { assert(begin_tokens + 1 < end_tokens); @@ -1021,7 +1021,7 @@ static void updateConsecutiveMacroArgTokens(SourceManager &SM, Partition.front().getLocation().getRawEncoding(); // Create a macro expansion SLocEntry that will "contain" all of the tokens. SourceLocation Expansion = - SM.createMacroArgExpansionLoc(BeginLoc, InstLoc, FullLength); + SM.createMacroArgExpansionLoc(BeginLoc, ExpandLoc, FullLength); #ifdef EXPENSIVE_CHECKS assert(llvm::all_of(Partition.drop_front(), @@ -1051,7 +1051,7 @@ void TokenLexer::updateLocForMacroArgTokens(SourceLocation ArgIdSpellLoc, Token *end_tokens) { SourceManager &SM = PP.getSourceManager(); - SourceLocation InstLoc = + SourceLocation ExpandLoc = getExpansionLocForMacroDefLoc(ArgIdSpellLoc); while (begin_tokens < end_tokens) { @@ -1059,12 +1059,12 @@ void TokenLexer::updateLocForMacroArgTokens(SourceLocation ArgIdSpellLoc, if (end_tokens - begin_tokens == 1) { Token &Tok = *begin_tokens; Tok.setLocation(SM.createMacroArgExpansionLoc(Tok.getLocation(), - InstLoc, + ExpandLoc, Tok.getLength())); return; } - updateConsecutiveMacroArgTokens(SM, InstLoc, begin_tokens, end_tokens); + updateConsecutiveMacroArgTokens(SM, ExpandLoc, begin_tokens, end_tokens); } } |