Page MenuHomePhabricator

rsmith (Richard Smith - zygoloid)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 12 2012, 2:19 PM (466 w, 1 h)

Recent Activity

Today

rsmith accepted D103855: [clang] Exclude function pointers on DefaultedComparisonAnalyzer.

Thanks, let's go with this for now.

Thu, Jun 17, 1:03 PM · Restricted Project

Yesterday

rsmith added a comment to D103855: [clang] Exclude function pointers on DefaultedComparisonAnalyzer.

I think we need to take this to the C++ committee. For example, consider a case like:

Wed, Jun 16, 10:45 AM · Restricted Project
rsmith added inline comments to D103850: [clang] diagnose instead of assert for defaulted comparison return type deduction..
Wed, Jun 16, 10:39 AM · Restricted Project
rsmith accepted D103760: [clang] use correct builtin type for defaulted comparison analyzer.
Wed, Jun 16, 10:24 AM · Restricted Project

Tue, Jun 15

rsmith added inline comments to D104299: Handle interactions between reserved identifier and user-defined suffixes.
Tue, Jun 15, 1:56 PM · Restricted Project

Mon, Jun 14

rsmith accepted D98068: Do not merge LocalInstantiationScope for template specialization.
Mon, Jun 14, 3:45 PM · Restricted Project
rsmith added a comment to D98068: Do not merge LocalInstantiationScope for template specialization.

I think this is the wrong solution; I think the assertion is correct and is observing a problem elsewhere. Imagine if we had something like:

Mon, Jun 14, 12:59 PM · Restricted Project

Thu, Jun 10

rsmith accepted D103928: [IR] make -warn-frame-size into a module attr.
Thu, Jun 10, 2:14 PM · Restricted Project, Restricted Project
rsmith accepted D103928: [IR] make -warn-frame-size into a module attr.
Thu, Jun 10, 1:31 PM · Restricted Project, Restricted Project

Wed, Jun 9

rsmith added inline comments to D103996: Save/restore OuterTemplateParams in AbstractManglingParser::parseEncoding..
Wed, Jun 9, 6:15 PM · Restricted Project, Restricted Project
rsmith accepted D103996: Save/restore OuterTemplateParams in AbstractManglingParser::parseEncoding..
Wed, Jun 9, 5:47 PM · Restricted Project, Restricted Project
rsmith added inline comments to D103928: [IR] make -warn-frame-size into a module attr.
Wed, Jun 9, 4:29 PM · Restricted Project, Restricted Project

Tue, Jun 8

rsmith added a comment to D103938: Diagnose -Wunused-value in constant evaluation context.

This will diagnose unused values in unreachable code in constant-evaluated contexts; that doesn't seem quite right. For example, in:

Tue, Jun 8, 6:37 PM · Restricted Project
rsmith accepted D103933: [clang] NFC: rename SK_CastDerivedToBaseRValue to SK_CastDerivedToBasePRValue.
Tue, Jun 8, 6:20 PM · Restricted Project
rsmith accepted D103720: [clang] NFC: Rename rvalue to prvalue.

Looks good to me.

Tue, Jun 8, 6:20 PM · Restricted Project, Restricted Project
rsmith added a comment to D103720: [clang] NFC: Rename rvalue to prvalue.

I think this is worth doing -- "rvalue" is at least ambiguous and, in C++-specific cases, confusing and wrong. Saying "prvalue" in C-specific parts of clang may also be a bit surprising, but it's unambiguous and still meaningful.

Tue, Jun 8, 2:54 PM · Restricted Project, Restricted Project

Wed, Jun 2

rsmith committed rG13659f48a1d7: PR50337, PR50561: Fix determination of whether a template parameter list (authored by rsmith).
PR50337, PR50561: Fix determination of whether a template parameter list
Wed, Jun 2, 1:07 PM

Tue, Jun 1

rsmith added a comment to D102507: [HIP] Support <functional> in device code.

@ldionne How should we go about establishing whether libc++ would be prepared to officially support CUDA? Right now, Clang's CUDA support is patching in attributes onto libc++ functions from the outside, which doesn't seem like a sustainable model.

Tue, Jun 1, 1:40 PM
rsmith updated subscribers of D102507: [HIP] Support <functional> in device code.
Tue, Jun 1, 1:35 PM

Wed, May 26

rsmith added a comment to D102663: Bug 49633 - Added warning for static inline global and namespaced declarations.

Should we also warn about inline variables in anonymous namespaces?

Wed, May 26, 11:41 AM · Restricted Project

Mon, May 24

rsmith committed rGde6164ec4da0: PR50456: Properly handle multiple escaped newlines in a '*/'. (authored by rsmith).
PR50456: Properly handle multiple escaped newlines in a '*/'.
Mon, May 24, 4:21 PM
rsmith added a comment to D102689: [C++] Ignore top-level qualifiers in casts.

The C++ standard does not appear to have similar wording. On the other hand, the C++ standard says that e.g. "The result of the expression (T) cast-expression is of type T", and similarly for the other casts, which is clearly just wrong if T is a reference type; the wording clarifies that the expression is an l-value or x-value if the type is a reference but doesn't remove the reference-ness of the expression type as it must, unless that's done by some other clause at a distance.

Mon, May 24, 1:40 PM · Restricted Project

Wed, May 19

rsmith committed rG2f8ac0758bbf: PR50402: Use proper constant evaluation rules for checking constraint (authored by rsmith).
PR50402: Use proper constant evaluation rules for checking constraint
Wed, May 19, 4:03 PM
rsmith committed rGd38057f3ecb0: Treat implicit deduction guides as being equivalent to their (authored by rsmith).
Treat implicit deduction guides as being equivalent to their
Wed, May 19, 1:32 PM

Tue, May 18

rsmith added a comment to D102567: [IR] Add a Location to BlockArgument..

I think we'll still need to revert though.

Tue, May 18, 7:26 PM · Restricted Project
rsmith committed rG80d981eda69f: Revert "[IR] Add a Location to BlockArgument." and follow-on commit (authored by rsmith).
Revert "[IR] Add a Location to BlockArgument." and follow-on commit
Tue, May 18, 7:26 PM
rsmith added a reverting change for rG3043be9d2db4: [IR] Add a Location to BlockArgument.: rG80d981eda69f: Revert "[IR] Add a Location to BlockArgument." and follow-on commit.
Tue, May 18, 7:26 PM
rsmith added a reverting change for D102567: [IR] Add a Location to BlockArgument.: rG80d981eda69f: Revert "[IR] Add a Location to BlockArgument." and follow-on commit.
Tue, May 18, 7:26 PM · Restricted Project
rsmith edited reviewers for D100252: [clang] Fix for "Bug 27113 - MSVC-compat __identifier implementation incomplete", added: rnk, hans; removed: rsmith.
Tue, May 18, 5:52 PM · Restricted Project

May 17 2021

rsmith added inline comments to D102645: [clang] p0388 conversion to incomplete array.
May 17 2021, 1:40 PM
rsmith requested review of D102650: Old work on P0388. For reference in D102645. Not for review / commit..
May 17 2021, 1:35 PM · Restricted Project

May 16 2021

rsmith committed rGd29f7f1a7b47: [clang] Fix ternary operator in the second for loop statement (authored by danlark).
[clang] Fix ternary operator in the second for loop statement
May 16 2021, 10:43 AM
rsmith closed D102502: [clang] Fix ternary operator in the second for loop statement.
May 16 2021, 10:43 AM · Restricted Project

May 14 2021

rsmith added a comment to D100733: [clang] NFC: change uses of `Expr->getValueKind` into `is?Value`.

I don't think out-of-tree experiments on possibilities for move semantics are especially motivating for this, one way or the other, but I do think it would be nice to make some kind of change here.

May 14 2021, 5:02 PM · Restricted Project
rsmith accepted D102502: [clang] Fix ternary operator in the second for loop statement.
May 14 2021, 2:34 PM · Restricted Project
rsmith added a comment to D102502: [clang] Fix ternary operator in the second for loop statement.

Thanks, nice catch!

May 14 2021, 9:25 AM · Restricted Project

May 13 2021

rsmith added inline comments to D88220: [C++20] P1825R0: More implicit moves.
May 13 2021, 2:49 PM · Restricted Project
rsmith added inline comments to D88220: [C++20] P1825R0: More implicit moves.
May 13 2021, 1:35 PM · Restricted Project
rsmith accepted D102367: [LowerConstantIntrinsics] reuse isManifestLogic from ConstantFolding.

The undef problem seems pretty fundamental here, and I don't think there's an easy fix. Let's consider that separately from this patch.

May 13 2021, 11:09 AM · Restricted Project

May 12 2021

