Skip to content

Commit 2472b40

Browse files
committed
C++: Fix test comments.
1 parent 1d04c89 commit 2472b40

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

  • cpp/ql/test/query-tests/Best Practices/Hiding/DeclarationHidesParameter

cpp/ql/test/query-tests/Best Practices/Hiding/DeclarationHidesParameter/hiding.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
void f(int ii) {
33
if (1) {
4-
for(int ii = 1; ii < 10; ii++) { // local variable hides global variable
4+
for(int ii = 1; ii < 10; ii++) { // local variable hides parameter of the same name
55
;
66
}
77
}
@@ -12,7 +12,7 @@ namespace foo {
1212
void f2(int ii, int kk) {
1313
try {
1414
for (ii = 0; ii < 3; ii++) {
15-
int kk; // local variable hides global variable
15+
int kk; // local variable hides parameter of the same name
1616
}
1717
}
1818
catch (int ee) {
@@ -25,7 +25,7 @@ void myFunction(int a, int b, int c);
2525

2626
void myFunction(int a, int b, int _c) {
2727
{
28-
int a = a; // local variable hides global variable
28+
int a = a; // local variable hides parameter of the same name
2929
int _b = b;
3030
int c = _c;
3131

@@ -42,7 +42,7 @@ class MyTemplateClass {
4242
template<class T>
4343
void MyTemplateClass<T> :: myMethod(int a, int b, int _c) {
4444
{
45-
int a = a; // local variable hides global variable
45+
int a = a; // local variable hides parameter of the same name
4646
int _b = b;
4747
int c = _c;
4848

@@ -61,7 +61,7 @@ void test() {
6161
void testMacro(int i) {
6262
MYMACRO;
6363

64-
for (int i = 0; i < 10; i++) {}; // local variable hides global variable
64+
for (int i = 0; i < 10; i++) {}; // local variable hides parameter of the same name
6565
}
6666

6767
#include "hiding.h"
@@ -75,7 +75,7 @@ void myClass::myMethod(int arg1, T arg2) {
7575
{
7676
int protoArg1;
7777
T protoArg2;
78-
int arg1; // local variable hides global variable
79-
T arg2; // local variable hides global variable
78+
int arg1; // local variable hides parameter of the same name
79+
T arg2; // local variable hides parameter of the same name
8080
}
8181
}

0 commit comments

Comments
 (0)