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 (393 w, 5 d)

Recent Activity

Yesterday

rsmith committed rGaf80b8ccc577: PR44684: Look through parens and similar constructs when determining whether a… (authored by rsmith).
PR44684: Look through parens and similar constructs when determining whether a…
Mon, Jan 27, 6:21 PM
rsmith added a comment to D71920: [AST] Refactor propagation of dependency bits. NFC.

I don't like the name getDependencies, because the function is not getting a list of dependencies, it's getting flags that indicate whether certain properties of the construct are dependent. Maybe getDependence or getDependenceFlags would be a better name? Likewise, instead of addDependencies, perhaps addDependence?

Mon, Jan 27, 5:09 PM · Restricted Project

Sun, Jan 26

rsmith added inline comments to D73380: [clang] Annotating C++'s `operator new` with more attributes.
Sun, Jan 26, 12:04 PM · Restricted Project, Restricted Project

Fri, Jan 24

rsmith added inline comments to D73380: [clang] Annotating C++'s `operator new` with more attributes.
Fri, Jan 24, 7:09 PM · Restricted Project, Restricted Project
rsmith committed rG04f131da0b19: DR1753: Don't permit x.NS::~T() as a pseudo-destructor name. (authored by rsmith).
DR1753: Don't permit x.NS::~T() as a pseudo-destructor name.
Fri, Jan 24, 7:01 PM
rsmith accepted D73388: NFC: Implement AST node skipping in ParentMapContext.

This seems reasonable to me.

Fri, Jan 24, 7:00 PM · Restricted Project
rsmith accepted D73385: [Sema] Split availability processing into SemaAvailability.cpp.
Fri, Jan 24, 3:32 PM · Restricted Project
rsmith added a comment to D73028: Extract ExprTraversal class from Expr.

The follow-up is here: https://reviews.llvm.org/D73029 .

I have the need to change the ascending traversal implemented in ASTContext.cpp with a map (populated while descending) to make it skip nodes too during parent traversal.

I didn't want to have descending traversal in Expr.cpp and ascending traversal in ASTContext.cpp as they would be likely to go out of sync, so moving this implementation here allows extending the purpose in the follow-up.

Fri, Jan 24, 1:13 PM · Restricted Project
rsmith added a comment to D73029: Extend ExprTraversal class with acending traversal.

We're working on moving the parent map out of ASTContext and into something specific to tooling; please don't add more dependencies onto it in the AST library.

Fri, Jan 24, 1:13 PM · Restricted Project
rsmith added a comment to D73028: Extract ExprTraversal class from Expr.

An addition to the API will be concerned with ascending through the AST in different traversal modes.

Fri, Jan 24, 11:50 AM · Restricted Project

Thu, Jan 23

rsmith requested changes to D72242: Fix crash on value dependent bitfields in if conditions in templates.

This is not an appropriate fix; the code is locally correct. The right way to handle this is exactly what Clang currently does: if the expression is not type-dependent, then contextually convert to bool, and if it's not value-dependent, then make sure it's a constant expression.

Thu, Jan 23, 6:58 PM
rsmith created D73306: llvm-addr2line: assume addresses on the command line are hexadecimal rather than attempting to guess the base based on the form of the number..
Thu, Jan 23, 4:40 PM · Restricted Project
rsmith committed rGfa2fc81d3464: Re-add documentation for -flax-vector-conversions= removed in… (authored by rsmith).
Re-add documentation for -flax-vector-conversions= removed in…
Thu, Jan 23, 12:37 PM
rsmith committed rGed63454d984f: Update documentation and release notes to match the state of -flax-vector… (authored by rsmith).
Update documentation and release notes to match the state of -flax-vector…
Thu, Jan 23, 12:28 PM
rsmith added a comment to D67678: PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer..

@rsmith This also breaks macOS SDK. Can we revert this as we discuss a less aggressive option?

Do you have a timeline for how long it would take to fix the MacOS SDK? Is this something we could realistically aim to do in Clang 11 instead? I would really prefer for us to not have different defaults for Darwin versus everywhere else, so if waiting one release cycle is enough, that seems fine.

