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 (428 w, 2 d)

Recent Activity

Fri, Sep 25

rsmith added a comment to D88333: Better diagnostics for anonymous bit-fields with attributes or an initializer.

I think we established rough consensus in CWG (at least, no one objected) that this is a grammar bug -- there's nothing for these attributes to appertain to, so they shouldn't be permitted. Unless CWG indicates it wants to change direction here I think we should continue to reject.

Fri, Sep 25, 8:20 PM

Thu, Sep 24

rsmith committed rG8c98c8803430: PR47176: Don't read from an inactive union member if a friend function (authored by rsmith).
PR47176: Don't read from an inactive union member if a friend function
Thu, Sep 24, 7:02 PM
rsmith added inline comments to D88236: [PR47636] Fix tryEmitPrivate to handle non-constantarraytypes.
Thu, Sep 24, 12:23 PM
rsmith added inline comments to D88236: [PR47636] Fix tryEmitPrivate to handle non-constantarraytypes.
Thu, Sep 24, 12:16 PM

Tue, Sep 22

rsmith added a comment to D87808: [DebugInfo] Fix bug in constructor homing for classes with trivial constructors..

But I think this code should give the same outcome either way, because a class with any constructor other than a default/copy/move constructor must have a user-declared constructor of some kind, and so will never have an implicit default constructor.

Hmm, trying to parse this. So if we're in the subtle case of having an implicit default constructor (and no other (necessarily user-declared, as you say) constructors) - if it's not been declared, then this function will return false. If it has been declared, it'll return false... hmm, nope, then it'll return true.

Tue, Sep 22, 1:30 PM · Restricted Project

Mon, Sep 21

rsmith added a comment to D87808: [DebugInfo] Fix bug in constructor homing for classes with trivial constructors..

@rsmith What's the deal with these anonymous structs/unions? Why do they have copy/move constructors (are those technically called from the enclosing class's copy/move constructors?) but no default constructor to be called from the other ctors of the enclosing class?

Mon, Sep 21, 6:11 PM · Restricted Project
rsmith accepted D87815: [clang] Fix a typo-correction crash.
Mon, Sep 21, 3:28 PM · Restricted Project
rsmith committed rG0f6facca9701: Don't build a StringLiteral expression with reference type when (authored by rsmith).
Don't build a StringLiteral expression with reference type when
Mon, Sep 21, 3:25 PM

Sun, Sep 20

rsmith committed rGaa769358d8c8: [c++20] Consistent with the intent to allow all plausible types in (authored by rsmith).
[c++20] Consistent with the intent to allow all plausible types in
Sun, Sep 20, 11:10 PM
rsmith committed rG0cd73dbe2c0d: [c++20] For P1907R1: Add checking for structural types for non-type (authored by rsmith).
[c++20] For P1907R1: Add checking for structural types for non-type
Sun, Sep 20, 8:21 PM
rsmith added inline comments to D87080: [AST] Reduce the size of TemplateArgumentLocInfo..
Sun, Sep 20, 3:08 PM · Restricted Project
rsmith added a comment to D87990: [Diagnostics] Diagnose -Wsizeof-array-div for array of pointers .

Thanks!

Sun, Sep 20, 2:47 PM
rsmith added inline comments to D87561: [Sema] List conversion validate character array.
Sun, Sep 20, 11:51 AM · Restricted Project
rsmith added inline comments to D87561: [Sema] List conversion validate character array.
Sun, Sep 20, 11:28 AM · Restricted Project

Fri, Sep 18

rsmith added inline comments to D87349: [clang] adapt c++17 behavior for dependent decltype-specifiers.
Fri, Sep 18, 5:58 PM · Restricted Project

Thu, Sep 17

rsmith added inline comments to D68364: Implement C++20's P0784 (More constexpr containers).
Thu, Sep 17, 5:43 PM · Restricted Project, Restricted Project
rsmith added a comment to D87853: [SemaTemplate] Stop passing insertion position around during VarTemplate instantiation.

Thanks, this is pretty subtle. Here's a small C++20 testcase that invalidates InsertPos while matching partial specializations:

Thu, Sep 17, 2:42 PM · Restricted Project
rsmith added inline comments to D77598: Integral template argument suffix and cast printing.
Thu, Sep 17, 2:21 PM · Restricted Project
rsmith added a reviewer for D77598: Integral template argument suffix and cast printing: rnk.
Thu, Sep 17, 2:10 PM · Restricted Project
rsmith added inline comments to D68364: Implement C++20's P0784 (More constexpr containers).
Thu, Sep 17, 2:09 PM · Restricted Project, Restricted Project
rsmith added a comment to D77491: [Sema] Introduce BuiltinAttr, per-declaration builtin-ness.

