Quuxplusone (Arthur O'Dwyer)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 27 2014, 8:52 PM (181 w, 3 d)

Recent Activity

Yesterday

Quuxplusone updated the diff for D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..

Bugfix and shrink {un,}synchronized_pool_resource.

Tue, Jun 19, 3:17 PM
Quuxplusone updated the diff for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..

Minor cosmetic changes.

Tue, Jun 19, 3:09 PM

Mon, Jun 18

Quuxplusone added a comment to D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()".

@EricWF ping; is this a reasonable solution to LWG 2843 on platforms without aligned new and delete?

Mon, Jun 18, 7:05 PM
Quuxplusone planned changes to D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..
Mon, Jun 18, 7:02 PM

Wed, Jun 13

Quuxplusone added inline comments to D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..
Wed, Jun 13, 1:43 AM
Quuxplusone updated the diff for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..
  • Shrink monotonic_buffer_resource, and make release() not "leak" allocation size.
Wed, Jun 13, 1:37 AM

Sun, Jun 10

Quuxplusone added inline comments to D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..
Sun, Jun 10, 7:25 PM

Tue, Jun 5

Quuxplusone planned changes to D47360: Implement <memory_resource> as a copy of <experimental/memory_resource>..

Once the dependencies (D47111 and D47358) are merged, I need to update the unit tests in this patch to reflect the unit tests that were committed. Right now, the unit tests in this patch reflect an old, out-of-date snapshot of what had been in those patches a couple weeks ago.

Tue, Jun 5, 9:45 PM
Quuxplusone updated the diff for D46806: Remove unused code from __functional_base. NFC..

Also, <experimental/memory_resource> doesn't need a full definition of std::tuple; just the forward declaration in <__tuple> will suffice.

Tue, Jun 5, 9:37 PM

Sat, Jun 2

Quuxplusone updated the diff for D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..
  • Split up the unit tests.
  • Refactor to shrink the memory layout of the resource object itself. Before this patch sizeof(unsynchronized_pool_resource)==48. After this patch sizeof(unsynchronized_pool_resource) == 32.
Sat, Jun 2, 8:51 AM

Tue, May 29

Quuxplusone added inline comments to D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..
Tue, May 29, 5:17 PM
Quuxplusone updated the diff for D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..

Rebase and update the diff.

Tue, May 29, 5:16 PM

Mon, May 28

Quuxplusone updated the diff for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..

Refactor to remove unused fields from the header structs.

Mon, May 28, 10:35 PM
Quuxplusone updated the diff for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..

Add override; disintegrate the unit test; adopt some tests from Eric's D27402.
Also fix one QOI issue discovered by Eric's tests: if the user passes an initial_size to the constructor, then they are probably intending that our first upstream-allocation be big enough to serve at least initial_size 1-byte allocations (or one initial_size-byte allocation with a suitably small alignment). This is explicitly not mandated by the Standard (it merely requires that our next upstream-allocation be of size at least initial_size), but it's probably a healthy choice.

Mon, May 28, 9:12 PM
Quuxplusone added inline comments to D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..
Mon, May 28, 7:05 PM

Sat, May 26

Quuxplusone updated the summary of D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..
Sat, May 26, 9:48 PM
Quuxplusone added a dependent revision for D46806: Remove unused code from __functional_base. NFC.: D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..
Sat, May 26, 9:48 PM
Quuxplusone added a dependent revision for D47109: LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()": D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..
Sat, May 26, 9:48 PM
Quuxplusone added a dependent revision for D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()": D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..
Sat, May 26, 9:48 PM
Quuxplusone added a reviewer for D47360: Implement <memory_resource> as a copy of <experimental/memory_resource>.: mclow.lists.
Sat, May 26, 9:48 PM
Quuxplusone added a dependent revision for D46806: Remove unused code from __functional_base. NFC.: D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..
Sat, May 26, 9:47 PM
Quuxplusone added a dependent revision for D47109: LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()": D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..
Sat, May 26, 9:47 PM
Quuxplusone updated the summary of D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..
Sat, May 26, 9:47 PM
Quuxplusone added a dependent revision for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource.: D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..
Sat, May 26, 9:47 PM
Quuxplusone added a dependent revision for D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()": D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..
Sat, May 26, 9:47 PM
Quuxplusone added a reviewer for D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()": mclow.lists.
Sat, May 26, 9:47 PM
Quuxplusone added a reviewer for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource.: mclow.lists.
Sat, May 26, 9:46 PM
Quuxplusone added a reviewer for D46806: Remove unused code from __functional_base. NFC.: mclow.lists.
Sat, May 26, 9:46 PM

Fri, May 25

Quuxplusone added a comment to D47067: Update NRVO logic to support early return.

Just commenting to say that this LGTM and I have no further nitpicks. I have verified that I cannot detect any change in the behavior of -Wpessimizing-move or -Wreturn-std-move due to this change (and I can successfully detect the additional copy-elision due to this change, hooray).

Fri, May 25, 10:50 AM

Thu, May 24

Quuxplusone abandoned D46807: Rename test_memory_resource.hpp -> test_experimental_memory_resource.hpp. NFC..

This is now part of D47360.

Thu, May 24, 11:52 PM
Quuxplusone abandoned D47090: Implement C++17 <memory_resource>..

I'm re-submitting this as a series of smaller patches that first bring <experimental/memory_resource> up to date with C++17, and then copy it over to <memory_resource>.
In order, these smaller patches are: D46806 D47109 D47344 D47111 D47358 D47360.

Thu, May 24, 11:50 PM
Quuxplusone created D47360: Implement <memory_resource> as a copy of <experimental/memory_resource>..
Thu, May 24, 11:49 PM
Quuxplusone added a dependent revision for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource.: D47360: Implement <memory_resource> as a copy of <experimental/memory_resource>..
Thu, May 24, 11:49 PM
Quuxplusone added a dependent revision for D46806: Remove unused code from __functional_base. NFC.: D47360: Implement <memory_resource> as a copy of <experimental/memory_resource>..
Thu, May 24, 11:49 PM
Quuxplusone added a dependent revision for D47109: LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()": D47360: Implement <memory_resource> as a copy of <experimental/memory_resource>..
Thu, May 24, 11:49 PM
Quuxplusone added a dependent revision for D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()": D47360: Implement <memory_resource> as a copy of <experimental/memory_resource>..
Thu, May 24, 11:49 PM
Quuxplusone created D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..
Thu, May 24, 10:33 PM
Quuxplusone updated the diff for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..

Fix one visibility macro.

Thu, May 24, 10:30 PM
Quuxplusone updated the diff for D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()".

Oops. If we do get an underaligned result, let's not leak it!

Thu, May 24, 7:50 PM
Quuxplusone created D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()".
Thu, May 24, 2:02 PM
Quuxplusone added a comment to D47109: LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()".

Sounds good to me. I don't have commit privs so could you land it for me?

Thu, May 24, 11:27 AM
Quuxplusone added inline comments to D47067: Update NRVO logic to support early return.
Thu, May 24, 12:34 AM

Tue, May 22

Quuxplusone added inline comments to D47067: Update NRVO logic to support early return.
Tue, May 22, 1:36 PM
Quuxplusone added inline comments to D41458: [libc++][C++17] Elementary string conversions for integral types.
Tue, May 22, 1:18 PM

May 20 2018

Quuxplusone updated the diff for D47090: Implement C++17 <memory_resource>..

Here's a work-in-progress, slightly-less-silly implementation of {un,}synchronized_pool_resource, plus a test.

May 20 2018, 9:49 PM

May 19 2018

Quuxplusone created D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..
May 19 2018, 3:47 PM
Quuxplusone added inline comments to D46806: Remove unused code from __functional_base. NFC..
May 19 2018, 12:53 PM
Quuxplusone updated the diff for D46806: Remove unused code from __functional_base. NFC..

@EricWF: would you mind landing these two drive-by fixes while you're at it?

May 19 2018, 12:50 PM
Quuxplusone added a comment to D47109: LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()".

This LGTM. Let's land it and see if anybody complains.

May 19 2018, 12:44 PM
Quuxplusone updated the diff for D47109: LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()".

Fix two more tests hiding in test/libcxx/, and give -U999 context.

May 19 2018, 12:23 PM
Quuxplusone created D47109: LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()".
May 19 2018, 12:16 PM
Quuxplusone added inline comments to D47090: Implement C++17 <memory_resource>..
May 19 2018, 11:39 AM

May 18 2018

Quuxplusone added a comment to D47090: Implement C++17 <memory_resource>..

I would prefer if we completed <experimental/memory_resource> (according to the current standard, not the LFTS spec), and then moved it.
Would you be willing to do that instead?

May 18 2018, 5:07 PM
Quuxplusone updated the summary of D47090: Implement C++17 <memory_resource>..
May 18 2018, 3:22 PM
Quuxplusone created D47090: Implement C++17 <memory_resource>..
May 18 2018, 3:22 PM

May 16 2018

Quuxplusone added inline comments to D46602: [clang-tidy] Store checks profiling info as JSON files.
May 16 2018, 11:10 AM · Restricted Project

May 14 2018

Quuxplusone added a comment to D45766: [Sema] Add -Wno-self-assign-overloaded.

Thank you for the test example! I got your point, but I wanted to ask if it should be like this for commutative operations?
In our case it is actually matrix, and subtraction of matrices is not commutative operation..

May 14 2018, 6:35 PM

May 13 2018

Quuxplusone updated the summary of D46807: Rename test_memory_resource.hpp -> test_experimental_memory_resource.hpp. NFC..
May 13 2018, 11:24 AM
Quuxplusone created D46807: Rename test_memory_resource.hpp -> test_experimental_memory_resource.hpp. NFC..
May 13 2018, 11:21 AM
Quuxplusone created D46806: Remove unused code from __functional_base. NFC..
May 13 2018, 11:19 AM

May 8 2018

Quuxplusone added a comment to D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

Can you post the diagnostic exactly as it appears in the compiler output? I am surprised that it would appear here. It should appear here only if the standard library's implicit conversion from std::map<...>::iterator to std::map<...>::const_iterator were implemented as a conversion operator instead of as a converting constructor. I have verified that both libstdc++ trunk and libc++ trunk implement it "correctly" as a converting constructor, and I have verified on Wandbox/Godbolt that no warning is emitted on your sample code when using either of those standard libraries.

Is it possible that you are using a standard library that is neither libc++ or libstdc++?

Is it possible that that standard library implements the iterator-to-const_iterator conversion as a conversion operator instead of a converting constructor?

May 8 2018, 7:21 PM · Restricted Project

Apr 30 2018

Quuxplusone added a comment to D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

Sorry, I responded via email but I guess Phabricator didn't pick it up for
some reason.
See below.

Apr 30 2018, 5:54 PM · Restricted Project

Apr 17 2018

Quuxplusone added inline comments to D45601: Warn on bool* to bool conversion.
Apr 17 2018, 11:23 AM
Quuxplusone added inline comments to D45601: Warn on bool* to bool conversion.
Apr 17 2018, 10:50 AM

Apr 16 2018

Quuxplusone added a comment to D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators..

I don't understand the spelling of this option. You spell it -wtest (because rjmccall suggested that spelling); but for my money it should be spelled -Wno-self-assign-nonfield.
Also, if you go this route, you miss the true positive reported by someone on the other patch, where the self-assignment involved a local variable named color.
Sorry I can't find the example right now. You'd have to trawl through all the patches opened on this subject in the past couple of weeks.

Apr 16 2018, 11:10 AM
Quuxplusone abandoned D44948: Add diagnostic -Waggregate-ctors, "aggregate type has user-declared constructors".

This patch's new home is https://github.com/Quuxplusone/clang/commits/aggregate-ctors — which is where I should have put it to begin with.

Apr 16 2018, 12:06 AM · Restricted Project

Apr 13 2018

Quuxplusone added inline comments to D45643: [Failing one test] Reword [-Wreturn-type] messages to "non-void x does not return a value".
Apr 13 2018, 6:41 PM · Restricted Project
Quuxplusone updated the summary of D45591: Clean carriage returns from lib/ and include/. NFC..
Apr 13 2018, 11:08 AM

Apr 12 2018

Quuxplusone added inline comments to D45601: Warn on bool* to bool conversion.
Apr 12 2018, 5:18 PM
Quuxplusone created D45591: Clean carriage returns from lib/ and include/. NFC..
Apr 12 2018, 1:56 PM

Apr 11 2018

Quuxplusone added a comment to D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17.

I'm waiting for @mclow.lists to have the final say re this differential.

Apr 11 2018, 11:15 AM

Apr 10 2018

Quuxplusone added a comment to D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

Tuesday ping! I just need someone to commit this for me.

Apr 10 2018, 10:12 AM · Restricted Project

Apr 9 2018

Quuxplusone added inline comments to D45403: Make [[maybe_unused]] work with static data members.
Apr 9 2018, 2:54 PM

Apr 5 2018

Quuxplusone updated the diff for D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

Finally learned how to "make check-clang" and actually run the test in the correct environment. Had to add -fcxx-exceptions to the command lines at the top of that file, because the code uses throw.

Apr 5 2018, 9:59 AM · Restricted Project

Apr 4 2018

Quuxplusone added a comment to D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17.

gcc does not silence the warning produced by
these attributes via (void) cast, unless it's [[nodiscard]] attribute :/
[...] So until they fix that (they will fix that right? :)),
we can only support _LIBCPP_FORCE_NODISCARD for clang compilers.

Apr 4 2018, 10:38 AM

Apr 3 2018

Quuxplusone added a comment to D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17.

If we must have an opt-in/out mechanism (which I don't believe we do)

Yes, we do. Opt-out is pre-existing, and removing it would be an [unacceptable] regression.

Apr 3 2018, 1:28 PM
Quuxplusone added a comment to D45163: [Sema] -Wunused-value: diagnose unused std::move() call results..

Well, we should feel welcome to submit patches to the C++ library implementations, I think. I can understand why Marshall is waiting to just do this until he gets a comprehensive committee paper, but he might consider taking a patch in the meantime.

That has been discussed, and it's not going to happen. Ask him if you want more info.

Apr 3 2018, 1:01 PM
Quuxplusone added inline comments to D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17.
Apr 3 2018, 12:55 PM

Apr 2 2018

Quuxplusone added a comment to D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes).

The warning is fundamentally about dataflow, but this doesn't apply to unevaluated expressions. There are plenty of cases where a user might want to ask if assignment is well formed on noexcept using only one variable. For example:

template <class T> void foo(T& value) noexcept(noexcept(value = value)) { /* perform an assignment somewhere */ }
Apr 2 2018, 4:11 PM
Quuxplusone added a comment to D45163: [Sema] -Wunused-value: diagnose unused std::move() call results..