I am also not sure if we have rules about SDK compatibility for releases and I can't say macOS SDK can definitely be fixed before clang 11 release. @dexonsmith @arphaman might have more info.

We can't comment on future releases.

That said, if this is urgent, let @arphaman know and we can try to qualify internally sometime in the next few months and we can report back what issues we find.

Thu, Jan 23, 12:16 PM · Restricted Project
rsmith added inline comments to D73150: [Concepts] Remove -fconcepts-ts, enable concepts support under -std=c++2a.
Thu, Jan 23, 11:56 AM · Restricted Project
rsmith accepted D73155: [Concepts] Implement P1616R1 - Using unconstrained template template parameters with constrained templates.
Thu, Jan 23, 11:55 AM · Restricted Project
rsmith accepted D73153: [Concepts] Update ReleaseNotes with Concepts support.
Thu, Jan 23, 11:51 AM · Restricted Project

Wed, Jan 22

rsmith added a comment to D67678: PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer..

I'll split out the new flag at least and re-land for Clang 10, while we figure out how to set the default.

Wed, Jan 22, 6:17 PM · Restricted Project
rsmith added a comment to D67678: PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer..

@rsmith This also breaks macOS SDK. Can we revert this as we discuss a less aggressive option?

Wed, Jan 22, 3:07 PM · Restricted Project
rsmith committed rGb32013baec1d: [www] Update cxx_status page to list changes on the Clang 10 branch as "Clang… (authored by rsmith).
[www] Update cxx_status page to list changes on the Clang 10 branch as "Clang…
Wed, Jan 22, 2:50 PM

Tue, Jan 21

rsmith added a comment to D72897: List implicit operator== after implicit destructors in a vtable..

Hi Richard,

http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l builder has been broken by this patch during few days (failed "Clang::virtual-compare.cpp" test).
Sorry, but I'm going to revert these changes.

Tue, Jan 21, 3:55 PM · Restricted Project
rsmith committed rG6e73fee78083: List implicit operator== after implicit destructors in a vtable. (authored by rsmith).
List implicit operator== after implicit destructors in a vtable.
Tue, Jan 21, 3:55 PM
rsmith accepted D72552: [Concepts] Constraint Satisfaction Caching.

Mechanically, this looks fine.

Tue, Jan 21, 1:10 PM · Restricted Project

Sun, Jan 19

rsmith committed rGadd2b7e44ada: List implicit operator== after implicit destructors in a vtable. (authored by rsmith).
List implicit operator== after implicit destructors in a vtable.
Sun, Jan 19, 6:37 PM
rsmith committed rG7a9fa76be742: Undo changes to release notes intended for the Clang 10 branch, not master. (authored by rsmith).
Undo changes to release notes intended for the Clang 10 branch, not master.
Sun, Jan 19, 6:37 PM
rsmith closed D72897: List implicit operator== after implicit destructors in a vtable..
Sun, Jan 19, 6:37 PM · Restricted Project
rsmith committed rG13fa4e2e5ae6: PR42108 Consistently diagnose binding a reference template parameter to a… (authored by rsmith).
PR42108 Consistently diagnose binding a reference template parameter to a…
Sun, Jan 19, 6:19 PM

Fri, Jan 17

rsmith accepted D65042: [Concept] Placeholder constraints and abbreviated templates.

I've left some comments suggesting how to rebase this on rGa42fd84cff265b7e9faa3fe42885ee171393e4db; otherwise, some minor changes then this looks good to me. Thanks!

Fri, Jan 17, 4:08 PM · Restricted Project
rsmith committed rGa42fd84cff26: Remove redundant CXXScopeSpec from TemplateIdAnnotation. (authored by rsmith).
Remove redundant CXXScopeSpec from TemplateIdAnnotation.
Fri, Jan 17, 3:49 PM
rsmith updated the diff for D72897: List implicit operator== after implicit destructors in a vtable..
  • Explicitly put implicit virtual functions in the right order, rather