rsmith committed rGe1aa528d3aaf: Handle unexpanded packs appearing in type-constraints. (authored by rsmith).
Handle unexpanded packs appearing in type-constraints.
May 12 2021, 6:46 PM
rsmith committed rG2f9d8b08ea65: PR50306: When instantiating a generic lambda with a constrained 'auto', (authored by rsmith).
PR50306: When instantiating a generic lambda with a constrained 'auto',
May 12 2021, 6:46 PM
rsmith committed rGe0acfed7ed51: Clean up handling of constrained parameters in lambdas. (authored by rsmith).
Clean up handling of constrained parameters in lambdas.
May 12 2021, 6:46 PM
rsmith committed rG4c88cfb1dc79: Add test for substitutability of variable templates in closure type (authored by rsmith).
Add test for substitutability of variable templates in closure type
May 12 2021, 6:46 PM
rsmith added a comment to D102367: [LowerConstantIntrinsics] reuse isManifestLogic from ConstantFolding.

Can you explain why UndefValue needs to be excluded? It's not mentioned in the summary, and the test case does not cover it.

May 12 2021, 4:34 PM · Restricted Project
rsmith added inline comments to D102367: [LowerConstantIntrinsics] reuse isManifestLogic from ConstantFolding.
May 12 2021, 3:13 PM · Restricted Project
rsmith committed rG5bb7e81c64bd: Fix bad mangling of <data-member-prefix> for a closure in the initializer of a… (authored by rsmith).
Fix bad mangling of <data-member-prefix> for a closure in the initializer of a…
May 12 2021, 1:14 PM
rsmith closed D101968: Fix bad mangling of <data-member-prefix> for a closure in the initializer of a variable at global namespace scope..
May 12 2021, 1:13 PM · Restricted Project
rsmith added inline comments to D98798: Produce warning for performing pointer arithmetic on a null pointer..
May 12 2021, 12:06 PM · Restricted Project
rsmith accepted D102251: Suppress Deferred Diagnostics in discarded statements..
May 12 2021, 11:08 AM · Restricted Project

May 11 2021

rsmith added a reverting change for rG697ac15a0fc7: Fix bad mangling of <data-member-prefix> for a closure in the initializer of a…: rGbb726383ac75: Revert "Fix bad mangling of <data-member-prefix> for a closure in the….
May 11 2021, 5:47 PM
rsmith reopened D101968: Fix bad mangling of <data-member-prefix> for a closure in the initializer of a variable at global namespace scope..

(Reopening, earlier commit was accidental.)

May 11 2021, 5:47 PM · Restricted Project
rsmith committed rGbb726383ac75: Revert "Fix bad mangling of <data-member-prefix> for a closure in the… (authored by rsmith).
Revert "Fix bad mangling of <data-member-prefix> for a closure in the…
May 11 2021, 5:47 PM
rsmith added a reverting change for D101968: Fix bad mangling of <data-member-prefix> for a closure in the initializer of a variable at global namespace scope.: rGbb726383ac75: Revert "Fix bad mangling of <data-member-prefix> for a closure in the….
May 11 2021, 5:47 PM · Restricted Project
rsmith committed rG3978333b71bf: Add test for PR50039. (authored by rsmith).
Add test for PR50039.
May 11 2021, 5:36 PM
rsmith committed rG697ac15a0fc7: Fix bad mangling of <data-member-prefix> for a closure in the initializer of a… (authored by rsmith).
Fix bad mangling of <data-member-prefix> for a closure in the initializer of a…
May 11 2021, 5:36 PM
rsmith closed D101968: Fix bad mangling of <data-member-prefix> for a closure in the initializer of a variable at global namespace scope..
May 11 2021, 5:35 PM · Restricted Project
rsmith added a comment to D102251: Suppress Deferred Diagnostics in discarded statements..

(No blocking concerns here.)

May 11 2021, 5:18 PM · Restricted Project

May 10 2021

rsmith accepted D96033: [clang-repl] Land initial infrastructure for incremental parsing.

Generally-speaking, we have a plan that I'm happy for us to work towards, and I'm happy for our progress towards that plan to be incremental. Even though this might not be fully in that direction right now, I think that's OK.

May 10 2021, 6:49 PM · Restricted Project
rsmith added inline comments to D96033: [clang-repl] Land initial infrastructure for incremental parsing.
May 10 2021, 6:45 PM · Restricted Project

May 6 2021

rsmith accepted D77598: Integral template argument suffix and cast printing.

Thanks, this looks good to me!

May 6 2021, 3:15 PM · Restricted Project, Restricted Project
rsmith added inline comments to D101192: Add support for #elifdef and #elifndef.
May 6 2021, 3:12 PM · Restricted Project

May 5 2021

rsmith requested review of D101968: Fix bad mangling of <data-member-prefix> for a closure in the initializer of a variable at global namespace scope..
May 5 2021, 6:58 PM · Restricted Project
rsmith added a comment to D77598: Integral template argument suffix and cast printing.

Thanks, I'm broadly very happy with this. My remaining comments are all very minor.

