rsmith (Richard Smith - zygoloid)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 12 2012, 2:19 PM (292 w, 6 d)

Recent Activity

Tue, Feb 20

rsmith committed rC325663: In C++14 onwards, it is permitted to read mutable members in constant.
In C++14 onwards, it is permitted to read mutable members in constant
Tue, Feb 20, 7:41 PM
rsmith committed rL325663: In C++14 onwards, it is permitted to read mutable members in constant.
In C++14 onwards, it is permitted to read mutable members in constant
Tue, Feb 20, 7:40 PM
rsmith added inline comments to D43494: [Modules] Fix creating fake definition data for lambdas..
Tue, Feb 20, 4:39 PM
rsmith committed rC325646: Fix assert when template argument deduction's original call arg checking….
Fix assert when template argument deduction's original call arg checking…
Tue, Feb 20, 3:50 PM
rsmith committed rL325646: Fix assert when template argument deduction's original call arg checking….
Fix assert when template argument deduction's original call arg checking…
Tue, Feb 20, 3:50 PM
rsmith committed rL325640: When multiple sanitizers are enabled (ubsan + something else), use all relevant….
When multiple sanitizers are enabled (ubsan + something else), use all relevant…
Tue, Feb 20, 3:22 PM
rsmith committed rC325640: When multiple sanitizers are enabled (ubsan + something else), use all relevant….
When multiple sanitizers are enabled (ubsan + something else), use all relevant…
Tue, Feb 20, 3:22 PM

Mon, Feb 19

rsmith committed rC325545: Fix some -Wexceptions false positives..
Fix some -Wexceptions false positives.
Mon, Feb 19, 6:34 PM
rsmith committed rL325545: Fix some -Wexceptions false positives..
Fix some -Wexceptions false positives.
Mon, Feb 19, 6:34 PM
rsmith committed rL325540: Fix test failure on target where size_t is long long..
Fix test failure on target where size_t is long long.
Mon, Feb 19, 2:52 PM
rsmith committed rC325540: Fix test failure on target where size_t is long long..
Fix test failure on target where size_t is long long.
Mon, Feb 19, 2:52 PM
rsmith committed rC325475: [cxx_dr_status] Tests for CWG issues 641-687..
[cxx_dr_status] Tests for CWG issues 641-687.
Mon, Feb 19, 1:11 AM
rsmith committed rL325475: [cxx_dr_status] Tests for CWG issues 641-687..
[cxx_dr_status] Tests for CWG issues 641-687.
Mon, Feb 19, 1:08 AM

Sun, Feb 18

rsmith added a comment to D43430: Omit nullptr check for sufficiently simple delete-expressions.

LGTM, but I'd also like @rjmccall's opinion.

Sun, Feb 18, 1:08 PM
rsmith added a comment to D43430: Omit nullptr check for sufficiently simple delete-expressions.

I wonder if this could have negative effects for frequent deletion of nullptrs (e.g. a sometimes-allocated member of a heavily used value type).

Sun, Feb 18, 1:08 PM
rsmith added a reviewer for D43430: Omit nullptr check for sufficiently simple delete-expressions: rjmccall.
Sun, Feb 18, 1:08 PM

Fri, Feb 16

rsmith added inline comments to D43425: [DSE] Don't DSE stores that subsequent memmove calls read from.
Fri, Feb 16, 6:40 PM

Thu, Feb 15

rsmith added inline comments to D43320: Allow dllimport non-type template arguments in C++17.
Thu, Feb 15, 6:47 PM

Wed, Feb 14

rsmith committed rC325195: Add missing definition for class static after r325193..
Add missing definition for class static after r325193.
Wed, Feb 14, 5:03 PM
rsmith committed rL325195: Add missing definition for class static after r325193..
Add missing definition for class static after r325193.
Wed, Feb 14, 5:03 PM
rsmith added inline comments to D43320: Allow dllimport non-type template arguments in C++17.
Wed, Feb 14, 4:42 PM
rsmith added inline comments to D43320: Allow dllimport non-type template arguments in C++17.
Wed, Feb 14, 4:38 PM
rsmith added inline comments to D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency.
Wed, Feb 14, 3:54 PM · Restricted Project
rsmith added a reviewer for D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency: rtrieu.
Wed, Feb 14, 3:44 PM · Restricted Project

Tue, Feb 13

rsmith committed rL325095: Fix a couple of places where we assumed that non-type template parameters are….
Fix a couple of places where we assumed that non-type template parameters are…
Tue, Feb 13, 6:10 PM
rsmith committed rC325095: Fix a couple of places where we assumed that non-type template parameters are….
Fix a couple of places where we assumed that non-type template parameters are…
Tue, Feb 13, 6:10 PM
rsmith added a comment to D42498: [ExprConstant] Fix crash when initialize an indirect field with another field..

Please handle this by temporarily updating the This pointer appropriately when evaluating the CXXDefaultInitExpr rather than trying to work around the This value being wrong later (your approach will still go wrong if the This pointer is used in other ways, such as an explicit mention of this or a member function call). You can refer to how we do this in CodeGen: look for CodeGenFunction::CXXDefaultInitExprScope and CodeGenFunction::FieldConstructionScope.

Tue, Feb 13, 5:48 PM

Mon, Feb 12

rsmith added inline comments to D42776: [Sema] Fix an assertion failure in constant expression evaluation of calls to functions with default arguments.
Mon, Feb 12, 3:37 PM

Sat, Feb 10

rsmith added a comment to D43153: [clang] Implement P0692 "Access Checking on Specializations".

So is my impression wrong and names in declaration-specifiers/declarators of partial-specialiations of variable-templates should be exempted from checks as well?

Sat, Feb 10, 8:26 PM

Fri, Feb 9

rsmith added a comment to D43153: [clang] Implement P0692 "Access Checking on Specializations".

How do you avoid suppressing diagnostics in the declaration of a template that is not a partial specialization? For example:

Fri, Feb 9, 7:20 PM
rsmith accepted D43110: [Sema] Don't mark plain MS enums as fixed.

Thanks! I'd noticed this weirdness but wasn't sure what we could do about it without breaking MS compat. I like this approach a lot.

Fri, Feb 9, 5:52 PM

Thu, Feb 8

rsmith committed rL324695: [modules] Fix incorrect diagnostic mapping computation when a module changes.
[modules] Fix incorrect diagnostic mapping computation when a module changes
Thu, Feb 8, 5:18 PM
rsmith committed rC324695: [modules] Fix incorrect diagnostic mapping computation when a module changes.
[modules] Fix incorrect diagnostic mapping computation when a module changes
Thu, Feb 8, 5:18 PM

Wed, Feb 7

rsmith committed rCXXA324542: Fix compilation in C++17 mode..
Fix compilation in C++17 mode.
Wed, Feb 7, 3:26 PM
rsmith committed rL324542: Fix compilation in C++17 mode..
Fix compilation in C++17 mode.
Wed, Feb 7, 3:25 PM
rsmith closed D42987: [libc++abi] fix compilation in C++17 mode.
Wed, Feb 7, 3:25 PM
rsmith added a comment to D42987: [libc++abi] fix compilation in C++17 mode.

I defined _LIBCPP_BUILDING_LIBRARY instead to match the existing code in libc++abi (stdlib_exception.cpp, stdlib_new_delete.cpp), which uses the _BUILDING_LIBRARY macro as a general way to say "give me all the symbols because I'm building the library". That seemed to match the semantics of this code better than a macro whose purpose is "I am writing user code that is still using this removed symbol".

