[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / static-cast-complete-type.cpp
blob6d76f813f8d968b9998a2bb444371f09342cd236
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 template<typename T> struct S {
3 S(int);
4 };
6 struct T; // expected-note{{forward declaration of 'T'}}
8 void f() {
9 S<int> s0 = static_cast<S<int> >(0);
10 S<void*> s1 = static_cast<S<void*> >(00);
12 (void)static_cast<T>(10); // expected-error{{'T' is an incomplete type}}