zhouyizhou created this revision. zhouyizhou added reviewers: lattner, rnk, MaskRay, simon_tatham. zhouyizhou requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
I think we could simplify Tokens = &*Macro->tokens_begin() in clang::TokenLexer::Init. Because the type of Tokens is const class clang::Token *, the return type of Macro->tokens_begin() is also class clang::Token *, so I think the &* sequence can be removed Thanks for you time Thanks Zhouyi Signed-off-by: Zhouyi Zhou <zhouzho...@gmail.com> Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D115014 Files: clang/lib/Lex/TokenLexer.cpp Index: clang/lib/Lex/TokenLexer.cpp =================================================================== --- clang/lib/Lex/TokenLexer.cpp +++ clang/lib/Lex/TokenLexer.cpp @@ -50,7 +50,7 @@ AtStartOfLine = Tok.isAtStartOfLine(); HasLeadingSpace = Tok.hasLeadingSpace(); NextTokGetsSpace = false; - Tokens = &*Macro->tokens_begin(); + Tokens = Macro->tokens_begin(); OwnsTokens = false; DisableMacroExpansion = false; IsReinject = false;
Index: clang/lib/Lex/TokenLexer.cpp =================================================================== --- clang/lib/Lex/TokenLexer.cpp +++ clang/lib/Lex/TokenLexer.cpp @@ -50,7 +50,7 @@ AtStartOfLine = Tok.isAtStartOfLine(); HasLeadingSpace = Tok.hasLeadingSpace(); NextTokGetsSpace = false; - Tokens = &*Macro->tokens_begin(); + Tokens = Macro->tokens_begin(); OwnsTokens = false; DisableMacroExpansion = false; IsReinject = false;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits