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

Recent Activity

Yesterday

rsmith created D67678: PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer..
Tue, Sep 17, 1:34 PM · Restricted Project
rsmith added a comment to D61717: Fix arm_neon.h to be clean under -fno-lax-vector-conversions..

Do you perhaps have a test case or error that I can look at? Perhaps I or someone else here can help out a bit here.

Tue, Sep 17, 1:34 PM · Restricted Project
rsmith accepted D63508: make -frewrite-includes also rewrite conditions in #if/#elif.
Tue, Sep 17, 7:33 AM · Restricted Project

Mon, Sep 16

rsmith committed rL372063: Fix reliance on -flax-vector-conversions in AVX intrinsics headers and.
Fix reliance on -flax-vector-conversions in AVX intrinsics headers and
Mon, Sep 16, 9:02 PM
rsmith committed rL372062: Fix reliance on lax vector conversions in tests for x86 intrinsics..
Fix reliance on lax vector conversions in tests for x86 intrinsics.
Mon, Sep 16, 9:02 PM
rsmith committed rL372061: Remove reliance on lax vector conversions from altivec.h in VSX mode..
Remove reliance on lax vector conversions from altivec.h in VSX mode.
Mon, Sep 16, 8:54 PM
rsmith added inline comments to D41217: [Concepts] Concept Specialization Expressions.
Mon, Sep 16, 11:07 AM · Restricted Project

Thu, Sep 12

rsmith committed rL371817: For PR17164: split -fno-lax-vector-conversion into three different.
For PR17164: split -fno-lax-vector-conversion into three different
Thu, Sep 12, 11:04 PM
rsmith committed rL371816: Fix interaction between r371813 and r371814..
Fix interaction between r371813 and r371814.
Thu, Sep 12, 10:27 PM
rsmith committed rL371814: Remove reliance on lax vector conversions from altivec.h and its test..
Remove reliance on lax vector conversions from altivec.h and its test.
Thu, Sep 12, 10:17 PM
rsmith committed rL371805: For PR17164: split -fno-lax-vector-conversion into three different.
For PR17164: split -fno-lax-vector-conversion into three different
Thu, Sep 12, 7:23 PM
rsmith accepted D67515: [Sema][Typo Correction] Fix potential infite loop on ambiguity checks.
Thu, Sep 12, 6:55 PM · Restricted Project, Restricted Project
rsmith added a comment to D67399: [ARM] Follow AACPS standard for volatile bitfields.

The exact sequence of volatile accesses is observable behavior, and it's the ABI's right to define correct behavior for compliant implementations, so we do need to do this.

Thu, Sep 12, 6:10 PM · Restricted Project
rsmith abandoned D61717: Fix arm_neon.h to be clean under -fno-lax-vector-conversions..

This patch doesn't work, and the ARM NEON intrinsic header emitter is too opaque and mysterious for me to be able to fix this, and it's not even clear that the generator knows what the actual parameter types of the compiler builtins are. For now I think the best I can do is to leave ARM targets with lax vector conversions enabled, and disable it for all the other targets. :-(

Thu, Sep 12, 5:33 PM · Restricted Project
rsmith added a comment to D67414: [AST] Treat "inline gnu_inline" the same way as "extern inline gnu_inline" in C++ mode.

Seems very surprising to me that the gnu_inline attribute has different behavior in their C and C++ frontends. That said, it looks like it's a behavior that they document; their documentation says "In C++, this attribute does not depend on extern in any way, but it still requires the inline keyword to enable its special behavior." and that matches their observed behavior. And they behave this way even for functions in extern "C" blocks. The question for us, then, is do we want to be compatible with C source code built as C++ (that is, the status quo) and C++ source code using this attribute and targeting older versions of Clang, or with g++?

I think it's a rather uncommon combination (I think most use of gnu_inline is together with extern), so I wouldn't think that there's a lot of users relying on the current behaviour (in clang-only codebases), but I have no data to back it up with.

Is Clang's current behavior actually causing problems for some real use case? Changing this behavior is not without risk, and the old behavior is certainly defensible.

It did come up in mingw-w64 recently; new header additions (that were developed with gcc) broke when built with clang (due to multiple definitions of a symbol). It's been rectified for now by avoiding this combination (for compatibility with existing clang versions) though.

Thu, Sep 12, 2:55 PM · Restricted Project
rsmith added a comment to D67414: [AST] Treat "inline gnu_inline" the same way as "extern inline gnu_inline" in C++ mode.

Seems very surprising to me that the gnu_inline attribute has different behavior in their C and C++ frontends. That said, it looks like it's a behavior that they document; their documentation says "In C++, this attribute does not depend on extern in any way, but it still requires the inline keyword to enable its special behavior." and that matches their observed behavior. And they behave this way even for functions in extern "C" blocks. The question for us, then, is do we want to be compatible with C source code built as C++ (that is, the status quo) and C++ source code using this attribute and targeting older versions of Clang, or with g++?

Thu, Sep 12, 1:57 PM · Restricted Project
rsmith committed rL371767: Improve code generation for thread_local variables:.
Improve code generation for thread_local variables:
Thu, Sep 12, 1:02 PM
rsmith closed D67429: Improve code generation for thread_local variables:.
Thu, Sep 12, 1:01 PM · Restricted Project, Restricted Project

Tue, Sep 10

rsmith created D67429: Improve code generation for thread_local variables:.
Tue, Sep 10, 7:06 PM · Restricted Project, Restricted Project
rsmith committed rL371557: When evaluating a __builtin_constant_p conditional, always enter.
When evaluating a __builtin_constant_p conditional, always enter
Tue, Sep 10, 2:25 PM
rsmith added a comment to D67287: [Diagnostics] Add -Wsizeof-array-div.

Just one thing I missed before, otherwise this looks good. Thanks!

Tue, Sep 10, 1:30 PM · Restricted Project
rsmith added inline comments to D67287: [Diagnostics] Add -Wsizeof-array-div.
Tue, Sep 10, 11:43 AM · Restricted Project

Mon, Sep 9

rsmith committed rL371476: Fix crash mangling an explicit lambda non-type template parameter pack.
Fix crash mangling an explicit lambda non-type template parameter pack
Mon, Sep 9, 5:38 PM
rsmith committed rL371469: Fix incorrect demangling of call operator of lambda with explicit.
Fix incorrect demangling of call operator of lambda with explicit
Mon, Sep 9, 4:11 PM
rsmith committed rL371468: PR43242: Fix crash when typo-correcting to an operator() that should not.
PR43242: Fix crash when typo-correcting to an operator() that should not
Mon, Sep 9, 4:11 PM
rsmith committed rL371462: Simplify demangler rule for lambda-expressions to match discussion on.
Simplify demangler rule for lambda-expressions to match discussion on
Mon, Sep 9, 3:26 PM

Sun, Sep 8

rsmith added a comment to D59754: [Sema] Add c++2a designated initializer warnings.

Hi! We've noticed that for our arm bots, we're getting some flaky builds that sometimes fail with error: array designators are a C99 extension [-Werror,-Wc99-designator] and sometimes don't fail. 2 questions:

  1. I can't see it off the patch immediately, but do you know why for arm specifically we can only get this warning sometimes?
Sun, Sep 8, 6:13 PM · Restricted Project, Restricted Project

Fri, Sep 6

rsmith committed rL371274: Synchronize LLVM's copy of libc++abi's demangler with the libc++abi.
Synchronize LLVM's copy of libc++abi's demangler with the libc++abi
Fri, Sep 6, 5:10 PM
rsmith committed rL371273: Implement demangling support for C++20 lambda expression extensions..
Implement demangling support for C++20 lambda expression extensions.
Fri, Sep 6, 4:56 PM
rsmith committed rL371252: Update comment for <template-param-decl> mangling to match extended mangling….
Update comment for <template-param-decl> mangling to match extended mangling…
Fri, Sep 6, 1:32 PM

Wed, Sep 4

rsmith committed rL371004: [c++20] Fix some ambiguities in our mangling of lambdas with explicit.
[c++20] Fix some ambiguities in our mangling of lambdas with explicit
Wed, Sep 4, 6:22 PM
rsmith committed rL370991: For PR43213, track whether template parameters are implicit through.
For PR43213, track whether template parameters are implicit through
Wed, Sep 4, 3:14 PM
rsmith committed rL370987: [www] Fix hyperlink syntax in attribute reference..
[www] Fix hyperlink syntax in attribute reference.
Wed, Sep 4, 2:31 PM
rsmith committed rL370986: [www] Update attribute reference for 'constinit'..
[www] Update attribute reference for 'constinit'.
Wed, Sep 4, 2:31 PM
rsmith committed rL370972: [c++20] P1143R2: Add support for the C++20 'constinit' keyword..
[c++20] P1143R2: Add support for the C++20 'constinit' keyword.
Wed, Sep 4, 1:30 PM

Tue, Sep 3

rsmith added a comment to D66361: Improve behavior in the case of stack exhaustion..
Tue, Sep 3, 11:02 AM · Restricted Project
rsmith committed rL370801: Disable stack exhaustion test on NetBSD, where either the detection or.
Disable stack exhaustion test on NetBSD, where either the detection or
Tue, Sep 3, 11:00 AM
rsmith committed rL370795: [www] Mark items complete in Clang 9 as 'Clang 9' rather than 'SVN'..
[www] Mark items complete in Clang 9 as 'Clang 9' rather than 'SVN'.
Tue, Sep 3, 10:49 AM

Mon, Sep 2

rsmith committed rL370689: Rename -Wc++20-designator to -Wc++2a-designator for consistency and add.
Rename -Wc++20-designator to -Wc++2a-designator for consistency and add
Mon, Sep 2, 4:26 PM
rsmith committed rL370688: Split -Wreorder into different warnings for reordering a constructor.
Split -Wreorder into different warnings for reordering a constructor
Mon, Sep 2, 4:18 PM

Fri, Aug 30

rsmith committed rL370558: [c++20] Add support for designated direct-list-initialization syntax..
[c++20] Add support for designated direct-list-initialization syntax.
Fri, Aug 30, 5:59 PM
rsmith committed rL370555: [c++20] Disallow template argument deduction from a braced-init-list.
[c++20] Disallow template argument deduction from a braced-init-list
Fri, Aug 30, 5:06 PM
rsmith committed rL370544: [c++20] Implement semantic restrictions for C++20 designated.
[c++20] Implement semantic restrictions for C++20 designated
Fri, Aug 30, 3:52 PM
rsmith closed D59754: [Sema] Add c++2a designated initializer warnings.
Fri, Aug 30, 3:52 PM · Restricted Project, Restricted Project
rsmith added inline comments to D67023: Diagnose use of ATOMIC_VAR_INIT.
Fri, Aug 30, 3:40 PM
rsmith committed rL370511: Request commit access for rsmith.
Request commit access for rsmith
Fri, Aug 30, 12:58 PM

Thu, Aug 29

rsmith commandeered D59754: [Sema] Add c++2a designated initializer warnings.

I'm taking this over to finish it off and submit.

Thu, Aug 29, 4:07 PM · Restricted Project, Restricted Project
rsmith added a comment to D64799: [Sema] Emit diagnostics for uncorrected delayed typos at the end of TU.

@rsmith two options for this patch seem to be:

  • silently ignore the errors (behavior before this patch),
  • show them to the user at the end of TU (what happens in the current version of the patch). This can result in bad UX, but we won't drop any errors on the floor. Which one do you think we should prefer?
Thu, Aug 29, 4:04 PM · Restricted Project
rsmith accepted D64799: [Sema] Emit diagnostics for uncorrected delayed typos at the end of TU.

LGTM: while this isn't a solution to the root cause of the issues here, it puts us in a better situation than the status quo.

Thu, Aug 29, 4:04 PM · Restricted Project
rsmith committed rL370419: Fix silent wrong-code bugs and crashes with designated initialization..
Fix silent wrong-code bugs and crashes with designated initialization.
Thu, Aug 29, 3:48 PM
rsmith committed rL370418: Refactor InitListChecker to check only a single (explicit) initializer.
Refactor InitListChecker to check only a single (explicit) initializer
Thu, Aug 29, 3:48 PM
rsmith committed rL370417: Refactor InitListChecker to make it a bit clearer that hasError is only.
Refactor InitListChecker to make it a bit clearer that hasError is only
Thu, Aug 29, 3:48 PM
rsmith added inline comments to D66862: Make lround builtin constexpr (and others).
Thu, Aug 29, 2:54 PM · Restricted Project
rsmith accepted D66067: Push lambda scope earlier when transforming lambda expression.
Thu, Aug 29, 1:41 PM · Restricted Project, Restricted Project
rsmith added inline comments to D64820: [Sema] Avoids an assertion failure when an invalid conversion declaration is used.
Thu, Aug 29, 1:32 PM · Restricted Project
rsmith added inline comments to D64820: [Sema] Avoids an assertion failure when an invalid conversion declaration is used.
Thu, Aug 29, 1:31 PM · Restricted Project
rsmith added inline comments to D64874: [Sema] Improve handling of function pointer conversions.
Thu, Aug 29, 1:31 PM · Restricted Project
rsmith added inline comments to D65695: Implements CWG 1601 in [over.ics.rank/4.2].
Thu, Aug 29, 1:25 PM · Restricted Project
rsmith requested changes to D66862: Make lround builtin constexpr (and others).
Thu, Aug 29, 12:30 PM · Restricted Project
rsmith added inline comments to D63960: [C++20] Add consteval-specific semantic for functions.
Thu, Aug 29, 11:39 AM · Restricted Project

Tue, Aug 27

rsmith added a comment to D58497: Clear the KnownModules cache if the preprocessor is going away.

Do we need KnownModules at all? It seems to serve a very similar purpose to the Modules string map on ModuleMap. (The main difference seems to be that KnownModules can cache module load failures.) If we can keep only a single data structure tracking this, owned by the ModuleMap (which also owns the modules), that should remove the possibility for dangling module pointers.

Tue, Aug 27, 4:55 PM · Restricted Project
rsmith added a comment to D65694: Properly instantiate a decltype in argument's default initializer.

This isn't the right approach: instead of re-instantiating the parameter when we encounter a use of it, we should inject the parameters into the local instantiation scope before trying to instantiate a default argument (Sema::CheckCXXDefaultArgExpr should call addInstantiatedParametersToScope to populate the LocalInstantiationScope before calling SubstInitializer).

Tue, Aug 27, 3:07 PM · Restricted Project

Mon, Aug 26

rsmith committed rL370000: Revert "[clang-scan-deps] Minimizer: Correctly handle multi-line content with….
Revert "[clang-scan-deps] Minimizer: Correctly handle multi-line content with…
Mon, Aug 26, 6:06 PM
rsmith committed rL369999: Don't lose the FoundDecl and template arguments for a DeclRefExpr in.
Don't lose the FoundDecl and template arguments for a DeclRefExpr in
Mon, Aug 26, 6:06 PM
rsmith committed rL369985: PR42587: diagnose unexpanded uses of a pack parameter of a generic.
PR42587: diagnose unexpanded uses of a pack parameter of a generic
Mon, Aug 26, 3:51 PM
rsmith added a comment to D64146: [Clang Interpreter] Initial patch for the constexpr interpreter.

I think we're past the point of large-scale structural comments that are better addressed before the first commit, and it'd be much better to make incremental improvements from here.

Mon, Aug 26, 3:16 PM · Restricted Project, Restricted Project
rsmith added inline comments to D63889: Check possible warnings on global initializers for reachability.
Mon, Aug 26, 12:00 PM · Restricted Project
rsmith committed rL369944: [msvc] Add necessary #include to make compiler intrinsics available..
[msvc] Add necessary #include to make compiler intrinsics available.
Mon, Aug 26, 11:41 AM
rsmith committed rL369940: Improve behavior in the case of stack exhaustion..
Improve behavior in the case of stack exhaustion.
Mon, Aug 26, 11:30 AM
rsmith committed rL369941: Fix file header..
Fix file header.
Mon, Aug 26, 11:29 AM
rsmith committed rL369932: Fix use of invalidated iterator introduced by r369680..
Fix use of invalidated iterator introduced by r369680.
Mon, Aug 26, 10:36 AM

Fri, Aug 23

rsmith committed rL369834: PR42513: Enter the proper DeclContext before substituting into an.
PR42513: Enter the proper DeclContext before substituting into an
Fri, Aug 23, 7:29 PM
rsmith committed rL369829: PR40674: fix assertion failure if a structured binding declaration has a.
PR40674: fix assertion failure if a structured binding declaration has a
Fri, Aug 23, 6:24 PM
rsmith accepted D66364: Diagnose use of _Thread_local as an extension when appropriate.

@rsmith are you fine with implementing the diagnostic for these keywords piecemeal based on the pattern from this patch, or do you want to see an omnibus patch that adds all of them at once?

Fri, Aug 23, 3:24 PM · Restricted Project

Thu, Aug 22

rsmith committed rL369725: Revert "PR42587: diagnose unexpanded uses of a pack parameter of a generic" due….
Revert "PR42587: diagnose unexpanded uses of a pack parameter of a generic" due…
Thu, Aug 22, 7:38 PM
rsmith committed rL369722: PR42587: diagnose unexpanded uses of a pack parameter of a generic.
PR42587: diagnose unexpanded uses of a pack parameter of a generic
Thu, Aug 22, 6:41 PM
rsmith accepted D66621: [clang] Devirtualization for classes with destructors marked as 'final'.

This seems subtle, but I believe it is correct.

Thu, Aug 22, 5:58 PM · Restricted Project, Restricted Project
rsmith accepted D66609: Allow Compiler.h to be included in C files and fix fallthrough warnings.
Thu, Aug 22, 4:06 PM · Restricted Project
rsmith committed rL369677: Revert "[LifetimeAnalysis] Support more STL idioms (template forward….
Revert "[LifetimeAnalysis] Support more STL idioms (template forward…
Thu, Aug 22, 10:47 AM

Wed, Aug 21

rsmith added inline comments to D66361: Improve behavior in the case of stack exhaustion..
Wed, Aug 21, 4:35 PM · Restricted Project
rsmith updated the diff for D66361: Improve behavior in the case of stack exhaustion..
  • Address review comments from Aaron.
Wed, Aug 21, 4:35 PM · Restricted Project
rsmith committed rL369573: Fix -Werror=unused-variable error after r369528..
Fix -Werror=unused-variable error after r369528.
Wed, Aug 21, 1:42 PM
Herald added a reviewer for D63744: In the libc++ unstable ABI, use [[no_unique_address]] instead of __compressed_pair when available.: jdoerfert.

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

Wed, Aug 21, 1:33 PM · Restricted Project
rsmith added a comment to D66397: [Diagnostics] Improve -Wxor-used-as-pow.

The ALPHA_OFFSET code seems to be unnecessarily "clever" to me. I think the warning can be suppressed by reversing the operands:

Wed, Aug 21, 12:22 PM · Restricted Project

Mon, Aug 19

rsmith added a comment to D66364: Diagnose use of _Thread_local as an extension when appropriate.

My motivation is for portability. _Thread_local (and all the rest) do not exist in C99 or earlier (or C++), so having some way to warn users of that is useful. I agree that we should be consistent and go with all or none, but my preference is for all (esp since this is a -pedantic warning class).

Mon, Aug 19, 12:54 PM · Restricted Project

Aug 16 2019

rsmith added a comment to D66364: Diagnose use of _Thread_local as an extension when appropriate.

_Thread_local is a reserved identifier; we generally don't produce extension warnings for uses of reserved identifiers. (Eg, there's no warning for _Atomic in C++ or _Bool in C89, and no warning for uses of __type_traits or __builtins.)