Wed, Feb 7, 3:22 PM
rsmith added inline comments to D43047: [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions..
Wed, Feb 7, 3:14 PM
rsmith committed rL324537: PR36055: fix computation of *-dependence in nested initializer lists..
PR36055: fix computation of *-dependence in nested initializer lists.
Wed, Feb 7, 2:27 PM
rsmith committed rC324537: PR36055: fix computation of *-dependence in nested initializer lists..
PR36055: fix computation of *-dependence in nested initializer lists.
Wed, Feb 7, 2:27 PM

Tue, Feb 6

rsmith created D42987: [libc++abi] fix compilation in C++17 mode.
Tue, Feb 6, 3:05 PM
rsmith added a comment to D42768: AST: support SwiftCC on MS ABI.

Looks fine to me.

Tue, Feb 6, 3:00 PM
rsmith accepted D41834: [Lex] Fix handling numerical literals ending with ' and signed exponent..

LGTM, thanks!

Tue, Feb 6, 1:25 PM

Mon, Feb 5

rsmith added a comment to D42768: AST: support SwiftCC on MS ABI.

The Itanium C++ ABI specifies a convention of using the source-level syntax in the mangling of vendor extensions. This gives a fairly natural naming convention for such extensions. That would suggest that the identifier to use here is __swiftcall__, not __swift_cc / __Swift. Given that the MS ABI mangles return types even for non-template functions, one consistent place to put this marker would be on the return type. That is, mangle __attribute__((__swiftcall__)) T f(...) as if it were __swiftcall__<T> f(...), and likewise for function pointer types.

Mon, Feb 5, 4:57 PM

Fri, Feb 2

rsmith committed rC324160: Fix crash when trying to pack-expand a GNU statement expression..
Fix crash when trying to pack-expand a GNU statement expression.
Fri, Feb 2, 4:46 PM
rsmith committed rL324160: Fix crash when trying to pack-expand a GNU statement expression..
Fix crash when trying to pack-expand a GNU statement expression.
Fri, Feb 2, 4:46 PM
rsmith accepted D41039: Add support for attribute "trivial_abi".
Fri, Feb 2, 3:13 PM
rsmith committed rL324152: Fix incorrect usage of std::is_assignable..
Fix incorrect usage of std::is_assignable.
Fri, Feb 2, 2:31 PM
rsmith committed rC324151: Add missing direct-init / parameter-declaration-clause disambiguation when.
Add missing direct-init / parameter-declaration-clause disambiguation when
Fri, Feb 2, 2:26 PM
rsmith committed rL324151: Add missing direct-init / parameter-declaration-clause disambiguation when.
Add missing direct-init / parameter-declaration-clause disambiguation when
Fri, Feb 2, 2:26 PM
rsmith added inline comments to D42768: AST: support SwiftCC on MS ABI.
Fri, Feb 2, 12:05 PM

Thu, Feb 1

rsmith committed rL324033: Disable test in C++<11 mode due to use of alignas..
Disable test in C++<11 mode due to use of alignas.
Thu, Feb 1, 3:34 PM
rsmith committed rCXX324033: Disable test in C++<11 mode due to use of alignas..
Disable test in C++<11 mode due to use of alignas.
Thu, Feb 1, 3:34 PM
rsmith committed rL324020: Make std::get_temporary_buffer respect overaligned types when possible.
Make std::get_temporary_buffer respect overaligned types when possible
Thu, Feb 1, 2:26 PM
rsmith committed rCXX324020: Make std::get_temporary_buffer respect overaligned types when possible.
Make std::get_temporary_buffer respect overaligned types when possible
Thu, Feb 1, 2:26 PM
rsmith closed D41746: Make std::get_temporary_buffer respect overaligned types when possible.
Thu, Feb 1, 2:26 PM
rsmith committed rL323998: PR36157: When injecting an implicit function declaration in C89, find the right.
PR36157: When injecting an implicit function declaration in C89, find the right
Thu, Feb 1, 12:05 PM
rsmith committed rC323998: PR36157: When injecting an implicit function declaration in C89, find the right.
PR36157: When injecting an implicit function declaration in C89, find the right
Thu, Feb 1, 12:05 PM

Wed, Jan 31

rsmith committed rL323935: PR36181: Teach CodeGen to properly ignore requests to emit dependent entities..
PR36181: Teach CodeGen to properly ignore requests to emit dependent entities.
Wed, Jan 31, 4:31 PM
rsmith committed rC323935: PR36181: Teach CodeGen to properly ignore requests to emit dependent entities..
PR36181: Teach CodeGen to properly ignore requests to emit dependent entities.
Wed, Jan 31, 4:31 PM

Jan 22 2018

rsmith accepted D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple..

Looks good, thanks!

Jan 22 2018, 10:41 PM

Jan 20 2018

rsmith added a comment to D42344: [libc++] Use multi-key tree search for {map, set}::{count, equal_range}.

Shouldn't we be changing only the heterogeneous functions here?

Jan 20 2018, 9:44 PM

Jan 17 2018

rsmith added a comment to D36915: [Sema] Diagnose local variables and parameters captured by lambda and block expressions in a default argument.

Please take a look at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0588r1.html, which respecifies the rules for lambda capture and its interaction with default arguments, and has been voted into the C++ working paper as a defect report resolution. The approach there is to use a purely syntactic, scope-based mechanism to detect problems such as this. (In dependent contexts, we can track on the DeclRefExpr whether the name is odr-usable, in case we can't tell whether it's odr-used from the template definition alone.)

Jan 17 2018, 5:55 PM
rsmith added a comment to rL322779: [Sema] Allow conversion between long double and __float128..

Why do we disallow this when converting from double-double to other types? IIUC, ISO C's TS 18661 requires a conversion between _Float128 and other types, so if we have a good reason to not support such for PPC64, we should be doing something more subtle than just treating _Float128 as an alias for __float128.

Jan 17 2018, 3:09 PM

Jan 16 2018

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

Did you forget to upload the updated patch? This looks unchanged compared to the prior version.

Jan 16 2018, 2:18 PM · Restricted Project
rsmith added a reviewer for D42092: implement C++ dr388 for the Itanium C++ ABI: proper handling of catching exceptions by reference: rnk.
Jan 16 2018, 1:27 PM

Jan 15 2018

rsmith added inline comments to D42092: implement C++ dr388 for the Itanium C++ ABI: proper handling of catching exceptions by reference.
Jan 15 2018, 9:59 PM
rsmith created D42092: implement C++ dr388 for the Itanium C++ ABI: proper handling of catching exceptions by reference.
Jan 15 2018, 9:49 PM

Jan 12 2018

rsmith committed rL322431: DR126: partially implement the const-correct rules for exception handler….
DR126: partially implement the const-correct rules for exception handler…
Jan 12 2018, 9:07 PM
rsmith committed rC322431: DR126: partially implement the const-correct rules for exception handler….
DR126: partially implement the const-correct rules for exception handler…
Jan 12 2018, 9:07 PM
rsmith added a comment to D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple..

This will still diagnose valid and reasonable programs, such as:

Jan 12 2018, 4:21 PM
rsmith added inline comments to D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple..
Jan 12 2018, 4:19 PM
rsmith committed rL322414: When rebuilding an InitListExpr, don't give it a type..
When rebuilding an InitListExpr, don't give it a type.
Jan 12 2018, 2:24 PM
rsmith committed rC322414: When rebuilding an InitListExpr, don't give it a type..
When rebuilding an InitListExpr, don't give it a type.
Jan 12 2018, 2:24 PM

Jan 11 2018

rsmith added a comment to D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization..

@rsmith The trait is already documented in LanguageExtensions.rst, so I'll assumed you missed that and are not trying to suggest more documentation is needed.

Jan 11 2018, 4:20 PM
rsmith accepted D29930: Add `__reference_binds_to_temporary` trait for checking safe reference initialization..

Please also document this trait in docs/LanguageExtensions.rst.

Jan 11 2018, 3:22 PM
rsmith committed rC322316: Handle scoped_lockable objects being returned by value in C++17..
Handle scoped_lockable objects being returned by value in C++17.
Jan 11 2018, 2:15 PM
rsmith closed D41933: handle scoped_lockable objects being returned by value in C++17.

Committed as r322316.

Jan 11 2018, 2:15 PM
rsmith committed rL322316: Handle scoped_lockable objects being returned by value in C++17..
Handle scoped_lockable objects being returned by value in C++17.
Jan 11 2018, 2:15 PM
rsmith accepted D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral..
Jan 11 2018, 1:29 PM
rsmith added inline comments to D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance.
Jan 11 2018, 12:33 PM · Restricted Project
rsmith added inline comments to D41933: handle scoped_lockable objects being returned by value in C++17.
Jan 11 2018, 12:05 PM
rsmith updated the diff for D41933: handle scoped_lockable objects being returned by value in C++17.
Jan 11 2018, 12:05 PM

Jan 10 2018

rsmith added inline comments to D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral..
Jan 10 2018, 7:00 PM
rsmith added a comment to D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral..

OSS-Fuzz classifies the bug as medium severity security issue

Jan 10 2018, 6:50 PM
rsmith created D41933: handle scoped_lockable objects being returned by value in C++17.
Jan 10 2018, 6:24 PM
rsmith committed rC322236: In C++17, when instantiating an out-of-line definition of an inline static data.
In C++17, when instantiating an out-of-line definition of an inline static data
Jan 10 2018, 3:09 PM
rsmith committed rL322236: In C++17, when instantiating an out-of-line definition of an inline static data.
In C++17, when instantiating an out-of-line definition of an inline static data
Jan 10 2018, 3:09 PM

Jan 8 2018

rsmith added a comment to D41834: [Lex] Fix handling numerical literals ending with ' and signed exponent..

The lexer is doing the right thing; per the C++ lexical rules, the +1 is not part of the token in this case.

Jan 8 2018, 5:20 PM
rsmith accepted D41837: Add Function multiversion to the release notes..

Looks fine. Can you also update include/clang/Basic/AttrDocs.td to mention multiversioning in TargetDocs? Then you can add a few words here to say "consult the documentation for the target attribute for more information" or similar :)

