[PATCH] D124688: [clangd] parse all make_unique-like functions in preamble

Tobias Ribizel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 16 00:45:05 PDT 2022


upsj added inline comments.


================
Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:416
+    // These mocks aren't quite right - we omit shared_ptr for simplicity.
+    // forward is included to show its body is not needed to get the diagnostic.
+    template <typename T> T&& forward(T& t) { return static_cast<T&&>(t); }
----------------
nridge wrote:
> I'm confused about this line: you say "show its body is not needed" but forward has a body here
Good catch, that was copy-pasted from std::make_unique above, but it doesn't seem to be necessary there either. I'll remove the bodies both.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124688



More information about the cfe-commits mailing list