-
Notifications
You must be signed in to change notification settings - Fork 2
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
C++ Fixes #125
Draft
giulianobelinassi
wants to merge
8
commits into
SUSE:main
Choose a base branch
from
giulianobelinassi:c++
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
C++ Fixes #125
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@giulianobelinassi can you rebase? |
I am still working on it. |
Ok! |
giulianobelinassi
force-pushed
the
c++
branch
from
September 25, 2024 22:19
6b9a4ea
to
5073600
Compare
C++ have `UsingType` which is not traversed by TraverseType, so do it in the Visitor. Signed-off-by: Giuliano Belinassi <[email protected]>
TraverseTemplateName does not handle TemplateDecl nor UsingShadowDecl. Do it on the visitor. Signed-off-by: Giuliano Belinassi <[email protected]>
C++ can specify partial template declarations which can implement additional things that the original declaration doesn't have. Here we try to match if a certain declaration comes from a specific specification by matching the Identifier on a DependentNameType, but that is not always possible so we also add all ClassTemplatePartialSpecializationDecl for a ClassTemplateDecl to the closure until we do not find a better way of doing this. Signed-off-by: Giuliano Belinassi <[email protected]>
VarTemplateSpecializations should not be treated as VarDecls, otherwise we lose the template<> argument. Signed-off-by: Giuliano Belinassi <[email protected]>
C++ have the `using` keyword which can act like typedefs. Visit those as well. Signed-off-by: Giuliano Belinassi <[email protected]>
Constructions such as `extern "C"` are modeled as LinkageSpecDecl, which we need to analyze as well. Signed-off-by: Giuliano Belinassi <[email protected]>
PrettyPrint::Contains_From_LineCol had a bug in which Decls that do not contain themselves were marked as such because two files ended up having the same FileID because of preprocessed notation (example: # 1 "file"). Fix this by dropping this function in favor of Range_Fully_Contains_Range, which uses the expanded location. Signed-off-by: Giuliano Belinassi <[email protected]>
giulianobelinassi
force-pushed
the
c++
branch
from
September 26, 2024 12:59
5073600
to
9c0254f
Compare
Due to the recursive nature of C++, we must make sure we added all Decls up to the root (TranslationUnitDecl) of the AST to the output, else we might miss important decls. Signed-off-by: Giuliano Belinassi <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve analysis on C++ code.
UsingType
.TemplateSpecializationType
'sTemplateType
andUsingShadowDecl
.