C++: Add a sample class in PrintAST.ql

I've found myself typing out this class whenever I want to print the AST
of one function. I hope it will be useful to others too.
This commit is contained in:
Jonas Jensen
2019-10-24 14:46:10 +02:00
parent 1c79ec550e
commit 8e31b8167a

View File

@@ -7,3 +7,12 @@
import cpp
import PrintAST
/**
* Temporarily tweak this class or make a copy to control which functions are
* printed.
*/
class Cfg extends PrintASTConfiguration {
/** Holds if the AST for `func` should be printed. */
override predicate shouldPrintFunction(Function func) { any() }
}