rsmith (Richard Smith - zygoloid)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Yesterday

rsmith committed rL306270: Testcase missed from r306075..
Testcase missed from r306075.
Sun, Jun 25, 9:41 PM

Fri, Jun 23

rsmith added a comment to D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library.

Is there any cases where we can turn the linker error into a compile time error?

Fri, Jun 23, 8:18 PM
rsmith accepted D33833: Fix PR 33189: Clang assertion on template destructor declaration.
Fri, Jun 23, 3:46 PM
rsmith added a comment to D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library.

Unlike with sized deallocation (which also requires a new stdlib entry point), it was intentional that this be enabled by default in C++17 mode. Implicit calls are only generated to the aligned forms of operator new and operator delete in cases where the program would otherwise be broken (due to requiring more alignment than the allocator would provide). A link error seems strictly preferable to silent misalignment at runtime. Plus, you have no way to tell whether the user is providing their own aligned allocation / deallocation functions, so disabling this by fiat for certain targets breaks legitimate use cases -- we need to at least respect the command-line -faligned-allocation flag and only use this target-based detection as a default / fallback.

Fri, Jun 23, 3:13 PM

Thu, Jun 22

rsmith committed rL306077: Add missing file from r306075..
Add missing file from r306075.
Thu, Jun 22, 6:19 PM
rsmith updated the diff for D34494: fix determination of whether declarations are visible during ObjC lookups.

The remaining missing pieces were ObjCInterfaceDecl::visible_categories and ObjCInterfaceDecl::visible_extensions. The new revision of the patch gets a bit further down the road of passing through real visibility information into those, but that approach seems to snowball out of control. For example, ASTContext::mergeTypes now needs visibility information in order to determine whether two ObjC object types are compatible (because this depends on whether the types have compatible sets of protocols, which in turn can vary depending on which categories are visible for those two types). I have not completed this patch: there are still a lot of places that an IsHiddenFunction would need to be plumbed through to make this work.

Thu, Jun 22, 6:17 PM
rsmith committed rL306075: PR33552: Distinguish between declarations that are owned by no module and.
PR33552: Distinguish between declarations that are owned by no module and
Thu, Jun 22, 6:05 PM
rsmith committed rL306065: PR33002: When we instantiate the definition of a static data member, we might.
PR33002: When we instantiate the definition of a static data member, we might
Thu, Jun 22, 3:19 PM

Wed, Jun 21

rsmith created D34494: fix determination of whether declarations are visible during ObjC lookups.
Wed, Jun 21, 7:11 PM
rsmith added a comment to D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds..

It'd be good to also add tests for the other traits you're changing.

Wed, Jun 21, 2:01 PM
rsmith accepted D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds..
Wed, Jun 21, 2:00 PM

Tue, Jun 20

rsmith added inline comments to D32332: Add support for transparent overloadable functions in clang.
Tue, Jun 20, 5:37 PM
rsmith added inline comments to D34198: Fix __has_trivial_destructor crash when the type is incomplete with unknown array bounds..
Tue, Jun 20, 4:08 PM
rsmith accepted D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator..

Looks good, thanks!

Tue, Jun 20, 9:29 AM

Mon, Jun 19

rsmith committed rL305764: Turn off "disable free" mode when preprocessing imported module files in.
Turn off "disable free" mode when preprocessing imported module files in
Mon, Jun 19, 6:32 PM
rsmith accepted D34251: Add a new driver option to disable warning about c++17's non-throwing exception specification in function signature.

We use the -Wc++NN-compat- prefix on all the other subwarnings of -Wc++NN-compat warnings (examples: -Wc++98-compat-bind-to-temporary-copy, -Wc++11-compat-reserved-user-defined-literal, ...). I'd prefer to include the -compat in the name for consistency; I also find it less clear what the warning flag would mean without it (I would expect -Wc++1z-mangling to only fire in C++1z mode, whereas this warning never fires in C++1z mode).

Mon, Jun 19, 4:18 PM
rsmith committed rL305758: Support non-identifier module names when preprocessing modules..
Support non-identifier module names when preprocessing modules.
Mon, Jun 19, 4:10 PM
rsmith added inline comments to D34370: Fix for Bug 33471: Preventing operator auto from resolving to a template operator..
Mon, Jun 19, 3:39 PM

Fri, Jun 16