If someone cares about pthread_create they might wish to follow up on my https://reviews.llvm.org/D58531, which I filed early last year to permit pthread_create to have a proper type in the syntax. It will likely need rebasing, but probably isn't that much work.

Thu, Sep 17, 1:54 PM · Restricted Project
rsmith added inline comments to D58531: [clang] Specify type of pthread_create builtin.
Thu, Sep 17, 1:53 PM · Restricted Project
rsmith added a comment to D68364: Implement C++20's P0784 (More constexpr containers).

The mechanism by which this interacts with Clang looks good to me. I've not done any detailed analysis to check all the functions made constexpr by P0784 are handled by this patch, though.

Thu, Sep 17, 1:24 PM · Restricted Project, Restricted Project

Wed, Sep 16

rsmith committed rG7337f2961944: PR47555: Inheriting constructors are implicitly definable. (authored by rsmith).
PR47555: Inheriting constructors are implicitly definable.
Wed, Sep 16, 6:12 PM
rsmith committed rG905b9ca26c94: Canonicalize declaration pointers when forming APValues. (authored by rsmith).
Canonicalize declaration pointers when forming APValues.
Wed, Sep 16, 6:11 PM
rsmith added inline comments to D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress.
Wed, Sep 16, 5:51 PM · Restricted Project
rsmith added inline comments to D87561: [Sema] List conversion validate character array.
Wed, Sep 16, 5:33 PM · Restricted Project
rsmith added inline comments to D87349: [clang] adapt c++17 behavior for dependent decltype-specifiers.
Wed, Sep 16, 4:42 PM · Restricted Project
rsmith added inline comments to D87349: [clang] adapt c++17 behavior for dependent decltype-specifiers.
Wed, Sep 16, 4:37 PM · Restricted Project
rsmith added inline comments to D72240: Implement C++20 std::atomic_ref and test.
Wed, Sep 16, 4:18 PM · Restricted Project

Mon, Sep 14

rsmith requested changes to D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress.
Mon, Sep 14, 5:15 PM · Restricted Project
rsmith accepted D77491: [Sema] Introduce BuiltinAttr, per-declaration builtin-ness.

