]> granicus.if.org Git - clang/commitdiff
Add testcase for r208062.
authorNick Lewycky <nicholas@mxc.ca>
Tue, 6 May 2014 22:28:58 +0000 (22:28 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Tue, 6 May 2014 22:28:58 +0000 (22:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208138 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/overload-call.cpp

index 615b10a43971524c807874c4abb98284f97b646a..da28eefe7a582550ac6d8ee96db1e18689a378c8 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
+// RUN: %clang_cc1 -pedantic -verify %s
 int* f(int) { return 0; }
 float* f(float) { return 0; }
 void f();
@@ -580,3 +580,13 @@ namespace PR12931 {
   void f(const volatile int &, int);
   void g() { f(0, 0); }
 }
+
+void test5() {
+  struct {
+    typedef void F1(int);
+    typedef void F2(double);
+    operator F1*();  // expected-note{{conversion candidate}}
+    operator F2*();  // expected-note{{conversion candidate}}
+  } callable;
+  callable();  // expected-error{{no matching function for call}}
+}