ilya-biryukov added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:12645
+    if (FD->isConstexpr() || FD->getReturnType()->isUndeducedType() ||
+        FD->getReturnType()->isInstantiationDependentType())
       return false;
----------------
rsmith wrote:
> This is a lot broader than necessary; what we should do is to look for a 
> deduced type in the return type. `isUndeducedType` doesn't quite do that for 
> a template because we "deduce" the `auto` as a dependent type early.
My change from some time ago (D44480) seem to do exactly that. Could you take a 
look?


Repository:
  rC Clang

https://reviews.llvm.org/D46684



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D46684: [... Haojian Wu via Phabricator via cfe-commits
    • [PATCH] D466... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D466... Ilya Biryukov via Phabricator via cfe-commits
    • [PATCH] D466... Haojian Wu via Phabricator via cfe-commits

Reply via email to