kadircet added inline comments.

================
Comment at: clang-tools-extra/clangd/CodeComplete.cpp:187
+      if (auto Header = headerToInsertIfAllowed(Opts))
+        if (auto HeaderFile = toHeaderFile(*Header, FileName))
+          if (auto Spelled =
----------------
(sorry for the late drive by comment)

if this returns an error it needs to be consumed to ensure we don't crash 
(destructor of `Expected` asserts)

but apart from that, this introduces lots of new string manipulations for every 
completion item, might have bad impact on latency especially when the include 
paths are long and require heap allocations. something to keep in mind once 
this hits production (and maybe we can choose to approximate or not do it at 
all if it turns out to be problematic)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92494

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

Reply via email to