commit | 7af4ec744e30d573482aef7a37089d0d32cc07ef | [log] [tgz] |
---|---|---|
author | Anders Carlsson <andersca@mac.com> | Tue Jan 05 05:04:05 2010 +0000 |
committer | Anders Carlsson <andersca@mac.com> | Tue Jan 05 05:04:05 2010 +0000 |
tree | 7ac99fbcb9eda074441b747323610eddce1d404d | |
parent | fc4e4e15115e2d973fcc43b2d40e401d3ac88b73 [diff] [blame] |
When emitting member function pointers, use the canonical decl if the member function is virtual. Fixes PR5940. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92680 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/member-function-pointers.cpp b/test/CodeGenCXX/member-function-pointers.cpp index 149b560..2454dda 100644 --- a/test/CodeGenCXX/member-function-pointers.cpp +++ b/test/CodeGenCXX/member-function-pointers.cpp
@@ -128,3 +128,14 @@ } } +// PR5940 +namespace PR5940 { + class foo { + public: + virtual void baz(void); + }; + + void foo::baz(void) { + void (foo::*ptr)(void) = &foo::baz; + } +}