Skip to content

Commit 7f2d485

Browse files
committed
C++: Update comment
1 parent c2871f4 commit 7f2d485

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cpp/ql/lib/semmle/code/cpp/models/interfaces/FormattingFunction.qll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction {
118118

119119
/**
120120
* Gets the position of the first format argument, corresponding with
121-
* the first format specifier in the format string.
121+
* the first format specifier in the format string. We'll ignore all
122+
* implicit function definitions.
122123
*/
123124
int getFirstFormatArgumentIndex() {
124125
// The formatting function either has a definition in the snapshot, or all
@@ -132,7 +133,7 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction {
132133
/**
133134
* Gets a non-implicit function declaration entry.
134135
*/
135-
FunctionDeclarationEntry getAnExplicitDeclarationEntry() {
136+
private FunctionDeclarationEntry getAnExplicitDeclarationEntry() {
136137
result = this.getADeclarationEntry() and
137138
not result.isImplicit()
138139
}
@@ -142,7 +143,7 @@ abstract class FormattingFunction extends ArrayFunction, TaintFunction {
142143
* from implicit function declarations. If there is some inconsistency in the number
143144
* of parameters, then don't return anything.
144145
*/
145-
int getNumberOfExplicitParameters() {
146+
private int getNumberOfExplicitParameters() {
146147
forex(FunctionDeclarationEntry fde | fde = this.getAnExplicitDeclarationEntry() |
147148
result = fde.getNumberOfParameters()
148149
)

0 commit comments

Comments
 (0)