Skip to content

Commit ea23c2d

Browse files
author
Dave Bartolomeo
authored
Merge pull request #2188 from jbj/printast-override
C++: Add a sample class in PrintAST.ql
2 parents e6f632b + 8f58e7e commit ea23c2d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,15 @@
77

88
import cpp
99
import PrintAST
10+
11+
/**
12+
* Temporarily tweak this class or make a copy to control which functions are
13+
* printed.
14+
*/
15+
class Cfg extends PrintASTConfiguration {
16+
/**
17+
* TWEAK THIS PREDICATE AS NEEDED.
18+
* Holds if the AST for `func` should be printed.
19+
*/
20+
override predicate shouldPrintFunction(Function func) { any() }
21+
}

0 commit comments

Comments
 (0)