f4a2713ac8
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
10 lines
308 B
C++
10 lines
308 B
C++
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
struct X0 { };
|
|
struct X1 { };
|
|
|
|
template<typename T>
|
|
void f0() {
|
|
const T *t = (const X0*)0; // expected-error{{cannot initialize a variable of type 'const X1 *' with an rvalue of type 'const X0 *'}}
|
|
}
|
|
template void f0<X1>(); // expected-note{{instantiation of}}
|