[PATCH] D76098: [WIP] [clangd] Do not trigger go-to-def textual fallback inside string literals

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 12 14:39:14 PDT 2020


nridge added a comment.

This is my attempt to avoid triggering the textual fallback for string literals, as per the discussion in the issue <https://github.com/clangd/clangd/issues/241>.

To classify tokens into the categories discussed in the issue, I resurrected and modified the `getTokenFlavor()` function that was removed in D75176 <https://reviews.llvm.org/D75176>.

However, it does not seem to be working as I expect -- `Lexer::getRawToken()` is returning `TokenKind::raw_identifier` inside the string literal rather than `TokenKind::string_literal`.

Am I misunderstanding how this API is supposed to work? I thought "raw" meant "no preprocessor", and things like string literals would still be recognized in raw mode.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76098/new/

https://reviews.llvm.org/D76098





More information about the cfe-commits mailing list