diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-01 12:38:43 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-01 12:38:43 +0900 |
commit | b67b7f2b784c7105e88a5e639d9d84736ae2cbc1 (patch) | |
tree | 0fd16d439c681c07d57d7f0d544c7582e04c3a31 /debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/60112-sp_before_not_var_ptr_star.cpp | |
parent | c0a6f1b84c84749908961579b84513fd9f9d9eac (diff) | |
download | extra-dependencies-b67b7f2b784c7105e88a5e639d9d84736ae2cbc1.tar.gz extra-dependencies-b67b7f2b784c7105e88a5e639d9d84736ae2cbc1.zip |
uncrustify-trinity: updated based on upstream version 0.78.1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/60112-sp_before_not_var_ptr_star.cpp')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/60112-sp_before_not_var_ptr_star.cpp | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/60112-sp_before_not_var_ptr_star.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/60112-sp_before_not_var_ptr_star.cpp new file mode 100644 index 00000000..4937f7a0 --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/cpp/60112-sp_before_not_var_ptr_star.cpp @@ -0,0 +1,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 *; |