teach unnecessaryparen plugin about other kinds of statements

i.e. do / while / switch

Change-Id: Id0985015cc425557f9984734701d56466f8a6088
Reviewed-on: https://gerrit.libreoffice.org/39601
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2017-07-05 16:30:06 +02:00
parent a1ead1a028
commit 13341ffa49
10 changed files with 59 additions and 21 deletions

View File

@@ -14,7 +14,7 @@ int main()
int x = 1;
x = ((2)); // expected-error {{parentheses around parentheses [loplugin:unnecessaryparen]}}
if ((foo(1))) foo(2); // expected-error {{parentheses immediately inside if [loplugin:unnecessaryparen]}}
if ((foo(1))) foo(2); // expected-error {{parentheses immediately inside if statement [loplugin:unnecessaryparen]}}
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */