Page MenuHomePhabricator
Feed Advanced Search

Today

rsmith added a comment to D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression.

I don't think this problem really has anything to do with statement expressions; consider:

Wed, Jul 17, 7:44 PM · Restricted Project

Yesterday

rsmith added inline comments to D64838: [Attr] Support _attribute__ ((fallthrough)).
Tue, Jul 16, 11:33 PM · Restricted Project

Fri, Jul 12

rsmith added inline comments to D64656: Ensure placeholder instruction for cleanup is created.
Fri, Jul 12, 5:50 PM · Restricted Project
rsmith updated subscribers of D64448: gsl::Owner/gsl::Pointer: Add implicit annotations for some std types.
Fri, Jul 12, 2:29 PM · Restricted Project
rsmith added inline comments to D64656: Ensure placeholder instruction for cleanup is created.
Fri, Jul 12, 2:10 PM · Restricted Project
rsmith added inline comments to D63508: make -frewrite-includes also rewrite conditions in #if/#elif.
Fri, Jul 12, 12:59 PM · Restricted Project

Tue, Jul 9

rsmith added a comment to D64380: Add 'require_designated_init' and 'required' attribute to clang.

C++20 designated initializers don't permit mixing designated fields with non-designated ones, so some of the examples here are invalid. However, I think we should be looking for an attribute design that works well in both C and C++, and with the various Clang extensions that permit the full generality of C designated initializers in other language modes. I also think this patch is combining multiple features that would be useful to expose separately. To that end, I think something like this might make sense:

Tue, Jul 9, 4:49 PM · Restricted Project
Herald added a project to D50763: [Parser] Refactor and fix bugs in late-parsing: Restricted Project.
Tue, Jul 9, 4:30 PM · Restricted Project
rsmith accepted D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272.

LGTM, thanks!

Tue, Jul 9, 12:40 PM · Restricted Project, Restricted Project, Restricted Project
rsmith accepted D63894: [CXX] Exercise all paths through these tests.
Tue, Jul 9, 12:38 PM · Restricted Project, Restricted Project

Mon, Jul 8

rsmith committed rL365377: Add missing declarations of explicit member specializations..
Add missing declarations of explicit member specializations.
Mon, Jul 8, 12:48 PM
rsmith accepted D64058: [cxx2a] P0624R2 fix: only lambdas with no lambda-capture are default-constructible and assignable..

Do you have commit access or do you need someone to commit this for you?

Mon, Jul 8, 12:48 PM · Restricted Project, Restricted Project
rsmith added inline comments to D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272.
Mon, Jul 8, 12:33 PM · Restricted Project, Restricted Project, Restricted Project

Sat, Jul 6

rsmith committed rL365272: Treat the range of representable values of floating-point types as [-inf, +inf]….
Treat the range of representable values of floating-point types as [-inf, +inf]…
Sat, Jul 6, 2:06 PM
rsmith closed D63793: Treat the range of representable values of floating-point types as [-inf, +inf] not as [-max, +max]..
Sat, Jul 6, 2:06 PM · Restricted Project, Restricted Project

Mon, Jul 1

rsmith accepted D62825: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast.

LG with a few tweaks.

Mon, Jul 1, 11:26 AM · Restricted Project, Restricted Project

Fri, Jun 28

rsmith added a reviewer for D63793: Treat the range of representable values of floating-point types as [-inf, +inf] not as [-max, +max].: spatel.
Fri, Jun 28, 12:56 PM · Restricted Project, Restricted Project

Thu, Jun 27

rsmith accepted D62293: [modules] Add PP callbacks for entering and leaving a submodule..
Thu, Jun 27, 3:18 PM · Restricted Project
rsmith accepted D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos.
Thu, Jun 27, 3:18 PM · Restricted Project
rsmith added inline comments to D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available..
Thu, Jun 27, 3:15 PM · Restricted Project
rsmith updated the diff for D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available..
  • Replace #defines of field names in non-[[no_unique_address]] mode with accessor functions
Thu, Jun 27, 3:15 PM · Restricted Project
rsmith added a comment to D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available..

I like this, however I want to echo @EricWF 's concern about the conditional compilation this introduces. Do we get any benefit if we still use compressed_pair but switch THAT to use no_unique_address instead?

Thu, Jun 27, 12:56 PM · Restricted Project

Wed, Jun 26

rsmith added a comment to D62648: [Sema][Typo] Fix assertion failure for expressions with multiple typos.

Thanks, this looks good; just some nits.

Wed, Jun 26, 1:59 PM · Restricted Project

Tue, Jun 25

rsmith added a comment to D63508: make -frewrite-includes also rewrite conditions in #if/#elif.

Patch generally looks good; just a minor concern about the output format.

Tue, Jun 25, 5:35 PM · Restricted Project
rsmith added inline comments to D60480: [libc++] Integrate the PSTL into libc++.
Tue, Jun 25, 3:23 PM · Restricted Project, Restricted Project
rsmith created D63793: Treat the range of representable values of floating-point types as [-inf, +inf] not as [-max, +max]..
Tue, Jun 25, 2:45 PM · Restricted Project, Restricted Project
rsmith committed rL364347: Remove redundant expression evaluation context when substituting into a.
Remove redundant expression evaluation context when substituting into a
Tue, Jun 25, 1:49 PM
rsmith committed rL364340: Add regression test for PR41576 (which is already fixed in trunk,.
Add regression test for PR41576 (which is already fixed in trunk,
Tue, Jun 25, 11:51 AM
rsmith added a comment to D62293: [modules] Add PP callbacks for entering and leaving a submodule..

PPCallbacks seems to be missing the addition of EnteredSubmodule and LeftSubmodule; PPChainedCallbacks seems to be missing the addition of LeftSubmodule.

Tue, Jun 25, 11:25 AM · Restricted Project

Mon, Jun 24

rsmith committed rL364265: [cxx2a] P1236R1: the validity of a left shift does not depend on the.
[cxx2a] P1236R1: the validity of a left shift does not depend on the
Mon, Jun 24, 6:48 PM
rsmith updated the diff for D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available..
  • Rename __hash_ macro to avoid name collision.
Mon, Jun 24, 5:56 PM · Restricted Project
rsmith updated the diff for D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available..
  • Address a couple of review comments from Marshall.
Mon, Jun 24, 5:51 PM · Restricted Project
rsmith created D63748: Pass std::unique_ptr, std::shared_ptr and std::weak_ptr in registers when possible..
Mon, Jun 24, 5:42 PM · Restricted Project
rsmith added a child revision for D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available.: D63748: Pass std::unique_ptr, std::shared_ptr and std::weak_ptr in registers when possible..
Mon, Jun 24, 5:42 PM · Restricted Project
rsmith updated the diff for D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available..
  • Revert one more vestigial change.
Mon, Jun 24, 4:19 PM · Restricted Project
rsmith updated the diff for D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available..
  • Revert vestigial changes to __compressed_pair.
Mon, Jun 24, 4:19 PM · Restricted Project
rsmith updated the summary of D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available..
Mon, Jun 24, 4:14 PM · Restricted Project
rsmith created D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available..
Mon, Jun 24, 4:13 PM · Restricted Project
rsmith committed rL364241: Fix test failures due to modified wording in Clang diagnostics..
Fix test failures due to modified wording in Clang diagnostics.
Mon, Jun 24, 3:01 PM
rsmith committed rL364239: Fix test failures when using a custom ABI namespace..
Fix test failures when using a custom ABI namespace.
Mon, Jun 24, 2:47 PM

Sun, Jun 23

rsmith committed rL364165: PR42362: Fix auto deduction of template parameter packs from.
PR42362: Fix auto deduction of template parameter packs from
Sun, Jun 23, 10:54 PM
rsmith committed rL364157: Fix test for 32-bit targets..
Fix test for 32-bit targets.
Sun, Jun 23, 10:42 AM

Sat, Jun 22

rsmith committed rL364140: Fix TBAA representation for zero-sized fields and unnamed bit-fields..
Fix TBAA representation for zero-sized fields and unnamed bit-fields.
Sat, Jun 22, 2:32 PM
rsmith committed rL364139: Remove reliance on toCharUnitsFromBits rounding down..
Remove reliance on toCharUnitsFromBits rounding down.
Sat, Jun 22, 1:42 PM

Fri, Jun 21

rsmith abandoned D63637: Do not set an RPATH on statically-linked LLVM executables..
Fri, Jun 21, 3:29 PM · Restricted Project
rsmith added inline comments to D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid).
Fri, Jun 21, 2:20 PM
rsmith committed rL364102: Fix __has_cpp_attribute expansion to produce trailing L and (where.
Fix __has_cpp_attribute expansion to produce trailing L and (where
Fri, Jun 21, 2:15 PM
rsmith added inline comments to D62825: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast.
Fri, Jun 21, 2:15 PM · Restricted Project, Restricted Project
rsmith committed rL364103: PR42301: Abort cleanly if we encounter a huge source file rather than.
PR42301: Abort cleanly if we encounter a huge source file rather than
Fri, Jun 21, 1:50 PM
rsmith committed rL364081: Fix ARM buildbot..
Fix ARM buildbot.
Fri, Jun 21, 10:38 AM
rsmith added a comment to D63637: Do not set an RPATH on statically-linked LLVM executables..
In D63637#1553781, @rnk wrote:

I think maybe we shouldn't build libc++, and any other shared libraries that might conflict with system shared libraries, into ${builddir}/lib.

Fri, Jun 21, 10:05 AM · Restricted Project

Thu, Jun 20

rsmith created D63637: Do not set an RPATH on statically-linked LLVM executables..
Thu, Jun 20, 7:26 PM · Restricted Project
rsmith added inline comments to D63161: Devirtualize destructor of final class..
Thu, Jun 20, 2:00 PM · Restricted Project, Restricted Project
rsmith accepted D63161: Devirtualize destructor of final class..

Thanks! Minor comment then feel free to commit.

Thu, Jun 20, 2:00 PM · Restricted Project, Restricted Project
rsmith committed rL363980: Rename CodeGenFunction::overlapFor* to getOverlapFor*..
Rename CodeGenFunction::overlapFor* to getOverlapFor*.
Thu, Jun 20, 1:57 PM
rsmith added inline comments to D63451: P0840R2: support for [[no_unique_address]] attribute.
Thu, Jun 20, 1:56 PM · Restricted Project, Restricted Project
rsmith committed rL363976: P0840R2: support for [[no_unique_address]] attribute.
P0840R2: support for [[no_unique_address]] attribute
Thu, Jun 20, 1:43 PM
rsmith closed D63451: P0840R2: support for [[no_unique_address]] attribute.
Thu, Jun 20, 1:43 PM · Restricted Project, Restricted Project
rsmith added a comment to D63451: P0840R2: support for [[no_unique_address]] attribute.

Can this attribute not be applied to a base class, or to a type?

Thu, Jun 20, 1:40 PM · Restricted Project, Restricted Project
rsmith added inline comments to D63451: P0840R2: support for [[no_unique_address]] attribute.
Thu, Jun 20, 1:29 PM · Restricted Project, Restricted Project
rsmith updated the diff for D63451: P0840R2: support for [[no_unique_address]] attribute.
  • Use custom code to specify CXXABI requirements on attributes.
  • Remove dead code that would have handled [[no_unique_address]] in C.
  • Extend documentation to include an example and to mention that this is a standard C++ attribute.
Thu, Jun 20, 1:29 PM · Restricted Project, Restricted Project
rsmith committed rL363972: Fix crash and rejects-valid when a later template parameter or default.
Fix crash and rejects-valid when a later template parameter or default
Thu, Jun 20, 12:45 PM
rsmith added inline comments to D63376: [clang] Small improvments after Adding APValue to ConstantExpr.
Thu, Jun 20, 10:30 AM · Restricted Project, Restricted Project
rsmith added a comment to D63574: Implement P0340R3: Make `underlying_type` SFINAE-friendly.

How many of these should fail?

Turns out that only the first one should fail - and that's the one that clang rejects.

Thu, Jun 20, 10:23 AM

Wed, Jun 19

rsmith added a comment to D63508: make -frewrite-includes also rewrite conditions in #if/#elif.

Perhaps we should rewrite all #if-like directives to #if 0 or #if 1? Either that or we could emit pragmas indicating the values of later __has_includes. Special-casing macros of this specific form is at best a partial solution.

Wed, Jun 19, 10:19 AM · Restricted Project

Tue, Jun 18

rsmith added inline comments to D63451: P0840R2: support for [[no_unique_address]] attribute.
Tue, Jun 18, 7:44 PM · Restricted Project, Restricted Project
rsmith updated the diff for D63451: P0840R2: support for [[no_unique_address]] attribute.
  • Remove accidentally-added file
Tue, Jun 18, 6:09 PM · Restricted Project, Restricted Project
rsmith added inline comments to D63451: P0840R2: support for [[no_unique_address]] attribute.
Tue, Jun 18, 6:08 PM · Restricted Project, Restricted Project
rsmith updated the diff for D63451: P0840R2: support for [[no_unique_address]] attribute.
  • Address review comments from @AaronBallman.
Tue, Jun 18, 6:05 PM · Restricted Project, Restricted Project
rsmith accepted D63490: Script for generating AST JSON dump test cases.

I think we can maybe make this a little more convenient to use. For the non-JSON -ast-dump format, I added utils/make-ast-dump-check.sh which can be used as (for example):

Tue, Jun 18, 11:45 AM

Jun 17 2019

rsmith added a comment to D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility.

Something I should ask, it seems like GCC only ignores the NullStmts at the end if it's in C mode. Should clang match this behaviour exactly?

I can't think of a reason that this should only happen in C mode, can you @rsmith?

Jun 17 2019, 5:22 PM
rsmith added inline comments to D63161: Devirtualize destructor of final class..
Jun 17 2019, 4:09 PM · Restricted Project, Restricted Project
rsmith committed rL363622: Fix crash when checking a dependently-typed reference that is.
Fix crash when checking a dependently-typed reference that is
Jun 17 2019, 2:46 PM
rsmith committed rL363620: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and….
Rewrite ConstStructBuilder with a mechanism that can cope with splitting and…
Jun 17 2019, 2:05 PM
rsmith closed D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants..
Jun 17 2019, 2:05 PM · Restricted Project, Restricted Project
rsmith added inline comments to D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants..
Jun 17 2019, 2:03 PM · Restricted Project, Restricted Project
rsmith updated the diff for D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants..
  • Address additional review comments from rjmccall.
Jun 17 2019, 2:02 PM · Restricted Project, Restricted Project
rsmith committed rL363617: Add convenience utility for replacing a range within a container with a.
Add convenience utility for replacing a range within a container with a
Jun 17 2019, 1:58 PM
rsmith added inline comments to D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants..
Jun 17 2019, 1:21 PM · Restricted Project, Restricted Project
rsmith updated the diff for D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants..
  • Fix somewhat-incorrect comment on Size member.
Jun 17 2019, 1:17 PM · Restricted Project, Restricted Project
rsmith added inline comments to D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants..
Jun 17 2019, 1:13 PM · Restricted Project, Restricted Project
rsmith updated the diff for D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants..
  • Address review comments from rjmccall.
Jun 17 2019, 1:13 PM · Restricted Project, Restricted Project
rsmith accepted D63376: [clang] Small improvments after Adding APValue to ConstantExpr.

Nice cleanup!

Jun 17 2019, 11:53 AM · Restricted Project, Restricted Project
rsmith created D63451: P0840R2: support for [[no_unique_address]] attribute.
Jun 17 2019, 11:39 AM · Restricted Project, Restricted Project
rsmith added a child revision for D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants.: D63451: P0840R2: support for [[no_unique_address]] attribute.
Jun 17 2019, 11:39 AM · Restricted Project, Restricted Project
rsmith added a comment to D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants..

Isn't [[no_unique_address]] only significant for empty members? I'm not sure why they need significant support from constant-building, since they expand to no meaningful initializer.

Jun 17 2019, 10:51 AM · Restricted Project, Restricted Project

Jun 14 2019

rsmith created D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants..
Jun 14 2019, 5:38 PM · Restricted Project, Restricted Project
rsmith accepted D63369: [AST] Fixed extraneous warnings for binary conditional operator.
Jun 14 2019, 5:00 PM · Restricted Project, Restricted Project
rsmith committed rL363477: Add a map_range function for applying map_iterator to a range..
Add a map_range function for applying map_iterator to a range.
Jun 14 2019, 4:56 PM
rsmith added inline comments to D63161: Devirtualize destructor of final class..
Jun 14 2019, 3:00 PM · Restricted Project, Restricted Project
rsmith committed rL363447: PR42071: Reject weird names for non-type template parameters..
PR42071: Reject weird names for non-type template parameters.
Jun 14 2019, 12:59 PM
rsmith committed rL363446: Use getOperatorSpelling to get the spelling of an overloaded operator.
Use getOperatorSpelling to get the spelling of an overloaded operator
Jun 14 2019, 12:58 PM
rsmith committed rL363430: Remove unused SK_LValueToRValue initialization step..
Remove unused SK_LValueToRValue initialization step.
Jun 14 2019, 10:45 AM
rsmith committed rL363429: PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type.
PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type
Jun 14 2019, 10:45 AM
rsmith committed rL363428: C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue….
C++ DR712 and others: handle non-odr-use resulting from an lvalue-to-rvalue…
Jun 14 2019, 10:45 AM

Jun 13 2019

rsmith committed rL363340: Remove unused SK_LValueToRValue initialization step..
Remove unused SK_LValueToRValue initialization step.
Jun 13 2019, 4:44 PM
rsmith added a comment to D62825: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast.

In my view, the mistake was specifying nullptr_t to have the same size and alignment as void*; it should instead be an empty type. Only confusion results from making it "look like" a pointer type rather than just being an empty tag type.

Perhaps, but that's clearly unfixable without breaking ABI, whereas the object-representation issue is fixable by, at most, requiring a few stores that might be difficult to eliminate in some fanciful situations.

Jun 13 2019, 4:37 PM · Restricted Project, Restricted Project
rsmith committed rL363337: PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type.
PR23833, DR2140: an lvalue-to-rvalue conversion on a glvalue of type
Jun 13 2019, 4:28 PM
rsmith added a comment to D62825: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast.

In what sense is the bit-pattern of a null pointer indeterminate?

The problem is not null pointers, it's nullptr_t, which is required to have the same size and alignment as void* but which comprises only padding bits. (Loads of nullptr_t are not even permitted to touch memory...).

I mean, I know this is C++ and the committee loves tying itself in knots to make the language unnecessarily unusable, but surely the semantics of bitcasting an r-value of type nullptr_t are intended to be equivalent to bitcasting an r-value of type void* that happens to be a null pointer.

I don't follow -- why would they be? bit_cast reads the object representation, which for nullptr_t is likely to be uninitialized, because the type contains only padding bits. (Note that there is formally no such thing as "bitcasting an rvalue". bit_cast takes an lvalue, and reinterprets its storage.)

I agree that the problem is that the object representation of nullptr_t is wrong, but it seems absurd to me that we're going to bake in an absurd special case (from the user's perspective) to bit_cast because we consider that representation unfixable.

Jun 13 2019, 3:24 PM · Restricted Project, Restricted Project
rsmith added inline comments to D62825: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast.
Jun 13 2019, 3:04 PM · Restricted Project, Restricted Project