kadircet marked an inline comment as done.
kadircet added inline comments.

================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:593
+  llvm::StringRef SpelledSpecifier =
+      syntax::FileRange(CCSema.SourceMgr, SemaSpecifier->getBeginLoc(),
+                        SemaSpecifier->getEndLoc())
----------------
sammccall wrote:
> what if beginLoc and endLoc are in different files?
> (this is most of what Lexer deals with, I think)
> 
> I think you want TokenBuffer::expandedTokens(SourceRange), then 
> spelledForExpanded, and then FileRange(...).text().
right, thinking about it again, I suppose it is better to keep lexer here as 
there's syntax::FileRange doesn't support macroIDs.
We would need to handle it ourselves in here which wouldn't reduce technical 
debt at all.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74844



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to