[PATCH] D79315: [clangd] Get rid of Inclusion::R
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 06:55:18 PDT 2020
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang-tools-extra/clangd/Headers.cpp:45
Inc.HashOffset = SM.getFileOffset(HashLoc);
+ // Line numbers are only computed once per SM, it is cached afterwards.
+ Inc.HashLine =
----------------
I'm not sure what this comment is trying to tell me - is it just "the next line isn't very expensive"? I wouldn't bother in that case...
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:610
+ auto FileRange =
+ syntax::FileRange(SM, FileTok->location(), Inc.Written.length())
+ .toCharRange(SM);
----------------
is this just FileTok.range(SM)?
================
Comment at: clang-tools-extra/clangd/unittests/XRefsTests.cpp:1493
Annotations MainCpp(R"cpp(
- #include $foo[["foo.h"]]
+ #/*comments*/include /*comments*/ $foo[["foo.h"]] //more comments
int end_of_preamble = 0;
----------------
can you try an angled include too? Does the raw lexer get that right?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79315/new/
https://reviews.llvm.org/D79315
More information about the cfe-commits
mailing list