[cfe-commits] r57841 - in /cfe/trunk: lib/AST/ASTContext.cpp lib/Sema/SemaExpr.cpp test/SemaObjC/comptypes-1.m test/SemaObjC/comptypes-7.m

Eli Friedman eli.friedman at gmail.com
Mon Oct 20 17:14:31 PDT 2008


On Mon, Oct 20, 2008 at 11:19 AM, Steve Naroff <snaroff at apple.com> wrote:
> Author: snaroff
> Date: Mon Oct 20 13:19:10 2008
> New Revision: 57841
>
> URL: http://llvm.org/viewvc/llvm-project?rev=57841&view=rev
> Log:
> Sema::CheckCompareOperands() and ASTContext::mergeTypes(): Change handling of ObjC qualified id types to be consistent with gcc. This changes a handful of test case errors into warnings (diff will tell you which cases have changed).

Using an == comparison for testing the result of mergeTypes is likely
to be confusing, because there are additional rules for ==, and gcc
tends to be loose in when it allows comparisons.  I'd suggest tests
using either __builtin_types_compatible_p or something like the
following:

TypeA* test1;
TypeB* test1;

-Eli



More information about the cfe-commits mailing list