[PATCH] D49175: [clangd] Ignore sema code complete callback with recovery context.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 11 06:09:50 PDT 2018


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.

Thanks! That's a simple fix that makes things better overall! 
LGTM with a NIT about the comment in the test.



================
Comment at: unittests/clangd/CodeCompleteTests.cpp:797
 #if 0
+  // In recorvery mode, "param_in_foo" will also be suggested among many other
+  // unrelated symbols; however, this is really a special case where this works.
----------------
NIT.

I would argue the results were actually useful here and we introduced a regression.
This patches fixes the more important cases, e.g. `if (int x = id^)`, so it's actually improving things overall. However, I'm not sure about the comment that says clangd is doing the right thing here (it actually gives a worse UX). WDYT? 


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D49175





More information about the cfe-commits mailing list