blob: cbc24aef28d587ea44aa08d56088d908efc67b6f [file] [log] [blame]
Fariborz Jahanian249cead2009-10-01 20:39:51 +00001// RUN: clang-cc -fsyntax-only -verify %s -std=c++0x
2
3struct R {
4 R(int);
5};
6
7struct A {
8 A(R);
9};
10
11struct B {
12 B(A);
13};
14
15int main () {
16 B(10); // expected-error {{functional-style cast from 'int' to 'struct B' is not allowed}}
17 (B)10; // expected-error {{C-style cast from 'int' to 'struct B' is not allowed}}
18 static_cast<B>(10); // expected-error {{static_cast from 'int' to 'struct B' is not allowed}} \\
19 // expected-warning {{expression result unused}}
20}
21