Jan 8 2018, 3:20 PM
rsmith added a comment to D33563: Track whether a unary operation can overflow.

Looks fine to me, wait to see if Eli has more comments.

Jan 8 2018, 3:14 PM
rsmith committed rL322030: PR35862: Suppress -Wmissing-variable-declarations warning on inline variables,.
PR35862: Suppress -Wmissing-variable-declarations warning on inline variables,
Jan 8 2018, 1:47 PM
rsmith committed rC322030: PR35862: Suppress -Wmissing-variable-declarations warning on inline variables,.
PR35862: Suppress -Wmissing-variable-declarations warning on inline variables,
Jan 8 2018, 1:47 PM
rsmith added a comment to D41039: Add support for attribute "trivial_abi".

I'd like to see more testing for the template instantiation case. I don't see any test coverage for the "attribute only affects instantiations whose members are trivial-for-calls" part.

Jan 8 2018, 1:39 PM
rsmith committed rL322024: Factor out comparison handling for arithmetic types..
Factor out comparison handling for arithmetic types.
Jan 8 2018, 1:13 PM
rsmith committed rC322024: Factor out comparison handling for arithmetic types..
Factor out comparison handling for arithmetic types.
Jan 8 2018, 1:13 PM
rsmith accepted D40819: Implement Attribute Target MultiVersioning (Improved edition!).

Looks good to me with just a few more tweaks (assuming these comments don't uncover any new issues). Thank you!

Jan 8 2018, 11:32 AM

Jan 7 2018

rsmith committed rL321977: Remove bogus check for template specialization from self-comparison warning..
Remove bogus check for template specialization from self-comparison warning.
Jan 7 2018, 2:27 PM
rsmith committed rC321977: Remove bogus check for template specialization from self-comparison warning..
Remove bogus check for template specialization from self-comparison warning.
Jan 7 2018, 2:27 PM
rsmith committed rL321976: Fix a couple of wrong self-comparison diagnostics..
Fix a couple of wrong self-comparison diagnostics.
Jan 7 2018, 2:19 PM