C++: One more speedup, address review.

This commit is contained in:
Cornelius Riemenschneider
2020-11-20 09:56:08 +01:00
parent 4405547b04
commit eeece5937d
2 changed files with 4 additions and 4 deletions

View File

@@ -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() }
}

View File

@@ -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]