blob: 1840456bde8e6746aa7203b2205514bac6a254c6 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Argyrios Kyrtzidis987a14b2008-08-22 15:38:55 +00002
3void f() {
4 float v1 = float(1);
5 int v2 = typeof(int)(1,2); // expected-error {{function-style cast to a builtin type can only take one argument}}
6 typedef int arr[];
7 int v3 = arr(); // expected-error {{array types cannot be value-initialized}}
8 int v4 = int();
9 int v5 = int; // expected-error {{expected '(' for function-style cast or type construction}}
Argyrios Kyrtzidis2fba1212008-08-23 19:24:45 +000010 typedef int T;
11 int *p;
12 bool v6 = T(0) == p;
Douglas Gregor77a52232008-09-12 00:47:35 +000013 char *str;
14 str = "a string";
15 wchar_t *wstr;
16 wstr = L"a wide string";
Argyrios Kyrtzidis987a14b2008-08-22 15:38:55 +000017}