Part one of handling C++ functional casts. This handles semantic
analysis and AST-building for the cases where we have N != 1
arguments. For N == 1 arguments, we need to finish the C++
implementation of explicit type casts (C++ [expr.cast]).

llvm-svn: 62329
diff --git a/clang/test/SemaCXX/functional-cast.cpp b/clang/test/SemaCXX/functional-cast.cpp
new file mode 100644
index 0000000..3b65031
--- /dev/null
+++ b/clang/test/SemaCXX/functional-cast.cpp
@@ -0,0 +1,27 @@
+// RUN: clang -fsyntax-only -verify %s
+
+struct SimpleValueInit {
+  int i;
+};
+
+struct InitViaConstructor {
+  InitViaConstructor(int i = 7);
+};
+
+// FIXME: error messages for implicitly-declared special member
+// function candidates are very poor
+struct NoValueInit { // expected-note{{candidate function}} 
+  NoValueInit(int i, int j); // expected-note{{candidate function}}
+};
+
+void test_cxx_functional_value_init() {
+  (void)SimpleValueInit();
+  (void)InitViaConstructor();
+  (void)NoValueInit(); // expected-error{{no matching constructor for initialization}}
+}
+
+void test_cxx_function_cast_multi() { 
+  (void)NoValueInit(0, 0);
+  (void)NoValueInit(0, 0, 0); // expected-error{{no matching constructor for initialization}}
+  (void)int(1, 2); // expected-error{{function-style cast to a builtin type can only take one argument}}
+}