summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/60120-sp_before_not_var_ptr_star.cpp
blob: 4937f7a0b8ccb434133b90b7d636fc1843c912d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#include <stdio.h>

char* const*foo1 = (char* const*)"foo";
char* const  *foo2 = (char* const  *)"foo";

char * const*foo3 = (char* const*)"foo";
char   * const  *foo4 = (char* const  *)"foo";
char   * const  *foo5 = (char* const  *)"foo";
char*const*foo6 = (char*const*)"foo";

char* const*foo7(char* const*);
char* const  *foo8(char* const  *);

int*const *bar0(int);
char*const*bar1(char* const*);
char*const  *bar2(char* const  *);
char  *const  *bar3(char* const  *);
char *const  *bar4(char* const  *);

void *operator new(int size);
void*operator new(int size);
void*    operator new(int size);
void     *operator new(int size);
void* operator new(int size);

void *::alloc1(int size);
void*::alloc2(int size);
void* ::alloc3(int size);
void * ::alloc4(int size);
void     * ::alloc5(int size);
void     *     ::alloc6(int size);


class Test {
void* method1();
void *method2();
void  *method3();
void*  method4();
void  *  method5();
};

void* Test::method1() {
	return nullptr;
}
void *Test::method2() {
	return NULL;
}
void  *Test::method3() {
	return NULL;
}
void*  Test::method4() {
	return nullptr;
}
void  *  Test::method5() {
	return 0;
}


namespace testing {

int *func1();
int*func2();
int *func3();
int*func4();
int*func5();

namespace test {
int *foo();
}

}

int *testing::func1() {
	return nullptr;
}
int* testing::func2() {
	return NULL;
}
int   *testing::func3() {
	return nullptr;
}
int * testing::func4() {
	return NULL;
}
int  *  testing::func5() {
	return NULL;
}

int*testing::test::foo()
{
	return NULL;
}

namespace Bar {

class Foo {
int*operator[] (int x) {
}

Foo *get();
}

}

Bar::Foo*Bar::Foo::get() {
}

void* not_malloc(const int);

void*::not_malloc(const int n)
{
}

int main()
{
	void (* name)();

	int *const *x;
	int *const*x;
	(int* )x;
	(const int *const)x;
	(int const*)x;
	(int const *)x;
	int y = 2+*x;
	return 0;
}

auto baz1() -> char* const*;
auto baz2() -> char* const  *;
auto baz3() -> char * const  *;
auto baz4() -> char*const  *;