rsmith accepted D34253: Call setMustBuildLookupTable on TagDecls in ExternalASTMerger.

If the lookup table is expected to be computed from the lexical decls rather than provided via "external visible storage", this makes sense to me.

Fri, Jun 16, 10:13 AM

Thu, Jun 15

rsmith added inline comments to D34045: [Sema] Don't emit undefined-internal warnings for CXXDeductionGuideDecls.
Thu, Jun 15, 7:54 AM

Tue, Jun 13

rsmith accepted D34133: Cold attribute on function decls are lost. Fix the problem.

LGTM

Tue, Jun 13, 2:03 PM

Mon, Jun 12

rsmith accepted D30375: Function with unparsed body is a definition.

LGTM as-is, but a couple of questions for possible further improvements.

Mon, Jun 12, 1:27 PM
rsmith added a comment to D34045: [Sema] Don't emit undefined-internal warnings for CXXDeductionGuideDecls.

Generally, all behavioural changes should have accompanying tests. The code change itself looks good, thanks.

Mon, Jun 12, 12:06 PM

Sun, Jun 11

rsmith accepted D34096: [Sema][C++1z] Ensure structured binding's bindings in dependent foreach have non-null type.

LGTM

Sun, Jun 11, 6:53 PM

Fri, Jun 9

rsmith added a comment to D33467: Fix LLVM build errors if necent build of GCC 7 is used.

This is a libstdc++ bug: https://gcc.gnu.org/PR79162 (They implemented a speculative fix for a different issue and ended up breaking this case.)

Fri, Jun 9, 3:55 PM
rsmith committed rL305126: 27037: Use correct CVR qualifier on an upcast on method pointer call.
27037: Use correct CVR qualifier on an upcast on method pointer call
Fri, Jun 9, 3:26 PM
rsmith closed D33875: PR27037: Use correct CVR qualifier on an upcast on method pointer call by committing rL305126: 27037: Use correct CVR qualifier on an upcast on method pointer call.
Fri, Jun 9, 3:26 PM
rsmith committed rL305121: Attempt to fix shared library build: RewriteFrontend depends on Serialization….
Attempt to fix shared library build: RewriteFrontend depends on Serialization…
Fri, Jun 9, 3:03 PM
rsmith committed rL305116: Add -frewrite-imports flag..
Add -frewrite-imports flag.
Fri, Jun 9, 2:24 PM
rsmith accepted D29951: Load lazily the template specialization in multi-module setups..

Looks great, thanks!

Fri, Jun 9, 12:31 PM
rsmith added a comment to D34059: Get the file name for the symbol from the Module, not the SourceManager..

Is there any way to add a test for this? Does it affect the behavior of clang or any in-tree clang-based tools?

Fri, Jun 9, 12:28 PM
rsmith committed rL305101: Add #pragma clang module build/endbuild pragmas for performing a module build.
Add #pragma clang module build/endbuild pragmas for performing a module build
Fri, Jun 9, 12:23 PM

Thu, Jun 8

rsmith committed rL305045: Remove 'Filename' parameter from BeginSourceFileAction..
Remove 'Filename' parameter from BeginSourceFileAction.
Thu, Jun 8, 6:36 PM
rsmith added inline comments to D33997: Implement the non-execution policy versions of `reduce` and `transform_reduce` for C++17.
Thu, Jun 8, 2:24 PM
rsmith accepted D33910: [ubsan] Detect invalid unsigned pointer index expression (clang).
Thu, Jun 8, 1:11 PM
rsmith accepted D33366: Fix that global delete operator get's assigned to a submodule..

LGTM

Thu, Jun 8, 10:56 AM

Wed, Jun 7

rsmith committed rL304960: Simplify..
Simplify.
Wed, Jun 7, 7:06 PM
rsmith accepted D26065: Improve diagnostics if friend function redefines file-level function..
Wed, Jun 7, 6:52 PM
rsmith committed rL304957: Weaken restriction in r304862 to allow implicit deduction guides to reference.
Weaken restriction in r304862 to allow implicit deduction guides to reference
Wed, Jun 7, 6:09 PM
rsmith committed rL304946: [c++1z] Support deducing B in noexcept(B)..
[c++1z] Support deducing B in noexcept(B).
Wed, Jun 7, 2:47 PM

Tue, Jun 6