std::move would definitely be special in this regard if there were a pressing benefit to be gained — i.e., if people were currently getting bitten by accidentally discarded calls of std::move(x). But you haven't shown that people are getting bitten today; in fact I think you said the opposite, right? that there were *no* instances of this happening in the real codebases you tested? So in that case, this diagnostic doesn't have a pressing benefit IMHO, and Clang could safely wait for the library vendors to do the work.

Apr 2 2018, 3:48 PM
Quuxplusone added a comment to D45163: [Sema] -Wunused-value: diagnose unused std::move() call results..

I think it wouldn't be unreasonable to ask standard library maintainers to add [[nodiscard]] to std::move

Apr 2 2018, 2:53 PM
Quuxplusone added a comment to D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

@rsmith ping?

Apr 2 2018, 12:09 PM · Restricted Project

Mar 31 2018

Quuxplusone added inline comments to D45128: [libcxx][test] Silence -Wself-assign diagnostics.
Mar 31 2018, 2:54 PM

Mar 28 2018

Quuxplusone updated the diff for D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

Addressed review comments from @rsmith and rebased on master.
I still need someone else to land this for me, though.

Mar 28 2018, 10:49 AM · Restricted Project

Mar 27 2018

Quuxplusone planned changes to D44948: Add diagnostic -Waggregate-ctors, "aggregate type has user-declared constructors".