Aug 16 2019, 3:31 PM · Restricted Project
rsmith committed rL369161: [doc] Fix some minor formatting issues..
[doc] Fix some minor formatting issues.
Aug 16 2019, 3:08 PM
rsmith updated the diff for D66361: Improve behavior in the case of stack exhaustion..
  • Disable stack exhaustion test if threads are disabled.
Aug 16 2019, 2:47 PM · Restricted Project
rsmith added inline comments to D66361: Improve behavior in the case of stack exhaustion..
Aug 16 2019, 2:47 PM · Restricted Project
rsmith updated the diff for D66361: Improve behavior in the case of stack exhaustion..
  • Review feedback: use _AddressOfReturnAddress with MSVC, and simplify
Aug 16 2019, 2:41 PM · Restricted Project
rsmith committed rL369145: Stop abusing SuppressAllDiagnostics when speculatively determining.
Stop abusing SuppressAllDiagnostics when speculatively determining
Aug 16 2019, 12:59 PM
rsmith created D66361: Improve behavior in the case of stack exhaustion..
Aug 16 2019, 12:59 PM · Restricted Project

Aug 15 2019

rsmith added inline comments to D63889: Check possible warnings on global initializers for reachability.
Aug 15 2019, 4:45 PM · Restricted Project
rsmith added inline comments to D65695: Implements CWG 1601 in [over.ics.rank/4.2].
Aug 15 2019, 1:34 PM · Restricted Project
rsmith accepted D66040: [Sema] Implement DR2386 for C++17 structured binding.

LGTM with minor adjustments to the test.

Aug 15 2019, 12:15 PM · Restricted Project, Restricted Project

Aug 14 2019

rsmith committed rL368940: Fix handling of class member access into a vector type..
Fix handling of class member access into a vector type.
Aug 14 2019, 3:59 PM
rsmith committed rL368941: [www] Update DR status page to match latest version of CWG issues list..
[www] Update DR status page to match latest version of CWG issues list.
Aug 14 2019, 3:59 PM

Aug 13 2019

rsmith committed rL368785: Add __has_builtin support for builtin function-like type traits..
Add __has_builtin support for builtin function-like type traits.
Aug 13 2019, 7:30 PM
rsmith closed D66100: Add __has_builtin support for builtin function-like type traits..
Aug 13 2019, 7:30 PM · Restricted Project, Restricted Project

Aug 12 2019

rsmith added a comment to D64146: [Clang Interpreter] Initial patch for the constexpr interpreter.

I would like to better understand the big picture for descriptors, pointers, and so on. I'm not yet seeing how the pieces are going to fit together and not frequently require expensive operations. For example, pointer arithmetic requires determining the array bound of the pointee; pointer subtraction requires determining whether two pointers point into the same array; pointer comparisons require determining the divergence point in the access paths between two pointers. These path-based operations were easy in the old representation, and seem to be difficult in the new representation, so I want to make sure that they've been properly considered. It's also not clear to me how you'll model pointers that have lost their designator (through constant folding), where you have a runtime offset but no compile-time offset, or pointers that point to objects whose values are not part of the evaluation (for example, extern globals), or pointers that have a designator but no base (for __builtin_object_size handling).

Aug 12 2019, 4:02 PM · Restricted Project, Restricted Project