freebsd-skq/test/SemaCXX/struct-class-redecl.cpp

9 lines
417 B
C++
Raw Normal View History

2010-01-01 10:34:51 +00:00
// RUN: %clang_cc1 -fsyntax-only -Wmismatched-tags -verify %s
2009-06-02 17:58:47 +00:00
class X; // expected-note 2{{here}}
typedef struct X * X_t; // expected-warning{{previously declared}}
template<typename T> struct Y; // expected-note{{previous}}
template<class U> class Y { }; // expected-warning{{previously declared}}
union X { int x; float y; }; // expected-error{{use of 'X' with tag type that does not match previous declaration}}