summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-05-10 21:23:31 +0000
committerDouglas Gregor <dgregor@apple.com>2011-05-10 21:23:31 +0000
commit932aac64929be70060c5fb12e91ee6b9ea477de0 (patch)
tree5fd4a5f37af348318579695d5afeae5042a30e2f /clang/test
parent999fa3bf1fc8c684626085e8b8b398c4623550dc (diff)
downloadbcm5719-llvm-932aac64929be70060c5fb12e91ee6b9ea477de0.tar.gz
bcm5719-llvm-932aac64929be70060c5fb12e91ee6b9ea477de0.zip
Tweak the diagnostics for the C++0x extensions to friend types to note
that they are C++0x extensions, and put them in the appropriate group. We already support most of the semantics. Addresses <rdar://problem/9407525>. llvm-svn: 131153
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CXX/class.access/class.friend/p2-cxx03.cpp2
-rw-r--r--clang/test/CXX/class/class.friend/p2.cpp4
-rw-r--r--clang/test/Parser/cxx-friend.cpp6
3 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/CXX/class.access/class.friend/p2-cxx03.cpp b/clang/test/CXX/class.access/class.friend/p2-cxx03.cpp
index 0391c4b989d..82cddc2bad5 100644
--- a/clang/test/CXX/class.access/class.friend/p2-cxx03.cpp
+++ b/clang/test/CXX/class.access/class.friend/p2-cxx03.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
template<typename T>
class X0 {
- friend T; // expected-warning{{non-class type 'T' cannot be a friend}}
+ friend T; // expected-warning{{non-class friend type 'T' is a C++0x extension}}
};
class X1 { };
diff --git a/clang/test/CXX/class/class.friend/p2.cpp b/clang/test/CXX/class/class.friend/p2.cpp
index eb5036f8128..87b69c095fb 100644
--- a/clang/test/CXX/class/class.friend/p2.cpp
+++ b/clang/test/CXX/class/class.friend/p2.cpp
@@ -4,7 +4,7 @@ struct B0;
class A {
friend class B {}; // expected-error {{cannot define a type in a friend declaration}}
- friend int; // expected-warning {{non-class type 'int' cannot be a friend}}
- friend B0; // expected-warning {{must specify 'struct' to befriend}}
+ friend int; // expected-warning {{non-class friend type 'int' is a C++0x extension}}
+ friend B0; // expected-warning {{specify 'struct' to befriend 'B0'}}
friend class C; // okay
};
diff --git a/clang/test/Parser/cxx-friend.cpp b/clang/test/Parser/cxx-friend.cpp
index 59350b56636..a13e7babc53 100644
--- a/clang/test/Parser/cxx-friend.cpp
+++ b/clang/test/Parser/cxx-friend.cpp
@@ -21,9 +21,9 @@ class B {
// 'A' here should refer to the declaration above.
friend class A;
- friend C; // expected-warning {{must specify 'class' to befriend}}
- friend U; // expected-warning {{must specify 'union' to befriend}}
- friend int; // expected-warning {{non-class type 'int' cannot be a friend}}
+ friend C; // expected-warning {{specify 'class' to befriend}}
+ friend U; // expected-warning {{specify 'union' to befriend}}
+ friend int; // expected-warning {{non-class friend type 'int'}}
friend void myfunc();
OpenPOWER on IntegriCloud