Don't allow calls to functions marked "unavailable". There's more work
to do in this area, since there are other places that reference
FunctionDecls.
Don't allow "overloadable" functions (in C) to be declared without a
prototype.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64897 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/overloadable.c b/test/Sema/overloadable.c
index afac741..136f8e9 100644
--- a/test/Sema/overloadable.c
+++ b/test/Sema/overloadable.c
@@ -37,4 +37,14 @@
double *f(int) __attribute__((overloadable)); // expected-error{{conflicting types for 'f'}}
+double promote(float) __attribute__((__overloadable__));
+double promote(double) __attribute__((__overloadable__));
+long double promote(long double) __attribute__((__overloadable__));
+
+void promote() __attribute__((__overloadable__)); // expected-error{{'overloadable' function 'promote' must have a prototype}}
+
+void test_promote(short* sp) {
+ promote(1.0);
+}
+