rsmith committed rL304862: Fix a couple of class template argument deduction crashes with libc++'s tuple..
Fix a couple of class template argument deduction crashes with libc++'s tuple.
Tue, Jun 6, 7:43 PM
rsmith committed rL304852: Improve error recovery for missing 'template' keyword in contexts where the.
Improve error recovery for missing 'template' keyword in contexts where the
Tue, Jun 6, 5:30 PM
rsmith accepted D30393: Do not inherit default arguments for friend function in class template..
Tue, Jun 6, 1:22 PM
rsmith added a comment to D30375: Function with unparsed body is a definition.

If you want to take this path, you should also add ActOnStartOfFunctionBody calls to the other parts of the parser that parse function definitions: Parser::ParseLateTemplatedFuncDef, Parser::ParseLexedObjCMethodDefs, and Parser::ParseLexedMethodDefs. You should also rename ActOnFinishFunctionBody to something like ActOnFinishFunctionDef to avoid confusion, because it pairs with ActOnStartOfFunctionDef not the new ActOnStartFunctionBody.

Tue, Jun 6, 1:15 PM
rsmith accepted D33875: PR27037: Use correct CVR qualifier on an upcast on method pointer call.

Looks good to me, thanks! Do you need someone to commit this for you?

Tue, Jun 6, 1:03 PM

Mon, Jun 5

rsmith committed rL304760: PR33318: Add missing full-expression checking to static_assert expression..
PR33318: Add missing full-expression checking to static_assert expression.
Mon, Jun 5, 6:35 PM
rsmith committed rL304756: Retain header search and preprocessing options from AST file when emitting.
Retain header search and preprocessing options from AST file when emitting
Mon, Jun 5, 5:32 PM
rsmith added a comment to D33910: [ubsan] Detect invalid unsigned pointer index expression (clang).

Looks good, with a couple of tweaks (and corresponding test changes).

Mon, Jun 5, 3:34 PM
rsmith committed rL304745: Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls.
Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls
Mon, Jun 5, 3:30 PM
rsmith closed D30963: Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls replaced by visible decls. by committing rL304745: Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls.
Mon, Jun 5, 3:30 PM
rsmith added inline comments to D33875: PR27037: Use correct CVR qualifier on an upcast on method pointer call.
Mon, Jun 5, 3:17 PM
rsmith committed rL304740: Fix memory leak exposed by r304726..
Fix memory leak exposed by r304726.
Mon, Jun 5, 3:06 PM
rsmith committed rL304728: Factor out and unify emission of "module is unavailable" diagnostics..
Factor out and unify emission of "module is unavailable" diagnostics.
Mon, Jun 5, 11:58 AM
rsmith committed rL304727: Attempt to fix Windows buildbot failure due to mismatching directory separators….
Attempt to fix Windows buildbot failure due to mismatching directory separators…
Mon, Jun 5, 11:40 AM
rsmith committed rL304726: Rather than rejecting attempts to run preprocessor-only actions on AST files,.
Rather than rejecting attempts to run preprocessor-only actions on AST files,
Mon, Jun 5, 11:10 AM

Fri, Jun 2

rsmith accepted D30963: Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls replaced by visible decls..
Fri, Jun 2, 6:51 PM
rsmith added inline comments to D30963: Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls replaced by visible decls..
Fri, Jun 2, 5:42 PM
rsmith accepted D33797: [coroutines] Fix rebuilding of dependent coroutine parameters.
Fri, Jun 2, 5:08 PM
rsmith added inline comments to D33797: [coroutines] Fix rebuilding of dependent coroutine parameters.
Fri, Jun 2, 4:43 PM
rsmith committed rL304604: Fix assertion failure if we can't deduce a template argument for a variable.
Fix assertion failure if we can't deduce a template argument for a variable
Fri, Jun 2, 3:53 PM
rsmith added inline comments to D30170: Function definition may have uninstantiated body.
Fri, Jun 2, 1:59 PM

Thu, Jun 1

rsmith committed rL304515: Support lazy stat'ing of files referenced by module maps..
Support lazy stat'ing of files referenced by module maps.
Thu, Jun 1, 6:56 PM
rsmith closed D33703: Support lazy stat'ing of files referenced by module maps by committing rL304515: Support lazy stat'ing of files referenced by module maps..
Thu, Jun 1, 6:56 PM
rsmith updated the diff for D33703: Support lazy stat'ing of files referenced by module maps.

