diff options
author | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
commit | 50b73317314e889cf39c7b1d6cbf419fa7502f22 (patch) | |
tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/Parser/DelayedTemplateParsing.cpp | |
parent | dc04cb328508e61aad809d9b53b12f9799a00e7d (diff) | |
download | FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.zip FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.tar.gz |
Vendor import of clang trunk r154661:
http://llvm.org/svn/llvm-project/cfe/trunk@r154661
Diffstat (limited to 'test/Parser/DelayedTemplateParsing.cpp')
-rw-r--r-- | test/Parser/DelayedTemplateParsing.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/Parser/DelayedTemplateParsing.cpp b/test/Parser/DelayedTemplateParsing.cpp index b02c402..9737c73 100644 --- a/test/Parser/DelayedTemplateParsing.cpp +++ b/test/Parser/DelayedTemplateParsing.cpp @@ -12,6 +12,10 @@ template <class T> class B { void foo4() { } // expected-note {{previous definition is here}} expected-note {{previous definition is here}} void foo4() { } // expected-error {{class member cannot be redeclared}} expected-error {{redefinition of 'foo4'}} expected-note {{previous definition is here}} + + friend void foo3() { + undeclared(); + } }; @@ -59,3 +63,30 @@ public: } + +namespace PR11931 { + +template <typename RunType> +struct BindState; + + template<> +struct BindState<void(void*)> { + static void Run() { } +}; + +class Callback { +public: + typedef void RunType(); + + template <typename RunType> + Callback(BindState<RunType> bind_state) { + BindState<RunType>::Run(); + } +}; + + +Callback Bind() { + return Callback(BindState<void(void*)>()); +} + +} |