Skip to content

Conversation

@harsszegi
Copy link

In case the "using" expression is used within a class declaration, the functions pulled by "using" are not recognized. This PR adds this, but only for constructors.


var functionName = GetCursorSpelling(cursor);
// This (not using 'cursor', but 'destinationCursor') is only used when we pulling in constructors from Foo, into Bar
// We are renming effectively the pulled in 'Foo' constructor into 'Bar'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renming -> renaming? (If yes, what do you mean by renaming the ctor into another class?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, exactly, with "using" if you have Bar : public Foo, when "using" is parsed in "Bar", you'll get Foo's constructors, e.g. "Foo::Foo", so when we add those to "Bar", we need to rename them to "Bar::Bar"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aok:)

// it only works with constructors
if (childCursor.Kind == CXCursorKind.CXCursor_OverloadedDeclRef)
{
// We simply

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the second half of the comment is missing.

In case the "using" expression is used within a class declaration, the
functions pulled by "using" are not recognized. This PR adds this, but only
for constructors.
@harsszegi harsszegi merged commit 9395218 into development Nov 29, 2023
@harsszegi harsszegi deleted the feature/fix_using branch November 29, 2023 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants