Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pointer return type appears to be treated as sp_arith for the first method after an access specifier #4277

Open
AnthonySWest opened this issue Apr 16, 2024 · 0 comments

Comments

@AnthonySWest
Copy link

Uncrustify version 0.78.1 (also occurs in latest commit for the master branch - 42cbc77).

Use the default config settings, but set sp_arith to force.

In a class, the first function after an access specifier, when returning a pointer, with the presence of calling conventions (e.g. __cdecl, __fastcall), the pointer appears to be incorrectly treated as sp_arith.

Expected results:

#ifndef TestSPArithH
#define TestSPArithH

class Test
{
public:
    Test* __fascall TestMethod1();
    Test* __fascall TestMethod2();
};
#endif

Actual results:

#ifndef TestSPArithH
#define TestSPArithH

class Test
{
public:
    Test * __fascall TestMethod1(); // The '*' on this line appears to be incorrectly treated as "sp_arith"
    Test* __fascall TestMethod2();  // This line is fine
};
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants