diff options
Diffstat (limited to 'test/SemaTemplate/friend.cpp')
| -rw-r--r-- | test/SemaTemplate/friend.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaTemplate/friend.cpp b/test/SemaTemplate/friend.cpp index e78a067ef8fa..ef1aed50e626 100644 --- a/test/SemaTemplate/friend.cpp +++ b/test/SemaTemplate/friend.cpp @@ -31,3 +31,19 @@ namespace PR6770 { friend class f1; // expected-error{{'friend' used outside of class}} } } + +namespace friend_redecl_inline { +// We had a bug where instantiating the foo friend declaration would check the +// defined-ness of the most recent decl while checking if the canonical decl was +// inlined. +void foo(); +void bar(); +template <typename T> +class C { + friend void foo(); + friend inline void bar(); +}; +inline void foo() {} +inline void bar() {} +C<int> c; +} |
