[libcxx-commits] [PATCH] D91311: Add new 'preferred_name' attribute.

Richard Smith - zygoloid via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 18 15:54:59 PST 2020


rsmith added a comment.

In D91311#2403805 <https://reviews.llvm.org/D91311#2403805>, @ldionne wrote:

> We can stick with this design, but I'd like to understand why `#if _LIBCPP_HAS_NO_PREFERRED_NAME` is necessary in `<iosfwd>`, and also the CI is failing on MacOS.

You mean the HWAddressSanitizer test failure? That appears to be a flake. Looking through recent failures I found more that look the same: https://reviews.llvm.org/B79364 https://reviews.llvm.org/B79363 https://reviews.llvm.org/B79358



================
Comment at: libcxx/include/iosfwd:188
 
+#ifdef _LIBCPP_PREFERRED_NAME
+template <class _CharT, class _Traits>
----------------
ldionne wrote:
> rsmith wrote:
> > aaron.ballman wrote:
> > > We always define `_LIBCPP_PREFERRED_NAME` so is this actually needed?
> > Thanks, I was trying to avoid the redundant redeclarations when the attribute is unavailable, but clearly this doesn't do that! Fixed.
> Is that really needed? What's the issue with having redundant declarations?
It's not necessary. I'm happy to remove it and redeclare the templates unconditionally if you prefer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91311



More information about the libcxx-commits mailing list