Noel Grandin
71b809959b
remove unnecessary use of void in function declarations
...
ie.
void f(void);
becomes
void f();
I used the following command to make the changes:
git grep -lP '\(\s*void\s*\)' -- *.cxx \
| xargs perl -pi -w -e 's/(\w+)\s*\(\s*void\s*\)/$1\(\)/g;'
and ran it for both .cxx and .hxx files.
Change-Id: I314a1b56e9c14d10726e32841736b0ad5eef8ddd
2015-04-15 11:47:12 +02:00
Noel Grandin
e4688a3d41
loplugin:staticmethods
...
Change-Id: Ibaad2adabecb878411fdd66383bca91f034477af
2015-04-07 10:24:54 +02:00
Stephan Bergmann
ad9498f8b8
More -Werror,-Wunused-private-field
...
...detected with a modified trunk Clang with
> Index: lib/Sema/SemaDeclCXX.cpp
> ===================================================================
> --- lib/Sema/SemaDeclCXX.cpp (revision 219190)
> +++ lib/Sema/SemaDeclCXX.cpp (working copy)
> @@ -1917,9 +1917,10 @@
> const Type *T = FD.getType()->getBaseElementTypeUnsafe();
> // FIXME: Destruction of ObjC lifetime types has side-effects.
> if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl())
> - return !RD->isCompleteDefinition() ||
> - !RD->hasTrivialDefaultConstructor() ||
> - !RD->hasTrivialDestructor();
> + return !RD->hasAttr<WarnUnusedAttr>() &&
> + (!RD->isCompleteDefinition() ||
> + !RD->hasTrivialDefaultConstructor() ||
> + !RD->hasTrivialDestructor());
> return false;
> }
>
> @@ -3517,9 +3518,11 @@
> bool addFieldInitializer(CXXCtorInitializer *Init) {
> AllToInit.push_back(Init);
>
> +#if 0
> // Check whether this initializer makes the field "used".
> if (Init->getInit()->HasSideEffects(S.Context))
> S.UnusedPrivateFields.remove(Init->getAnyMember());
> +#endif
>
> return false;
> }
to warn about members of SAL_WARN_UNUSED-annotated class types, and warn about
initializations with side effects (cf.
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-October/039602.html >
"-Wunused-private-field distracted by side effects").
Change-Id: I3f3181c4eb8180ca28e1fa3dffc9dbe1002c6628
2014-10-15 15:58:56 +02:00
Noel Grandin
184a00b962
loplugin: inlinesimplememberfunctions
...
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-06-09 10:10:13 +02:00
Norbert Thiebaud
5db050afb3
fdo#65108 inter-module includes <> include/helpcompiler
...
Change-Id: Ie959c92c0ebffb88318a9ac1a9284da11281105d
2013-11-09 18:48:42 -06:00
Thomas Arnhold
1130a359cb
fixincludeguards.sh: include - the rest
...
Change-Id: If1ee11da444a7f96f2d8668b277540da0bb4dbe9
2013-10-23 23:22:31 +02:00
Tor Lillqvist
610681b97a
L10N_PLUGIN_PUBLIC is not used anywhere
...
Change-Id: I27bc41e76aa19cf6bd0a9eb4dcbfa07a0d165eb0
2013-10-12 20:34:54 +03:00
Michael Stahl
0bb8c03253
helpcompiler: remove Package_inc
...
Change-Id: Iddafa9068edcc20135c08ed205b8fb7fb5382eba
2013-05-07 01:41:23 +02:00