Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

rsmith (Richard Smith - zygoloid)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 12 2012, 2:19 PM (585 w, 3 d)

Recent Activity

Mon, Sep 25

rsmith committed rG7421dd55a16f: Don't specify the same flag twice. (authored by rsmith).
Don't specify the same flag twice.
Mon, Sep 25, 4:38 PM · Restricted Project, Restricted Project
rsmith added a comment to D147655: Implement mangling rules for C++20 concepts and requires-expressions..

Yeah, the more I think about this, the more I think that while (1) Apple should upstream its use of an older default, regardless (2) the existence of any targets at all with an older default means that tests like this always need to be using -fclang-abi-compat=latest.

Mon, Sep 25, 4:38 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
rsmith committed rG940850066290: Add -fclang-abi-compat=latest to a bunch of tests for manglings that changed… (authored by rsmith).
Add -fclang-abi-compat=latest to a bunch of tests for manglings that changed…
Mon, Sep 25, 4:35 PM · Restricted Project, Restricted Project
rsmith committed rGc74398649f28: Enter the function parameter mangling scope for a function encoding (authored by rsmith).
Enter the function parameter mangling scope for a function encoding
Mon, Sep 25, 4:19 PM · Restricted Project, Restricted Project

Sun, Sep 24

rsmith committed rG68765143c676: Fix assertion failure mangling an unresolved template argument that (authored by rsmith).
Fix assertion failure mangling an unresolved template argument that
Sun, Sep 24, 11:53 AM · Restricted Project, Restricted Project

Fri, Sep 22

rsmith added a comment to D147655: Implement mangling rules for C++20 concepts and requires-expressions..

Hi @rsmith, we have an internal test where your change seems to have changed the mangling in C++17 mode and wanted to check if that was intentional.

[...]

Are these changes in non-C++20 mode intentional?

Fri, Sep 22, 5:41 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
rsmith committed rGaaa79a59317f: [release notes] Add forgotten case to list of changed manglings. (authored by rsmith).
[release notes] Add forgotten case to list of changed manglings.
Fri, Sep 22, 5:40 PM · Restricted Project, Restricted Project

Thu, Sep 21

rsmith committed rGc4a3157d6622: Add mangling for type trait expressions. (authored by rsmith).
Add mangling for type trait expressions.
Thu, Sep 21, 12:59 PM · Restricted Project, Restricted Project

Wed, Sep 20

rsmith committed rG1aadd4766e97: Remove #include that the cp-to-llvm script added. (authored by rsmith).
Remove #include that the cp-to-llvm script added.
Wed, Sep 20, 12:43 PM · Restricted Project, Restricted Project
rsmith closed D147655: Implement mangling rules for C++20 concepts and requires-expressions..
Wed, Sep 20, 12:38 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
rsmith committed rG4b163e343cfa: Implement mangling rules for C++20 concepts and requires-expressions. (authored by rsmith).
Implement mangling rules for C++20 concepts and requires-expressions.
Wed, Sep 20, 12:38 PM · Restricted Project, Restricted Project, Restricted Project
rsmith updated the summary of D147655: Implement mangling rules for C++20 concepts and requires-expressions..
Wed, Sep 20, 12:36 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
rsmith updated the diff for D147655: Implement mangling rules for C++20 concepts and requires-expressions..
  • Merge
Wed, Sep 20, 12:34 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Mon, Sep 11

rsmith added a comment to D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops".

The changes in SemaInit.cpp don't look correct to me. Trying to recurse through the initializer and find every nested temporary is highly error-prone; I can't tell you which expression nodes you forgot to recurse through, but I'm sure there are some.

Mon, Sep 11, 2:11 PM · Restricted Project, Restricted Project

Wed, Sep 6

rsmith added a comment to D147655: Implement mangling rules for C++20 concepts and requires-expressions..

Ping. Are there any further concerns here? (This obviously needs to be merged with trunk, and the -fclang-abi-compat= checks and release notes need to be updated to match the latest release version.)

Wed, Sep 6, 4:12 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Aug 31 2023

rsmith added inline comments to D158296: [clang] Diagnose overly complex Record in __builtin_dump_struct.
Aug 31 2023, 3:03 PM · Restricted Project, Restricted Project

Aug 30 2023

