Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4276d1f

Browse files
committed
C++: Add missing comment and update test results.
1 parent 7e667b9 commit 4276d1f

3 files changed

Lines changed: 457 additions & 453 deletions

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ class PrintASTNode extends TPrintASTNode {
182182
result = childIndex.toString()
183183
}
184184

185+
/**
186+
* Gets the QL predicate that can be used to access the child at `childIndex`.
187+
* May not hold for all children, see for example `FunctionNode`.
188+
*/
185189
abstract string getChildAccessorPredicate(int childIndex);
186190

187191
/**
@@ -616,7 +620,7 @@ class ArrayAggregateLiteralNode extends ExprNode {
616620
}
617621
}
618622

619-
string getChildAccessor(Locatable parent, Element child) {
623+
private string getChildAccessor(Locatable parent, Element child) {
620624
shouldPrintFunction(getEnclosingFunction(parent)) and
621625
(
622626
exists(Stmt s | s = parent.(Stmt) |

0 commit comments

Comments
 (0)