D14212: Enable warnings zero-as-null-pointer-constant & suggest-override

Aaron Puchert noreply at phabricator.kde.org
Wed Jul 18 20:38:12 BST 2018


aaronpuchert added inline comments.

INLINE COMMENTS

> CMakeLists.txt:147
> +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
> +    add_compile_flag_if_supported(-Wsuggest-override CXX_ONLY)
>  endif()

With Clang you could add `-Winconsistent-missing-override`, although it's not exactly the same. (It's a bit weaker.)

> CMakeLists.txt:10-11
>  set_property(TARGET astylelib PROPERTY POSITION_INDEPENDENT_CODE ON)
> +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
> +   if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0")
> +      target_compile_options(astylelib PRIVATE "-Wno-zero-as-null-pointer-constant" "-Wno-suggest-override")

Maybe you can remember in `add_compile_flag_if_supported` if a warning flag was enabled and check that here? That would seem more consistent to me.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D14212

To: kossebau, #kdevelop
Cc: aaronpuchert, kdevelop-devel, antismap, iodelay, vbspam, njensen, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180718/879e9b52/attachment.html>


More information about the KDevelop-devel mailing list