rsmith added inline comments to D158296: [clang] Diagnose overly complex Record in __builtin_dump_struct.
Aug 30 2023, 2:23 PM · Restricted Project, Restricted Project

Aug 29 2023

rsmith added a comment to D158967: [clang][clangd] Ensure the stack bottom before building AST.

Currently the code in CompilerInstance::ExecuteAction seems to acknowledge that there should be a fallback. I'm suggesting to move this fallback down to a function that actually runs parsing.

One thing I'm afraid of is, that there are/were some compatible reasons that made us decide not to insert this call at ASTFrontendAction::ExecuteAction nor clang::ParseAST. (I didn't see the explanation in D66361. Richard, could you kindly explain why? @rsmith)

Aug 29 2023, 12:24 PM · Restricted Project, Restricted Project, Restricted Project

Aug 21 2023

rsmith added a comment to D155387: [Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases.

I believe this should compile as according to (over.match.oper)p4:

A non-template function or function template F named operator== is a rewrite target with first operand o unless a search for the name operator!= in the scope S from the instantiation context of the operator expression finds a function …

And 'search' is defined without any checks for ambiguous bases in (basic.lookup.general)p3

A single search in a scope S for a name N from a program point P finds all declarations that precede P to which any name that is the same as N ([basic.pre]) is bound in S. If any such declaration is a using-declarator whose terminal name ([expr.prim.id.unqual]) is not dependent ([temp.dep.type]), it is replaced by the declarations named by the using-declarator ([namespace.udecl]).

Clang does a full lookup instead, therefore exposing the errors that it should not diagnose.

Aug 21 2023, 3:17 PM · Restricted Project, Restricted Project
rsmith added a comment to D157708: [Sema] Suppress lookup diagnostics when checking reversed operators.

The prior behavior of Clang is correct. A search of a class scope is ill-formed if it finds an ambiguous result, see http://eel.is/c++draft/basic.lookup#class.member.lookup-6.sentence-2

Aug 21 2023, 12:10 PM · Restricted Project, Restricted Project
rsmith added inline comments to D158372: [Clang] Treat invalid UDL as two tokens.
Aug 21 2023, 12:06 PM · Restricted Project, Restricted Project

Aug 7 2023

rsmith requested changes to D154559: [clang] Fix constant evaluation about static member function.

Clang was correct here until fairly recently; P2280 (https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2280r4.html) changed the language rules. It was applied as a DR, so we should make that change retroactively rather than only in C++23 mode. See https://github.com/llvm/llvm-project/issues/63139, which tracks implementation of that language change.

Aug 7 2023, 11:32 AM · Restricted Project

Aug 2 2023

rsmith added inline comments to D156726: Make globals with mutable members non-constant, even in custom sections.
Aug 2 2023, 10:02 AM · Restricted Project, Restricted Project

Aug 1 2023

rsmith accepted D156806: [Modules] Add test for merging of template member parent.

Awesome, thanks! It makes perfect sense that rG61c7a9140b would fix this.

Aug 1 2023, 11:04 AM · Restricted Project, Restricted Project

Jul 28 2023

rsmith accepted D156210: [ODRHash] Hash type-as-written.

Looks good, thanks!

Jul 28 2023, 2:13 PM · Restricted Project, Restricted Project
rsmith accepted D155387: [Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases.

This looks good to me. I think we can further refine the handling of duplicate diagnostics but I don't think that needs to be done as part of this bugfix.

Jul 28 2023, 1:40 PM · Restricted Project, Restricted Project

Jul 27 2023

rsmith added a comment to D156210: [ODRHash] Hash type-as-written.

From what @rsmith said:

If we want to include the underlying type of the typedef here, we'll need a new kind of hashing to capture only the value of the typedef and not how it was written. I don't think it's worth it; let's just not include the definition of a referenced typedef in the hash for now.

So now it looks like the only path we can forward? Or can we accept the regressions described in the patch?

Jul 27 2023, 6:20 PM · Restricted Project, Restricted Project
rsmith added a comment to D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`..

LGTM, though please wait a day or two for any more comments from @gribozavr2 since he's looked at this more closely than I have.

Jul 27 2023, 5:19 PM · Restricted Project, Restricted Project

Jul 26 2023

rsmith added inline comments to D155895: Anonymous unions should be transparent wrt `[[clang::trivial_abi]]`..
Jul 26 2023, 11:51 AM · Restricted Project, Restricted Project

Jul 25 2023

rsmith added a comment to D154658: Optimize emission of `dynamic_cast` to final classes..

This change results in some of our builds (distributed Thin-LTO in case that matters) to fail with missing symbols. At a first glance this seems to emit VTables in some files where it didn't do this before and then fails to resolve some members of that vtable. I'm in the process of analyzing this further and making a small reproducer.

Jul 25 2023, 4:01 PM · Restricted Project, Restricted Project
rsmith committed rG61c7a9140bec: Commit to a primary definition for a class when we load its first (authored by rsmith).
Commit to a primary definition for a class when we load its first
Jul 25 2023, 3:59 PM · Restricted Project, Restricted Project
rsmith committed rGb6847edfc235: For #64088: mark vtable as used if we might emit a reference to it. (authored by rsmith).
For #64088: mark vtable as used if we might emit a reference to it.
Jul 25 2023, 2:43 PM · Restricted Project, Restricted Project

Jul 24 2023

rsmith committed rG6cf817966199: Don't perform dynamic_cast optimization at -O0. (authored by rsmith).
Don't perform dynamic_cast optimization at -O0.
Jul 24 2023, 10:25 PM · Restricted Project, Restricted Project

Jul 21 2023

rsmith committed rG9d525bf94b25: Optimize emission of `dynamic_cast` to final classes. (authored by rsmith).
Optimize emission of `dynamic_cast` to final classes.
Jul 21 2023, 7:08 PM · Restricted Project, Restricted Project
rsmith closed D154658: Optimize emission of `dynamic_cast` to final classes..
Jul 21 2023, 7:08 PM · Restricted Project, Restricted Project
rsmith added a comment to D154324: [C++20] [Modules] [ODRHash] Use CanonicalType for base classes.

@rsmith, thanks for the suggestions! Could you go over ODRHash::AddTemplateName suggest how to fix it to address https://reviews.llvm.org/D153003 and https://reviews.llvm.org/D41416#4496451?

Jul 21 2023, 5:57 PM · Restricted Project, Restricted Project, Restricted Project
rsmith committed rG7c5e4efb099e: Track the RequestingModule in the HeaderSearch LookupFile cache. (authored by rsmith).
Track the RequestingModule in the HeaderSearch LookupFile cache.
Jul 21 2023, 3:50 PM · Restricted Project, Restricted Project
rsmith closed D156000: Track the RequestingModule in the HeaderSearch LookupFile cache..
Jul 21 2023, 3:50 PM · Restricted Project, Restricted Project
rsmith added inline comments to D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops".
Jul 21 2023, 3:48 PM · Restricted Project, Restricted Project
rsmith added a comment to D154324: [C++20] [Modules] [ODRHash] Use CanonicalType for base classes.

I've done a pass through this file looking for places where we incorrectly add to the ODR hash a type that was written within some other entity than the one that we're ODR hashing, that could validly be spelled differently in different declarations of that other entity. There are quite a lot of them; please see the comments here for places that need fixing.

Jul 21 2023, 3:46 PM · Restricted Project, Restricted Project, Restricted Project
rsmith added inline comments to D155387: [Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases.
Jul 21 2023, 3:04 PM · Restricted Project, Restricted Project
rsmith requested review of D156000: Track the RequestingModule in the HeaderSearch LookupFile cache..
Jul 21 2023, 2:55 PM · Restricted Project, Restricted Project
rsmith added a comment to D132779: Enforce module decl-use restrictions and private header restrictions in textual headers.

Hi @rsmith, this commit makes it possible for HeaderInfo::LookupFile() to be called with different RequestingModule within single CompilerInstance. This is problematic, since some modules may see headers other modules can't (due to [no_undeclared_includes]). This can permanently mess up contents of the lookup cache (HeaderSearch::LookupFileCache) that uses only the lookup name as the key.

Jul 21 2023, 2:13 PM · Restricted Project, Restricted Project
rsmith added a comment to D154324: [C++20] [Modules] [ODRHash] Use CanonicalType for base classes.

OK, I see. The problem is that the canonical version of the type can be spelled in different ways in different translation units, due to us treating some expressions as being equivalent despite them not being the same under the ODR. For example, we consider these function template declarations to be redeclarations:

Jul 21 2023, 2:05 PM · Restricted Project, Restricted Project, Restricted Project
rsmith added a comment to D155809: [NFC] [Clang] Fix strict weak ordering in ItaniumVTableBuilder.

This looks correct to me, but it's still a little subtle. Perhaps it'd be clearer to map the method to an integer (0 for copy assignment, 1 for move assignment, 2 for destructor, 3 for equality comparison), and then order them by that integer? That'd be more obviously a strict weak order.

Jul 21 2023, 12:37 AM · Restricted Project, Restricted Project

Jul 20 2023

rsmith added a comment to D154658: Optimize emission of `dynamic_cast` to final classes..

LGTM, except, should we have a way to turn this optimization off specifically?

Jul 20 2023, 2:58 PM · Restricted Project, Restricted Project
rsmith updated the diff for D154658: Optimize emission of `dynamic_cast` to final classes..
  • Add option to disable vptr-based dynamic_cast optimization.
Jul 20 2023, 2:55 PM · Restricted Project, Restricted Project
rsmith accepted D155857: [CMake] Disable GCC -Wnonnull.

Seems reasonable to me. Given that this affects all of LLVM I'd like to wait a day or so to see if anyone has concerns.

Jul 20 2023, 12:13 PM · Restricted Project, Restricted Project, Restricted Project
rsmith requested changes to D155857: [CMake] Disable GCC -Wnonnull.

This branch doesn't look necessary or correct to me. We should never call this function on a lazy pointer in offset mode unless we have an external source that produced the offset, and it's certainly not appropriate to cast the offset to a pointer and return it.

Jul 20 2023, 9:31 AM · Restricted Project, Restricted Project, Restricted Project

Jul 19 2023

rsmith added a comment to D154658: Optimize emission of `dynamic_cast` to final classes..

Ping.

Jul 19 2023, 3:12 PM · Restricted Project, Restricted Project
rsmith added inline comments to D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute.
Jul 19 2023, 9:58 AM · Restricted Project, Restricted Project

Jul 18 2023

rsmith added inline comments to D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute.
Jul 18 2023, 2:31 PM · Restricted Project, Restricted Project
rsmith added inline comments to D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute.
Jul 18 2023, 2:28 PM · Restricted Project, Restricted Project

Jul 16 2023

rsmith added inline comments to D155387: [Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases.
Jul 16 2023, 1:16 PM · Restricted Project, Restricted Project
rsmith added inline comments to D155387: [Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases.
Jul 16 2023, 10:07 AM · Restricted Project, Restricted Project

Jul 13 2023

rsmith committed rG3a9683fce362: Fix comparison of constrained deduced return types in explicit (authored by rsmith).
Fix comparison of constrained deduced return types in explicit
Jul 13 2023, 8:00 PM · Restricted Project, Restricted Project

Jul 12 2023

rsmith added a comment to D154658: Optimize emission of `dynamic_cast` to final classes..

Oh, this does matter on platforms using pointer authentication, because each vptr field is signed with a constant discriminator derived from the name of the class that introduced it.

Jul 12 2023, 3:46 PM · Restricted Project, Restricted Project
rsmith updated the diff for D154658: Optimize emission of `dynamic_cast` to final classes..
  • Avoid emitting the type_info when detecting whether it would be null.
  • Bring back class type in GetVTablePtr and instead don't use it here.
Jul 12 2023, 3:45 PM · Restricted Project, Restricted Project

Jul 11 2023

rsmith committed rG7f0ef7f304b1: Fix profiling of overloaded postincrement / postdecrement. (authored by rsmith).
Fix profiling of overloaded postincrement / postdecrement.
Jul 11 2023, 8:42 AM · Restricted Project, Restricted Project

Jul 7 2023

rsmith updated the diff for D154658: Optimize emission of `dynamic_cast` to final classes..
  • Mark gep as inbounds.
Jul 7 2023, 3:38 PM · Restricted Project, Restricted Project
rsmith added a comment to D154658: Optimize emission of `dynamic_cast` to final classes..

I think (hope?) we should be able to apply this to a much larger set of cases. Would it be correct to do this optimization unless the vtable might be emitted with vague linkage and non-default visibility (that is, unless we're in the odd case where people expect non-default visibility classes to be the same type across DSOs)? Or are there cases where we might be using a vtable that (eg) doesn't even have the right symbol?

I don't know of any problems other than the total failure of vague linkage across DSO boundaries, so if we just treat that as an implicit exception to the vtable uniqueness guarantee in the ABI, I think you've got the condition exactly right: we could do this for any class where either the v-table doesn't have vague linkage or the class's formal visibility is not default. Our experience at Apple with enforcing type visibility is that it's usually good for one or two bug reports a year, but it's pretty easy to explain to users what they did wrong, and Clang's visibility attributes are pretty simple to use. (type_visibility helps a lot with managing tradeoffs.)

Jul 7 2023, 3:28 PM · Restricted Project, Restricted Project
rsmith updated the diff for D154658: Optimize emission of `dynamic_cast` to final classes..
  • Address review comments.
Jul 7 2023, 3:15 PM · Restricted Project, Restricted Project

Jul 6 2023

rsmith added a comment to D154658: Optimize emission of `dynamic_cast` to final classes..

I don't think it's an intended guarantee of the Itanium ABI that the v-table will be unique, and v-tables are frequently not unique in the presence of shared libraries.

Jul 6 2023, 6:10 PM · Restricted Project, Restricted Project
rsmith requested review of D154658: Optimize emission of `dynamic_cast` to final classes..
Jul 6 2023, 2:58 PM · Restricted Project, Restricted Project
rsmith added inline comments to D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops".
Jul 6 2023, 12:20 PM · Restricted Project, Restricted Project
rsmith added a comment to D153296: [AST] Stop evaluate constant expression if the condition expression which in switch statement contains errors.

Making the return ESR_Failed; unconditional looks to be the correct change here. We can't continue evaluation past that point because we don't know what would be executed next. Unconditionally returning ESR_Failed in that situation is what the other similar paths through EvaluateStmt do.

Jul 6 2023, 12:00 PM · Restricted Project, Restricted Project

Jun 30 2023

rsmith accepted D154270: [clang][CodeGen] Fix global variables initialized with an inheriting constructor..

Wow, what an amazing bug :)

Jun 30 2023, 3:57 PM · Restricted Project, Restricted Project
rsmith requested changes to D153375: [Clang] Fix incorrect use of direct initialization with copy initialization.
Jun 30 2023, 3:46 PM · Restricted Project
rsmith added inline comments to D153375: [Clang] Fix incorrect use of direct initialization with copy initialization.
Jun 30 2023, 3:42 PM · Restricted Project
rsmith added a comment to D153962: [clang] Do not discard cleanups while processing immediate invocation.

LGTM, thank you for doing this!

Jun 30 2023, 11:24 AM · Restricted Project, Restricted Project

Jun 29 2023

rsmith added a comment to D153003: [ODRHash] Fix ODR hashing of template names.

How to we even get into the ODR hasher here? I thought we only applied it to function and class definitions (to which the ODR does apply).

I think this comes from we add ODRHash for RecordDecl.

Jun 29 2023, 1:51 PM · Restricted Project, Restricted Project

Jun 28 2023

rsmith added a comment to D153003: [ODRHash] Fix ODR hashing of template names.

I think the behavior change for the testcase here is correct, though I'm not sure that the patch is getting that behaviour change in the right way. Per [temp.type]/1.4 (http://eel.is/c++draft/temp.type#1.4),

Jun 28 2023, 9:24 AM · Restricted Project, Restricted Project

Jun 20 2023

rsmith added a comment to D153294: [clang] Do not create ExprWithCleanups while checking immediate invocation.

A constant expression (including the immediate invocations generated for consteval functions) is a full-expression, so destructors should be run at the end of evaluating it, not as part of the enclosing expression. That's presumably why the code is calling MaybeCreateExprWithCleanups -- to associate cleanups for the immediate invocation with that ConstantExpr rather than with the outer context. I think the problem is that we don't have an ExpressionEvaluationContext wrapping the immediate invocation, so we don't save and restore the enclosing cleanup state -- and we can't really wrap it, because we don't find out that we're building an immediate invocation until after we've already done so. Probably the best way to handle that is to create the inner ExprWithCleanups for the constant expression, but leave the cleanups flags alone so that we also create an outer ExprWithCleanups. That'll mean we sometimes create an ExprWithCleanups that doesn't actually run any cleanups, but that's OK, just redundant. One thing we will need to be careful about is assigning any block / compound literal cleanups to the right ExprWithCleanups node. We can figure out where to put them by doing a traversal of the ConstantExpr's subexpression to see if it contains the BlockDecl / CompoundLiteralExpr being referenced by the cleanup.

Jun 20 2023, 1:01 PM · Restricted Project, Restricted Project

Jun 12 2023

rsmith added a comment to D142388: [clang] Add builtin_nondeterministic_value.

I have a concern with the name of this builtin. People are going to assume it produces a nondeterministic value, and use it for seeding random number generators and similar, and will be surprised when the value produced is actually deterministic, and, worse, might leak information on the stack that was left behind by some previous function call. Can we give this a name that doesn't suggest that it produces its value nondeterministically?

That's a fair point; do you have a suggestion for a name? (I had suggested __builtin_unspecified_value() but perhaps that is too focused on the term of art.)

Jun 12 2023, 2:09 PM · Restricted Project, Restricted Project

Jun 11 2023

rsmith added a comment to D142388: [clang] Add builtin_nondeterministic_value.

I have a concern with the name of this builtin. People are going to assume it produces a nondeterministic value, and use it for seeding random number generators and similar, and will be surprised when the value produced is actually deterministic, and, worse, might leak information on the stack that was left behind by some previous function call. Can we give this a name that doesn't suggest that it produces its value nondeterministically?

Jun 11 2023, 7:39 PM · Restricted Project, Restricted Project

Jun 6 2023

rsmith added a comment to D148700: [clang] Add support for “regular” keyword attributes.

Yes, standard attributes aren't supposed to be used for things which affect the type system (although, we certainly have many, already, which do, since we expose most GCC-syntax attributes also as C++-standard attribute syntax!)

Jun 6 2023, 4:31 PM · Restricted Project, Restricted Project, Restricted Project

Jun 2 2023

rsmith added a comment to D151952: [clang] adds `__type_pack_index` so we can get a type's parameter pack index.

Taking a step back for a moment: what is the intended use case for this? My concern is that most of the time you're going to want to make O(N) such queries into a pack of N elements, resulting in O(N^2) compile time, much like we regrettably get from uses of __type_pack_element. If we can avoid the regret in this case by providing a different intrinsic, perhaps we should do so. (For example, we could take two packs of types, and produce a sequence of integers giving the indexes of each of the first types in the second list, in O(N) time. And similarly we could add a __type_pack_elements that takes a pack of types and a pack of indexes and performs N indexing operations at once, in O(N) time, rather than having the program do it in O(N^2) time.)

Jun 2 2023, 4:41 PM · Restricted Project, Restricted Project
rsmith added inline comments to D134334: [Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template name.
Jun 2 2023, 4:36 PM · Restricted Project, Restricted Project

Jun 1 2023

rsmith requested changes to D134334: [Clang] Fix crash in isCXXDeclarationSpecifier when attempting to annotate template name.
Jun 1 2023, 11:52 AM · Restricted Project, Restricted Project

May 31 2023

rsmith added inline comments to D151553: [clang] Fix consteval operators in template contexts.
May 31 2023, 12:37 PM · Restricted Project, Restricted Project

May 30 2023

rsmith accepted D150212: [clang][Sema] Improve diagnostics for auto return type.

LGTM too.

May 30 2023, 12:10 PM · Restricted Project, Restricted Project

May 29 2023

rsmith added inline comments to D150212: [clang][Sema] Improve diagnostics for auto return type.
May 29 2023, 9:30 AM · Restricted Project, Restricted Project

May 28 2023

rsmith accepted D151627: [clang][c++20][NFC] `ComparisonCategoryType` - updated comment, removed `std:*_equality`.
May 28 2023, 11:17 AM · Restricted Project, Restricted Project

May 25 2023

rsmith added a comment to D146764: [clang] Make predefined expressions string literals under -fms-extensions.

Sorry for the late comments.

May 25 2023, 11:16 AM · Restricted Project, Restricted Project

May 23 2023

rsmith accepted D150504: [AST] Construct Capture objects before use.
May 23 2023, 9:44 PM · Restricted Project, Restricted Project

May 18 2023

rsmith added a comment to D150875: Make dereferencing a void* a hard-error instead of warn-as-error.

We are the only of the major compilers with this "extension" (I hesitate to call it that, as I'm not sure this FITS in the 'extension's permitted by standard)

May 18 2023, 10:28 AM · Restricted Project, Restricted Project

May 3 2023

rsmith accepted D149713: [Sema] Avoid emitting warnings for constant destruction..

LGTM with the extra test

May 3 2023, 9:55 AM · Restricted Project, Restricted Project
rsmith added a comment to D149713: [Sema] Avoid emitting warnings for constant destruction..

I think this would be an interesting test:

May 3 2023, 9:55 AM · Restricted Project, Restricted Project

May 1 2023

rsmith added a comment to D149514: Check if First argument in _builtin_assume_aligned_ is of pointer type.

There's some corresponding code in lib/CodeGen that can be deleted too:

May 1 2023, 2:21 PM · Restricted Project, Restricted Project, Restricted Project
rsmith added a comment to D148997: [clang] Add a new annotation token: annot_repl_input_end.

This looks like a nice improvement to me.

May 1 2023, 12:07 PM · Restricted Project, Restricted Project

Apr 30 2023

rsmith added a comment to D149516: [Sema] `setInvalidDecl` for error deduction declaration.

I wonder if there are any cases where the "deduction guide" is so broken that we shouldn't be creating a CXXDeductionGuideDecl at all. For example, if there's no trailing return type, then the declaration is syntactically invalid (and looks more like a constructor than a deduction guide), and it's not clear to me whether creating a CXXDeductionGuideDecl really makes sense.

Apr 30 2023, 3:50 PM · Restricted Project, Restricted Project
rsmith committed rG0a57d4d490a4: Remove bug fix release note for a bug that was never released. (authored by rsmith).
Remove bug fix release note for a bug that was never released.
Apr 30 2023, 3:15 PM · Restricted Project, Restricted Project

Apr 26 2023

rsmith added a comment to D148274: [clang] Fix overly aggressive lifetime checks for parenthesized aggregate initialization.

LGTM, I'll leave approval to @shafik :)

Apr 26 2023, 6:08 PM · Restricted Project, Restricted Project
rsmith added inline comments to D149264: GH62362: Handle constraints on "Using" inherited constructors.
Apr 26 2023, 5:18 PM · Restricted Project
rsmith added a comment to D149264: GH62362: Handle constraints on "Using" inherited constructors.

I think that the bugs that this was aiming to fix were fixed by rG1e43349e321694d7fee3d77cb691887ad67fb5d7, which means that we should not ask whether the constraints of an inherited constructor are satisfied any more. Instead, overload resolution will look at whether the constraints of the original constructors are satisfied. (More broadly, I wonder whether DiagnoseUseOfDecl should be considering constraints at all -- the model in the standard is that any time you name a function, you go through overload resolution, which considers constraints, so DiagnoseUseOfDecl should only ever be duplicating work that's already been done by overload resolution, but it's possible we're not entirely following that model. Still, we should be able to avoid redoing the constraint satisfaction checks in the common case where overload resolution already did them.)

Apr 26 2023, 5:15 PM · Restricted Project
rsmith committed rG1e43349e3216: Pass the found declaration to DiagnoseUseOfDecl. (authored by rsmith).
Pass the found declaration to DiagnoseUseOfDecl.
Apr 26 2023, 4:56 PM · Restricted Project, Restricted Project

Apr 25 2023

rsmith accepted D148372: [clang] add diagnose when member function contains invalid default argument.

Are there any calls to Sema::ActOnParamDefaultArgumentError left? If not, can you also remove the function?

Apr 25 2023, 9:33 AM · Restricted Project, Restricted Project

Apr 24 2023

rsmith added inline comments to D148274: [clang] Fix overly aggressive lifetime checks for parenthesized aggregate initialization.
Apr 24 2023, 10:33 AM · Restricted Project, Restricted Project

Apr 16 2023

rsmith added inline comments to D148372: [clang] add diagnose when member function contains invalid default argument.
Apr 16 2023, 3:47 PM · Restricted Project, Restricted Project
rsmith added inline comments to D148474: [Clang] Fix ResolveConstructorOverload to not select a conversion function if we are going use copy elision.
Apr 16 2023, 3:41 PM · Restricted Project