Page MenuHomePhabricator

Quuxplusone (Arthur O'Dwyer)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Fri, Dec 14

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

@EricWF ping!

Fri, Dec 14, 8:43 AM
Quuxplusone added a comment to D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.

@rsmith ping!

Fri, Dec 14, 8:42 AM
Quuxplusone updated the summary of D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.
Fri, Dec 14, 8:39 AM
Quuxplusone retitled D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat` from Introduce `-Wc++14-compat-ctad` as a subgroup of `-Wc++14-compat` to Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.
Fri, Dec 14, 8:38 AM

Thu, Dec 13

Quuxplusone added a comment to D54472: Disable invalid isPodLike<> specialization.

LGTM at this point modulo my two comments (one important but trivial, the other completely trivial).
I don't know whether Chandler's concern about __has_feature in "include/llvm/ADT/PointerIntPair.h" has been 100% resolved yet — @chandlerc?

Thu, Dec 13, 7:49 AM

Tue, Dec 11

Quuxplusone added inline comments to D48753: [libcxx] Use custom allocator's `construct` in C++03 when available..
Tue, Dec 11, 5:28 PM
Quuxplusone added a comment to D55270: [Sema] Further improvements to to static_assert diagnostics..

@courbet: On the cpplang Slack, Peter Feichtinger mentioned that defaulted template arguments should perhaps be treated differently. Is there any way to suppress the , std::allocator<int> part of this diagnostic? https://godbolt.org/z/TM0UHc

Tue, Dec 11, 2:42 PM
Quuxplusone added inline comments to D55552: [Sema] Better static assert diagnostics for expressions involving temporaries..
Tue, Dec 11, 7:05 AM

Mon, Dec 10

Quuxplusone added inline comments to D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch..
Mon, Dec 10, 12:34 PM
Quuxplusone updated the diff for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..

@EricWF ping!

Mon, Dec 10, 9:28 AM
Quuxplusone updated the diff for D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()".

Address review comments.

Mon, Dec 10, 7:39 AM

Sun, Dec 9

Quuxplusone added a comment to D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..

@EricWF ping? This still needs someone to land it; I don't have commit privs. Thanks!

Sun, Dec 9, 1:58 PM

Sat, Dec 8

Quuxplusone added inline comments to D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch..
Sat, Dec 8, 8:41 AM
Quuxplusone updated subscribers of D55270: [Sema] Further improvements to to static_assert diagnostics..
Sat, Dec 8, 8:25 AM

Fri, Dec 7

Quuxplusone added inline comments to D55270: [Sema] Further improvements to to static_assert diagnostics..
Fri, Dec 7, 7:07 AM

Thu, Dec 6

Quuxplusone updated the diff for D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.

Rename -Wc++14-compat-ctad to just -Wctad, per @rsmith's comment to "move this out of -Wc++14-compat."

Thu, Dec 6, 5:08 AM

Tue, Dec 4

Quuxplusone added inline comments to D55270: [Sema] Further improvements to to static_assert diagnostics..
Tue, Dec 4, 2:31 PM
Quuxplusone added inline comments to D54472: Disable invalid isPodLike<> specialization.
Tue, Dec 4, 9:50 AM

Fri, Nov 30

Quuxplusone added inline comments to D54472: Disable invalid isPodLike<> specialization.
Fri, Nov 30, 6:18 PM
Quuxplusone added a comment to D54903: [Sema] Improve static_assert diagnostics..

Looks fine to me; please don't let me block this any further. :) Someone else, e.g. @aaron.ballman, should be the one to accept it, though.

Fri, Nov 30, 5:20 PM

Thu, Nov 29

Quuxplusone accepted D55005: Avoid redundant reference to isPodLike in SmallVect implementation.

LGTM, for what that's worth!

Thu, Nov 29, 9:15 AM

Wed, Nov 28

Quuxplusone added a comment to D55005: Avoid redundant reference to isPodLike in SmallVect implementation.

My comment on D54472 didn't mention it because I thought it would be obvious, but the same pattern applies to your proposed diffs in "include/llvm/ADT/Optional.h".

Wed, Nov 28, 12:02 PM
Quuxplusone added inline comments to D55005: Avoid redundant reference to isPodLike in SmallVect implementation.
Wed, Nov 28, 11:59 AM
Quuxplusone added inline comments to D54903: [Sema] Improve static_assert diagnostics..
Wed, Nov 28, 11:54 AM
Quuxplusone added inline comments to D54903: [Sema] Improve static_assert diagnostics..
Wed, Nov 28, 5:39 AM
Quuxplusone added inline comments to D54903: [Sema] Improve static_assert diagnostics..
Wed, Nov 28, 5:29 AM

Tue, Nov 27

Quuxplusone added inline comments to D54472: Disable invalid isPodLike<> specialization.
Tue, Nov 27, 10:14 PM
Quuxplusone added a comment to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

Hmm. I don't remember what we do in this case for trivial_abi (which does need to address it because it's possible to return types like DestroyBase). It looks like we currently make it non-trivial. But trivial-ABI needs to consider copy constructors as well as move constructors, which would undermine my case that it should be a subset of trivially-relocatability, at least in the fantasy world where there are correct types which default their move constructors but not their copy constructors or vice-versa.

Tue, Nov 27, 10:01 PM · Restricted Project
Quuxplusone added inline comments to D54903: [Sema] Improve static_assert diagnostics..
Tue, Nov 27, 3:32 PM
Quuxplusone updated the summary of D54885: Assigning to a local object in a return statement prevents copy elision. NFC..
Tue, Nov 27, 9:39 AM
Quuxplusone updated the diff for D54885: Assigning to a local object in a return statement prevents copy elision. NFC..

Extend my check to include return ++x, which catches a couple more cases. These are iterator types, which means they are presumably "cheap" to copy; but they aren't trivial, unless my checker has a bug. :)

Tue, Nov 27, 9:32 AM

Mon, Nov 26

Quuxplusone added inline comments to D54885: Assigning to a local object in a return statement prevents copy elision. NFC..
Mon, Nov 26, 4:38 PM
Quuxplusone added inline comments to D54885: Assigning to a local object in a return statement prevents copy elision. NFC..
Mon, Nov 26, 2:28 PM

Sun, Nov 25

Quuxplusone created D54885: Assigning to a local object in a return statement prevents copy elision. NFC..
Sun, Nov 25, 9:07 PM

Wed, Nov 21

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

Change 1 << to size_t(1) << in one last place. @EricWF ping.

Wed, Nov 21, 8:55 PM
Quuxplusone added a comment to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

I still believe it is impossible to implement std::optional with only [[maybe_trivially_relocatable]].

This might also need elaboration.

Because __optional_destruct_base contains an anonymous union member, and that union type is not destructible; therefore that union type is not trivially relocatable; therefore __optional_destruct_base contains a member of non-trivially-destructible type. However, I'm working on changing my patch to make anonymous unions "see-through" in this respect, so that that union's non-destructibility doesn't interfere with the [[maybe_trivially_relocatable]]ity of its enclosing class type, as long as all the members of the union are trivially relocatable. This might fix optional. I'm not sure yet.

Ah, that makes sense. And yeah, that seems like the right rule for unions. I really appreciate you putting the effort into exploring this part of the design space.

Wed, Nov 21, 10:14 AM · Restricted Project
Quuxplusone added a comment to D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.

In the past, we've been resistant to adding more fine-grained compat warnings, because we don't want to encourage subsetting the language (which sounds like exactly what you're trying to do here). We generally don't think it's Clang's business to enforce coding style conventions (such as "don't use CTAD because it makes your code less readable"), but we do consider it to be in-scope for Clang to warn on constructs that are error-prone or that have a negative impact on portability or compatibility, and so on. On that basis, I think there is a case to be made for warning on this specific language feature, because using CTAD on class templates that weren't designed for it is dangerous and creates source compatibility problems for future changes to that library.

Wed, Nov 21, 7:41 AM

Tue, Nov 20

Quuxplusone added a comment to D47360: Implement <memory_resource> as a copy of <experimental/memory_resource>..

@EricWF ping? (and D47344 D47111 D47358)

Tue, Nov 20, 7:11 AM
Quuxplusone added a comment to D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.

@lebedev.ri ping?

Tue, Nov 20, 7:11 AM

Mon, Nov 19

Quuxplusone added a comment to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

In the unordered_set [[maybe_trivially_relocatable]] patch, I must wrap the attribute in a macro _LIBCPP_MAYBE_TRIVIALLY_RELOCATABLE_UNLESS_DEBUG. Without this caveat, I would have ended up with unsafe behavior in debug mode. The unordered_set [[trivially_relocatable]] patch does not have this danger; the fact that we break the Rule of Zero in debug mode is sufficient to disable trivial relocatability.

Can you elaborate? Providing a non-defaulted copy/move constructor or destructor should make an unannotated class non-trivially-relocatable under both rules.

Mon, Nov 19, 4:21 PM · Restricted Project
Quuxplusone added a comment to D54673: Fix some `-Wshadow` diagnostics emitted by Clang trunk.

This is what I see when building make -j5 check-cxx with Clang trunk (built from source) on OS X.

Mon, Nov 19, 1:50 PM
Quuxplusone added inline comments to D54673: Fix some `-Wshadow` diagnostics emitted by Clang trunk.
Mon, Nov 19, 1:49 PM
Quuxplusone added a comment to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

Now that [[clang::maybe_trivially_relocatable]] is implemented, we can see if it does actually simplify the libc++ patch. I will try to get to that tonight.

Mon, Nov 19, 1:42 PM · Restricted Project

Nov 17 2018

Quuxplusone created D54673: Fix some `-Wshadow` diagnostics emitted by Clang trunk.
Nov 17 2018, 6:44 PM
Quuxplusone updated the diff for D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

Implement [[clang::maybe_trivially_relocatable]] along the lines suggested by @rjmccall. The idea is that there are two levels of "opt-in-ness."

Nov 17 2018, 12:01 PM · Restricted Project
Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Nov 17 2018, 9:51 AM · Restricted Project

Nov 16 2018

Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Nov 16 2018, 10:44 PM · Restricted Project
Quuxplusone updated the diff for D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

Use [[clang::trivially_relocatable]] instead of [[trivially_relocatable]].
Canonicalize in QualType::isTriviallyRelocatableType.
Slight wording tweaks to the documentation.

Nov 16 2018, 10:41 PM · Restricted Project
Quuxplusone updated the diff for D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.

Added a test case (partly copied from test/SemaCXX/cxx14-compat.cpp).

Nov 16 2018, 2:25 PM
Quuxplusone abandoned D51135: Rename has{MutableFields,VolatileMember} to has{Mutable,Volatile}Subobject. NFC..
Nov 16 2018, 2:08 PM
Quuxplusone abandoned D54479: Mark some library types and templates with visibility+availability attributes..

Discussed offline with @ldionne and my verdict was "If there is any rule for adding these attributes, then the current codebase doesn't follow that rule very well." So, abandoning; and if there's any ad-hoc fix to be made in the areas touched by this patch, then Louis can make it.

Nov 16 2018, 2:07 PM

Nov 14 2018

Quuxplusone updated the diff for D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.

Third time's the charm!

Nov 14 2018, 8:05 PM
Quuxplusone updated the diff for D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.

Fix naming. (Uploaded an earlier diff by accident.)

Nov 14 2018, 7:39 PM
Quuxplusone created D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.
Nov 14 2018, 7:39 PM
Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Nov 14 2018, 12:16 PM · Restricted Project
Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Nov 14 2018, 8:58 AM · Restricted Project

Nov 13 2018

Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Nov 13 2018, 5:44 PM · Restricted Project
Quuxplusone updated the diff for D54479: Mark some library types and templates with visibility+availability attributes..

Re-add _LIBCPP_TYPE_VIS to __assoc_sub_state because it is mentioned in the mangled names of functions exported from src/future.cpp.
Remove _LIBCPP_AVAILABILITY_FUTURE from types that aren't supposed to be visible to user-programmers anyway (IIUC).

Nov 13 2018, 3:31 PM
Quuxplusone added inline comments to D54479: Mark some library types and templates with visibility+availability attributes..
Nov 13 2018, 3:28 PM
Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Nov 13 2018, 2:48 PM · Restricted Project
Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Nov 13 2018, 11:07 AM · Restricted Project
Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Nov 13 2018, 10:16 AM · Restricted Project
Quuxplusone created D54479: Mark some library types and templates with visibility+availability attributes..
Nov 13 2018, 9:15 AM
Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Nov 13 2018, 8:19 AM · Restricted Project

Nov 11 2018

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

Rebased on master. @EricWF @ldionne ping please?

Nov 11 2018, 9:53 PM
Quuxplusone updated the diff for D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()".
Nov 11 2018, 9:40 PM
Quuxplusone updated the diff for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..

Rebased on master. @EricWF @ldionne ping please?

Nov 11 2018, 9:22 PM
Quuxplusone updated the diff for D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()".

Rebased on master. @EricWF @ldionne ping please?

Nov 11 2018, 9:18 PM

Oct 3 2018

Quuxplusone updated the diff for D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()".

Rebased on master. Added @ldionne as reviewer.

Oct 3 2018, 2:01 PM
Quuxplusone added a reviewer for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource.: ldionne.
Oct 3 2018, 1:53 PM

Sep 15 2018

Quuxplusone added a comment to D52137: Added warning for unary minus used with unsigned type.

I think we can and should do better about false positives here. If you move this check to SemaChecking, you can produce the warning in a context where you know what the final type is -- I don't think there's any reason to warn if the final type is signed and no wider than the promoted type of the negation.

Sep 15 2018, 1:09 PM

Sep 6 2018

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

@EricWF ping?

Sep 6 2018, 5:08 PM

Aug 24 2018

Quuxplusone added inline comments to D51200: Introduce per-callsite inline intrinsics.
Aug 24 2018, 9:51 AM · Restricted Project

Aug 22 2018

Quuxplusone created D51135: Rename has{MutableFields,VolatileMember} to has{Mutable,Volatile}Subobject. NFC..
Aug 22 2018, 3:45 PM

Aug 21 2018

Quuxplusone updated the diff for D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

Update to match the wording in D1144R0 draft revision 13. There's no longer any need to fail when we see a mutable member; on the other hand, we *always* need to perform the special member lookup to find out if our class is move-constructible and destructible.

Aug 21 2018, 5:59 PM · Restricted Project

Aug 19 2018

Quuxplusone added inline comments to D41284: [Concepts] Associated constraints infrastructure..
Aug 19 2018, 12:16 AM

Aug 18 2018

Quuxplusone added inline comments to D41284: [Concepts] Associated constraints infrastructure..
Aug 18 2018, 3:58 PM

Aug 17 2018

Quuxplusone added inline comments to D41284: [Concepts] Associated constraints infrastructure..
Aug 17 2018, 3:49 PM
Quuxplusone updated the diff for D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

A type with no move-constructor, and some non-defaulted copy-constructors (even if it *also* has some defaulted copy-constructors) should not be considered naturally trivially relocatable. The paper already said this, but the Clang patch was misimplemented.

Aug 17 2018, 2:40 AM · Restricted Project

Aug 16 2018

Quuxplusone added a comment to D50805: Don't warn on returning the address of a label from a statement expression.

I think that, ultimately, this warning isn't worth the code complexity in clang to support it.

Aug 16 2018, 12:02 AM · Restricted Project

Aug 14 2018

Quuxplusone updated the diff for D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

Rebased, and ping!

Aug 14 2018, 11:09 AM · Restricted Project

Aug 13 2018

Quuxplusone added a comment to D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..

Long-delayed ping!

Aug 13 2018, 1:18 AM

Aug 11 2018

Quuxplusone added inline comments to D41217: [Concepts] Concept Specialization Expressions.
Aug 11 2018, 10:41 AM

Aug 7 2018

Quuxplusone added inline comments to D50421: [libcxx] [test] Remove assertion that <bitset> includes <cstddef> and <stdexcept>..
Aug 7 2018, 5:10 PM

Aug 3 2018

Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Aug 3 2018, 1:04 PM · Restricted Project
Quuxplusone updated the diff for D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

Correctly drop the attribute from non-relocatable instantiations of class templates (even though they don't print the diagnostic).

Aug 3 2018, 12:50 PM · Restricted Project

Aug 2 2018

Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Aug 2 2018, 4:32 PM · Restricted Project
Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Aug 2 2018, 12:59 PM · Restricted Project
Quuxplusone updated the diff for D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

Further removal of dead code based on @Rakete1111's feedback.

Aug 2 2018, 12:58 PM · Restricted Project

Aug 1 2018

Quuxplusone updated the diff for D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

clang-format.

Aug 1 2018, 1:22 PM · Restricted Project
Quuxplusone added inline comments to D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Aug 1 2018, 1:12 PM · Restricted Project
Quuxplusone updated the diff for D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".

Address feedback from @Rakete1111. Fix wrong ordering of 'class|struct|...' in the diagnostic. Add union test cases. Correctly drop the attribute whenever it is diagnosed as inapplicable.

Aug 1 2018, 1:11 PM · Restricted Project

Jul 31 2018

Quuxplusone created D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)".
Jul 31 2018, 5:20 PM · Restricted Project

Jul 30 2018

Quuxplusone added a comment to D41458: [libc++][C++17] Elementary string conversions for integral types.

@lichray: I'm interested in merging this patch into my libc++ fork, but the latest update seems to be missing a ton of files. For example charconv_test_helpers.h is included by one of the tests, but does not exist. Also there's a lot of boilerplate missing: you ought to add the new header to module.modulemap, and to double_include.sh.cpp, and so on. Might you upload a new patch anytime soon?

Jul 30 2018, 8:53 PM
Quuxplusone added a comment to D49317: Move __construct_forward (etc.) out of std::allocator_traits..

After thinking about this for some more, I'm not sure this patch is worth doing in its current form. The minimal patch for allowing specializations of allocator_traits would be:

  1. move the __move_construct_forward & friends functions from allocator_traits to private static member functions of std::vector (because they're only used in std::vector right now).
  2. keep the SFINAE on the allocator and avoid encoding any memcpy decision at the call site.
Jul 30 2018, 1:00 PM
Quuxplusone added a comment to D49317: Move __construct_forward (etc.) out of std::allocator_traits..

@mclow.lists: Well, anyway, is this pure refactoring acceptable, or would you prefer to keep these helpers inside allocator_traits until a better solution to constexpr-memcpy can be invented?

Jul 30 2018, 11:20 AM
Quuxplusone added inline comments to D49317: Move __construct_forward (etc.) out of std::allocator_traits..
Jul 30 2018, 10:47 AM
Quuxplusone updated the summary of D49317: Move __construct_forward (etc.) out of std::allocator_traits..
Jul 30 2018, 10:20 AM
Quuxplusone added inline comments to D49317: Move __construct_forward (etc.) out of std::allocator_traits..
Jul 30 2018, 10:13 AM

Jul 27 2018

Quuxplusone added a comment to D49317: Move __construct_forward (etc.) out of std::allocator_traits..

@ldionne: I don't know if your "LGTM" is necessarily sufficient to commit this or not; but either way, I don't have commit privs, so could I ask you (or someone else) to commit this on my behalf? Thanks!

Jul 27 2018, 1:31 PM