diff options
author | Daniel Jacobowitz <drow@false.org> | 2010-09-08 19:09:43 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2010-09-08 19:09:43 +0000 |
commit | c767944bf25ae52241366d9bdc7ba14b493f17eb (patch) | |
tree | 322a298962eafe7852fad3d99848edcf3fd8cbc4 /gdb/testsuite/gdb.cp/templates.cc | |
parent | 561d38252c8b1c7a006eb58f079d3d650bee5743 (diff) | |
download | gdb-c767944bf25ae52241366d9bdc7ba14b493f17eb.zip gdb-c767944bf25ae52241366d9bdc7ba14b493f17eb.tar.gz gdb-c767944bf25ae52241366d9bdc7ba14b493f17eb.tar.bz2 |
gdb/
* dwarf2read.c (read_structure_type): Move processing of
fields and member functions from here...
(process_structure_scope): ... to here.
gdb/testsuite/
* gdb.cp/templates.cc (Empty, FunctionArg): New classes.
(FunctionArg::method): New function.
(empty, arg): New variables.
(main): Call arg.method.
* gdb.cp/templates.exp (test_template_args): New function.
(do_tests): Call it.
Diffstat (limited to 'gdb/testsuite/gdb.cp/templates.cc')
-rw-r--r-- | gdb/testsuite/gdb.cp/templates.cc | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/gdb/testsuite/gdb.cp/templates.cc b/gdb/testsuite/gdb.cp/templates.cc index 783bc2c..b5e0643 100644 --- a/gdb/testsuite/gdb.cp/templates.cc +++ b/gdb/testsuite/gdb.cp/templates.cc @@ -712,6 +712,23 @@ template<class T> T Garply<T>::garply (int i, T tt) } } +template<class C> class Empty +{ +}; + +template<class C> class FunctionArg +{ +public: + int method(Empty<void (FunctionArg<C>)> &); +}; + +template<class C> int FunctionArg<C>::method(Empty<void (FunctionArg<C>)> &arg) +{ + return 75; +} + +Empty<void(FunctionArg<int>)> empty; +FunctionArg<int> arg; int main() { @@ -785,18 +802,7 @@ int main() t5i.value(); + arg.method(empty); + return 0; } - - - - - - - - - - - - - |