[PATCH] D133674: [Lex/DependencyDirectivesScanner] Handle the case where the source line starts with a `tok::hashhash`
Argyrios Kyrtzidis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 12 12:52:41 PDT 2022
akyrtzi added a comment.
In D133674#3784602 <https://reviews.llvm.org/D133674#3784602>, @jansvoboda11 wrote:
> Could you explain why this is necessary and even correct? I'd expect Clang to give an error when seeing `##` in this position, and I'd expect the scanner to do the same.
`##` is lexed as `tok::hashhash`; it is ignored by the preprocessor (it is not treated as the start of a preprocessor directive) and passed on to the parser to interpret, like any other token.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133674/new/
https://reviews.llvm.org/D133674
More information about the cfe-commits
mailing list