diff options
author | John McCall <rjmccall@apple.com> | 2009-09-02 00:55:30 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-09-02 00:55:30 +0000 |
commit | 2dc078f24e3335c51c52238851451b7155ba2b7b (patch) | |
tree | a1ee2c38d8d1062620302ab9e17798e6d18aa45b /clang/test/SemaCXX/friend-class-nodecl.cpp | |
parent | a119813218ce80c00fdeff8b1d4708f9b8b6d779 (diff) | |
download | bcm5719-llvm-2dc078f24e3335c51c52238851451b7155ba2b7b.tar.gz bcm5719-llvm-2dc078f24e3335c51c52238851451b7155ba2b7b.zip |
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
Diffstat (limited to 'clang/test/SemaCXX/friend-class-nodecl.cpp')
-rw-r--r-- | clang/test/SemaCXX/friend-class-nodecl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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; +}; + |