[cfe-commits] r55767 - in /cfe/trunk: include/clang/AST/ASTContext.h include/clang/Basic/DiagnosticKinds.def lib/AST/ASTContext.cpp lib/Sema/Sema.h lib/Sema/SemaExpr.cpp

steve naroff snaroff at apple.com
Fri Sep 5 16:11:33 PDT 2008


On Sep 5, 2008, at 6:41 PM, Eli Friedman wrote:

> On Fri, Sep 5, 2008 at 3:22 PM, steve naroff <snaroff at apple.com>  
> wrote:
>> The code above enables us to diagnose the following as an error  
>> (which isn't
>> considered an error in C):
>>
>> int (^emptyArgBlock)();
>> int (^intArgBlock)(int) = emptyArgBlock;
>
> Right... my question is, is your function supposed to be equivalent to
> the following?  If not, how is it different?
>
> bool ASTContext::typesAreBlockCompatible(QualType lhs, QualType rhs) {
>  return getCanonicalType(lhs) == getCanonicalType(rhs);
> }
>

I believe you are right. Duh.

Thanks,

snaroff

> -Eli




More information about the cfe-commits mailing list