Fri, Jan 17, 1:46 PM · Restricted Project
rsmith added a comment to D72897: List implicit operator== after implicit destructors in a vtable..

I know that Sema used to have a lot of issues with implicitly declaring special members, but I also know that that was bound up with how we tracked special state for the class, and that code has changed a lot. If you feel that that's an unlikely problem now, and you're comfortable with potentially having to generate implicit declarations of special members in different orders to satisfy different ABIs, I can accept this approach.

Fri, Jan 17, 1:46 PM · Restricted Project

Thu, Jan 16

rsmith accepted D50360: [Concepts] Requires Expressions.
Thu, Jan 16, 7:40 PM · Restricted Project
rsmith committed rG01a6cd471f01: Don't dump IR output from this test to stdout. (authored by rsmith).
Don't dump IR output from this test to stdout.
Thu, Jan 16, 7:22 PM
rsmith created D72897: List implicit operator== after implicit destructors in a vtable..
Thu, Jan 16, 6:43 PM · Restricted Project
rsmith committed rGb78e8e0d79c4: Add extra test file forgotten in 45d7080. (authored by rsmith).
Add extra test file forgotten in 45d7080.
Thu, Jan 16, 6:15 PM
rsmith added a comment to D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available..

Ping. Is there any interest in pursuing this, or is the preprocessor complexity too great?

Thu, Jan 16, 4:31 PM · Restricted Project

Wed, Jan 15

rsmith added a comment to D65042: [Concept] Placeholder constraints and abbreviated templates.

I think this might work out more cleanly if we represented a constrained auto type as a ConstrainedType node wrapping an AutoType node rather than putting both things into the same object. (This will become more pressing if/when C++ starts allowing, for example, constrained placeholders for deduced class template specializations, or constrained typename types, which are likely future directions.) But let's go with this approach for now.

Wed, Jan 15, 7:20 PM · Restricted Project
rsmith added a comment to D37933: Prevent InstCombine from miscompiling `operator delete` .

So, from what I can see no transformation made for free() is valid in case of operator delete.
What do you think instead of introducing a predicate isCallToOperatorDelete() and bail out at the beginning of visitFree() ?

Wed, Jan 15, 7:11 PM
rsmith committed rG45d70806f438: PR42694 Support explicit(bool) in older language modes as an extension. (authored by rsmith).
PR42694 Support explicit(bool) in older language modes as an extension.
Wed, Jan 15, 6:52 PM
rsmith committed rGe8f198dd9e9d: Fix pack deduction to only deduce the arity of packs that are actually expanded… (authored by rsmith).
Fix pack deduction to only deduce the arity of packs that are actually expanded…
Wed, Jan 15, 4:22 PM
rsmith added inline comments to D50360: [Concepts] Requires Expressions.
Wed, Jan 15, 2:56 PM · Restricted Project
rsmith added inline comments to D50360: [Concepts] Requires Expressions.
Wed, Jan 15, 2:08 PM · Restricted Project
rsmith committed rGb72a8c65e4e3: PR17164: Change clang's default behavior from -flax-vector-conversions=all to… (authored by Richard Smith <richard-llvm@metafoo.co.uk>).
PR17164: Change clang's default behavior from -flax-vector-conversions=all to…
Wed, Jan 15, 1:19 PM
rsmith committed rG388eaa1270c2: Work around PR43337: don't try to use the vec_sel overloads for vector long… (authored by Richard Smith <richard-llvm@metafoo.co.uk>).
Work around PR43337: don't try to use the vec_sel overloads for vector long…
Wed, Jan 15, 1:19 PM
rsmith closed D67678: PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer..
Wed, Jan 15, 1:19 PM · Restricted Project

Tue, Jan 14

rsmith committed rG1b5404aff379: PR44540: Prefer an inherited default constructor over an initializer list… (authored by rsmith).
PR44540: Prefer an inherited default constructor over an initializer list…
Tue, Jan 14, 7:33 PM
rsmith added a comment to D67678: PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer..

Ping, I don't think I have any actionable feedback here and I'd like to get this landed before Clang 10 branches.

Tue, Jan 14, 2:26 PM · Restricted Project
rsmith updated the diff for D67678: PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer..

Rebase and slightly expand release notes.

Tue, Jan 14, 2:26 PM · Restricted Project
rsmith accepted D44352: [Concepts] Type Constraints.

Some cleanups (mainly parameters that are no longer necessary), then this is good to go. Thanks!

Tue, Jan 14, 2:17 PM · Restricted Project

Mon, Jan 13

rsmith committed rG989bed989a41: Re-enable testing of .s tests under test/CodeGen/X86. (authored by rsmith).
Re-enable testing of .s tests under test/CodeGen/X86.
Mon, Jan 13, 4:23 PM
rsmith added a comment to D50360: [Concepts] Requires Expressions.

(Partial comments; I'll try to complete the review today or tomorrow.)

Mon, Jan 13, 11:22 AM · Restricted Project

Sun, Jan 12

rsmith requested changes to D72565: adding __has_feature support for left c++ type_traits.
Sun, Jan 12, 10:34 AM · Restricted Project

Fri, Jan 10

rsmith committed rG9a6f4d451ca7: Clean up and slightly generalize implementation of composite pointer type… (authored by rsmith).
Clean up and slightly generalize implementation of composite pointer type…
Fri, Jan 10, 4:16 PM
rsmith committed rGfbf915f01d46: Add a FIXME and corresponding test coverage for some suspicious behavior… (authored by rsmith).
Add a FIXME and corresponding test coverage for some suspicious behavior…
Fri, Jan 10, 4:16 PM
rsmith committed rGf4df7f4701d8: Remove redundant implicit cast creation. (authored by rsmith).
Remove redundant implicit cast creation.
Fri, Jan 10, 4:16 PM
rsmith committed rG1b8c84b8dd5a: Improve precision of documentation comment. (authored by rsmith).
Improve precision of documentation comment.
Fri, Jan 10, 3:50 PM
rsmith committed rG7a38468e34ee: Only destroy static locals if they have non-trivial destructors. (authored by rsmith).
Only destroy static locals if they have non-trivial destructors.
Fri, Jan 10, 3:21 PM
rsmith added inline comments to D72411: [CodeGen] partially revert 2b4fa5348ee157b6b1a1af44d0137ca8c7a71573 to fix Objective-C static variable initialization.
Fri, Jan 10, 3:20 PM · Restricted Project
rsmith added inline comments to D72411: [CodeGen] partially revert 2b4fa5348ee157b6b1a1af44d0137ca8c7a71573 to fix Objective-C static variable initialization.
Fri, Jan 10, 3:02 PM · Restricted Project

Thu, Jan 9

rsmith added inline comments to D44352: [Concepts] Type Constraints.
Thu, Jan 9, 7:21 PM · Restricted Project
rsmith committed rGf041e9ad706a: CWG2352: Allow qualification conversions during reference binding. (authored by rsmith).
CWG2352: Allow qualification conversions during reference binding.
Thu, Jan 9, 6:26 PM
rsmith committed rG25195541349b: When diagnosing the lack of a viable conversion function, also list explicit… (authored by rsmith).
When diagnosing the lack of a viable conversion function, also list explicit…
Thu, Jan 9, 3:15 PM

Wed, Jan 8

rsmith added inline comments to D44352: [Concepts] Type Constraints.
Wed, Jan 8, 5:19 PM · Restricted Project
rsmith accepted D43357: [Concepts] Function trailing requires clauses.

Thanks, I'm happy to iterate on this further after you commit (though feel free to ask for another round of review if you prefer). The changes to recovery from missing parens in a trailing requires clause can be done in a separate change after this one if you like.

Wed, Jan 8, 4:05 PM · Restricted Project
rsmith added a comment to D70172: [CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese.

This doesn't look quite right to me. I don't think we should treat the delete this; for a destructor as being emitted-for-device in any translation unit in which the vtable is marked used. (For example, if in your testcase MSEmitDeletingDtor::CFileStream::CFileStream() were a __host__ function, I think you'd still diagnose, but presumably shouldn't do so, because the vtable -- and therefore CFileStream::operator delete -- is never referenced / emitted for the device.) Instead, I think we should treat the delete this; as being emitted in any translation unit in which the vtable itself is emitted-for-device. Presumably, this means you will need to model / track usage of the vtable itself in your "call graph".

Wed, Jan 8, 12:32 PM

Tue, Jan 7

rsmith added inline comments to D43357: [Concepts] Function trailing requires clauses.
Tue, Jan 7, 7:50 PM · Restricted Project
rsmith added inline comments to D43357: [Concepts] Function trailing requires clauses.
Tue, Jan 7, 3:51 PM · Restricted Project
rsmith added inline comments to D71572: [ItaniumCXXABI] Make tls wrappers properly comdat.
Tue, Jan 7, 10:52 AM · Restricted Project

Mon, Jan 6

rsmith committed rG907cefe72143: Always deduce the lengths of contained parameter packs when deducing a pack… (authored by rsmith).
Always deduce the lengths of contained parameter packs when deducing a pack…
Mon, Jan 6, 5:29 PM
rsmith added a comment to D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item.

While I agree with the general notion about the flaws with the current implementation, I feel that the more major refactoring proposed in this review is out of the scope of this minor fix.

Mon, Jan 6, 1:39 PM · Restricted Project
rsmith added inline comments to D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item.
Mon, Jan 6, 1:39 PM · Restricted Project
rsmith added inline comments to D72053: [RFC] Handling implementation limits.
Mon, Jan 6, 12:14 PM · Restricted Project
rsmith added inline comments to D71227: [cuda][hip] Fix function overload resolution in the global initiailizer..
Mon, Jan 6, 11:03 AM · Restricted Project

Dec 20 2019

rsmith accepted D71758: [Lexer] Allow UCN for dollar symbol '\u0024' in identifiers when using -fdollars-in-identifiers flag..
Dec 20 2019, 1:47 PM · Restricted Project
rsmith added a comment to D71758: [Lexer] Allow UCN for dollar symbol '\u0024' in identifiers when using -fdollars-in-identifiers flag..

This seems reasonable to me, and matches GCC 10's behavior; $ is not in the basic source character set, so encoding it with a UCN should be permitted.

Dec 20 2019, 1:47 PM · Restricted Project

Dec 19 2019

rsmith committed rGde21704ba96f: CWG2352: Allow qualification conversions during reference binding. (authored by rsmith).
CWG2352: Allow qualification conversions during reference binding.
Dec 19 2019, 7:03 PM
rsmith added a comment to D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item.

To be rigorous, we should perform "pointer" checking for every operation that performs pointer arithmetic. Then we should perform "lvalue" checking (which doesn't allow pointers one past the end) in the following places:

  1. When we take the address of an lvalue.
  2. When we form a reference to an lvalue.
  3. When we perform an lvalue-to-rvalue conversion.
  4. When we perform an assignment to an lvalue.

    This sort of piecemeal approach of recursively looking through arbitrary expressions seems likely to miss cases. For example, we currently don't perform checks inside compound literals.
Dec 19 2019, 6:53 PM · Restricted Project
rsmith committed rGf4a45c2ce4ce: Fix crash on init-capture packs where the type of the initializer is non… (authored by rsmith).
Fix crash on init-capture packs where the type of the initializer is non…
Dec 19 2019, 3:20 PM
rsmith added a comment to D65591: [AST] Add a flag indicating if any subexpression had errors.

Summary of an off-line discussion with Ilya:

Dec 19 2019, 2:40 PM · Restricted Project
rsmith committed rGdf2e2ab07b48: Implement latest C++ feature test macro recommendations. (authored by rsmith).
Implement latest C++ feature test macro recommendations.
Dec 19 2019, 1:03 PM
rsmith added a comment to D71619: [CLANG] Alignment specifier not applied to anonymous structure or union.

Seems fine to me. @aaron.ballman, want to take a look?

Dec 19 2019, 1:03 PM · Restricted Project
rsmith added a comment to D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item.

In addition to @riccibruno's comment, I found a couple of other suspicious things nearby (unrelated to the fix in this patch). No need to address them in this patch unless you feel motivated :)

Dec 19 2019, 12:54 PM · Restricted Project

Dec 18 2019

rsmith committed rG3ced23976aa8: Refactor CompareReferenceRelationship and its callers in preparation for… (authored by rsmith).
Refactor CompareReferenceRelationship and its callers in preparation for…
Dec 18 2019, 2:10 PM
rsmith added inline comments to D71619: [CLANG] Alignment specifier not applied to anonymous structure or union.
Dec 18 2019, 1:13 PM · Restricted Project
rsmith committed rGb6e90a1a1093: llvm-cxxmap: fix support for remapping non-mangled names. (authored by rsmith).
llvm-cxxmap: fix support for remapping non-mangled names.
Dec 18 2019, 10:48 AM

Dec 16 2019

rsmith added inline comments to D71572: [ItaniumCXXABI] Make tls wrappers properly comdat.
Dec 16 2019, 6:54 PM · Restricted Project
rsmith committed rGeea8ba097c4a: Check whether the destination is a complete type in a static_cast (or C-style… (authored by rsmith).
Check whether the destination is a complete type in a static_cast (or C-style…
Dec 16 2019, 6:36 PM
rsmith added inline comments to D71576: [c++20] Add deprecation warnings for the expression forms deprecated by P1120R0..
Dec 16 2019, 6:36 PM · Restricted Project
rsmith committed rG4e9f1379b9cd: If constant evaluation fails due to an unspecified pointer comparison, produce… (authored by rsmith).
If constant evaluation fails due to an unspecified pointer comparison, produce…
Dec 16 2019, 5:59 PM
rsmith committed rGf495de43bd5d: [c++20] P1959R0: Remove support for std::*_equality. (authored by rsmith).
[c++20] P1959R0: Remove support for std::*_equality.
Dec 16 2019, 5:59 PM
rsmith committed rG4b0029995853: [c++20] Add deprecation warnings for the expression forms deprecated by P1120R0. (authored by rsmith).
[c++20] Add deprecation warnings for the expression forms deprecated by P1120R0.
Dec 16 2019, 5:59 PM
rsmith closed D71576: [c++20] Add deprecation warnings for the expression forms deprecated by P1120R0..

Committed as rG4b0029995853fe37d1dc95ef96f46697c743fcad.

Dec 16 2019, 5:58 PM · Restricted Project
rsmith created D71576: [c++20] Add deprecation warnings for the expression forms deprecated by P1120R0..
Dec 16 2019, 3:30 PM · Restricted Project

Dec 15 2019

rsmith committed rGbc633a42dd40: Mark the major papers for C++20 consistent comparisons as "done", and start… (authored by rsmith).
Mark the major papers for C++20 consistent comparisons as "done", and start…
Dec 15 2019, 10:25 PM
rsmith committed rG4a4e90a82388: [c++20] Compute exception specifications for defaulted comparisons. (authored by rsmith).
[c++20] Compute exception specifications for defaulted comparisons.
Dec 15 2019, 10:19 PM
rsmith committed rGfbf60b7dbeb0: Properly compute whether statement expressions can throw, rather than… (authored by rsmith).
Properly compute whether statement expressions can throw, rather than…
Dec 15 2019, 10:19 PM
rsmith committed rG0ec1e9900129: Resolve exception specifications after marking the corresponding function as… (authored by rsmith).
Resolve exception specifications after marking the corresponding function as…
Dec 15 2019, 10:19 PM

Dec 14 2019

rsmith added inline comments to D43357: [Concepts] Function trailing requires clauses.
Dec 14 2019, 4:33 PM · Restricted Project
rsmith accepted D70579: [coroutines][PR41909] Generalize fix from D62550.
Dec 14 2019, 3:48 PM · Restricted Project