summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test/unnecessaryparen.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-07 08:42:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-07 10:45:05 +0200
commit868d8c8f0fdf376b0a3eb545ee841c9c12ffee3b (patch)
tree7e8b919732f3d73cfb77974c489ee864103b2882 /compilerplugins/clang/test/unnecessaryparen.cxx
parent9479171a09ba4c73afa8b40a5c2590df3b6d5415 (diff)
loplugin:unnecessaryparen handle parens inside call expr
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/test/unnecessaryparen.cxx')
-rw-r--r--compilerplugins/clang/test/unnecessaryparen.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/unnecessaryparen.cxx b/compilerplugins/clang/test/unnecessaryparen.cxx
index 201032a703ae..77cb6bb87168 100644
--- a/compilerplugins/clang/test/unnecessaryparen.cxx
+++ b/compilerplugins/clang/test/unnecessaryparen.cxx
@@ -15,6 +15,8 @@ int main()
x = ((2)); // expected-error {{parentheses around parentheses [loplugin:unnecessaryparen]}}
if ((foo(1))) foo(2); // expected-error {{parentheses immediately inside if statement [loplugin:unnecessaryparen]}}
+
+ foo((1)); // expected-error {{parentheses immediately inside single-arg call [loplugin:unnecessaryparen]}}
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */