summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test/redundantcast.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/test/redundantcast.cxx')
-rw-r--r--compilerplugins/clang/test/redundantcast.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/test/redundantcast.cxx b/compilerplugins/clang/test/redundantcast.cxx
index 53df00ae96ed..b6754391e7ca 100644
--- a/compilerplugins/clang/test/redundantcast.cxx
+++ b/compilerplugins/clang/test/redundantcast.cxx
@@ -40,7 +40,7 @@ int main() {
Enum1 e = (Enum1)Enum1::X; // expected-error {{redundant cstyle cast from 'Enum1' to 'Enum1' [loplugin:redundantcast]}}
(void)e;
- S const s;
+ S const s{};
const_cast<S &>(s).f1();
const_cast<S &>(s).f2(); // expected-error {{redundant const_cast from 'const S' to 'S', result is implicitly cast to 'const S' [loplugin:redundantcast]}}
const_cast<S &>(s).f3();