[PATCH] D46684: [Frontend] Don't skip function body when the return type is dependent on the template parameter.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 10 07:46:54 PDT 2018


rsmith added inline comments.


================
Comment at: lib/Sema/SemaDecl.cpp:12645
+    if (FD->isConstexpr() || FD->getReturnType()->isUndeducedType() ||
+        FD->getReturnType()->isInstantiationDependentType())
       return false;
----------------
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.


Repository:
  rC Clang

https://reviews.llvm.org/D46684





More information about the cfe-commits mailing list