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 (216 w, 3 d)

Recent Activity

Fri, Feb 8

Quuxplusone added a comment to D57906: [CTU] Do not allow different CPP dialects in CTU.

Consider this STL code:

template<typename _Alloc>
  struct __alloc_traits
#if __cplusplus >= 201103L
  : std::allocator_traits<_Alloc>
#endif
  { // ...
  };

This class template would create ODR errors during merging the two units,
since in one translation unit the class template has a base class, however
in the other unit it has none.

Fri, Feb 8, 7:32 AM · Restricted Project
Quuxplusone added inline comments to D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.
Fri, Feb 8, 7:30 AM · Restricted Project

Wed, Feb 6

Quuxplusone added inline comments to D57626: Disallow trivial_abi on a class if all copy and move constructors are deleted.
Wed, Feb 6, 10:39 AM · Restricted Project

Tue, Feb 5

Quuxplusone updated the diff for D57734: priority_queue::replace_top(x).

Reverted names back to friendly names. (The uglified __names were a conforming extension; but the friendly names are what people would actually want to use. As this patch is likely going to be stagnant on Phab for a while, I'd rather have it be in the state that's directly apply-able for anyone who does want to merge it locally.)

Tue, Feb 5, 10:22 AM · Restricted Project
Quuxplusone added a comment to D57734: priority_queue::replace_top(x).

@mclow.lists wrote:

Now no one outside of libc++ can call it (legally)

Tue, Feb 5, 9:16 AM · Restricted Project
Quuxplusone added inline comments to D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.
Tue, Feb 5, 9:10 AM · Restricted Project
Quuxplusone updated the diff for D57734: priority_queue::replace_top(x).

@mclow.lists: Easy peasy! Please take another look.

Tue, Feb 5, 8:45 AM · Restricted Project

Mon, Feb 4

Quuxplusone updated the diff for D57734: priority_queue::replace_top(x).

Brought unit tests into line with https://reviews.llvm.org/rL353086

Mon, Feb 4, 11:21 PM · Restricted Project
Quuxplusone updated the diff for D47360: Implement <memory_resource> as a copy of <experimental/memory_resource>..

Rebased on master. Added to <version> by updating and running the Python script.

Mon, Feb 4, 10:08 PM
Quuxplusone added a comment to D57624: Support tests in freestanding.

Hi @jfb, this commit broke /utils/generate_feature_test_macro_components.py in the libc++ repo by replacing two curly braces with one curly brace:

Mon, Feb 4, 9:31 PM · Restricted Project
Quuxplusone updated the diff for D47358: <experimental/memory_resource>: Implement {un,}synchronized_pool_resource..

Rebased on master. @EricWF (cc @AlisdairM) ping!

Mon, Feb 4, 9:18 PM
Quuxplusone updated the diff for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..

Rebased on master. @EricWF (cc @AlisdairM) ping!

Mon, Feb 4, 8:44 PM
Quuxplusone updated the diff for D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()".

Rebased on master. @EricWF ping! It's been quite a few months...

Mon, Feb 4, 8:17 PM
Quuxplusone created D57734: priority_queue::replace_top(x).
Mon, Feb 4, 8:12 PM · Restricted Project
Quuxplusone added inline comments to D57626: Disallow trivial_abi on a class if all copy and move constructors are deleted.
Mon, Feb 4, 3:03 PM · Restricted Project

Sun, Feb 3

Quuxplusone added a comment to D57626: Disallow trivial_abi on a class if all copy and move constructors are deleted.

Can you give more intuition on why classes with no copy/move operations should be forced non-trivial-abi? Let's take this specific example:

Sun, Feb 3, 7:55 AM · Restricted Project

Jan 17 2019

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

LGTM!

Jan 17 2019, 9:23 AM

Jan 15 2019

Quuxplusone added a comment to D56731: Add -Wctad-maybe-unsupported to diagnose CTAD on types with no user defined deduction guides..

we need to keep in mind while making that decision that a warning that is either off-by-default or turned off by nearly everyone delivers much less value

Jan 15 2019, 11:00 PM
Quuxplusone added a comment to D56731: Add -Wctad-maybe-unsupported to diagnose CTAD on types with no user defined deduction guides..

Concretely, I think we could warn if, during template instantiation from a type-dependent initializer, we select the copy deduction candidate and there was another viable candidate (the optional o(x) case, the tuple t{args...} case, etc), maybe under a new -Wctad-unwrap or similar.

Jan 15 2019, 3:38 PM
Quuxplusone added inline comments to D56731: Add -Wctad-maybe-unsupported to diagnose CTAD on types with no user defined deduction guides..
Jan 15 2019, 2:24 PM
Quuxplusone added inline comments to D56731: Add -Wctad-maybe-unsupported to diagnose CTAD on types with no user defined deduction guides..
Jan 15 2019, 10:46 AM

Jan 14 2019

Quuxplusone added a comment to D56277: AggressiveInstCombine: Add tests for full multiplication pattern match.

@lebedev.ri ping?

Jan 14 2019, 5:18 PM

Jan 7 2019

Quuxplusone added inline comments to D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch..
Jan 7 2019, 3:25 PM
Quuxplusone added inline comments to D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch..
Jan 7 2019, 1:56 PM

Jan 5 2019

Quuxplusone added inline comments to D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch..
Jan 5 2019, 9:16 AM

Jan 4 2019