Thanks! This looks good to me (subject to Aaron's comment being addressed). Please wait a couple of days for any more comments from the other reviewers.

Mon, Sep 14, 3:10 PM · Restricted Project
rsmith added a comment to D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress.

Richard, what do you think the right rule is for when to use the special constant-evaluation rules for this feature in C++? The C standard says that constant expressions should use the default rules rather than considering the dynamic environment, but C can get away with that because constant expressions are restricted to a narrow set of syntactic situations.

Mon, Sep 14, 1:46 AM · Restricted Project

Sun, Sep 13

rsmith added a comment to D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress.

@rsmith asked "I don't see changes to the constant evaluator". The semantic rules for enabling this pragma require that strict or precise semantics be in effect., see SemaAttr.cpp And the floating point constant evaluation doesn't occur when strict or precise

Sun, Sep 13, 11:26 PM · Restricted Project
rsmith added a comment to D86048: [AST][RecoveryExpr] Popagate the error-bit from a VarDecl's initializer to DeclRefExpr..

The crux is we're forcing decltype(N) to be a (unique) dependent type, which feels wrong.
[...]
There are three behaviors:

  • standard up to C++14: traversing the expr looking for a template param to be lexically included (this is my reading of the standard)
Sun, Sep 13, 5:22 PM · Restricted Project
rsmith added a comment to D87565: [Sema] Improve const_cast conformance to N4261.

For what it's worth, the most recent thoughts from CWG on this question are from 2015 (prior to guaranteed copy elision, which probably changes the answer): http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1965. That direction would permit const_cast to rvalue reference type to materialize a temporary for arrays and classes but not scalar types (which seems just as arbitrary as the current set of rules to me).

Sun, Sep 13, 4:41 PM · Restricted Project
rsmith requested changes to D87565: [Sema] Improve const_cast conformance to N4261.
Sun, Sep 13, 4:36 PM · Restricted Project
rsmith added a comment to D87566: [Sema] Permit conversions to arrays of unknown bound.

I made a start on this a while back and found a bunch more places that needed updates: https://github.com/zygoloid/llvm-project/commit/c23440979ac4f07ce38657ce0e69d010d2afa83e

Sun, Sep 13, 1:26 PM · Restricted Project
rsmith added inline comments to D87561: [Sema] List conversion validate character array.
Sun, Sep 13, 1:11 PM · Restricted Project
rsmith added a comment to D87563: [Sema] Improve overload resolution.

Looks like this is an implementation of DR1307. Please also add a test to test/CXX/drs/dr13xx.cpp.

Sun, Sep 13, 12:01 PM · Restricted Project

Tue, Sep 8

rsmith added inline comments to D84637: [AST] Enhance the const expression evaluator to support error-dependent exprs..
Tue, Sep 8, 1:04 PM · Restricted Project

Mon, Sep 7

rsmith added inline comments to D77491: [Sema] Introduce BuiltinAttr, per-declaration builtin-ness.
Mon, Sep 7, 1:05 AM · Restricted Project
rsmith updated the diff for D85051: Improve the representation of <compare>'s zero-only type..
  • Address review comments.
  • Add some positive tests.
Mon, Sep 7, 12:49 AM · Restricted Project

Thu, Sep 3

rsmith committed rG052dbe226cb3: Remove unused and dangerous overload of PerformImplicitConversion. (authored by rsmith).
Remove unused and dangerous overload of PerformImplicitConversion.
Thu, Sep 3, 3:35 PM
rsmith committed rGe6393ee81317: Canonicalize declaration pointers when forming APValues. (authored by rsmith).
Canonicalize declaration pointers when forming APValues.
Thu, Sep 3, 3:35 PM
rsmith added a comment to D86508: [clang] improve GCC-compat for C90 __builtin_ functions.

It seems to me that adding new __builtin_* functions for GCC compatibility and adding new LIBBUILTINs are unrelated changes, and it might be clearer to split them up into two commits.

Thu, Sep 3, 12:47 PM · Restricted Project
rsmith added inline comments to D86508: [clang] improve GCC-compat for C90 __builtin_ functions.
Thu, Sep 3, 12:46 PM · Restricted Project
rsmith accepted D86207: Set InvalidDecl directly when deserializing a Decl.
Thu, Sep 3, 12:38 PM · Restricted Project

Wed, Sep 2

rsmith added inline comments to D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt.
Wed, Sep 2, 12:28 PM · Restricted Project, Restricted Project
rsmith added inline comments to D86207: Set InvalidDecl directly when deserializing a Decl.
Wed, Sep 2, 11:46 AM · Restricted Project
rsmith added a comment to D86993: Document Clang's expectations of the C standard library..

Wording looks good. Should we alsso document our assumptions about what functions exist in the standard library — the functions that we'll always use even in freestanding builds?

Wed, Sep 2, 11:19 AM · Restricted Project

Tue, Sep 1

rsmith added a comment to D85778: More accurately compute the ranges of possible values for +, -, *, &, %..

Hi, this change seems like hits a false positive case in chromium build: https://bugs.chromium.org/p/chromium/issues/detail?id=1124085

Tue, Sep 1, 5:53 PM · Restricted Project
rsmith committed rG0ffbbce78de6: Don't take the expression range into account when looking for widening (authored by rsmith).
Don't take the expression range into account when looking for widening
Tue, Sep 1, 5:42 PM
rsmith added a comment to D85778: More accurately compute the ranges of possible values for +, -, *, &, %..
Tue, Sep 1, 5:42 PM · Restricted Project
rsmith updated the diff for D86993: Document Clang's expectations of the C standard library..

Add missing word.

Tue, Sep 1, 5:12 PM · Restricted Project
rsmith added a comment to D86815: [LangRef] Adjust guarantee for llvm.memcpy to also allow equal arguments..

Documentation patch for your consideration: https://reviews.llvm.org/D86993

Tue, Sep 1, 5:11 PM · Restricted Project
rsmith requested review of D86993: Document Clang's expectations of the C standard library..
Tue, Sep 1, 5:10 PM · Restricted Project
rsmith added inline comments to D86508: [clang] improve GCC-compat for C90 __builtin_ functions.
Tue, Sep 1, 3:05 PM · Restricted Project
rsmith added a comment to D60939: [Concepts] Delayed Constraint Substitution.

I wonder if there's a cleaner way to model this:

Tue, Sep 1, 2:48 PM · Restricted Project
rsmith added a comment to D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt.

Looking specifically for attributes in the 'then' and 'else' cases of an if seems like a fine first pass at this, but I think this is the wrong way to lower these attributes in the longer term: we should have a uniform treatment of them that looks for the most recent prior branch and annotates it with weights. We could do that either by generating LLVM intrinsic calls that an LLVM pass lowers, or by having the frontend look backwards for the most recent branch and annotate it. I suppose it's instructive to consider a case such as:

Tue, Sep 1, 1:37 PM · Restricted Project, Restricted Project
rsmith requested changes to D86802: [Modules] Don't parse/load explicit module maps if modules are disabled.

Sorry for not noticing this review earlier.

Tue, Sep 1, 1:01 PM · Restricted Project
rsmith added a comment to D86508: [clang] improve GCC-compat for C90 __builtin_ functions.

I've not checked all the types are correct (someone should double-check that prior to commit), but it looks like GCC provides these __builtin_* functions, so we should too. The addition of the non-__builtin_ versions should improve our diagnostics but otherwise have no effect.

Tue, Sep 1, 11:56 AM · Restricted Project
rsmith accepted D86514: Correctly parse LateParsedTemplates in case of multiple dependent modules.

Thanks!

Tue, Sep 1, 10:46 AM · Restricted Project

Mon, Aug 31

rsmith abandoned D63748: Pass std::unique_ptr, std::shared_ptr and std::weak_ptr in registers when possible..

Abandoned in favor of https://reviews.llvm.org/D82490

Mon, Aug 31, 11:20 PM · Restricted Project
rsmith committed rGf819dbf012b3: Classify (small unsigned bitfield) < 0 comparisons under (authored by rsmith).
Classify (small unsigned bitfield) < 0 comparisons under
Mon, Aug 31, 11:17 PM
rsmith committed rGcff6dda604cb: More accurately compute the ranges of possible values for +, -, *, &, %. (authored by rsmith).
More accurately compute the ranges of possible values for +, -, *, &, %.
Mon, Aug 31, 11:17 PM
rsmith closed D85778: More accurately compute the ranges of possible values for +, -, *, &, %..
Mon, Aug 31, 11:17 PM · Restricted Project
rsmith committed rG113861b44461: Fix -Wcompound-token-split to give the same warnings under -E (authored by rsmith).
Fix -Wcompound-token-split to give the same warnings under -E
Mon, Aug 31, 8:59 PM
rsmith committed rG0da84535b1e3: Remove -Wcompound-token-split-by-space from -Wall. (authored by rsmith).
Remove -Wcompound-token-split-by-space from -Wall.
Mon, Aug 31, 8:59 PM
rsmith added a comment to D77491: [Sema] Introduce BuiltinAttr, per-declaration builtin-ness.

I'd still like @rsmith to sign off here as code owner.

Mon, Aug 31, 6:01 PM · Restricted Project
rsmith added a comment to D86815: [LangRef] Adjust guarantee for llvm.memcpy to also allow equal arguments..

Thanks, I'm happy with this.

Mon, Aug 31, 3:11 PM · Restricted Project

Fri, Aug 28

rsmith accepted D67113: ICK_Function_Conversion is a third kind conversion.
Fri, Aug 28, 5:21 PM · Restricted Project
rsmith added a comment to D86815: [LangRef] Adjust guarantee for llvm.memcpy to also allow equal arguments..

Why would we change this? What's the point of having separate memcpy and memmove intrinsics?

I'm reading this as clang mis-uses llvm.memcpy when it probably should be using llvm.memmove

Fri, Aug 28, 2:46 PM · Restricted Project
rsmith added inline comments to D86815: [LangRef] Adjust guarantee for llvm.memcpy to also allow equal arguments..
Fri, Aug 28, 2:23 PM · Restricted Project
rsmith committed rG0e00a95b4fad: Add new warning for compound punctuation tokens that are split across macro… (authored by rsmith).
Add new warning for compound punctuation tokens that are split across macro…
Fri, Aug 28, 1:36 PM
rsmith closed D86751: Add new warning for compound punctuation tokens that are split across macro expansions or split by whitespace..
Fri, Aug 28, 1:36 PM · Restricted Project
rsmith added inline comments to D86751: Add new warning for compound punctuation tokens that are split across macro expansions or split by whitespace..
Fri, Aug 28, 1:34 PM · Restricted Project

Aug 27 2020

rsmith updated the summary of D86751: Add new warning for compound punctuation tokens that are split across macro expansions or split by whitespace..
Aug 27 2020, 4:51 PM · Restricted Project
rsmith requested review of D86751: Add new warning for compound punctuation tokens that are split across macro expansions or split by whitespace..
Aug 27 2020, 4:46 PM · Restricted Project

Aug 26 2020

rsmith added inline comments to D86514: Correctly parse LateParsedTemplates in case of multiple dependent modules.
Aug 26 2020, 1:51 PM · Restricted Project

Aug 25 2020

rsmith added a comment to D81083: [Clang] Allow "vector_size" applied to Booleans.

Have you considered using the ext_vector_type attribute instead of vector_size for this? That would have a couple of advantages:

Aug 25 2020, 2:03 PM · Restricted Project

Aug 24 2020

rsmith committed rG04ba18563390: PR37556: Don't diagnose conflicts between instantiated unqualified (authored by rsmith).
PR37556: Don't diagnose conflicts between instantiated unqualified
Aug 24 2020, 11:27 PM
rsmith added a comment to D79279: Add overloaded versions of builtin mem* functions.

Thanks, I'm happy with this approach.

Aug 24 2020, 6:39 PM · Restricted Project, Restricted Project
rsmith committed rG91604949ef2f: Properly pass modules flags to frontend when using -std=c++20 instead of… (authored by rsmith).
Properly pass modules flags to frontend when using -std=c++20 instead of…
Aug 24 2020, 5:50 PM
rsmith retitled D86494: PR43079: Work around GCC 10 not emitting base variants of structors for final classes, by avoiding referencing the symbols in question. from Work around GCC 10 not emitting base variants of structors for final classes, by avoiding referencing the symbols in question. to PR43079: Work around GCC 10 not emitting base variants of structors for final classes, by avoiding referencing the symbols in question..
Aug 24 2020, 4:20 PM · Restricted Project
rsmith requested review of D86494: PR43079: Work around GCC 10 not emitting base variants of structors for final classes, by avoiding referencing the symbols in question..
Aug 24 2020, 4:18 PM · Restricted Project

Aug 22 2020

rsmith accepted D86398: [X86] Enable constexpr on _cast fp<-> uint intrinsics (PR31446).

It would be useful to include in our documentation a brief list of which of these intrinsics can be used in constant expressions.

Aug 22 2020, 4:44 PM · Restricted Project

Aug 21 2020

rsmith added a comment to D86342: Enable constexpr on ROTATELEFT/ROTATERIGHT builtin intrinsics (PR47249).

(Same comments as for the bitreverse patch.)

Aug 21 2020, 11:09 AM · Restricted Project
rsmith added a comment to D86339: Enable constexpr on BITREVERSE builtin intrinsics (PR47249).

Can you also add documentation to LanguageExtensions.rst? Thanks!

Aug 21 2020, 11:07 AM · Restricted Project

Aug 20 2020

rsmith committed rGfe86dbb32da2: [clang]: Remove assertion which checks explicit declaration (authored by gousemoodhin).
[clang]: Remove assertion which checks explicit declaration
Aug 20 2020, 6:16 PM
rsmith closed D83929: [clang]: Remove assertion which checks explicit declaration.
Aug 20 2020, 6:16 PM · Restricted Project
rsmith committed rG70923983e542: Improve pretty-printing for APValues of void type. (authored by rsmith).
Improve pretty-printing for APValues of void type.
Aug 20 2020, 5:14 PM
rsmith committed rGefeb65d53b88: Fix up clangd after Clang 038edf6029bafe70b1f7165abe2b0e61ddf506b3. (authored by rsmith).
Fix up clangd after Clang 038edf6029bafe70b1f7165abe2b0e61ddf506b3.
Aug 20 2020, 4:36 PM
rsmith committed rG038edf6029ba: Don't reject uses of void-returning consteval functions. (authored by rsmith).
Don't reject uses of void-returning consteval functions.
Aug 20 2020, 3:40 PM
rsmith accepted D83929: [clang]: Remove assertion which checks explicit declaration.

Looks good to me. Do you need someone to land this for you?

Aug 20 2020, 3:38 PM · Restricted Project

Aug 19 2020

rsmith accepted D76323: [AST] Fix handling of long double and bool in __builtin_bit_cast.

This looks OK to me.

Aug 19 2020, 4:30 PM · Restricted Project
rsmith committed rGc1c1bed5d082: [c++14] Implement missed piece of N3323: use "converted constant" rules (authored by rsmith).
[c++14] Implement missed piece of N3323: use "converted constant" rules
Aug 19 2020, 3:46 PM
rsmith committed rG6f339367195e: Explain why the array bound is non-constant in VLA diagnostics. (authored by rsmith).
Explain why the array bound is non-constant in VLA diagnostics.
Aug 19 2020, 3:46 PM

Aug 18 2020

rsmith accepted D86130: [AST] Fix a crash on mangling a binding decl from a DeclRefExpr..

Here's a testcase that produces a name with external linkage:

Aug 18 2020, 1:39 PM · Restricted Project

Aug 16 2020

rsmith committed rG948219d10987: Replace setter named 'getAsOpaqueInt' with a real getter. (authored by rsmith).
Replace setter named 'getAsOpaqueInt' with a real getter.
Aug 16 2020, 5:02 PM