Page MenuHomePhabricator

EricWF (Eric Fiselier)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 26 2014, 12:44 PM (465 w, 6 d)

Recent Activity

Wed, May 24

EricWF resigned from D150284: [libc++][PSTL] Add a simple std::thread backend.

I'm going to unblock this. Because I don't think it's harmful.

Wed, May 24, 3:26 PM · Restricted Project, Restricted Project
EricWF added a comment to D151267: mdspan: implement layout_right.

Great tests.

Wed, May 24, 8:36 AM · Restricted Project, Restricted Project
EricWF requested changes to D150896: [libc++] Apply _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION only in classes that we have instantiated externally.
Wed, May 24, 6:13 AM · Restricted Project, Restricted Project
EricWF reopened D150896: [libc++] Apply _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION only in classes that we have instantiated externally.

@philnik Please revert this change. It breaks a bunch of downstream users. We can discuss how or if to reapply it again later, but for the moment, please revert the change while we figure it out.
We appreciate your help unblocking downstream.

Wed, May 24, 6:13 AM · Restricted Project, Restricted Project

Fri, May 19

EricWF accepted D150912: [libc++][NFC] Move basic_ios extern instantiations into <ios>.

Did some digging, and it seems this should be fine. LGTM again.

Fri, May 19, 9:23 AM · Restricted Project, Restricted Project
EricWF requested changes to D150912: [libc++][NFC] Move basic_ios extern instantiations into <ios>.

Wait a second.

Fri, May 19, 9:17 AM · Restricted Project, Restricted Project
EricWF accepted D150912: [libc++][NFC] Move basic_ios extern instantiations into <ios>.
Fri, May 19, 9:16 AM · Restricted Project, Restricted Project

Thu, May 18

EricWF requested changes to D150912: [libc++][NFC] Move basic_ios extern instantiations into <ios>.

You need to describe the rational in the description.

Thu, May 18, 3:47 PM · Restricted Project, Restricted Project

Wed, May 17

EricWF added inline comments to D150284: [libc++][PSTL] Add a simple std::thread backend.
Wed, May 17, 11:44 AM · Restricted Project, Restricted Project
EricWF requested changes to D150284: [libc++][PSTL] Add a simple std::thread backend.
Wed, May 17, 10:13 AM · Restricted Project, Restricted Project
EricWF added a comment to D150538: [libc++] Untangles invoke..

Is the patch as uploaded correct? Because some bits appear to me as having disappeared.

Wed, May 17, 10:10 AM · Restricted Project, Restricted Project
EricWF accepted D138528: [libc++][NFC] Remove unused include in __threading_support.

LGTM.

Wed, May 17, 10:06 AM · Restricted Project, Restricted Project
EricWF added a comment to D150610: [libc++] Make sure `operator new` never returns nullptr, even under -fno-exceptions.

Pinging vendors for discussion.

In particular, @EricWF it would be nice to know how Google feels about this, given that it's a large code base built using -fno-exceptions (presumably the dylib too?).

Wed, May 17, 10:04 AM · Restricted Project, Restricted Project, Restricted Project
EricWF accepted D150793: Revert "[libc++] Implement P2505R5(Monadic operations for std::expected).".

If the bots are happy, then go ahead and revert+reland.
But if there are merge issues, then I think that forgetting the phab review number in the commit message is OK.

Wed, May 17, 9:48 AM · Restricted Project, Restricted Project
EricWF accepted D150779: [libc++] Avoid dereferencing a const iterator in std::sort.
Wed, May 17, 9:29 AM · Restricted Project, Restricted Project
EricWF added a comment to D150284: [libc++][PSTL] Add a simple std::thread backend.

The __threading header, which defines a stable API that libc++ uses to implement threading primitives. This has been used by a bunch of vendors to shim in the different implementations for their platforms.
I believe we'll want to do the same thing here.

Do we know what the full API will look like yet?

We don't know exactly which parts we will require, but I don't think that's relevant for this patch. We only implement a single (primitive) backend here, which will most likely not exist for a long time in this form.

Wed, May 17, 9:25 AM · Restricted Project, Restricted Project
EricWF added inline comments to D150284: [libc++][PSTL] Add a simple std::thread backend.
Wed, May 17, 9:22 AM · Restricted Project, Restricted Project
EricWF added a comment to D150493: [libc++] Add concepts that ensure a given iterator meets the syntactic requirements.

I'm going to try rolling this change out at Google to see the scope of the breakage, how many bugs it finds, and what class of bugs those are.
I'll report back in a couple of days.

Wed, May 17, 8:51 AM · Restricted Project, Restricted Project

Tue, May 16

EricWF added a comment to D150300: [libc++][WIP] Try disabling transitive includes in all configurations to see impact on CI times.

I also wonder whether we should look at removing the transitive includes in general (obviously in a separate patch). I expected some overhead from allowing them, but not these numbers. I still don't like it might break some users, but the benefits seem quite large.

Yeah, that's what this patch got me thinking about, too. This is kind of scary but it would likely provide worthwhile benefits to users. I do think landing a variant of this patch (aka where we change the default in the CI) is tied to removing the transitive includes by default for users, since we need to keep testing exactly what we ship, not something slightly different.

So if we were to remove the transitive includes for users, we'd want to give some grace period for users to update their code base, and give them a way to opt-in gradually into that change. So for example, we could:

  1. Stop removing transitive includes under _LIBCPP_REMOVE_TRANSITIVE_INCLUDES, now when we remove transitive includes we start guarding it behind _LIBCPP_REMOVE_TRANSITIVE_INCLUDES_2.
  2. Release-note that transitive includes will be removed by default in LLVM 18 (for example), and they can define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES in LLVM 17 to start preparing their code base.
  3. In LLVM 18, we flip the default to remove transitive includes and optionally we provide a way to opt into the old behavior with a macro like _LIBCPP_PROVIDE_TRANSITIVE_INCLUDES. This is the grace period.

IMO it would make more sense to add a new macro, since the users who already define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES are fine with the transitive includes not being stable.

  1. In LLVM 19, we remove the escape hatch and unconditionally remove all transitive includes marked under _LIBCPP_REMOVE_TRANSITIVE_INCLUDES.
  2. Now we begin the same cycle again but with _LIBCPP_REMOVE_TRANSITIVE_INCLUDES_2.
  3. Optionally, we add a #warning if _LIBCPP_REMOVE_TRANSITIVE_INCLUDES is defined just so that people who used that macro to opt-in their code bases earlier can clean up their build scripts.

In all cases, we can never reuse the _LIBCPP_REMOVE_TRANSITIVE_INCLUDES name unless we know nobody's defining the macro anymore because otherwise we could break them.

Given that we already granularized most of the relevant stuff I wonder whether it's even worth it to start a new cycle instead of just removing includes unconditionally after we've done it once. After that way fewer people will be broken by removing transitive includes. I also can't find many more headers which we would want to granulize. My remaining candidates are <math.h>, <mutex>, <locale> and possibly <future>, <ios>, <istream> and <regex>. AFAIK everything else is already granularized, a single-class header or quite small.

Tue, May 16, 1:46 PM · Restricted Project, Restricted Project
EricWF added a comment to D150060: [libc++][format] Removes optional dependency..

I'm with ldionne that we should keep using optional here. The correctness seems like a very important quality that we'll be loosing some certainty in.

Tue, May 16, 12:18 PM · Restricted Project, Restricted Project
EricWF added a comment to D150300: [libc++][WIP] Try disabling transitive includes in all configurations to see impact on CI times.

Do we have -ftime-trace files for this change?

Tue, May 16, 12:16 PM · Restricted Project, Restricted Project
EricWF requested changes to D150588: [libc++] Remove tests from ranges.pass.cpp which violate semantic requirements.

What semantic requirements do these violate. Please add that information to the description.

Tue, May 16, 12:15 PM · Restricted Project, Restricted Project
EricWF added inline comments to D150284: [libc++][PSTL] Add a simple std::thread backend.
Tue, May 16, 12:14 PM · Restricted Project, Restricted Project
EricWF requested changes to D150284: [libc++][PSTL] Add a simple std::thread backend.

The __threading header, which defines a stable API that libc++ uses to implement threading primitives. This has been used by a bunch of vendors to shim in the different implementations for their platforms.
I believe we'll want to do the same thing here.

Tue, May 16, 12:07 PM · Restricted Project, Restricted Project

Apr 27 2023

EricWF closed D146190: Fix EBO on std::optional and std::variant when targeting the MSVC ABI.

Committed in db381405ced7b65ad1cf8fc60bbdfb505e1ed3de

Apr 27 2023, 6:06 PM · Restricted Project, Restricted Project
EricWF committed rGdb381405ced7: Fix EBO on std::optional and std::variant when targeting the MSVC ABI (authored by EricWF).
Fix EBO on std::optional and std::variant when targeting the MSVC ABI
Apr 27 2023, 6:05 PM · Restricted Project, Restricted Project

Apr 15 2023

EricWF added a comment to D148357: [NFC][libc++] Removes sliceExpr friend..

If we think there's no need for the friend declaration, then lets explain why we think it's unneeded in the commit message for archeology.

Apr 15 2023, 7:33 AM · Restricted Project, Restricted Project
EricWF added a comment to D148357: [NFC][libc++] Removes sliceExpr friend..

Sorry, I meant to comment that this is likely a misspelling of __slice_expr. Though I don't know if it's needed, and the test coverage here is really poor. But I would rather change it to what the author likely intended it to be.

Apr 15 2023, 7:19 AM · Restricted Project, Restricted Project

Apr 14 2023

EricWF requested changes to D148357: [NFC][libc++] Removes sliceExpr friend..
Apr 14 2023, 1:23 PM · Restricted Project, Restricted Project
EricWF accepted D148359: [libc++] Removes Clang 14 support..

LGTM, but I would wait for another LGTM.

Apr 14 2023, 1:18 PM · Restricted Project, Restricted Project
EricWF accepted D147640: [libcxxabi] [test] Use the correct printf formats for printing pointers.
Apr 14 2023, 10:52 AM · Restricted Project, Restricted Project

Apr 11 2023

EricWF accepted D147639: [libcxxabi] [test] Don't cast a pointer to long, fixing the test on Windows.
Apr 11 2023, 12:38 PM · Restricted Project, Restricted Project
EricWF accepted D146190: Fix EBO on std::optional and std::variant when targeting the MSVC ABI.

OK, lets try this again. Hopefully with cooler heads.

Apr 11 2023, 12:06 PM · Restricted Project, Restricted Project
EricWF added a comment to D147680: [ASan][libc++] Turn on ASan annotations for short strings.

Can you please update the patch so that it merges?

Apr 11 2023, 11:23 AM · Restricted Project, Restricted Project
EricWF accepted D147089: [libc++] Add assertions for potential OOB reads in std::sort.

Have we done any benchmarking on this? I know the optimizer can be quite sensitive to the exact formulation of the loop.

Apr 11 2023, 11:18 AM · Restricted Project, Restricted Project
EricWF accepted D147751: [libc++] Instructions to run libc++ test suite.
Apr 11 2023, 11:18 AM · Restricted Project, Restricted Project
EricWF accepted D147630: [libcxx] [test] Check for C++ headers before building a test that uses them.
Apr 11 2023, 11:05 AM · Restricted Project, Restricted Project
EricWF added a comment to D147860: [libcxxabi] [test] Mark code following an assert(false) as unreachable.

Oh, and of course, after the CI is passing. Please re-upload a new patch so that it merges.

Apr 11 2023, 11:05 AM · Restricted Project, Restricted Project
EricWF accepted D147860: [libcxxabi] [test] Mark code following an assert(false) as unreachable.

LGTM after addressing @phosek comment about the other delete functions.

Apr 11 2023, 11:04 AM · Restricted Project, Restricted Project
EricWF accepted D148030: [libc++] Remove redundant assertion in std::span::subspan.
Apr 11 2023, 11:02 AM · Restricted Project, Restricted Project

Apr 10 2023

EricWF added a comment to D146190: Fix EBO on std::optional and std::variant when targeting the MSVC ABI.

@philnik I believe your actions here are unbecoming. I would ask you to reconsider the way you interact in the community.

Apr 10 2023, 4:02 PM · Restricted Project, Restricted Project
EricWF accepted D147519: [libc++] Rename __tuple_dir back to __tuple.
Apr 10 2023, 3:57 PM · Restricted Project, Restricted Project
EricWF added inline comments to D147860: [libcxxabi] [test] Mark code following an assert(false) as unreachable.
Apr 10 2023, 3:54 PM · Restricted Project, Restricted Project
EricWF accepted D146190: Fix EBO on std::optional and std::variant when targeting the MSVC ABI.

