]> granicus.if.org Git - clang/commitdiff
Another little test for C++ [over.over]
authorDouglas Gregor <dgregor@apple.com>
Thu, 9 Jul 2009 17:44:05 +0000 (17:44 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 9 Jul 2009 17:44:05 +0000 (17:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75151 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/over/over.over/p2.cpp [new file with mode: 0644]

diff --git a/test/CXX/over/over.over/p2.cpp b/test/CXX/over/over.over/p2.cpp
new file mode 100644 (file)
index 0000000..adca33c
--- /dev/null
@@ -0,0 +1,10 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+template<typename T> T f0(T, T);
+
+void test_f0() {
+  int (*f0a)(int, int) = f0;
+  int (*f0b)(int, int) = &f0;
+  int (*f0c)(int, float) = f0; // expected-error{{incompatible type}}
+  // FIXME: poor error message above!
+}
\ No newline at end of file