C++: Rename shouldPrintFunction to shouldPrintDeclaration

This commit is contained in:
Jeroen Ketema
2023-07-19 16:23:21 +02:00
parent 0a0e9bb25b
commit 2a63116fc2
14 changed files with 96 additions and 88 deletions

View File

@@ -7,5 +7,5 @@ private import semmle.code.cpp.PrintAST
private import PrintConfig
private class PrintConfig extends PrintAstConfiguration {
override predicate shouldPrintFunction(Function func) { shouldDumpFunction(func) }
override predicate shouldPrintDeclaration(Declaration decl) { shouldDumpDeclaration(decl) }
}

View File

@@ -8,11 +8,11 @@ predicate locationIsInStandardHeaders(Location loc) {
}
/**
* Holds if the AST or IR for the specified function should be printed in the test output.
* Holds if the AST or IR for the specified declaration should be printed in the test output.
*
* This predicate excludes functions defined in standard headers.
* This predicate excludes declarations defined in standard headers.
*/
predicate shouldDumpFunction(Declaration decl) {
predicate shouldDumpDeclaration(Declaration decl) {
not locationIsInStandardHeaders(decl.getLocation()) and
(
decl instanceof Function

View File

@@ -7,5 +7,5 @@ private import semmle.code.cpp.ir.implementation.raw.PrintIR
private import PrintConfig
private class PrintConfig extends PrintIRConfiguration {
override predicate shouldPrintFunction(Declaration decl) { shouldDumpFunction(decl) }
override predicate shouldPrintDeclaration(Declaration decl) { shouldDumpDeclaration(decl) }
}