I think this is ready. It LGTM. Lets just get the CI passing.

Please wait for other people who have already commented. It's really not nice to overrule people like that, and this isn't exactly time sensitive.

Apr 10 2023, 3:48 PM · Restricted Project, Restricted Project
EricWF accepted D146190: Fix EBO on std::optional and std::variant when targeting the MSVC ABI.

I think this is ready. It LGTM. Lets just get the CI passing.

Apr 10 2023, 1:35 PM · Restricted Project, Restricted Project

Apr 6 2023

EricWF added a comment to D145376: [libc++] add declval failure assertion for instantiation.

OK, so I've come around on this change. But please give me 2 weeks to cleanup the breakages it's going to cause inside Google.
I'll come back and let you know how many breakages were bugs vs how many were just weird meta-programming.

Apr 6 2023, 7:34 AM · Restricted Project, Restricted Project

Apr 5 2023

EricWF requested changes to D147560: [libc++] Fix std::optional-related type deduction.

I think this is a bandaid over a bigger clang bug.

Apr 5 2023, 1:13 PM · Restricted Project, Restricted Project

Mar 20 2023

EricWF accepted D146088: [libc++] Qualifies size_t..

Thanks for updating the description. With rational, this makes a ton of sense.

Mar 20 2023, 1:56 PM · Restricted Project, Restricted Project
EricWF added a comment to D145800: [libc++] Granularizes vector..

Rereading the bug on github. I think this might deserve a standard defect report.

Mar 20 2023, 1:15 PM · Restricted Project, Restricted Project
EricWF requested changes to D145800: [libc++] Granularizes vector..

I think this is a really bad idea.
Splitting the specialization out so that only some files can depend on it, while others cannot, allowing some bits of the code to only see a partial implementation is going to be bug prone.

Mar 20 2023, 12:29 PM · Restricted Project, Restricted Project
EricWF added a comment to D146214: [ASan][libc++] Annotating std::basic_string with all allocators.

Has this patch been tested against Chromium? Has it been tested elsewhere?
The more testing it's undergone, the more confident I can be.

Mar 20 2023, 12:11 PM · Restricted Project, Restricted Project, Restricted Project
EricWF added a comment to D146228: [libc++] Granularize __mutex_base.

I agree with @Mordante

Mar 20 2023, 11:59 AM · Restricted Project, Restricted Project
EricWF accepted D146228: [libc++] Granularize __mutex_base.
Mar 20 2023, 11:58 AM · Restricted Project, Restricted Project
EricWF accepted D146366: [libc++] Use the stdlib=<LIB> Lit feature instead of use_system_cxx_lib.
Mar 20 2023, 11:47 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
EricWF requested changes to D146372: [libc++]Enforce `-Wzero-as-null-pointer-constant`.
Mar 20 2023, 11:45 AM · Restricted Project, Restricted Project
EricWF accepted D146395: [libc++] Move __errc to __system_error/errc.h.
Mar 20 2023, 11:27 AM · Restricted Project, Restricted Project

Mar 17 2023

EricWF added a comment to D145376: [libc++] add declval failure assertion for instantiation.

Is this code ODR used? I suspect it is, and so it's not valid, but I'm not sure and I ran into a bunch of different instances of this pattern while testing this change.

Mar 17 2023, 2:50 PM · Restricted Project, Restricted Project
EricWF accepted D146190: Fix EBO on std::optional and std::variant when targeting the MSVC ABI.
Mar 17 2023, 2:35 PM · Restricted Project, Restricted Project
EricWF accepted D145847: [libc++][format] Implements LWG3892..

Nice tests. Big fan of the work done in this patch.

Mar 17 2023, 2:34 PM · Restricted Project, Restricted Project
EricWF requested changes to D146088: [libc++] Qualifies size_t..

Why? If we've done everything correctly, there should be no difference between the two type? What's the motivation for this?

Mar 17 2023, 2:31 PM · Restricted Project, Restricted Project

Mar 10 2023

EricWF added a comment to D145376: [libc++] add declval failure assertion for instantiation.

Disregard my suggestion about unavailable. It seems to always fire, including in unevaluated contexts. I feel silly.

