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

Stephan Bergmann sbergman at redhat.com
Fri Nov 24 10:44:44 UTC 2017


 compilerplugins/clang/test/unnecessaryparen.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 827de7f4198281bc8dbc886f49ce96a04fcb72ab
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Nov 24 11:43:30 2017 +0100

    Clarify that loplugin:unnecessaryparen doesn't want to warn about sizeof
    
    ...for whatever reason
    
    Change-Id: Iaae919dc6c636c4846c548914e593cb8bd94fe8b

diff --git a/compilerplugins/clang/test/unnecessaryparen.cxx b/compilerplugins/clang/test/unnecessaryparen.cxx
index 4e85fe97076f..c4bc0573505a 100644
--- a/compilerplugins/clang/test/unnecessaryparen.cxx
+++ b/compilerplugins/clang/test/unnecessaryparen.cxx
@@ -61,6 +61,9 @@ int main()
     if ((s2 = s1)) {
         return 0;
     }
+
+    (void) sizeof (int);
+    (void) sizeof (x); // expect no warning (for whatever reason; for symmetry with above case?)
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */


More information about the Libreoffice-commits mailing list