Handle built-in unary operators when reporting ambiguities.
wip - To prune excessive reporting.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83889 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/ambiguous-builtin-unary-operator.cpp b/test/SemaCXX/ambiguous-builtin-unary-operator.cpp
new file mode 100644
index 0000000..042546a
--- /dev/null
+++ b/test/SemaCXX/ambiguous-builtin-unary-operator.cpp
@@ -0,0 +1,18 @@
+// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
+
+struct A {
+  operator int&();
+};
+
+struct B {
+  operator long&();
+};
+
+struct C : B, A { };
+
+void test(C c) {
+  ++c; // expected-error {{use of overloaded operator '++' is ambiguous}}\
+       // expected-note 4 {{built-in candidate operator ++ (}}
+}
+
+