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 (357 w, 4 d)

Recent Activity

Yesterday

rsmith committed rC361208: Give 'fixit-cxx0x.cpp' a more modern name..
Give 'fixit-cxx0x.cpp' a more modern name.
Mon, May 20, 4:34 PM
rsmith committed rL361208: Give 'fixit-cxx0x.cpp' a more modern name..
Give 'fixit-cxx0x.cpp' a more modern name.
Mon, May 20, 4:34 PM
rsmith added a comment to D62009: [clang] perform semantic checking in constant context.

Interesting. I think all of the new warnings in the test cases here are undesirable (they duplicate errors produced by the constant evaluator), but the removed warnings all look like improvements.

Mon, May 20, 4:18 PM · Restricted Project
rsmith added a comment to D62009: [clang] perform semantic checking in constant context.

there are issues with using ConstantExpr to mark expressions as constant for semantic checking:

  • #1 multpile Expr::Ignore* operation remove ConstantExpr from the expression.
Mon, May 20, 1:01 PM · Restricted Project
rsmith committed rL361182: Rearrange and clean up how we disambiguate lambda-introducers from ObjC.
Rearrange and clean up how we disambiguate lambda-introducers from ObjC
Mon, May 20, 11:00 AM
rsmith committed rC361182: Rearrange and clean up how we disambiguate lambda-introducers from ObjC.
Rearrange and clean up how we disambiguate lambda-introducers from ObjC
Mon, May 20, 11:00 AM
rsmith added a comment to D61722: [AST] Add RecoveryExpr; produce it on overload resolution failure and missing member..

I expect we'll want a ContainsErrors bit on Stmt, propagated similarly to the existing InstantiationDependent / ContainsUnexpandedParameterPack / ... bits.

This sounds good (as an alternative to using dependent bits for this).

Do you think we want a similar bit on Type (set on e.g. vector<ErrorTy>) , or should be ensure ErrorTy never gets used for compound types?

Mon, May 20, 12:17 AM · Restricted Project

Sun, May 19

rsmith requested changes to D62116: [Sema] raise nullptr check to cover additional uses.
Sun, May 19, 11:25 PM · Restricted Project

Sat, May 18

rsmith added inline comments to D61838: [Sema] Suppress additional warnings for C's zero initializer.
Sat, May 18, 3:55 PM · Restricted Project

Fri, May 17

rsmith committed rL361067: [c++20] P1327R1: Support for typeid applied to objects of polymorphic.
[c++20] P1327R1: Support for typeid applied to objects of polymorphic
Fri, May 17, 12:17 PM
rsmith committed rC361067: [c++20] P1327R1: Support for typeid applied to objects of polymorphic.
[c++20] P1327R1: Support for typeid applied to objects of polymorphic
Fri, May 17, 12:17 PM
rsmith accepted D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions.
Fri, May 17, 1:20 AM · Restricted Project, Restricted Project
rsmith committed rL360999: Suppress false-positive GCC -Wreturn-type warning..
Suppress false-positive GCC -Wreturn-type warning.
Fri, May 17, 1:04 AM
rsmith committed rC360999: Suppress false-positive GCC -Wreturn-type warning..
Suppress false-positive GCC -Wreturn-type warning.
Fri, May 17, 1:04 AM
rsmith committed rL360998: Fix crash if, during evaluation of __builtin_object_size, we try to load.
Fix crash if, during evaluation of __builtin_object_size, we try to load
Fri, May 17, 1:02 AM
rsmith committed rC360998: Fix crash if, during evaluation of __builtin_object_size, we try to load.
Fix crash if, during evaluation of __builtin_object_size, we try to load
Fri, May 17, 1:02 AM
rsmith committed rC360997: Fix alignment check to check the alignment of the intended type..
Fix alignment check to check the alignment of the intended type.
Fri, May 17, 12:30 AM
rsmith committed rL360997: Fix alignment check to check the alignment of the intended type..
Fix alignment check to check the alignment of the intended type.
Fri, May 17, 12:30 AM
rsmith committed rC360995: Refactor constant evaluation of typeid(T) to track a symbolic type_info.
Refactor constant evaluation of typeid(T) to track a symbolic type_info
Fri, May 17, 12:06 AM
rsmith committed rL360995: Refactor constant evaluation of typeid(T) to track a symbolic type_info.
Refactor constant evaluation of typeid(T) to track a symbolic type_info
Fri, May 17, 12:06 AM

Thu, May 16

rsmith committed rC360977: [c++20] P1327R1: Support for typeid applied to objects of polymorphic.
[c++20] P1327R1: Support for typeid applied to objects of polymorphic
Thu, May 16, 7:14 PM
rsmith committed rL360977: [c++20] P1327R1: Support for typeid applied to objects of polymorphic.
[c++20] P1327R1: Support for typeid applied to objects of polymorphic
Thu, May 16, 7:14 PM
rsmith committed rL360974: Refactor constant evaluation of typeid(T) to track a symbolic type_info.
Refactor constant evaluation of typeid(T) to track a symbolic type_info
Thu, May 16, 6:44 PM
rsmith committed rC360974: Refactor constant evaluation of typeid(T) to track a symbolic type_info.
Refactor constant evaluation of typeid(T) to track a symbolic type_info
Thu, May 16, 6:44 PM
rsmith committed rL360962: Convert PointerUnion to a variadic template..
Convert PointerUnion to a variadic template.
Thu, May 16, 5:37 PM
rsmith closed D62027: Convert PointerUnion to a variadic template..
Thu, May 16, 5:37 PM · Restricted Project
rsmith added a comment to D62027: Convert PointerUnion to a variadic template..

This implementation is accepted by the lowest supported versions of all of our supported compilers: https://godbolt.org/z/yZJDu3

Thu, May 16, 1:27 PM · Restricted Project
rsmith created D62027: Convert PointerUnion to a variadic template..
Thu, May 16, 1:19 PM · Restricted Project
rsmith added a comment to D62009: [clang] perform semantic checking in constant context.

i added this bit because when we eventually store the result of evaluation in ConstantExpr we will probably want to trail-allocate the APValue's possible representations separately to limit memory consumption. but if we do this the ConstantExpr node will need to be created after evaluation of the value to allocate the right space and we will need an other way to mark that the expression should be evaluated in constant context.

Thu, May 16, 1:14 PM · Restricted Project
rsmith added a comment to D62009: [clang] perform semantic checking in constant context.

The approach we've been taking for this up until now is to use a ConstantExpr node to mark the entry point of a constant context; it looks like that would continue to work here, but we're missing those nodes in some cases? (This is preferable to using a flag because it also -- eventually -- gives us a place to store the evaluated value, which we're going to need for various upcoming features, particularly consteval.)

Thu, May 16, 11:46 AM · Restricted Project
rsmith accepted D59885: [Lex] Allow to consume tokens while preprocessing.

Thanks, LGTM!

Thu, May 16, 11:41 AM · Restricted Project
rsmith accepted D36357: Added a better diagnostic when using the delete operator with lambdas.

LGTM, thank you! :)

Thu, May 16, 11:37 AM · Restricted Project, Restricted Project
rsmith added a comment to D58920: [Modules][PR39287] Consolidate multiple std's.

Thanks for the help, @rsmith! Your suggestions were spot-on. (It took me a little while to figure out why, even using the LazyDeclPtr directly, I was still triggering deserialization. It turns out dump() causes deserialization too -- whoops!)

You should also change FindExistingResult::~FindExistingResult to update Sema::StdNamespace to point to your newly-deserialized namespace if you didn't find a prior declaration of it, so that Sema::getStdNamespace() finds the deserialized namespace.

I haven't done this yet. I'm trying to think of a test case that would fail if this were not done properly -- or would there not be one?

Thu, May 16, 11:35 AM · Restricted Project

Wed, May 15

rsmith committed rL360837: Fix regression in r360311 caused by reversed bool arguments..
Fix regression in r360311 caused by reversed bool arguments.
Wed, May 15, 7:05 PM
rsmith committed rC360837: Fix regression in r360311 caused by reversed bool arguments..
Fix regression in r360311 caused by reversed bool arguments.
Wed, May 15, 7:05 PM
rsmith added a comment to D61722: [AST] Add RecoveryExpr; produce it on overload resolution failure and missing member..

I expect we'll want a ContainsErrors bit on Stmt, propagated similarly to the existing InstantiationDependent / ContainsUnexpandedParameterPack / ... bits. For example, the constant evaluator will want to quickly bail out of evaluating expressions and statements containing errors, and the error recovery TreeTransform that we perform to fix typos will want that too (and maybe could be able to fix other kinds of errors for which we build these error nodes eventually?).

Wed, May 15, 5:53 PM · Restricted Project
rsmith updated subscribers of D61756: Add a __FILE_NAME__ macro..

Generally, I think this is a good, useful feature, but there's one point from http://clang.llvm.org/get_involved.html 's checklist for accepting language extensions on which its case is weak, as reflected by this feedback from @alexr on D17741:

I don't think we want to add a fundamental new preprocessor feature like __FILE_BASENAME__ without at least getting some early buy-in from the WG14 and WG21 committees.

Wed, May 15, 5:00 PM · Restricted Project
rsmith committed rC360827: Make tentative parsing to detect template-argument-lists less aggressive.
Make tentative parsing to detect template-argument-lists less aggressive
Wed, May 15, 4:34 PM
rsmith committed rL360827: Make tentative parsing to detect template-argument-lists less aggressive.
Make tentative parsing to detect template-argument-lists less aggressive
Wed, May 15, 4:33 PM
rsmith committed rL360806: [c++20] For P1327R1: support dynamic_cast in constant expression.
[c++20] For P1327R1: support dynamic_cast in constant expression
Wed, May 15, 1:19 PM
rsmith committed rC360806: [c++20] For P1327R1: support dynamic_cast in constant expression.
[c++20] For P1327R1: support dynamic_cast in constant expression
Wed, May 15, 1:19 PM
rsmith accepted D59413: Fix isInSystemMacro in presence of macro and pasted token.
Wed, May 15, 1:14 PM · Restricted Project
rsmith added inline comments to D59885: [Lex] Allow to consume tokens while preprocessing.
Wed, May 15, 11:31 AM · Restricted Project

Tue, May 14

rsmith added a comment to D36357: Added a better diagnostic when using the delete operator with lambdas.

How should I do this? Do I just skip to the next }, or also take into account any additional scopes? Also does this mean that I skip and then revert, because that seems pretty expensive?

It would be a little expensive, yes, but we'd only be doing it on codepaths where we're producing an error -- for an ill-formed program, it's OK to take more time in order to produce a better diagnostic. Skipping to the next } won't work, because SkipUntil will skip over pairs of brace-balanced tokens (so you'll skip past the } you're looking for), but skipping until the next { and then skipping to the } after it should work.

Hmm wouldn't this interact badly with {} in initializers?

[]<int = {0}> {};
[](int = {0}) {};
Tue, May 14, 4:08 PM · Restricted Project, Restricted Project
rsmith added a comment to D36357: Added a better diagnostic when using the delete operator with lambdas.

How should I do this? Do I just skip to the next }, or also take into account any additional scopes? Also does this mean that I skip and then revert, because that seems pretty expensive?

Tue, May 14, 1:23 PM · Restricted Project, Restricted Project
rsmith added a comment to D59885: [Lex] Allow to consume tokens while preprocessing.

The suggested approach looks promising. The difference seems to be within the noise levels on my machine:

Tue, May 14, 12:59 PM · Restricted Project
rsmith added a comment to D61790: [C++20] add consteval specifier.

Thanks for working on this!

Tue, May 14, 12:44 PM · Restricted Project

Mon, May 13

rsmith committed rL360637: PR41817: Fix regression in r359260 that caused the MS compatibility.
PR41817: Fix regression in r359260 that caused the MS compatibility
Mon, May 13, 5:25 PM
rsmith committed rC360637: PR41817: Fix regression in r359260 that caused the MS compatibility.
PR41817: Fix regression in r359260 that caused the MS compatibility
Mon, May 13, 5:25 PM
rsmith committed rL360635: [c++20] P1064R0: Allow virtual function calls in constant expression.
[c++20] P1064R0: Allow virtual function calls in constant expression
Mon, May 13, 4:33 PM
rsmith committed rC360635: [c++20] P1064R0: Allow virtual function calls in constant expression.
[c++20] P1064R0: Allow virtual function calls in constant expression
Mon, May 13, 4:33 PM
rsmith accepted D61370: Add a C2x mode and allow attributes in it.
Mon, May 13, 3:00 PM
rsmith added a comment to D58920: [Modules][PR39287] Consolidate multiple std's.

The problem may well be that you're recursively triggering deserialization of the std namespace from its own deserialization.

Mon, May 13, 12:54 PM · Restricted Project
rsmith added a comment to D59885: [Lex] Allow to consume tokens while preprocessing.

Thinking about this some more: distinguishing between "macro expansion" and other cases seems like a proxy for "this token came from inside the preprocessor / lexer" versus "this token was provided by the user", which is also exactly what IsNewToken is supposed to capture. I don't think we need two separate flags here.

Mon, May 13, 12:37 PM · Restricted Project
rsmith accepted D61858: Make `__is_base_of` more friendly with unions.

Yeah, this seems to match the library wording. (I think it's short-sighted and over-fitting -- this is baking into the library specification that the language happens to not allow unions to have base classes today -- but this isn't the venue for that discussion.)

Mon, May 13, 12:15 PM · Restricted Project
rsmith committed rC360563: PR41845: Detect and reject mismatched inner/outer pack expansion sizes.
PR41845: Detect and reject mismatched inner/outer pack expansion sizes
Mon, May 13, 1:29 AM
rsmith committed rL360563: PR41845: Detect and reject mismatched inner/outer pack expansion sizes.
PR41845: Detect and reject mismatched inner/outer pack expansion sizes
Mon, May 13, 1:29 AM
rsmith committed rC360560: PR41854: Don't assert when constant-evaluating a member function call on an….
PR41854: Don't assert when constant-evaluating a member function call on an…
Mon, May 13, 12:51 AM
rsmith committed rL360560: PR41854: Don't assert when constant-evaluating a member function call on an….
PR41854: Don't assert when constant-evaluating a member function call on an…
Mon, May 13, 12:51 AM
rsmith committed rC360559: [c++20] P1064R0: Allow virtual function calls in constant expression.
[c++20] P1064R0: Allow virtual function calls in constant expression
Mon, May 13, 12:42 AM
rsmith committed rL360559: [c++20] P1064R0: Allow virtual function calls in constant expression.
[c++20] P1064R0: Allow virtual function calls in constant expression
Mon, May 13, 12:42 AM

Sun, May 12

rsmith committed rC360538: Reject attempts to call non-static member functions on objects outside.
Reject attempts to call non-static member functions on objects outside
Sun, May 12, 2:37 AM
rsmith committed rL360538: Reject attempts to call non-static member functions on objects outside.
Reject attempts to call non-static member functions on objects outside
Sun, May 12, 2:37 AM
rsmith added a comment to rL360464: Fix handling of objects under construction during constant expression.

Sorry @rsmith due to dependencies, I had to revert rL360499 and rL360464 together in the end

Sun, May 12, 1:59 AM
rsmith committed rC360537: Fix handling of objects under construction during constant expression.
Fix handling of objects under construction during constant expression
Sun, May 12, 1:56 AM
rsmith committed rL360537: Fix handling of objects under construction during constant expression.
Fix handling of objects under construction during constant expression
Sun, May 12, 1:56 AM

Fri, May 10

rsmith committed rL360499: Reject attempts to call non-static member functions on objects outside.
Reject attempts to call non-static member functions on objects outside
Fri, May 10, 6:58 PM
rsmith committed rC360499: Reject attempts to call non-static member functions on objects outside.
Reject attempts to call non-static member functions on objects outside
Fri, May 10, 6:57 PM
rsmith added a comment to D61809: [BPF] Preserve debuginfo array/union/struct type name/access index.

If I understand correctly, you want to be able to compile a program against some struct and union layouts, and then at load time "update" the program to cope with the actual layouts for those types being something else, but containing (at least) the set of members you know about. And your proposed approach is to add intrinsics into the IR that identify the GEPs that we emitted to model struct field accesses, but to otherwise not change the emitted IR. If so, I don't see how this approach to that problem can work. There seem to be a couple of problems:

Fri, May 10, 4:27 PM · Restricted Project
rsmith committed rC360464: Fix handling of objects under construction during constant expression.
Fix handling of objects under construction during constant expression
Fri, May 10, 1:05 PM
rsmith committed rC360463: Improve interface of APValuePathEntry..
Improve interface of APValuePathEntry.
Fri, May 10, 1:05 PM
rsmith committed rL360464: Fix handling of objects under construction during constant expression.
Fix handling of objects under construction during constant expression
Fri, May 10, 1:05 PM
rsmith committed rL360463: Improve interface of APValuePathEntry..
Improve interface of APValuePathEntry.
Fri, May 10, 1:05 PM
rsmith added inline comments to D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid).
Fri, May 10, 11:38 AM
rsmith added a comment to D59885: [Lex] Allow to consume tokens while preprocessing.

Overall, the performance cost in empty-callback case seems to be lower than 5%. This is significant, but hopefully acceptable.

Fri, May 10, 10:51 AM · Restricted Project

Thu, May 9

rsmith accepted D61485: Added an assert in `isConstantInitializer`: initializer lists must be in semantic form.
Thu, May 9, 8:27 PM · Restricted Project, Restricted Project
rsmith committed rC360387: Remember to decay arrays to pointers before checking whether the.
Remember to decay arrays to pointers before checking whether the
Thu, May 9, 3:22 PM
rsmith committed rL360387: Remember to decay arrays to pointers before checking whether the.
Remember to decay arrays to pointers before checking whether the
Thu, May 9, 3:22 PM
rsmith committed rL360370: DR1872: don't allow any calls to virtual functions in constant.
DR1872: don't allow any calls to virtual functions in constant
Thu, May 9, 12:44 PM
rsmith committed rC360370: DR1872: don't allow any calls to virtual functions in constant.
DR1872: don't allow any calls to virtual functions in constant
Thu, May 9, 12:44 PM
rsmith committed rC360369: Simplify tracking of end of consumed decl-specifier sequence..
Simplify tracking of end of consumed decl-specifier sequence.
Thu, May 9, 12:44 PM
rsmith committed rL360369: Simplify tracking of end of consumed decl-specifier sequence..
Simplify tracking of end of consumed decl-specifier sequence.
Thu, May 9, 12:44 PM
rsmith accepted D61731: [clang] fix -Wparentheses in ParseDecl.cpp after D60934.
Thu, May 9, 12:43 PM

Wed, May 8

rsmith updated the diff for D61717: Fix arm_neon.h to be clean under -fno-lax-vector-conversions..

Remove unneeded test change.

Wed, May 8, 11:19 PM · Restricted Project
rsmith created D61717: Fix arm_neon.h to be clean under -fno-lax-vector-conversions..
Wed, May 8, 11:17 PM · Restricted Project
rsmith committed rL360312: Fix up lldb after clang r360311..
Fix up lldb after clang r360311.
Wed, May 8, 9:40 PM
rsmith committed rLLDB360312: Fix up lldb after clang r360311..
Fix up lldb after clang r360311.
Wed, May 8, 9:40 PM
rsmith committed rC360311: [c++20] Add support for explicit(bool), as described in P0892R2..
[c++20] Add support for explicit(bool), as described in P0892R2.
Wed, May 8, 8:59 PM
rsmith committed rL360311: [c++20] Add support for explicit(bool), as described in P0892R2..
[c++20] Add support for explicit(bool), as described in P0892R2.
Wed, May 8, 8:59 PM
rsmith closed D60934: [clang] adding explicit(bool) from c++2a.
Wed, May 8, 8:58 PM · Restricted Project, Restricted Project
rsmith committed rL360310: [cxx_status] Mark support for std::is_constant_evaluated as done..
[cxx_status] Mark support for std::is_constant_evaluated as done.
Wed, May 8, 8:51 PM
rsmith committed rC360310: [cxx_status] Mark support for std::is_constant_evaluated as done..
[cxx_status] Mark support for std::is_constant_evaluated as done.
Wed, May 8, 8:51 PM
rsmith committed rC360309: [cxx_dr_status] Update links to use wg21.link, and list "extension".
[cxx_dr_status] Update links to use wg21.link, and list "extension"
Wed, May 8, 8:43 PM
rsmith committed rL360309: [cxx_dr_status] Update links to use wg21.link, and list "extension".
[cxx_dr_status] Update links to use wg21.link, and list "extension"
Wed, May 8, 8:43 PM
rsmith committed rC360308: [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose.
[c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose
Wed, May 8, 8:30 PM
rsmith committed rL360308: [c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose.
[c++20] Implement P0846R0: allow (ADL-only) calls to template-ids whose
Wed, May 8, 8:30 PM
rsmith committed rL360302: When typo-correcting a function name, consider correcting to a type name.
When typo-correcting a function name, consider correcting to a type name
Wed, May 8, 5:59 PM
rsmith committed rC360302: When typo-correcting a function name, consider correcting to a type name.
When typo-correcting a function name, consider correcting to a type name
Wed, May 8, 5:59 PM
rsmith added inline comments to D61522: Added an assertion to constant evaluation enty points that prohibits dependent expressions.
Wed, May 8, 4:54 PM · Restricted Project, Restricted Project
rsmith accepted D60910: [WIP] Dumping the AST to JSON.

If you're happy with these two conditions, then I have no concerns with this moving forward:

Wed, May 8, 1:50 PM