summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/struct-class-redecl.cpp
blob: 4b6cef6dd2bfade6d03ac94ae34447d3a4543660 (plain)
1
2
3
4
5
6
7
8
// RUN: clang-cc -fsyntax-only -Wmismatched-tags -verify %s
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}}
OpenPOWER on IntegriCloud