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.

llvm-svn: 64897
diff --git a/clang/test/SemaCXX/attr-unavailable.cpp b/clang/test/SemaCXX/attr-unavailable.cpp
new file mode 100644
index 0000000..140008a
--- /dev/null
+++ b/clang/test/SemaCXX/attr-unavailable.cpp
@@ -0,0 +1,11 @@
+// RUN: clang -fsyntax-only -verify %s
+
+int &foo(int);
+double &foo(double);
+void foo(...) __attribute__((__unavailable__)); // expected-note{{unavailable function is declared here}}
+
+void test_foo(short* sp) {
+  int &ir = foo(1);
+  double &dr = foo(1.0);
+  foo(sp); // expected-error{{call to function 'foo' that has been intentionally made unavailable}}
+}