4 ms·
> I'm assuming this bug is an instance of a more general one Anyone want to work on a regexp for the more general condition?
by davidw 18y ago
> I'm assuming this bug is an instance of a more general one
Anyone want to work on a regexp for the more general condition?
- brianr 18y agoMost of these don't look like bugs, but here's a search to match "if (... = ": http://www.google.com/codesearch?hl=en&lr=&q=if\+\ http://www.google.com/codesearch?hl=en&lr=&q=if\+\(\w%2B\+%3D\+&sbtn=Search Can anyone think of a better way to match the subset that are more likely to be bugs?
- alecco 18y agohttp://www.google.com/codesearch?hl=en&lr=&q=if\+\ http://www.google.com/codesearch?hl=en&lr=&q=if\+\(\w%2B\+%3D\+[^(\.]%2B\+%3F\)&sbtn=Search That takes out parentheses (for function calls) and structure member assignment because it might be two statements in one line (ugly and error prone as output will be exactly the same for a = b.c; if(a) {}; vs. if (a=b.c)