forked from OSchip/llvm-project
Followup to r183931 to fix the lambda conversion-to-block-pointer member.
llvm-svn: 183942
This commit is contained in:
parent
280e5cb653
commit
ef10282a0f
|
@ -900,7 +900,7 @@ static void addBlockPointerConversion(Sema &S,
|
|||
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);
|
||||
|
|
|
@ -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{{.*}} }
|
||||
|
|
Loading…
Reference in New Issue