diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
| commit | dbe13110f59f48b4dbb7552b3ac2935acdeece7f (patch) | |
| tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/Parser/DelayedTemplateParsing.cpp | |
| parent | 9da628931ebf2609493570f87824ca22402cc65f (diff) | |
Notes
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 b02c4026c048e..9737c731bd170 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*)>()); +} + +} |
