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

Ast visitor function for using declarations. #645

Merged
merged 9 commits into from
Nov 13, 2023

Conversation

schaumb
Copy link
Collaborator

@schaumb schaumb commented Oct 11, 2023

Based on #487, it resolves #305

Manually:

  • Test with multiple namespaces
  • Test with multiple files with the same namespace
  • Test with nested namespaces
  • Using namespace with rename - OK, but namespace Cica = ::MyNamespace; fails
  • Using class with rename (works as typedef)

@schaumb schaumb self-assigned this Oct 11, 2023
@schaumb schaumb added Kind: Enhancement 🌟 Plugin: C++ Issues related to the parsing and presentation of C++ projects. labels Oct 11, 2023
@schaumb schaumb added this to the Release Gershwin milestone Oct 11, 2023
@whisperity
Copy link
Collaborator

In general, I am fine with this. However, there is something I really do not understand in the tests. So, there is a function call to g() in the test function. That call should(?) resolve to the void g() {} as defined on line 21. But nowhere in the tests does the number 21 appear... I might just be seeing ghosts here because something is indexed from 0 instead of 1 (the number 20 appears as a line number in the test!), but it's nevertheless curious.

@schaumb
Copy link
Collaborator Author

schaumb commented Nov 7, 2023

In general, I am fine with this. However, there is something I really do not understand in the tests. So, there is a function call to g() in the test function. That call should(?) resolve to the void g() {} as defined on line 21. But nowhere in the tests does the number 21 appear... I might just be seeing ghosts here because something is indexed from 0 instead of 1 (the number 20 appears as a line number in the test!), but it's nevertheless curious.

Hi @whisperity ,
The test is about using, but none using directives use the global g function.
This free g function tests that using MyNamespace::g.line does not link to all g functions and the global g function call is not linked to the using line. That's why there are no explicit tests for the g function

Copy link
Collaborator

@mcserep mcserep left a comment

Choose a reason for hiding this comment

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

Great work @schaumb! 🏆

@mcserep mcserep merged commit e23b1dc into Ericsson:master Nov 13, 2023
7 checks passed
wbqpk3 pushed a commit to wbqpk3/CodeCompass that referenced this pull request Jul 8, 2024
Co-authored-by: Bendegúz Filyó <filyo.bendeguz@hallgato.ppke.hu>
Co-authored-by: Máté Cserép <mcserep@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kind: Enhancement 🌟 Plugin: C++ Issues related to the parsing and presentation of C++ projects.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"using" declarative is not handled
4 participants