summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/compare.c
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2007-08-27 04:08:11 +0000
committerSteve Naroff <snaroff@apple.com>2007-08-27 04:08:11 +0000
commit808eb8fe88f968b338e5cf86ce0922ac4c485e56 (patch)
tree33304b44ef33b50bb75d4697d8d0327b3f37f7f8 /clang/test/Sema/compare.c
parentfc6ffa251398b01dae2aa4a1f49b021086aca573 (diff)
downloadbcm5719-llvm-808eb8fe88f968b338e5cf86ce0922ac4c485e56.tar.gz
bcm5719-llvm-808eb8fe88f968b338e5cf86ce0922ac4c485e56.zip
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). llvm-svn: 41476
Diffstat (limited to 'clang/test/Sema/compare.c')
-rw-r--r--clang/test/Sema/compare.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Sema/compare.c b/clang/test/Sema/compare.c
index 0aeeb30d735..d4e29e8674f 100644
--- a/clang/test/Sema/compare.c
+++ b/clang/test/Sema/compare.c
@@ -6,3 +6,7 @@ int test(char *C) { // nothing here should warn.
return C != 0;
}
+int equal(char *a, const char *b)
+{
+ return a == b;
+}
OpenPOWER on IntegriCloud