QualType CalleeType = cast<CallExpr>(this)->getCallee()->getType();
if (const PointerType *FnTypePtr = CalleeType->getAsPointerType())
CalleeType = FnTypePtr->getPointeeType();
+ else if (const BlockPointerType *BPT = CalleeType->getAsBlockPointerType())
+ CalleeType = BPT->getPointeeType();
+
if (const FunctionType *FnType = CalleeType->getAsFunctionType())
if (FnType->getResultType()->isLValueReferenceType())
return LV_Valid;
void tovoid_test(int (^f)(int, int)) {
tovoid(f);
}
+
+void reference_lvalue_test(int& (^f)()) {
+ f() = 10;
+}