FOC/L4RE: Upstream revision 47
This commit is contained in:
@@ -13,7 +13,7 @@ TOOL_TESTS = mapping mapping_inline random random_inline extern_c static \
|
||||
parser parser_noinline \
|
||||
multifile variable line line_not line_nh interface comment_in_string \
|
||||
default_args drop_single1 drop_single2 drop_single3 drop_multi1 \
|
||||
drop_multi2
|
||||
drop_multi2 implement_template
|
||||
|
||||
mapping_inline_src = mapping
|
||||
mapping_inline_flags = -i
|
||||
|
||||
31
tools/preprocess/test/implement_template.cpp
Normal file
31
tools/preprocess/test/implement_template.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
INTERFACE:
|
||||
|
||||
template< typename T >
|
||||
class Test
|
||||
{
|
||||
public:
|
||||
void test_func();
|
||||
};
|
||||
|
||||
|
||||
IMPLEMENTATION:
|
||||
|
||||
IMPLEMENT
|
||||
template< typename T >
|
||||
// comment
|
||||
void __attribute__((deprecated))
|
||||
Test<T>::test_func()
|
||||
{
|
||||
}
|
||||
|
||||
PUBLIC
|
||||
template< typename T > // comment 1
|
||||
template<
|
||||
typename X, // comment within template args list
|
||||
typename X2 // another comment in tl args
|
||||
>
|
||||
// comment 2
|
||||
void __attribute__((deprecated))
|
||||
Test<T>::test_func2<X, X2>()
|
||||
{
|
||||
}
|
||||
5
tools/preprocess/test/verify/implement_template.cc
Normal file
5
tools/preprocess/test/verify/implement_template.cc
Normal file
@@ -0,0 +1,5 @@
|
||||
// AUTOMATICALLY GENERATED -- DO NOT EDIT! -*- c++ -*-
|
||||
|
||||
#include "implement_template.h"
|
||||
#include "implement_template_i.h"
|
||||
|
||||
58
tools/preprocess/test/verify/implement_template.h
Normal file
58
tools/preprocess/test/verify/implement_template.h
Normal file
@@ -0,0 +1,58 @@
|
||||
// AUTOMATICALLY GENERATED -- DO NOT EDIT! -*- c++ -*-
|
||||
|
||||
#ifndef implement_template_h
|
||||
#define implement_template_h
|
||||
|
||||
//
|
||||
// INTERFACE definition follows
|
||||
//
|
||||
|
||||
#line 2 "implement_template.cpp"
|
||||
|
||||
template< typename T >
|
||||
class Test
|
||||
{
|
||||
public:
|
||||
void test_func();
|
||||
|
||||
public:
|
||||
#line 23 "implement_template.cpp"
|
||||
// comment 2
|
||||
// comment 1
|
||||
template<
|
||||
typename X, // comment within template args list
|
||||
typename X2 // another comment in tl args
|
||||
> void __attribute__((deprecated))
|
||||
test_func2<X,X2>();
|
||||
};
|
||||
|
||||
//
|
||||
// IMPLEMENTATION of function templates
|
||||
//
|
||||
|
||||
|
||||
#line 12 "implement_template.cpp"
|
||||
|
||||
|
||||
|
||||
// comment
|
||||
template< typename T > void __attribute__((deprecated))
|
||||
Test<T>::test_func()
|
||||
{
|
||||
}
|
||||
|
||||
#line 20 "implement_template.cpp"
|
||||
|
||||
|
||||
|
||||
// comment 2
|
||||
// comment 1
|
||||
template< typename T > template<
|
||||
typename X, // comment within template args list
|
||||
typename X2 // another comment in tl args
|
||||
> void __attribute__((deprecated))
|
||||
Test<T>::test_func2<X,X2>()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // implement_template_h
|
||||
6
tools/preprocess/test/verify/implement_template_i.h
Normal file
6
tools/preprocess/test/verify/implement_template_i.h
Normal file
@@ -0,0 +1,6 @@
|
||||
// AUTOMATICALLY GENERATED -- DO NOT EDIT! -*- c++ -*-
|
||||
|
||||
#ifndef implement_template_i_h
|
||||
#define implement_template_i_h
|
||||
|
||||
#endif // implement_template_i_h
|
||||
@@ -15,6 +15,7 @@ class Foo
|
||||
public:
|
||||
// A long, multiline comment in front of this function definition.
|
||||
// Also, a lot of specifiers that need to be handled.
|
||||
|
||||
static void func1();
|
||||
};
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
// A long, multiline comment in front of this function definition.
|
||||
// Also, a lot of specifiers that need to be handled.
|
||||
|
||||
|
||||
void
|
||||
Foo::func1()
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@ class Foo
|
||||
public:
|
||||
// A long, multiline comment in front of this function definition.
|
||||
// Also, a lot of specifiers that need to be handled.
|
||||
|
||||
static void func1();
|
||||
};
|
||||
|
||||
|
||||
@@ -17,17 +17,21 @@ public:
|
||||
void *
|
||||
operator new(size_t); // funny comment
|
||||
|
||||
|
||||
#line 16 "operator.cpp"
|
||||
Foo&
|
||||
operator+(const Foo&); // funny comment
|
||||
|
||||
|
||||
#line 22 "operator.cpp"
|
||||
Foo&
|
||||
operator=(const Foo&); // funny comment
|
||||
|
||||
|
||||
#line 28 "operator.cpp"
|
||||
Foo&
|
||||
operator*(const Foo&); // funny comment
|
||||
|
||||
};
|
||||
|
||||
#line 34 "operator.cpp"
|
||||
|
||||
@@ -12,13 +12,3 @@ create_stack<int>()
|
||||
{
|
||||
return new stack<int>();
|
||||
}
|
||||
|
||||
#line 192 "template.cpp"
|
||||
|
||||
|
||||
|
||||
template <> stack_t<bool>*
|
||||
create_stack<bool>()
|
||||
{
|
||||
return new stack<bool>();
|
||||
}
|
||||
|
||||
@@ -109,9 +109,24 @@ template <> stack_t<int>*
|
||||
create_stack();
|
||||
|
||||
#line 195 "template.cpp"
|
||||
template <> stack_t<bool>*
|
||||
template <> inline stack_t<bool>*
|
||||
create_stack();
|
||||
|
||||
//
|
||||
// IMPLEMENTATION of inline functions (and needed classes)
|
||||
//
|
||||
|
||||
|
||||
#line 192 "template.cpp"
|
||||
|
||||
|
||||
|
||||
template <> inline stack_t<bool>*
|
||||
create_stack<bool>()
|
||||
{
|
||||
return new stack<bool>();
|
||||
}
|
||||
|
||||
//
|
||||
// IMPLEMENTATION of function templates
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user