]> granicus.if.org Git - clang/commit
Add Type::getAsBuiltinType() and Type::builtinTypesAreCompatible().
authorSteve Naroff <snaroff@apple.com>
Mon, 27 Aug 2007 04:08:11 +0000 (04:08 +0000)
committerSteve Naroff <snaroff@apple.com>
Mon, 27 Aug 2007 04:08:11 +0000 (04:08 +0000)
commit77878cc5aa6ad01fc0c91bac1a61819dbf3bf691
tree209c8ae83d017feec233a1d954bd285d9b5cbf16
parent716c7304ff5d27a95e1e7823acd1d09d5ec3e37f
Add Type::getAsBuiltinType() and Type::builtinTypesAreCompatible().
Modified Type::typesAreCompatible() to use the above.

This fixes the following bug submitted by Keith Bauer (thanks!).

int equal(char *a, const char *b)
{
    return a == b;
}

Also tweaked Sema::CheckCompareOperands() to ignore the qualifiers when
comparing two pointer types (though it doesn't relate directly to this bug).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41476 91177308-0d34-0410-b5e6-96231b3b80d8
AST/Type.cpp
Sema/SemaExpr.cpp
include/clang/AST/Type.h
test/Sema/compare.c
test/Sema/unused-expr.c