Skip to content

Commit 1afd32c

Browse files
committed
C++: Add comment, rename class.
1 parent eeece59 commit 1afd32c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,11 @@ class PrintASTNode extends TPrintASTNode {
235235
private Function getEnclosingFunction() { result = getParent*().(FunctionNode).getFunction() }
236236
}
237237

238-
private class PrintableElementBase extends ElementBase {
239-
PrintableElementBase() {
238+
/**
239+
* Class that restricts the elements that we compute `qlClass` for.
240+
*/
241+
private class PrintableElement extends Element {
242+
PrintableElement() {
240243
exists(TASTNode(this))
241244
or
242245
exists(TDeclarationEntryNode(_, this))
@@ -251,7 +254,7 @@ private class PrintableElementBase extends ElementBase {
251254
/**
252255
* Retrieves the canonical QL class(es) for entity `el`
253256
*/
254-
private string qlClass(PrintableElementBase el) {
257+
private string qlClass(PrintableElement el) {
255258
result = "[" + concat(el.getAPrimaryQlClass0(), ",") + "] "
256259
// Alternative implementation -- do not delete. It is useful for QL class discovery.
257260
//result = "["+ concat(el.getAQlClass(), ",") + "] "

0 commit comments

Comments
 (0)