-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C++: more conservative resolveClass #202
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
Conversation
These tests exercise the problematic cases where a variable can appear to have multiple types because of how we fail to account for qualified names when comparing type names.
Also exclude templates as their names are not canonical. The test changes in `isfromtemplateinstantiation/` are the inverses of what we got in 34c9892, which should be a good thing.
That job compared an ODASA build to itself. I've started another one here: https://jenkins.internal.semmle.com/job/Query-Changes/job/CPP-Differences/412/ |
Good catch! Does the CPP-Differences job not respect qlSubmoduleShaOverride? Or did I put the wrong SHA? |
It doesn't know about |
The query changes LGTM. They have the following summary:
I assume the change to The |
HardCodedCredentials: fix query metadata comment
Change locations of parameterized types to class file
This PR ensures that
resolveClass
never returns more than one result and does not attempt to match classes by name if they are templates or are nested in a name space or another class. This fixes the problem on LGTM where ChakraCore analysis went into an infinite loop ingetQualifiedName
because a class appeared to be nested within itself due to name clashes.A more thorough fix would be to match classes by fully-qualified name, either with a string or a
newtype
, but at this point in the release cycle I'm proposing a more minimal fix.The code change here is the same as in #198, where the CPP-Differences job found no query changes. I've extended the tests to try and show the effects of each commit.