Parse: Don't crash when trailing return type is missing
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 9 Jan 2015 05:10:55 +0000 (05:10 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 9 Jan 2015 05:10:55 +0000 (05:10 +0000)
commite01c466c679d939f09a4b1d9f65085f90bf40ea4
treeb347c32c4513f532e1ad12ac7bebcfddc0df16a2
parent76a4b95ad84a0fd23e34982cfb1b40b39ca2fb4d
Parse: Don't crash when trailing return type is missing

Sema::CheckParmsForFunctionDef can't cope with a null TypeSourceInfo.
Don't let the AST contain the malformed lambda.

This fixes PR22122.

llvm-svn: 225505
clang/lib/Parse/ParseExprCXX.cpp
clang/test/Parser/cxx0x-lambda-expressions.cpp