hokein added inline comments.
================ Comment at: clang-tools-extra/clangd/SourceCode.cpp:769 + llvm::StringRef TokenName; + if (Tok.getKind() == tok::identifier) + TokenName = Tok.getIdentifierInfo()->getName(); ---------------- ilya-biryukov wrote: > Why do we have both `raw_identifier` and `identifier`? > We should run lexer in the raw mode, in which case we should always get > `raw_identifier`. I just borrowed from `collectIdentifiers`. You are right, we only run a raw lexer, updated the code. ================ Comment at: clang-tools-extra/clangd/unittests/SourceCodeTests.cpp:690 + void f() { + [[Foo]] foo; + } ---------------- ilya-biryukov wrote: > Could you add a few more occurrences? > Maybe also with the weird things like multi-line tokens: > ``` > F\ > o\ > o > ``` Done, note that multi-line identifier is not supported -- `getRawIdentifier` returns a literal name `F\o\o` which makes the check `Tok.getRawIdentifier() == Identifier` fail. I think it is fine to not support it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69615/new/ https://reviews.llvm.org/D69615 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits