@@ -44,35 +44,46 @@ int Foo::test(int (*baz)(int))
4444 (void )i, // BAD
4545 (void )j;
4646
47+ if (1 ) FOO (i),
48+ (void )x.foo (j); // BAD
49+
4750 // Parenthesized comma (borderline example):
4851
4952 foo (i++), j++; // GOOD
5053 (foo (i++), j++); // GOOD
5154 (foo (i++), // GOOD
5255 j++);
5356 (foo (i++),
54- j++); // BAD (?)
57+ foo (i++),
58+ j++, // GOOD (?) -- Currently explicitly excluded
59+ j++);
5560
5661 x.foo (i++), j++; // GOOD
5762 (x.foo (i++), j++); // GOOD
5863 (x.foo (i++), // GOOD
5964 j++);
6065 (x.foo (i++),
61- j++); // BAD (?)
66+ x.foo (i++),
67+ j++, // GOOD (?) -- Currently explicitly excluded
68+ j++);
6269
6370 FOO (i++), j++; // GOOD
6471 (FOO (i++), j++); // GOOD
6572 (FOO (i++), // GOOD
6673 j++);
6774 (FOO (i++),
68- j++); // BAD (?)
75+ FOO (i++),
76+ j++, // GOOD (?) -- Currently explicitly excluded
77+ j++);
6978
7079 (void )(i++), j++; // GOOD
7180 ((void )(i++), j++); // GOOD
7281 ((void )(i++), // GOOD
7382 j++);
7483 ((void )(i++),
75- j++); // BAD (?)
84+ (void )(i++),
85+ j++, // GOOD (?) -- Currently explicitly excluded
86+ j++);
7687
7788 // Comma in argument list doesn't count:
7889
@@ -102,7 +113,7 @@ int Foo::test(int (*baz)(int))
102113 j++);
103114
104115 BAZ (" %d %d\n " , i,
105- j); // GOOD [FALSE POSITIVE] -- but can only be excluded by excluding all parenthesized commas (which sounds like a good idea actually)
116+ j); // GOOD -- Currently explicitly excluded
106117
107118 // Comma in loops
108119
@@ -128,10 +139,10 @@ int Foo::test(int (*baz)(int))
128139
129140 // Mixed tabs and spaces (ugly case):
130141
131- for (i = 0 , // GOOD if tab >= 4 spaces else BAD -- can't exclude w/o source code text :/
142+ for (i = 0 , // GOOD if tab >= 4 spaces else BAD -- Currently ignoring loop heads.
132143 j = 0 ;
133144 i + j < 10 ;
134- i++, // GOOD if tab >= 4 spaces else BAD -- can't exclude w/o source code text :/
145+ i++, // GOOD if tab >= 4 spaces else BAD -- Currently ignoring loop heads.
135146 j++);
136147
137148 if (i)
@@ -140,13 +151,13 @@ int Foo::test(int (*baz)(int))
140151
141152 // LHS ends on same line RHS begins on:
142153
143- int k1 = ( foo (
154+ if ( 1 ) foo (
144155 i++
145- ), j++) ; // GOOD? [FALSE POSITIVE]
156+ ), j++; // GOOD? [FALSE POSITIVE]
146157
147- int k2 = ( baz (
158+ if ( 1 ) baz (
148159 i++
149- ), j++) ; // GOOD when it's a function-pointer call !?
160+ ), j++; // GOOD... when calling a function pointer.. !?
150161
151162 // Weird cases:
152163
0 commit comments