r183942 - Followup to r183931 to fix the lambda conversion-to-block-pointer member.
Eli Friedman
eli.friedman at gmail.com
Thu Jun 13 13:56:28 PDT 2013
Author: efriedma
Date: Thu Jun 13 15:56:27 2013
New Revision: 183942
URL: http://llvm.org/viewvc/llvm-project?rev=183942&view=rev
Log:
Followup to r183931 to fix the lambda conversion-to-block-pointer member.
Modified:
cfe/trunk/lib/Sema/SemaLambda.cpp
cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm
Modified: cfe/trunk/lib/Sema/SemaLambda.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLambda.cpp?rev=183942&r1=183941&r2=183942&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLambda.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLambda.cpp Thu Jun 13 15:56:27 2013
@@ -900,7 +900,7 @@ static void addBlockPointerConversion(Se
DeclarationNameInfo(Name, Loc, NameLoc),
ConvTy,
S.Context.getTrivialTypeSourceInfo(ConvTy, Loc),
- /*isInline=*/false, /*isExplicit=*/false,
+ /*isInline=*/true, /*isExplicit=*/false,
/*isConstexpr=*/false,
CallOperator->getBody()->getLocEnd());
Conversion->setAccess(AS_public);
Modified: cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm?rev=183942&r1=183941&r2=183942&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/lambda-expressions.mm Thu Jun 13 15:56:27 2013
@@ -60,6 +60,15 @@ void take_block(void (^block)()) { block
}
@end
-// ARC: attributes [[NUW]] = { nounwind{{.*}} }
+typedef int (^fptr)();
+template<typename T> struct StaticMembers {
+ static fptr f;
+};
+template<typename T>
+fptr StaticMembers<T>::f = [] { auto f = []{return 5;}; return fptr(f); }();
+template fptr StaticMembers<float>::f;
+// ARC: define linkonce_odr i32 ()* @_ZZNK13StaticMembersIfE1fMUlvE_clEvENKUlvE_cvU13block_pointerFivEEv
+
+// ARC: attributes [[NUW]] = { nounwind{{.*}} }
// MRC: attributes [[NUW]] = { nounwind{{.*}} }
More information about the cfe-commits
mailing list