diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2010-05-30 06:03:20 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2010-05-30 06:03:20 +0000 |
commit | c8731be34d18955bec1b71e172c978197c8f4ad7 (patch) | |
tree | a206a768dff7cfbbacfb8b5ca8fc80fda294671c /clang/test/CodeGenCXX/incomplete-member-function-pointer.cpp | |
parent | ad98fc9733cc4b89599f13727e7f4da9465933b2 (diff) | |
download | llvm-c8731be34d18955bec1b71e172c978197c8f4ad7.zip llvm-c8731be34d18955bec1b71e172c978197c8f4ad7.tar.gz llvm-c8731be34d18955bec1b71e172c978197c8f4ad7.tar.bz2 |
Fix for PR7040: Don't try to compute the LLVM type for a function where it
isn't possible to compute.
This patch is mostly refactoring; the key change is the addition of the code
starting with the comment, "Check whether the function has a computable LLVM
signature." The solution here is essentially the same as the way the
vtable code handles such functions.
llvm-svn: 105151
Diffstat (limited to 'clang/test/CodeGenCXX/incomplete-member-function-pointer.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/incomplete-member-function-pointer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/incomplete-member-function-pointer.cpp b/clang/test/CodeGenCXX/incomplete-member-function-pointer.cpp new file mode 100644 index 0000000..b97e44c --- /dev/null +++ b/clang/test/CodeGenCXX/incomplete-member-function-pointer.cpp @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 %s -emit-llvm-only +// PR7040 +struct fake_tuple; +struct connection { + void bar(fake_tuple); +}; +void (connection::*a)(fake_tuple) = &connection::bar; +void f() { + void (connection::*b)(fake_tuple) = &connection::bar; +} |