summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test/unnecessaryparen.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/test/unnecessaryparen.cxx')
-rw-r--r--compilerplugins/clang/test/unnecessaryparen.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/unnecessaryparen.cxx b/compilerplugins/clang/test/unnecessaryparen.cxx
index 85be13848b22..1ea22288673e 100644
--- a/compilerplugins/clang/test/unnecessaryparen.cxx
+++ b/compilerplugins/clang/test/unnecessaryparen.cxx
@@ -32,6 +32,9 @@ int main()
// lots of our code uses this style, which I'm loathe to bulk-fix as yet
int z = (y) ? 1 : 0;
(void)z;
+
+ int v1 = (static_cast<short>(1)) + 1; // expected-error {{unnecessary parentheses around cast [loplugin:unnecessaryparen]}}
+ (void)v1;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */