[cxx1z-constexpr-lambda] Make a lambda's closure type eligible as a literal-type...
authorFaisal Vali <faisalv@yahoo.com>
Sat, 23 Jul 2016 04:05:19 +0000 (04:05 +0000)
committerFaisal Vali <faisalv@yahoo.com>
Sat, 23 Jul 2016 04:05:19 +0000 (04:05 +0000)
commitc6b9be29f270e6adc0922cb6e9be000f7102b663
tree58e796c5e76f0eeac88440340b1072aea8874257
parenta653927e8b98d9877254bebfab0d008c9670dbb0
[cxx1z-constexpr-lambda] Make a lambda's closure type eligible as a literal-type in C++1z

Additionally, for pre-C++1z, instead of forbidding a lambda's closure type from being a literal type through circumlocutorily setting HasNonLiteralTypeFieldsOrBases falsely to true -- handle lambda's more directly in CXXRecordDecl::isLiteral().

One additional small step towards implementing constexpr-lambdas.

Thanks to Richard Smith for his review!
https://reviews.llvm.org/D22662

llvm-svn: 276514
clang/include/clang/AST/DeclCXX.h
clang/test/SemaCXX/cxx1z-constexpr-lambdas.cpp