Rebased and added requested test.

Thu, Jun 1, 6:24 PM
rsmith committed rL304506: PR32848: There isn't necessarily a FileChanged or FileSkipped for every….
PR32848: There isn't necessarily a FileChanged or FileSkipped for every…
Thu, Jun 1, 6:06 PM
rsmith added a comment to D33703: Support lazy stat'ing of files referenced by module maps.
  • I've noticed in the patch that on the ASTWriter side we serialize the introduced size / mtime, but there are no changes to the ASTReader, so I assume in the reader side you still need the module map around to fetch those infos, right?
Thu, Jun 1, 5:07 PM
rsmith committed rL304464: Escape filenames in module map line marker directives, to unbreak Windows build….
Escape filenames in module map line marker directives, to unbreak Windows build…
Thu, Jun 1, 1:11 PM
rsmith accepted D33398: Mangle __unaligned in Itanium ABI.

Looks great, thanks!

Thu, Jun 1, 1:07 PM

Wed, May 31

rsmith committed rL304376: PR33232: implement support for MSVC's __is_trivially_destructible trait..
PR33232: implement support for MSVC's __is_trivially_destructible trait.
Wed, May 31, 5:28 PM
rsmith added a comment to D33616: [MS] Fix _bittest* intrinsics for values bigger than 31.

My feeling is that there's not much value in adding an LLVM intrinsic for something that can be expressed directly in a handful of IR instructions; those instructions seem like the way to express this that would allow the most optimization potential, and the backend should be able to pattern match this to a BT instruction. Based on that, I'm reluctant to add clang builtins for this, partly because it looks like we'd need quite a lot of them and partly because (in the absence of an IR intrinsic) they'd just get lowered into the same instructions as the plain C code anyway.

Wed, May 31, 2:12 PM
rsmith committed rL304346: [modules] When compiling a preprocessed module map, look for headers relative.
[modules] When compiling a preprocessed module map, look for headers relative
Wed, May 31, 1:57 PM
rsmith added a comment to D33398: Mangle __unaligned in Itanium ABI.
In D33398#769152, @rnk wrote:

Isn't there a space in the mangling for vendor extensions? Can we use that here?

Wed, May 31, 12:37 PM

Tue, May 30

rsmith added a comment to D33616: [MS] Fix _bittest* intrinsics for values bigger than 31.
In D33616#768287, @hans wrote:

From looking in the Intel manual (Table 3-2, in 3.1.1.9 about Bit(BitBase,BitOffset)) it does sound like the bit offset can be negative *shudder*, so I suppose this is necessary and explains why the type is signed in the first place? Hopefully most of these will be inlined into a context where BitPos is constant or unsigned.

Tue, May 30, 5:27 PM
rsmith created D33703: Support lazy stat'ing of files referenced by module maps.
Tue, May 30, 5:00 PM
rsmith committed rL304253: [modules] Minor documentation clarification for behavior of requires….
[modules] Minor documentation clarification for behavior of requires…
Tue, May 30, 4:05 PM
rsmith committed rL304237: Add an explicit -std= to test to unbreak on PS4 targets..
Add an explicit -std= to test to unbreak on PS4 targets.
Tue, May 30, 1:13 PM

Mon, May 29

rsmith committed rL304190: Diagnose attempts to build a preprocessed module that defines an unavailable….
Diagnose attempts to build a preprocessed module that defines an unavailable…
Mon, May 29, 10:23 PM
rsmith committed rL304183: [modules] When we #include a local submodule header that we've already built,.
[modules] When we #include a local submodule header that we've already built,
Mon, May 29, 7:03 PM

Sun, May 28

rsmith added inline comments to D33625: [coroutines] Diagnose invalid result types for `await_resume` and `await_suspend` and add missing conversions..
Sun, May 28, 12:44 PM

Sat, May 27

rsmith accepted D33624: [coroutines] Mark cxx_status.html of Coroutines TS as (SVN).
Sat, May 27, 3:52 PM

May 26 2017

rsmith added a comment to D29877: Warn about unused static file scope function template declarations..

No. But I can point you to range-v3 which uses this pattern and I think the idiom is somewhat appealing, but that's orthogonal to Clang diagnosing it.

May 26 2017, 4:53 PM
rsmith added a comment to D29877: Warn about unused static file scope function template declarations..

