This revision was automatically updated to reflect the committed changes.
sammccall marked 2 inline comments as done.
Closed by commit rG07f9fb8b5141: [clangd] Elide even more checks in
SelectionTree. (authored by sammccall).
Changed prior to commit:
https://reviews.llvm.org/D117107?vs=399643&i
hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.
Thanks, this looks great!
Comment at: clang-tools-extra/clangd/Selection.cpp:364
+return *Offset < First;
+ log("Start {0}", Tok.dumpForTests(SM));
+
sammccall added a comment.
PTAL
Comment at: clang-tools-extra/clangd/Selection.cpp:350
+return *Offset < First;
+ StartInvalid = false;
+ return false;
sammccall wrote:
> hokein wrote:
> > this should be `true`.
> Oh shoot, now th
sammccall updated this revision to Diff 399643.
sammccall marked 3 inline comments as done.
sammccall added a comment.
Handle EOF
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117107/new/
https://reviews.llvm.org/D117107
Files:
clang-tools-extra
sammccall planned changes to this revision.
sammccall marked 5 inline comments as done.
sammccall added a comment.
Thanks! You caught a serious bug, I'm digging into it.
Comment at: clang-tools-extra/clangd/Selection.cpp:289
+// surround the selection, including when genera
hokein added a comment.
this looks good in general.
Comment at: clang-tools-extra/clangd/Selection.cpp:289
+// surround the selection, including when generated by macros.
+if (ExpandedTokens.empty() ||
+&ExpandedTokens.front() > &this->ExpandedTokens.back() ||
-
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/unittests/SelectionTests.cpp:206
+ R"cpp(
+#define TARGET void foo()
+[[TAR^GET{ return; }]]
This test isn't strictly related, but it failed with a buggy versio
sammccall created this revision.
sammccall added a reviewer: hokein.
Herald added subscribers: usaxena95, kadircet, arphaman.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
During pop() we conve