mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
C++: One more speedup, address review.
This commit is contained in:
@@ -66,7 +66,7 @@ class ElementBase extends @element {
|
||||
* `BinaryOperation` is not.
|
||||
*
|
||||
* This predicate can have multiple results if multiple primary classes match.
|
||||
* For some elements, this predicate may not exist.
|
||||
* For some elements, this predicate may not have a result.
|
||||
*/
|
||||
string getAPrimaryQlClass() { none() }
|
||||
}
|
||||
|
||||
@@ -237,11 +237,11 @@ class PrintASTNode extends TPrintASTNode {
|
||||
|
||||
private class PrintableElementBase extends ElementBase {
|
||||
PrintableElementBase() {
|
||||
shouldPrintFunction(getEnclosingFunction(this))
|
||||
exists(TASTNode(this))
|
||||
or
|
||||
exists(TDeclarationEntryNode(_, this))
|
||||
or
|
||||
this instanceof Type
|
||||
or
|
||||
this instanceof DeclarationEntry
|
||||
}
|
||||
|
||||
pragma[noinline]
|
||||
|
||||
Reference in New Issue
Block a user