FOC/L4RE: Upstream revision 47

This commit is contained in:
Sebastian Sumpf
2013-02-20 12:17:17 +01:00
parent 34af60da11
commit b22db346c8
127 changed files with 1856 additions and 1965 deletions

View File

@@ -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

View 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>()
{
}

View File

@@ -0,0 +1,5 @@
// AUTOMATICALLY GENERATED -- DO NOT EDIT! -*- c++ -*-
#include "implement_template.h"
#include "implement_template_i.h"

View 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

View 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

View File

@@ -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();
};

View File

@@ -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()
{

View File

@@ -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();
};

View File

@@ -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"

View File

@@ -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>();
}

View File

@@ -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
//