diff options
Diffstat (limited to 'test/CXX/class.access/class.friend/p2-cxx03.cpp')
-rw-r--r-- | test/CXX/class.access/class.friend/p2-cxx03.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CXX/class.access/class.friend/p2-cxx03.cpp b/test/CXX/class.access/class.friend/p2-cxx03.cpp new file mode 100644 index 0000000..0391c4b --- /dev/null +++ b/test/CXX/class.access/class.friend/p2-cxx03.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +template<typename T> +class X0 { + friend T; // expected-warning{{non-class type 'T' cannot be a friend}} +}; + +class X1 { }; +enum E1 { }; +X0<X1> x0a; +X0<X1 *> x0b; +X0<int> x0c; +X0<E1> x0d; + |