Quuxplusone added inline comments to D55933: [Sema] Do not print default template parameters..
Jan 4 2019, 10:16 AM

Jan 3 2019

Quuxplusone added inline comments to D56277: AggressiveInstCombine: Add tests for full multiplication pattern match.
Jan 3 2019, 10:25 AM
Quuxplusone added inline comments to D55933: [Sema] Do not print default template parameters..
Jan 3 2019, 9:06 AM

Jan 2 2019

Quuxplusone added inline comments to D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.
Jan 2 2019, 3:39 PM · Restricted Project

Dec 29 2018

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

@EricWF ping!
and oops, I never submitted these comments, I guess.

Dec 29 2018, 4:34 PM
Quuxplusone updated the diff for D47111: <experimental/memory_resource>: Implement monotonic_buffer_resource..

Updated and addressed review comments.
test/std/experimental/memory/memory.resource.monotonic.buffer/monotonic.buffer.mem/allocate_overaligned_request.pass.cpp is now XFAILed on OSX platforms, using code copied-and-pasted from test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp.

Dec 29 2018, 4:33 PM
Quuxplusone updated the diff for D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()".
Dec 29 2018, 2:27 PM
Quuxplusone added a comment to D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()".

@EricWF ping!

Dec 29 2018, 1:32 PM

Dec 24 2018

Quuxplusone added inline comments to D55955: Properly diagnose [[nodiscard]] on the body of a range-based for loop.
Dec 24 2018, 12:33 PM

Dec 22 2018

Quuxplusone added a comment to D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.
  • using CTAD on arbitrary class templates that weren't designed for it creates a source compatibility problem that the class template author has no control over nor say in
  • using CTAD on class templates that were designed for it does not create a new source compatibility problem -- the class template author created the source compatibility problem themselves when they designed how their class templates would interact with CTAD
Dec 22 2018, 10:14 AM

Dec 21 2018

Quuxplusone added inline comments to D55933: [Sema] Do not print default template parameters..
Dec 21 2018, 1:52 PM
Quuxplusone added a comment to D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.

Since I don't know what it means, I don't know if I want a diagnostic for it :-)

Dec 21 2018, 1:34 PM

Dec 20 2018

Quuxplusone added a comment to D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.

@rsmith ping! It's been a week since the last ping...

Dec 20 2018, 11:40 PM
Quuxplusone added inline comments to D55933: [Sema] Do not print default template parameters..
Dec 20 2018, 8:11 AM

Dec 19 2018

Quuxplusone added inline comments to D54472: Disable invalid isPodLike<> specialization.
Dec 19 2018, 11:10 AM
Quuxplusone added inline comments to D54472: Disable invalid isPodLike<> specialization.
Dec 19 2018, 11:02 AM
Quuxplusone added a comment to D55552: [Sema] Better static assert diagnostics for expressions involving temporaries..

LGTM. Tiny style suggestions, which I won't mind if you ignore.

Dec 19 2018, 9:25 AM
Quuxplusone added inline comments to D54472: Disable invalid isPodLike<> specialization.
Dec 19 2018, 8:21 AM

Dec 14 2018

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

@EricWF ping!

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

@rsmith ping!

Dec 14 2018, 8:42 AM
Quuxplusone updated the summary of D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`.
Dec 14 2018, 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`.
Dec 14 2018, 8:38 AM

Dec 13 2018

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?

Dec 13 2018, 7:49 AM

Dec 11 2018

Quuxplusone added inline comments to D48753: [libcxx] Use custom allocator's `construct` in C++03 when available..
Dec 11 2018, 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

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

Dec 10 2018

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

@EricWF ping!

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

Address review comments.

Dec 10 2018, 7:39 AM

Dec 9 2018

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!

Dec 9 2018, 1:58 PM

Dec 8 2018

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

Dec 7 2018

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

Dec 6 2018

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."

Dec 6 2018, 5:08 AM

Dec 4 2018

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

Nov 30 2018

Quuxplusone added inline comments to D54472: Disable invalid isPodLike<> specialization.
Nov 30 2018, 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.

Nov 30 2018, 5:20 PM

Nov 29 2018

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

LGTM, for what that's worth!

Nov 29 2018, 9:15 AM

Nov 28 2018

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".

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

Nov 27 2018

Quuxplusone added inline comments to D54472: Disable invalid isPodLike<> specialization.
Nov 27 2018, 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.

Nov 27 2018, 10:01 PM · Restricted Project
Quuxplusone added inline comments to D54903: [Sema] Improve static_assert diagnostics..
Nov 27 2018, 3:32 PM
Quuxplusone updated the summary of D54885: Assigning to a local object in a return statement prevents copy elision. NFC..
Nov 27 2018, 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. :)

Nov 27 2018, 9:32 AM

Nov 26 2018

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

Nov 25 2018

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

Nov 21 2018

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.

Nov 21 2018, 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.

Nov 21 2018, 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.

Nov 21 2018, 7:41 AM

Nov 20 2018

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

@EricWF ping? (and D47344 D47111 D47358)

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

@lebedev.ri ping?

Nov 20 2018, 7:11 AM

Nov 19 2018

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.

Nov 19 2018, 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.

Nov 19 2018, 1:50 PM
Quuxplusone added inline comments to D54673: Fix some `-Wshadow` diagnostics emitted by Clang trunk.
Nov 19 2018, 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.

Nov 19 2018, 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