[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 25 04:55:53 PDT 2023


cor3ntin added inline comments.


================
Comment at: clang/lib/Sema/SemaOverload.cpp:13033
+  ExprResult Res = FixOverloadedFunctionReference(E, DAP, Found);
+  if (Res.isInvalid())
+    return false;
----------------
aaron.ballman wrote:
> Below you assume that `Res.get()` returns a nonnull pointer, so you need to check for usable instead of valid. Probably worth a pass over the other uses of `isInvalid()` to see if maybe `!isUsable()` is better.
I don't think `FixOverloadedFunctionReference` can ever be null, and if it can, maybe it's better to let it assert so that we know we missed something, right?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140828



More information about the cfe-commits mailing list