[PATCH] Fix Bug 23189 in C++14 type inference for lambdas with undeclared identifiers
Richard Smith
richard at metafoo.co.uk
Mon Jun 1 20:48:30 PDT 2015
================
Comment at: lib/Sema/SemaStmt.cpp:2983-2989
@@ -2982,9 +2982,9 @@
if (FD->isDependentContext()) {
// C++1y [dcl.spec.auto]p12:
// Return type deduction [...] occurs when the definition is
// instantiated even if the function body contains a return
// statement with a non-type-dependent operand.
assert(AT->isDeduced() && "should have deduced to dependent type");
return false;
} else if (RetExpr) {
----------------
Dependent types are supposed to be eliminated by this check. I think the right thing to do is to correct typos in the expression before we get to this point.
http://reviews.llvm.org/D9880
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list