[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

Eli Friedman eli.friedman at gmail.com
Fri Sep 5 15:41:11 PDT 2008


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);
}

-Eli



More information about the cfe-commits mailing list