[cfe-commits] r72409 - in /cfe/trunk: lib/AST/Expr.cpp test/SemaCXX/blocks.cpp

Eli Friedman eli.friedman at gmail.com
Mon May 25 19:47:57 PDT 2009


On Mon, May 25, 2009 at 7:03 PM, Anders Carlsson <andersca at mac.com> wrote:
> @@ -776,6 +776,9 @@
>     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;

This bit of code looks like the helper method we were discussing
before to figure out whether the return value of a call is a
reference.

-Eli




More information about the cfe-commits mailing list