May 5 2021, 6:28 PM · Restricted Project, Restricted Project
rsmith committed rG6bbfa0fd408e: When performing template argument deduction to select a partial (authored by rsmith).
When performing template argument deduction to select a partial
May 5 2021, 2:47 PM

Apr 30 2021

rsmith requested changes to D101429: PR45879: Use LValue object to evaluate active union members.

This change is not correct. The language rules only apply to particular syntactic forms, so we need to check for those exact syntactic forms here.

Apr 30 2021, 1:45 PM · Restricted Project
rsmith added a comment to D101598: [clang][Sema] adds `[[clang::no_address]]` attribute.

Just for posterity, what we discussed is that since there is a list of addressable functions in the standard, we should explore adding a warning to Clang that fires whenever somebody takes the address of a function in namespace std, except if it's an addressable function. That list would either be maintained explicitly in Clang, or, preferably, we'd have an attribute that we can mark addressable functions with so that the compiler doesn't flag those specific functions.

Apr 30 2021, 1:03 PM · Restricted Project

Apr 29 2021

rsmith added inline comments to D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion.
Apr 29 2021, 5:53 PM · Restricted Project

Apr 28 2021

rsmith added a comment to D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable.

When this change returns, I'd like to see a different implementation strategy. Running a recursive AST visitation after the fact is generally not the right way to look for this kind of issue; adding an extra pass to speculatively hunt for each kind of warning we might want to issue is too expensive. Instead, I think we should do something simpler and cheaper, such as tracking, for each variable in scope, the number of potentially-evaluated non-assignment references to that variable. For example:

Apr 28 2021, 1:37 PM · Restricted Project, Restricted Project, Restricted Project

Apr 27 2021

rsmith added a comment to D101387: [Clang] remove text extension from diag::err_drv_invalid_value_with_suggestion.

Note that, per https://clang.llvm.org/docs/InternalsManual.html#the-format-string,

Apr 27 2021, 11:42 PM · Restricted Project
rsmith added inline comments to D101392: Remove libstdc++ friend template hack.
Apr 27 2021, 1:13 PM · Restricted Project

Apr 22 2021

rsmith committed rG40beb1f84a3d: CWG2076: Permit implicit conversions within a single level of braces (authored by rsmith).
CWG2076: Permit implicit conversions within a single level of braces
Apr 22 2021, 4:50 PM

Apr 16 2021

rsmith accepted D100680: clang: Add specificity to libstdc++ workaround.
Apr 16 2021, 12:42 PM
rsmith added a comment to D100465: clang: Remove __atomic libstdc++ hack.

Then remove the workarounds as (hopefully now entirely uncontroversial) follow-up steps.

Apr 16 2021, 12:38 PM · Restricted Project
rsmith added a comment to D100465: clang: Remove __atomic libstdc++ hack.

From a process standpoint, I think the best thing would be to first send out a patch adding a release note saying we no longer support libstdc++ < 4.8.3 and updating the part of docs/Toolchain.rst that Aaron linked to, and send a brief note to cfe-dev drawing people's attention to that patch and asking for objections -- I don't think you need to wait for more than a couple of days for such objections, but as this is effectively a policy change we should probably give people a little time to respond. Then remove the workarounds as (hopefully now entirely uncontroversial) follow-up steps.

Apr 16 2021, 12:36 PM · Restricted Project
rsmith added a comment to D100469: [PATCH] clang: Remove libstdc++ gets hack.

I think we should decide what version of libstdc++ we're prepared to support and document that somewhere, and it would make sense to remove the various libstdc++ compatibility changes that target older versions. Google still has builds that use Clang trunk, recent glibc, and libstdc++ 4.9, in >=C++14 mode, though (which I think is the combination that needs this workaround), so I'm not sure that the world is ready for Clang's minimum to be increased to 6.3 or later. (Of course Google could locally patch their libstdc++, but if there's one organization building in this mode still, it seems likely that there are others, and in particular version 4.9 was the last version prior to the introduction of the dual ABI, so there may be reasons people want to stop there in particular. I think at least the need to support libstdc++ 4.2 for Apple targets has disappeared now, though, so it's possible that we could drop support for 4.8 and earlier?)

Apr 16 2021, 11:16 AM

Apr 15 2021

rsmith added inline comments to D99456: [C++2b] Support size_t literals.
Apr 15 2021, 6:19 PM · Restricted Project
rsmith added a comment to D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls..

Looks like this breaks tests on mac/arm: http://45.33.8.238/macm1/7552/step_7.txt