Mar 10 2023, 12:25 PM · Restricted Project, Restricted Project
EricWF added a comment to D145376: [libc++] add declval failure assertion for instantiation.

Just use __attribute__((unavailable("declval cannot be called")) or some such.

Mar 10 2023, 12:21 PM · Restricted Project, Restricted Project

Mar 8 2023

EricWF updated subscribers of D145376: [libc++] add declval failure assertion for instantiation.

Also, I'm not sure a static assert pointing to the stable name in the
standard is helpful to our users. Will they even know what it is?

Mar 8 2023, 12:50 PM · Restricted Project, Restricted Project
EricWF added a comment to D145376: [libc++] add declval failure assertion for instantiation.

We went out of our way to make declval as low cost as we possibly could. Adding a body for the compiler to see is just work.

Mar 8 2023, 12:20 PM · Restricted Project, Restricted Project

Mar 7 2023

EricWF added a reviewer for D144994: [Draft][libc++][modules] Adds std module.: EricWF.

Cool deal. Thanks for working on this.

Mar 7 2023, 1:58 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
EricWF added a comment to D144568: [libc++][NFC] Refactor the __enable_ifs in <string>.

@philnik Every single change needs a description. The description must include the motivation for making the change. What does in improve? What code does it break/fix? etc.

Mar 7 2023, 1:56 PM · Restricted Project, Restricted Project
EricWF requested changes to D144568: [libc++][NFC] Refactor the __enable_ifs in <string>.

This increases code duplication substantially.

Mar 7 2023, 1:54 PM · Restricted Project, Restricted Project
EricWF added a comment to D144667: [libc++] Enable -Wunused-template.

How is libc++ not working with it yet a blocker for them? We disable warnings in our headers except outside of our build?

Mar 7 2023, 1:52 PM · Restricted Project, Restricted Project, Restricted Project
EricWF accepted D144667: [libc++] Enable -Wunused-template.
Mar 7 2023, 1:51 PM · Restricted Project, Restricted Project, Restricted Project
EricWF accepted D145422: [libc++] Remove C++03 extensions for std::allocator_arg & friends.

Is there a design document describing these sets of changes?
If this affects the library *build* primarily, then it should be possible to make this continue to work.

Mar 7 2023, 1:50 PM · Restricted Project, Restricted Project
EricWF requested changes to D145376: [libc++] add declval failure assertion for instantiation.

This change is not correct and cannot proceed.

Mar 7 2023, 1:45 PM · Restricted Project, Restricted Project
EricWF added inline comments to D145285: [libc++] Refactor __less.
Mar 7 2023, 1:32 PM · Restricted Project, Restricted Project
EricWF requested changes to D145285: [libc++] Refactor __less.

This cleanup seems incomplete. Why keep __less as a template at all given it's never actually used as one?

Mar 7 2023, 1:32 PM · Restricted Project, Restricted Project

Mar 6 2023

EricWF requested changes to D138826: [libc++][chrono] Fixes formatter duration..
Mar 6 2023, 12:18 PM · Restricted Project, Restricted Project

Jan 13 2023

EricWF added inline comments to D141623: [SystemZ][z/OS] Fix cityhash lit for EBCDIC.
Jan 13 2023, 2:10 PM · Restricted Project, Restricted Project
EricWF added a comment to D141308: [libc++] Make the libc++ test-suite standalone.

I'm not convinced this is something that we want to add the complexity for.

Jan 13 2023, 2:07 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Dec 17 2022

EricWF requested changes to D140259: [libc++] Add __small_buffer.

Changes need descriptions.

Dec 17 2022, 11:50 AM · Restricted Project, Restricted Project

Nov 29 2022

EricWF added a comment to D135248: [libc++] implement move_iterator<T*> should be a random access iterator .

Hey @EricWF , could you please take a look at this patch, i guess there are some tests which got affected by this . I'm not sure if i need to update them for passing the CI?

Nov 29 2022, 12:47 PM · Restricted Project, Restricted Project, Restricted Project

Nov 21 2022

EricWF added a comment to D137501: [libc++][math.h][NFC] Refactor enable_ifs.

Why is this a cleanup?

Nov 21 2022, 9:55 AM · Restricted Project, Restricted Project
EricWF requested changes to D137502: [libc++][math.h] move #undefs to the top and guard explicitly against MSVCRT instead.

This changes behavior.

Nov 21 2022, 9:42 AM · Restricted Project, Restricted Project
EricWF accepted D138445: [libcxx] Add BOT_OWNERS.txt.
Nov 21 2022, 9:35 AM · Restricted Project, Restricted Project

Nov 14 2022

EricWF added a comment to D137315: [libc++abi] Improve performance of __dynamic_cast.

Do you know why the hint wasn't initially used? Was there a point where compilers didn't actually provide the hints?

Nov 14 2022, 9:08 AM · Restricted Project, Restricted Project, Restricted Project

Nov 7 2022

EricWF requested changes to D135248: [libc++] implement move_iterator<T*> should be a random access iterator .
Nov 7 2022, 10:57 AM · Restricted Project, Restricted Project, Restricted Project
EricWF added a comment to D118620: [SystemZ][z/OS] Move several exception derived classes to c++abi library.

Sorry, I'm going to have to let @ldionne weigh in on this too. I'm just not sure introducing this whole new build mode with a separate exception library is something we want to do -- so I would like input from the other maintainers.

Nov 7 2022, 10:35 AM · Restricted Project, Restricted Project, Restricted Project
EricWF requested changes to D118620: [SystemZ][z/OS] Move several exception derived classes to c++abi library.

I don't really like the state this leaves variant, any and friends in when exception vtables aren't compiled into the dylib.
There's no way to know only from the headers that using any of these types will result in linker errors.

Nov 7 2022, 7:28 AM · Restricted Project, Restricted Project, Restricted Project

Nov 6 2022

EricWF added a comment to D124516: [libc++] Implement `std::expected` P0323R12.

Another improvement that can be made is reducing the number of instantiations we perform in a lot of the metaprogramming. _And, _Not, and _Or should only be used when short circuiting is needed. In most cases here it isn't. Every single instantiation performed in expected is carried around by the compiler and in the AST for the entire translation unit. That's costly, lets avoid that cost.

I've removed short circuiting for the static_assert cases. but most meta programming in this patch can benefit from short-circuiting as they are used in the constructors' constraints. (the most complicated one in this patch is the __can_convert @ldionne had some comments explaining why they are needed. (in the early revisions of this patch, there was no short-circuiting)

That being said, I wrote sine simple tests that benchmark the compilation times.

The first one is the case where short circuiting happens

// The 3rd requirement of `__can_convert`
// _Not<is_constructible<_Tp, expected<_Up, _Gp>&>>
// fails and short circuits
template <std::size_t N>
struct Foo {
  Foo() {}

  template <std::size_t M>
  Foo(Foo<M>) {}

  template <std::size_t M, class E>
  Foo(std::expected<Foo<M>, E>) {}
};

template <std::size_t N>
void callCtor() {
  std::expected<Foo<N>, int> e1;
  [[maybe_unused]] std::expected<Foo<N + 1>, int> e2(e1);
}

template <std::size_t... Ns>
void generateTest(std::index_sequence<Ns...>) {
  (callCtor<Ns>(), ...);
}

int main() { generateTest(std::make_index_sequence<1000>{}); }
  • With the _And/_Or version, it took *8.9s* to compile.
  • With the _BoolConstant<is_xxx_v && ...> version, it took *10.0s* to compile

So we see some benefits of short circuiting (out weighs the instantiation cost)

Then I have another test case where all boolean requirements pass so no short circuiting happening

// All requirements of `__can_convert` pass
// short circuiting has no benefit
template <std::size_t N>
struct Foo {
  Foo() {}

  template <std::size_t M>
  Foo(Foo<M>) {}
};

template <std::size_t N>
void callCtor() {
  std::expected<Foo<N>, int> e1;
  [[maybe_unused]] std::expected<Foo<N + 1>, int> e2(e1);
}

template <std::size_t... Ns>
void generateTest(std::index_sequence<Ns...>) {
  (callCtor<Ns>(), ...);
}

int main() { generateTest(std::make_index_sequence<1000>{}); }
  • With the _And/_Or version, it took *8.5s* to compile.
  • With the _BoolConstant<is_xxx_v && ...> version, it took *7.3s* to compile

So we know that short circuiting doesn't help because all booleans are true. And the instantiation costs make it slower.

The first case we gain 1.1s and the second case we lost 1.2s. So I am on the boarder line of whether or not to do short circuiting on these constructor constraints. I think in the real case, it is likely that those booleans are all true because if the user calls these converting constructors, it is likely to succeed instead of falling back to the constructor that takes U&&. That means in real user code, the short circuiting might never happen.

Nov 6 2022, 3:11 PM · Restricted Project, Restricted Project
EricWF accepted D135781: [libc++] Assume that builtins for math.h functions are available.
Nov 6 2022, 2:45 PM · Restricted Project, Restricted Project
EricWF requested changes to D136908: [libc++] Remove duplication in math_h.pass.cpp and improve coverage.

Stop being clever in tests. These changes add a substantial cognitive load to any person who's trying to read them for the first time and understand what they do.

Nov 6 2022, 2:42 PM · Restricted Project, Restricted Project
EricWF added inline comments to D136765: [ASan][libcxx] Annotating std::vector with all allocators.
Nov 6 2022, 2:41 PM · Restricted Project, Restricted Project, Restricted Project
EricWF added inline comments to D136765: [ASan][libcxx] Annotating std::vector with all allocators.
Nov 6 2022, 2:40 PM · Restricted Project, Restricted Project, Restricted Project
EricWF accepted D137498: [libc++][math.h][NFC] Reformat functions.

This is from clang-format? LGTM then.

Nov 6 2022, 2:38 PM · Restricted Project, Restricted Project
EricWF requested changes to D137476: [libc++] Add utilites for instantiating functions with multiple types.

I don't think the test suite is the place to get clever with code deduplication and template magic.

Nov 6 2022, 2:37 PM · Restricted Project, Restricted Project

Nov 3 2022

EricWF accepted D137025: [libc++] inline more functions into basic_string.

Disregard me. They were all marked inline already.

Nov 3 2022, 9:34 AM · Restricted Project, Restricted Project
EricWF requested changes to D137025: [libc++] inline more functions into basic_string.

This also affects external instantiations. So I'm not sure this is as simple as just "removing boilerplate".

Nov 3 2022, 9:33 AM · Restricted Project, Restricted Project

Nov 2 2022

EricWF added a comment to D132061: [libc++] static_assert preconditions in vector.

Sorry for the repeated comments. But if I understand the description correctly, the diagnostic below is no longer emitted?

Nov 2 2022, 6:24 PM · Restricted Project, Restricted Project
EricWF requested changes to D132061: [libc++] static_assert preconditions in vector.

I would like other people to weigh in on this patch. I don't think these changes pull their weight. I'm not convinced they add clarity. And I'm certain they add complexity and cost -- also if we get the assert wrong (and I don't think we will), but we risk breaking totally valid code that would otherwise compile.

Nov 2 2022, 6:21 PM · Restricted Project, Restricted Project
EricWF added a comment to D132061: [libc++] static_assert preconditions in vector.

I'm not convinced your average user knows what copy insertable means, and I think the static assert is more opaque than the templated messages, which while noiser, contain more information.

Nov 2 2022, 6:16 PM · Restricted Project, Restricted Project
EricWF added a comment to D132061: [libc++] static_assert preconditions in vector.

This change doesn't improve conformance, right? It just attempts to make the diagnostics nicer in a handful of cases where the error occurs in the immediate function call to the allocator?

Nov 2 2022, 6:14 PM · Restricted Project, Restricted Project

Nov 1 2022

EricWF added a comment to D137127: [libc++abi] Use std::nullptr_t instead of declaring it manually.

I don't think this helps, but I don't think it hurts. The correctness of the tests requires std::nullptr_t to be decltype(nullptr), so /shrug

The question is whether the <cstdlib> header is allowed to define a ::nullptr_t. If it does define it (it does with the Android NDK), then the test doesn't compile because -Wshadow complains about the local nullptr_t. (I suspect the issue is that bionic's stdlib.h includes malloc.h, which includes stddef.h without first declaring any __need_* macros. When libc++'s stddef.h is included, it defines ::nullptr_t.) It could be an issue with the bionic headers, but that's also probably hard to clean up without breaking stuff?

Nov 1 2022, 5:38 PM · Restricted Project, Restricted Project
EricWF added inline comments to D124516: [libc++] Implement `std::expected` P0323R12.
Nov 1 2022, 5:36 PM · Restricted Project, Restricted Project