This is related to an upcoming C++ paper, definitely not ready for prime time (e.g. no tests), and quite possibly never will be ready (although if people thought it would be useful, I'd be happy to clean it up and add tests).
I'll mark it "Plan Changes" for now and perhaps just abandon it in a few days/weeks. Sorry I didn't mark it as such to begin with.

Mar 27 2018, 4:49 PM · Restricted Project
Quuxplusone created D44948: Add diagnostic -Waggregate-ctors, "aggregate type has user-declared constructors".
Mar 27 2018, 12:40 PM · Restricted Project
Quuxplusone updated the summary of D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.
Mar 27 2018, 11:19 AM · Restricted Project
Quuxplusone updated the diff for D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

Rebased on master. AFAIK this is ready to go and I just need someone to land it for me... @rtrieu ping?

Mar 27 2018, 11:18 AM · Restricted Project

Mar 26 2018

Quuxplusone added a comment to D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes).

Two more high-level comments from me, and then I'll try to butt out.

Mar 26 2018, 10:41 AM

Mar 25 2018

Quuxplusone added inline comments to D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes).
Mar 25 2018, 8:07 PM

Mar 22 2018

Quuxplusone added a comment to D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

@rtrieu gentle ping!

Mar 22 2018, 10:15 AM · Restricted Project
Quuxplusone added inline comments to D33844: [clang-tidy] terminating continue check.
Mar 22 2018, 10:07 AM · Restricted Project

