Draft
Conversation
Collaborator
|
@giulianobelinassi can you rebase? |
Collaborator
Author
|
I am still working on it. |
Collaborator
Ok! |
6b9a4ea to
5073600
Compare
C++ have `UsingType` which is not traversed by TraverseType, so do it in the Visitor. Signed-off-by: Giuliano Belinassi <gbelinassi@suse.de>
TraverseTemplateName does not handle TemplateDecl nor UsingShadowDecl. Do it on the visitor. Signed-off-by: Giuliano Belinassi <gbelinassi@suse.de>
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 <gbelinassi@suse.de>
VarTemplateSpecializations should not be treated as VarDecls, otherwise we lose the template<> argument. Signed-off-by: Giuliano Belinassi <gbelinassi@suse.de>
C++ have the `using` keyword which can act like typedefs. Visit those as well. Signed-off-by: Giuliano Belinassi <gbelinassi@suse.de>
Constructions such as `extern "C"` are modeled as LinkageSpecDecl, which we need to analyze as well. Signed-off-by: Giuliano Belinassi <gbelinassi@suse.de>
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 <gbelinassi@suse.de>
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 <gbelinassi@suse.de>
This file contains hidden or 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
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'sTemplateTypeandUsingShadowDecl.