[Libreoffice-commits] core.git: compilerplugins/clang

Stephan Bergmann sbergman at redhat.com
Thu Jun 1 07:24:39 UTC 2017


 compilerplugins/clang/test/redundantcast.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 82dc186a2a0f819fded89a84956bd75a0096e06b
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jun 1 09:23:26 2017 +0200

    Avoid "default initialization ... without ... default constructor" error
    
    Change-Id: Ic336b33bd747cd55955231cbe0b5a9d474adf3ab

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();


More information about the Libreoffice-commits mailing list