File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
cpp/ql/src/semmle/code/cpp Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class Parameter extends LocalScopeVariable, @parameter {
3636 * 1. The name given to the parameter at the function's definition or
3737 * (for catch block parameters) at the catch block.
3838 * 2. A name given to the parameter at a function declaration.
39- * 3. The name "p#i " where i is the index of the parameter.
39+ * 3. The name "(unnamed parameter i) " where i is the index of the parameter.
4040 */
4141 override string getName ( ) {
4242 exists ( VariableDeclarationEntry vde |
@@ -46,7 +46,7 @@ class Parameter extends LocalScopeVariable, @parameter {
4646 )
4747 or
4848 not exists ( getANamedDeclarationEntry ( ) ) and
49- result = "p# " + this .getIndex ( ) .toString ( )
49+ result = "(unnamed parameter " + this .getIndex ( ) .toString ( ) + ")"
5050 }
5151
5252 override string getAPrimaryQlClass ( ) { result = "Parameter" }
@@ -111,7 +111,8 @@ class Parameter extends LocalScopeVariable, @parameter {
111111 * Holds if this parameter has a name.
112112 *
113113 * In other words, this predicate holds precisely when the result of
114- * `getName()` is not "p#i" (where `i` is the index of the parameter).
114+ * `getName()` is not "(unnamed parameter i)" (where `i` is the index
115+ * of the parameter).
115116 */
116117 predicate isNamed ( ) { exists ( getANamedDeclarationEntry ( ) ) }
117118
You can’t perform that action at this time.
0 commit comments