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

Skip to content

Commit 668764c

Browse files
committed
C++: Make new predicates private.
1 parent 8c925a2 commit 668764c

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -546,17 +546,8 @@ class FunctionNode extends ASTNode {
546546
}
547547

548548
override string getChildAccessorPredicate(int childIndex) {
549-
childIndex = 0 and
550-
result = "..."
551-
or
552-
childIndex = 1 and
553-
result = "..."
554-
or
555549
childIndex = 2 and
556550
result = "getEntryPoint()"
557-
or
558-
childIndex = 3 and
559-
result = "..."
560551
}
561552

562553
override string getChildEdgeLabelInternal(int childIndex) {
@@ -642,7 +633,7 @@ string getChildAccessor(Locatable parent, Element child) {
642633
)
643634
}
644635

645-
predicate namedStmtChildPredicates(Locatable s, Element e, string pred) {
636+
private predicate namedStmtChildPredicates(Locatable s, Element e, string pred) {
646637
shouldPrintFunction(getEnclosingFunction(s)) and
647638
(
648639
exists(int n | s.(BlockStmt).getStmt(n) = e and pred = "getStmt(" + n + ")")
@@ -724,7 +715,7 @@ predicate namedStmtChildPredicates(Locatable s, Element e, string pred) {
724715
)
725716
}
726717

727-
predicate namedExprChildPredicates(Expr expr, Element ele, string pred) {
718+
private predicate namedExprChildPredicates(Expr expr, Element ele, string pred) {
728719
shouldPrintFunction(expr.getEnclosingFunction()) and
729720
(
730721
expr.(Access).getTarget() = ele and pred = "getTarget()"

0 commit comments

Comments
 (0)