[clang] [clang][Preprocessor] Add peekNextPPToken, makes look ahead next token without side-effects (PR #143898)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 13 23:33:33 PDT 2025


yronglin wrote:

Do we also need to update `peekNextToken` in Lexer/TokenLexer? 

> so the return value std::nullopt and tok::eof have two different meanings.

We depent std::nullopt to walk up in macro stack in `isNextTokenOneOf`.

https://github.com/llvm/llvm-project/pull/143898


More information about the cfe-commits mailing list