Add test for C++ DR899.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151411 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CXX/over/over.match/over.match.funcs/over.match.copy/p1.cpp b/test/CXX/over/over.match/over.match.funcs/over.match.copy/p1.cpp
index 8b8a1ef..31a679f 100644
--- a/test/CXX/over/over.match/over.match.funcs/over.match.copy/p1.cpp
+++ b/test/CXX/over/over.match/over.match.funcs/over.match.copy/p1.cpp
@@ -13,3 +13,25 @@
     X x3 = y; // expected-error{{no viable conversion from 'const ExplicitConv::Y' to 'ExplicitConv::X'}}
   }
 }
+
+namespace DR899 {
+  struct C { }; // expected-note 2 {{candidate constructor}}
+
+  struct A {
+    explicit operator int() const;
+    explicit operator C() const;
+  };
+
+  struct B {
+    int i;
+    B(const A& a): i(a) { }
+  };
+
+  int main() {
+    A a;
+    int i = a; // expected-error{{no viable conversion}}
+    int j(a);
+    C c = a; // expected-error{{no viable conversion}}
+    C c2(a);
+  }
+}