Apr 15 2021, 6:09 PM · Restricted Project
rsmith committed rGf7c9de0de580: Add triple to fix test failure. (authored by rsmith).
Add triple to fix test failure.
Apr 15 2021, 6:09 PM
rsmith committed rG834467590842: Implemented [[clang::musttail]] attribute for guaranteed tail calls. (authored by haberman).
Implemented [[clang::musttail]] attribute for guaranteed tail calls.
Apr 15 2021, 5:13 PM
rsmith closed D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls..
Apr 15 2021, 5:13 PM · Restricted Project
rsmith accepted D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls..
Apr 15 2021, 4:47 PM · Restricted Project

Apr 14 2021

rsmith added inline comments to D100511: [clang] Modify diagnostic level from err to warn: anyx86_interrupt_regsave.
Apr 14 2021, 4:40 PM · Restricted Project
rsmith added inline comments to D100388: [BROKEN][clang] Try to fix thunk function types.
Apr 14 2021, 3:50 PM · Restricted Project, Restricted Project
rsmith added inline comments to D100388: [BROKEN][clang] Try to fix thunk function types.
Apr 14 2021, 11:57 AM · Restricted Project, Restricted Project

Apr 13 2021

rsmith added inline comments to D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls..
Apr 13 2021, 4:56 PM · Restricted Project
rsmith added a comment to D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls..

Functionally this looks good to me. I've suggested some minor cleanups and I understand you're doing some wordsmithing on the diagnostics; I think once those are complete this will be ready to land. Thank you!

Apr 13 2021, 3:54 PM · Restricted Project

Apr 12 2021

rsmith added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 12 2021, 9:38 PM · Restricted Project
rsmith added a comment to D100346: [Clang] String Literal and Wide String Literal Encoding from the Preprocessor.

Exposing this information seems fine to me. I think it'd be more useful to expose it in a way the preprocessor can inspect, but it's hard to see how to do that without requiring us to invent identifier-shaped names for all encodings, and perhaps we shouldn't be in the business of doing that. If this string literal approach addresses the use cases you have, then I think that's OK.

Apr 12 2021, 6:59 PM · Restricted Project
rsmith added inline comments to D99696: [clang] NRVO: Improvements and handling of more cases..
Apr 12 2021, 6:39 PM · Restricted Project
rsmith added a comment to D99790: [CGCall] Annotate `this` argument with alignment.

I think it should be fixed in CodeGenVTables::maybeEmitThunk(), likely in arrangeGlobalDeclaration().
Or is this wrong on the AST level, too?

Apr 12 2021, 4:58 PM · Restricted Project, Restricted Project
rsmith added inline comments to D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls..
Apr 12 2021, 4:17 PM · Restricted Project
rsmith accepted D100057: Remove warning "suggest braces" for aggregate initialization of an empty class with an aggregate base class..

Thanks, I think this makes sense as a generalization of the existing "idiomatic aggregate initialization" rule. Some suggested cleanups but otherwise LGTM.

Apr 12 2021, 12:53 PM · Restricted Project
rsmith committed rGfc1e146e4412: Fix documentation typo. (authored by rsmith).
Fix documentation typo.
Apr 12 2021, 11:39 AM

Apr 8 2021

rsmith added inline comments to D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls..
Apr 8 2021, 4:11 PM · Restricted Project
rsmith accepted D100136: Allow applying attributes to subset of allowed subjects..

LGTM

Apr 8 2021, 3:19 PM · Restricted Project
rsmith added inline comments to D100136: Allow applying attributes to subset of allowed subjects..
Apr 8 2021, 2:13 PM · Restricted Project

Apr 7 2021

rsmith added a comment to D94640: adds more checks to -Wfree-nonheap-object.

Sorry for the late review.

Apr 7 2021, 5:07 PM · Restricted Project
rsmith added inline comments to D97802: [libc++] Increase readability of typeinfo comparison of ARM64.
Apr 7 2021, 1:39 PM · Restricted Project
rsmith added a comment to D100037: [clang][UBSan] Passing underaligned pointer as a function argument is undefined behaviour.

This is somewhat related to the following RFC by @rjmccall:
https://lists.llvm.org/pipermail/llvm-dev/2016-January/094012.html

Apr 7 2021, 11:16 AM · Restricted Project, Restricted Project, Restricted Project

Apr 6 2021

rsmith added a comment to D99893: [WIP] Replace std::forward & std::move by cast expressions during Sema.

This would solve some of the issues (perfect code-gen / no body instantiation), but the declarations are still instantiated of course.
And I have a few folks asking me whether I could get rid of it. Unfortunately, I think the goals of preserving the AST as is today and getting rid of these template instantiations are contradictory.

Apr 6 2021, 4:35 PM · Restricted Project