I think this patch still gets the following case wrong:

// foo.h
constexpr struct {
  template <class T> void operator()(T) {} // emits unused template warning
} foo;
May 26 2017, 3:14 PM

May 25 2017

rsmith added a comment to D33538: [coroutines] Support "coroutines" feature in module map requires clause.

Do we need to conditionalize this part of libc++? Nothing in the <coroutines> header appears to need compiler support.

That's correct. I was mistaken as to why this was needed. I mistook a bug in libc++ for the reason this was needed.
So I have no need for this patch anymore.

Do you still want to land this for the reasons you mentioned?

May 25 2017, 5:07 PM
rsmith committed rL303945: Factor resolving of header directives -> files out of module map parser..
Factor resolving of header directives -> files out of module map parser.
May 25 2017, 5:02 PM
rsmith accepted D33568: Fix crash when evaluating constant expressions involving nullptr.

Thanks!

May 25 2017, 4:15 PM
rsmith accepted D33538: [coroutines] Support "coroutines" feature in module map requires clause.

Do we need to conditionalize this part of libc++? Nothing in the <coroutines> header appears to need compiler support.

Oh wait, I see what's going on. You're not testing for whether coroutines is enabled, you're testing for whether the __builtin_coro_* builtins exist. Are we sufficiently confident that those aren't going to change that we're prepared to make libc++ rely on this? (If we change the signature of those builtins in the future, then new versions of clang would stop being able to build old versions of the libc++ module.)

May 25 2017, 4:14 PM
rsmith added a comment to D33538: [coroutines] Support "coroutines" feature in module map requires clause.

Do we need to conditionalize this part of libc++? Nothing in the <coroutines> header appears to need compiler support.

May 25 2017, 4:03 PM
rsmith added a comment to D33538: [coroutines] Support "coroutines" feature in module map requires clause.

Do we need to conditionalize this part of libc++? Nothing in the <coroutines> header appears to need compiler support.

May 25 2017, 3:55 PM
rsmith committed rL303930: Switch from using a DiagnosticTrap and a note for "while defining a special.
Switch from using a DiagnosticTrap and a note for "while defining a special
May 25 2017, 3:47 PM
rsmith added inline comments to D33568: Fix crash when evaluating constant expressions involving nullptr.
May 25 2017, 2:56 PM

May 23 2017

rsmith accepted D32828: [Modules] Fix conservative assertion for import diagnostics.
May 23 2017, 4:03 PM
rsmith committed rL303699: [modules] When reparenting a local declaration, don't mark the declaration as.
[modules] When reparenting a local declaration, don't mark the declaration as
May 23 2017, 3:03 PM
rsmith added a comment to D29951: Load lazily the template specialization in multi-module setups..

In order to create a reasonable test I need to use -error-on-deserialized-decl and I hit a bug: https://bugs.llvm.org/show_bug.cgi?id=32988

Richard, could you help me out with the test? Maybe we could trigger this avoiding the abovementioned bug...

May 23 2017, 1:18 PM
rsmith accepted D33424: Lexer: allow imaginary constants in GNU mode (only)..

I like it, and it seems like it would nicely generalize if there are more cases that we find need this treatment.

May 23 2017, 1:04 PM
rsmith added inline comments to D33366: Fix that global delete operator get's assigned to a submodule..
May 23 2017, 12:46 PM
rsmith added inline comments to D29951: Load lazily the template specialization in multi-module setups..
May 23 2017, 12:07 PM

May 22 2017

rsmith added a comment to D33424: Lexer: allow imaginary constants in GNU mode (only)..

Counterproposal: in -std=*++14 onwards, treat this construct as a user-defined literal, but fall back on the built-in interpretation if name lookup doesn't find an operator""i function. (The two interpretations only conflict if the source code explicitly does something like using namespace std::complex_literals;, which seems like a pretty big clue that the user expected 1.0ito be std::complex<double> rather than _Complex double.)

May 22 2017, 5:17 PM
rsmith committed rL303589: Add option to include multiple lines in snippets..
Add option to include multiple lines in snippets.
May 22 2017, 4:51 PM
rsmith accepted D31692: [coroutines] Wrap the body of the coroutine in try-catch.

LGTM

May 22 2017, 3:08 PM
rsmith added inline comments to D33398: Mangle __unaligned in Itanium ABI.
May 22 2017, 3:05 PM