Mar 18 2018

Quuxplusone added a comment to D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

@rtrieu ping! I've rebased this on the pure refactoring you committed for me last week.

Mar 18 2018, 10:51 AM · Restricted Project

Mar 15 2018

Quuxplusone updated the diff for D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

Rebase on master, now that the refactoring D43898 has been pushed (thanks @rtrieu!)

Mar 15 2018, 11:48 AM · Restricted Project
Quuxplusone added inline comments to D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.
Mar 15 2018, 11:41 AM · Restricted Project

Mar 14 2018

Quuxplusone updated the diff for D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

Boldly add -Wreturn-std-move to -Wmove (and thus also to -Wall).
The backward-compatibility-concerned diagnostic, -Wreturn-std-move-in-c++11, is *not* appropriate for -Wmove; but I believe this main diagnostic is appropriate.

Mar 14 2018, 2:57 PM · Restricted Project

Mar 13 2018

Quuxplusone added a comment to D43898: Preliminary refactoring in service of -Wreturn-std-move. NFC..

@rtrieu thanks! I don't have commit privileges; could I ask you to commit this on my behalf? (Or if not, please say no, and I'll know to go looking for someone else to ask.)

Mar 13 2018, 5:24 PM

Mar 10 2018

Quuxplusone updated the diff for D43898: Preliminary refactoring in service of -Wreturn-std-move. NFC..

Addressed @rtrieu's comments.

Mar 10 2018, 11:57 AM
Quuxplusone updated the diff for D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.

Rebased on D43898 after addressing @rtrieu's latest comments over there.

Mar 10 2018, 11:57 AM · Restricted Project
Quuxplusone added inline comments to D43898: Preliminary refactoring in service of -Wreturn-std-move. NFC..
Mar 10 2018, 11:57 AM