[GH-ISSUE #295] Asist++ doesn't handle variables in class that are out of order #93

Open
opened 2026-05-05 03:39:19 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @klugier on GitHub (Aug 24, 2025).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/295

The Assist++ doesn't work for following code:

#include <Core/Core.h>

using namespace Upp;

class Foo {
public:
	Foo() {
		numbers.// <- In this place Assist++ claims that "No relevant autocomplete found"
	}
	
private:
	Vector<int> numbers;
};

CONSOLE_APP_MAIN
{
}

However when the order or public and private will be changed, everything works as expected:

#include <Core/Core.h>

using namespace Upp;

class Foo {
private:
	Vector<int> numbers;

public:
	Foo() {
		numbers.// <- In this place Assist++ claims that "No relevant autocomplete found"
	}
};

CONSOLE_APP_MAIN
{
}

Also, for this code Assist++ works as expected:

class Foo {
public:
	Foo();
	
private:
	Vector<int> numbers;
};

Foo::Foo() {
	numbers.// <- In this place Assist++ works as expected
}

To sum up, the first example should work without any problems. It is perfectly valid c++ code and it is common pattern to provide public variables at the top and then private at the bottom.

Originally created by @klugier on GitHub (Aug 24, 2025). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/295 The Assist++ doesn't work for following code: ``` #include <Core/Core.h> using namespace Upp; class Foo { public: Foo() { numbers.// <- In this place Assist++ claims that "No relevant autocomplete found" } private: Vector<int> numbers; }; CONSOLE_APP_MAIN { } ``` However when the order or public and private will be changed, everything works as expected: ``` #include <Core/Core.h> using namespace Upp; class Foo { private: Vector<int> numbers; public: Foo() { numbers.// <- In this place Assist++ claims that "No relevant autocomplete found" } }; CONSOLE_APP_MAIN { } ``` Also, for this code Assist++ works as expected: ``` class Foo { public: Foo(); private: Vector<int> numbers; }; Foo::Foo() { numbers.// <- In this place Assist++ works as expected } ``` To sum up, the first example should work without any problems. It is perfectly valid c++ code and it is common pattern to provide public variables at the top and then private at the bottom.
Author
Owner

@mirek-fidler commented on GitHub (Aug 25, 2025):

Fair enough, very hard / impossible to solve. libclang only sees source up
to '.'

Mirek

On Mon, Aug 25, 2025 at 12:39 AM Zbigniew Rębacz @.***>
wrote:

klugier created an issue (ultimatepp/ultimatepp#295)
https://github.com/ultimatepp/ultimatepp/issues/295

The Assist++ doesn't work for following code:

#include <Core/Core.h>

using namespace Upp;

class Foo {
public:
Foo() {
numbers.// <- In this place Assist++ claims that "No relevant autocomplete found"
}

private:
Vector numbers;
};

CONSOLE_APP_MAIN
{
}

However when the order or public and private will be changed, everything
works as expected:

#include <Core/Core.h>

using namespace Upp;

class Foo {
private:
Vector numbers;

public:
Foo() {
numbers.// <- In this place Assist++ claims that "No relevant autocomplete found"
}
};

CONSOLE_APP_MAIN
{
}

Also, for this code Assist++ works as expected:

class Foo {
public:
Foo();

private:
Vector numbers;
};

Foo::Foo() {
numbers.
}

To sum up, the first example should work without any problems. It is
perfectly valid c++ code and it is common pattern to provide public
variables at the top and then private at the bottom.


Reply to this email directly, view it on GitHub
https://github.com/ultimatepp/ultimatepp/issues/295, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARH237EDM4EEAPMX5JLHBT3PI5IXAVCNFSM6AAAAACEWFBQ3KVHI2DSMVQWIX3LMV43ASLTON2WKOZTGM2DSOJWHE3TCMA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

<!-- gh-comment-id:3219155719 --> @mirek-fidler commented on GitHub (Aug 25, 2025): Fair enough, very hard / impossible to solve. libclang only sees source up to '.' Mirek On Mon, Aug 25, 2025 at 12:39 AM Zbigniew Rębacz ***@***.***> wrote: > *klugier* created an issue (ultimatepp/ultimatepp#295) > <https://github.com/ultimatepp/ultimatepp/issues/295> > > The Assist++ doesn't work for following code: > > #include <Core/Core.h> > > using namespace Upp; > > class Foo { > public: > Foo() { > numbers.// <- In this place Assist++ claims that "No relevant autocomplete found" > } > > private: > Vector<int> numbers; > }; > > CONSOLE_APP_MAIN > { > } > > However when the order or public and private will be changed, everything > works as expected: > > #include <Core/Core.h> > > using namespace Upp; > > class Foo { > private: > Vector<int> numbers; > > public: > Foo() { > numbers.// <- In this place Assist++ claims that "No relevant autocomplete found" > } > }; > > CONSOLE_APP_MAIN > { > } > > Also, for this code Assist++ works as expected: > > class Foo { > public: > Foo(); > > private: > Vector<int> numbers; > }; > > Foo::Foo() { > numbers. > } > > To sum up, the first example should work without any problems. It is > perfectly valid c++ code and it is common pattern to provide public > variables at the top and then private at the bottom. > > — > Reply to this email directly, view it on GitHub > <https://github.com/ultimatepp/ultimatepp/issues/295>, or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AARH237EDM4EEAPMX5JLHBT3PI5IXAVCNFSM6AAAAACEWFBQ3KVHI2DSMVQWIX3LMV43ASLTON2WKOZTGM2DSOJWHE3TCMA> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >
Author
Owner

@mirek-fidler commented on GitHub (Aug 25, 2025):

It is perfectly valid c++ code

C:\upp\MyApps\assist_h\assist_h.cpp:9:2: error: expected unqualified-id

But I will try to think about it anyway; maybe there is a way to perform some kind of voodoo ritual and reorganize the code. Like finding boundaries of current inline, move it down before class clossing }

<!-- gh-comment-id:3219206434 --> @mirek-fidler commented on GitHub (Aug 25, 2025): > It is perfectly valid c++ code C:\upp\MyApps\assist_h\assist_h.cpp:9:2: error: expected unqualified-id But I will try to think about it anyway; maybe there is a way to perform some kind of voodoo ritual and reorganize the code. Like finding boundaries of current inline, move it down before class clossing }
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#93
No description provided.