Downgrade complaints about calling unavailable functions to a warning
(as GCC does), except when we've performed overload resolution and
found an unavailable function: in this case, we actually error.

Merge the checking of unavailable functions with the checking for
deprecated functions. This unifies a bit of code, and makes sure that
we're checking for unavailable functions in the right places. Also,
this check can cause an error. We may, eventually, want an option to
make "unavailable" warnings into errors.

Implement much of the logic needed for C++0x deleted functions, which
are effectively the same as "unavailable" functions (but always cause
an error when referenced). However, we don't have the syntax to
specify deleted functions yet :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64955 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/overloadable.c b/test/Sema/overloadable.c
index 22ced49..2072292 100644
--- a/test/Sema/overloadable.c
+++ b/test/Sema/overloadable.c
@@ -43,11 +43,11 @@
 
 void promote() __attribute__((__overloadable__)); // expected-error{{'overloadable' function 'promote' must have a prototype}}
 void promote(...) __attribute__((__overloadable__, __unavailable__)); // \
-    // expected-note{{unavailable function is declared here}}
+    // expected-note{{candidate function}}
 
 void test_promote(short* sp) {
   promote(1.0);
-  promote(sp); // expected-error{{call to function 'promote' that has been intentionally made unavailable}}
+  promote(sp); // expected-error{{call to unavailable function 'promote'}}
 }