When inferring the result type of a block based on a return statement

with a type-dependent expression, infer the placeholder type
'Context.DependentTy' to indicate that this is just a
placeholder. Fixes PR9982 / <rdar://problem/9486685>.

llvm-svn: 132657
This commit is contained in:
Douglas Gregor
2011-06-05 05:04:23 +00:00
parent 1134ab23df
commit 0aa91e0a66
3 changed files with 52 additions and 10 deletions

View File

@@ -2082,6 +2082,7 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
case Decl::FunctionTemplate:
case Decl::TypeAliasTemplate:
case Decl::NamespaceAlias:
case Decl::Block:
break;
case Decl::CXXConstructor:
// Skip function templates