Cppcheck: Reduction of False Positives with a MSVC Project File
Stephan Bergmann
sbergman at redhat.com
Fri Sep 7 10:15:23 UTC 2018
On 07/09/18 11:26, Stephan Bergmann wrote:
> >
> D:\cygwin\home\Hearthstone\lode\dev\core\framework\inc\helper\shareablemutex.hxx
>
> > 73 noExplicitConstructor 398 style Class 'ShareGuard' has
> a constructor with 1 argument that is not explicit.
>
> For all the nine noExplicitConstructor occurrences: For one, what
> puzzles me is Cppcheck's fixation on "1 argument" ctors, as "explicit"
> has long surpassed being only relevant for ctors that can be called with
> one argument; if it warns about these, why doesn't it warn about ctors
> taking more arguments, too? For another, for each individual ctor, they
> may be arguments for and against it being "explicit". Would need deeper
> inspection, but generally feels on the level of rather unhelpful noise.
Especially, ctors that are part of the stable URE interface should
likely not be changed to be explicit, to avoid incompatible changes.
See the discussion at <https://gerrit.libreoffice.org/#/c/60123/>
"Cppcheck: make 1-argument ctors explicit".
More information about the LibreOffice
mailing list