[libcxx-commits] [PATCH] D131727: Enable -Wctad-maybe-unsupported in LLVM build

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Aug 13 03:02:54 PDT 2022


philnik added a comment.

In D131727#3720886 <https://reviews.llvm.org/D131727#3720886>, @dblaikie wrote:

> Updated with the libcxx changes necessary to get a clean build - but I'm still confused by:
>
> 1. why the clang warning fired on these at all (I haven't looked into that in detail, but I can probably figure it out with some closer inspection)
> 2. why libcxx doesn't seem to apply `LLVM_ENABLE_WERROR` & what that means with regards to libcxx's policy on warning cleanliness, etc..



1. The warnings probably fire because we don't consider the headers to be system headers when building the library.
2. We have `LIBCXX_ENABLE_WERROR` for that. I don't know why we ignore `LLVM_ENABLE_WERROR`, but it probably has something to do with GCC not building libc++ cleanly. For example we get warnings that `__attribute__((init_priority(100)))` is implementation-reserved. When using clang we build with `-Werror` in the CI.

I think libc++ shouldn't be built with `-Wctad-maybe-unsupported`, since we can generally assume that using CTAD is OK.
BTW it would help if you ping the #libc <https://reviews.llvm.org/tag/libc/> group next time you want to ask something. That way all the libc++ developers get an email.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131727/new/

https://reviews.llvm.org/D131727



More information about the libcxx-commits mailing list