Skip to content

Commit eeece59

Browse files
committed
C++: One more speedup, address review.
1 parent 4405547 commit eeece59

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cpp/ql/src/semmle/code/cpp/Element.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ElementBase extends @element {
6666
* `BinaryOperation` is not.
6767
*
6868
* This predicate can have multiple results if multiple primary classes match.
69-
* For some elements, this predicate may not exist.
69+
* For some elements, this predicate may not have a result.
7070
*/
7171
string getAPrimaryQlClass() { none() }
7272
}

cpp/ql/src/semmle/code/cpp/PrintAST.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,11 @@ class PrintASTNode extends TPrintASTNode {
237237

238238
private class PrintableElementBase extends ElementBase {
239239
PrintableElementBase() {
240-
shouldPrintFunction(getEnclosingFunction(this))
240+
exists(TASTNode(this))
241241
or
242-
this instanceof Type
242+
exists(TDeclarationEntryNode(_, this))
243243
or
244-
this instanceof DeclarationEntry
244+
this instanceof Type
245245
}
246246

247247
pragma[noinline]

0 commit comments

Comments
 (0)