From 2dc078f24e3335c51c52238851451b7155ba2b7b Mon Sep 17 00:00:00 2001 From: John McCall Date: Wed, 2 Sep 2009 00:55:30 +0000 Subject: Ensure that the tag decls of friend decls aren't added to the friending class's decl list, and remove some workarounds that were due to this. Thanks to Eli for pointing this out and providing the test case. llvm-svn: 80745 --- clang/test/SemaCXX/friend-class-nodecl.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 clang/test/SemaCXX/friend-class-nodecl.cpp (limited to 'clang/test/SemaCXX/friend-class-nodecl.cpp') diff --git a/clang/test/SemaCXX/friend-class-nodecl.cpp b/clang/test/SemaCXX/friend-class-nodecl.cpp new file mode 100644 index 00000000000..de12eaf741c --- /dev/null +++ b/clang/test/SemaCXX/friend-class-nodecl.cpp @@ -0,0 +1,10 @@ +// RUN: clang-cc -ast-print %s -o %t && +// RUN: not grep '^ *class B' %t + +// Tests that the tag decls in friend declarations aren't added to the +// declaring class's decl chain. + +class A { + friend class B; +}; + -- cgit v1.2.3