aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/function.c
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-01-29 18:58:14 +0000
committerSteve Naroff <snaroff@apple.com>2008-01-29 18:58:14 +0000
commit2565eeff7b0d2310fb2924ce96a54302b0dfa5af (patch)
tree16daf1a7dcdc8c0ffb283cc3ec669b35a289d105 /test/Sema/function.c
parentc385c90c68dfa376650e2facfbb444b2ec9bd110 (diff)
Tighten up ASTContext::typesAreCompatible()...it needs to make sure the qualifiers match. The comment and C99 citation for this routine were correct...the code needed to conform to the comment/spec. This fixes the test added below.
Tightening up this routine forced tweaks to Sema::CheckSubtractionOperands() and Sema::CheckCompareOperands(). For example, they both need to operate on the unqualified pointee... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/function.c')
-rw-r--r--test/Sema/function.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/Sema/function.c b/test/Sema/function.c
index 34e523586c..17cc86ef13 100644
--- a/test/Sema/function.c
+++ b/test/Sema/function.c
@@ -1,4 +1,4 @@
-// RUN: clang %s -fsyntax-only
+// RUN: clang %s -fsyntax-only -verify
// PR1892
void f(double a[restrict][5]); // should promote to restrict ptr.
void f(double (* restrict a)[5]);
@@ -6,6 +6,9 @@ void f(double (* restrict a)[5]);
int foo (__const char *__path);
int foo(__const char *__restrict __file);
+void func(const char*); //expected-error{{previous declaration is here}}
+void func(char*); //expected-error{{conflicting types for 'func'}}
+
void g(int (*)(const void **, const void **));
void g(int (*compar)()) {
}