-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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#: Move qualified name computation into QualifiedName.qll
#14657
Conversation
c5c4295
to
399327e
Compare
399327e
to
c717e34
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added some questions.
vort instanceof VoidType and | ||
qualifier = "System" and | ||
name = "Void" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to special case VoidType
?
Couldn't the below cover it?
not exists(vort.getDeclaringType()) and
qualifier = vort.getNamespace().getFullName() and
name = vort.getUndecoratedName()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps; I just copied over the existing logic.
qualifier = "System" and | ||
name = "Nullable<" + getFullName(vort.(NullableType).getUnderlyingType()) + ">" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? NullableType
is a subclass of ConstructedType
, couldn't the below any(ConstructedType ct | ...
cover nullable types too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I just copied it from the existing setup, but I can try to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Also great to collect all the logic printing the qualified name in one place.
This PR moves the logic for computing fully qualified names into
QualifiedName.qll
, and makes it parameterized on how to print unbound generics. This is in preparation for a change to the Models-as-Data format for C#.