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

Sourcetrail fails to find implicit destructor calls #7

Closed
petermost opened this issue May 7, 2024 · 4 comments
Closed

Sourcetrail fails to find implicit destructor calls #7

petermost opened this issue May 7, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@petermost
Copy link
Owner

Copied from Sourcetrail issue: CoatiSoftware#839

Sourcetrail does not appear to find implicit destructor calls.

Being able to find destructor calls would be immensely helpful.

In the mean time, at the least it would be helpful for Sourcetrail to provide a warning message that it does not expect to find them.

@petermost petermost self-assigned this May 7, 2024
@petermost
Copy link
Owner Author

@catskul: The current indexer only uses the Clang AST, which doesn't provide that information.
This Stackoverflow answer "How to get information about call to destructors in Clang LibTooling?" shows that it is necessary to use the 'Control Flow Graph' (CFG) to retrieve that information.

@petermost
Copy link
Owner Author

Added with commit 0beeaa0

Please note:

  • Only non-trivial destructors are being indexed, because only those are detectable via CFG.
  • The source code location of the destructor call is always at the end of the function, because the CFG doesn't offer locations.

Maybe @mlangkabel or @egraether have a better idea, but they probably don't have time to support a Sourcetrail clone.

@petermost
Copy link
Owner Author

Disabled the detection/indexing of the destructor calls with commit bccad3b because of a crash (assertion) in CFG::buildCFG

@petermost petermost reopened this Jul 1, 2024
@petermost petermost added the bug Something isn't working label Jul 1, 2024
@petermost
Copy link
Owner Author

Re-enabled the detection/indexing of non-trivial destructor calls, now that Clang-18 is being used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant