[cfe-dev] Challenging "-Wctad-maybe-unsupported" for 9.0.0

JVApen via cfe-dev cfe-dev at lists.llvm.org
Sat Aug 3 03:02:42 PDT 2019


Hello all,

I'm currently testing 9.0.0 and I'm one of those strange people that uses
-Weverything in production, as we only support a single clang-release at
the same time. (Actually clang-cl, as it's Windows-only)
During the upgrade, I've noticed a new warning "-Wctad-maybe-unsupported".
At first, I was really happy seeing it and started updating some code that
implicitly used it.
I'm even considering to propose an extension to our styleguide, as
mentioned in the review of the warning: https://reviews.llvm.org/D56731
`Some style guides want to allow using CTAD only on types that "opt-in"`

However, after finishing my initial testing and applying some suppression
and update locally, I'm changing my mind.
Over half of the updates I had to do were about `std::unique_lock`,
`std::scope_guard` ... (and this without actively using this feature).
These classes, if I'm correct, are one of the selling point of CTAD and are
prohibited thanks to this warning.

To circle back to title of the email, should -Wctad-maybe-unsupported
actually be a compiler warning iso a clang-tidy check?
If so, would it make sense of having a white-list, like all `std::` classes?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190803/1d42fd4c/attachment.html>


More information about the cfe-dev mailing list