ahatanak (Akira Hatanaka)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 4 2013, 1:37 PM (237 w, 18 h)

Recent Activity

Yesterday

ahatanak accepted D48407: ProvenanceAnalysis: Store WeakTrackingVH instead of Value* in UnderlyingValue Cache..

LGTM

Wed, Jun 20, 8:50 PM
ahatanak added inline comments to rC335021: [Sema] Produce diagnostics for attribute 'trivial_abi' that appears.
Wed, Jun 20, 4:02 PM
ahatanak committed rC335189: Use cast instead of dyn_cast_or_null..
Use cast instead of dyn_cast_or_null.
Wed, Jun 20, 4:01 PM
ahatanak committed rL335189: Use cast instead of dyn_cast_or_null..
Use cast instead of dyn_cast_or_null.
Wed, Jun 20, 4:01 PM

Mon, Jun 18

ahatanak committed rL335021: [Sema] Produce diagnostics for attribute 'trivial_abi' that appears.
[Sema] Produce diagnostics for attribute 'trivial_abi' that appears
Mon, Jun 18, 10:09 PM
ahatanak committed rC335021: [Sema] Produce diagnostics for attribute 'trivial_abi' that appears.
[Sema] Produce diagnostics for attribute 'trivial_abi' that appears
Mon, Jun 18, 10:09 PM

Tue, Jun 12

ahatanak committed rL334569: [Sema] When the address of a member function is used as a template.
[Sema] When the address of a member function is used as a template
Tue, Jun 12, 10:30 PM
ahatanak committed rC334569: [Sema] When the address of a member function is used as a template.
[Sema] When the address of a member function is used as a template
Tue, Jun 12, 10:30 PM
ahatanak closed D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer.
Tue, Jun 12, 10:30 PM

Wed, Jun 6

ahatanak added inline comments to D22391: [Sema] Add warning for implicitly casting a null constant to a non null pointer type .
Wed, Jun 6, 4:30 PM
ahatanak updated the diff for D22391: [Sema] Add warning for implicitly casting a null constant to a non null pointer type .

Sorry for the delay in responding. I've addressed Jordan's review comments.

Wed, Jun 6, 4:26 PM
ahatanak updated the diff for D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called.

Sink diagnoseUnavailableAlignedAllocation into DiagnoseUseOfDecl and add calls to it in a few other places so that diagnostics are produced for calls to aligned operator and builtin operator new/delete in addition to aligned deallocation functions called from deleting destructors.

Wed, Jun 6, 4:04 PM

Tue, Jun 5

ahatanak added a comment to D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable..

I see, thank you.

clang front-end currently fails to issue a warning or error when an aligned allocation/deallocation functions are required but not available in a few cases (e.g., delete called from a deleting destructor, calls to operator or builtin operator new/delete). I suppose those bugs should be fixed in separate patches.

I don't think we need to emit warnings from __builtin_operator_new/__builtin_operator_delete. Libc++ is the only consumer, and I think we can trust it to know what it's doing.

Tue, Jun 5, 8:19 PM

Mon, Jun 4

ahatanak created D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called.
Mon, Jun 4, 7:25 PM
ahatanak added a comment to D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable..

I see, thank you.

Mon, Jun 4, 7:05 PM
ahatanak added a comment to D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable..

Could you elaborate on what kind of changes you are planning to make in libc++ after committing this patch?

Mon, Jun 4, 1:41 PM

Fri, Jun 1

ahatanak added a comment to D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable..

I think clang should error out or warn when aligned operator or builtin operator new/delete functions are used when they are not available (r306722 should have handled them).

Fri, Jun 1, 4:12 PM
ahatanak added a comment to D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable..

What when compiler has __builtin_operator_new, __builtin_operator_delete? If I build libc++ tests with recent Clang which has these builtins and run tests with libc++.dylib from old Darwin, there are no linkage errors. Should we define __cpp_aligned_allocation in this case?

I don't see why that should make any difference -- those builtins call the same functions that the new and delete operator call. Perhaps libc++ isn't calling the forms of those builtins that take an alignment argument yet?

Fri, Jun 1, 10:56 AM

Thu, May 31

ahatanak added a comment to D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer.

It doesn't look like it's possible to get the context needed to do accessibility check (CXXMethodDecl 'method' for 'C::overloadedMethod' in the test case) from 'Expr *OvlExpr' in CheckAddressOfMemberAccess. It's possible to get the class in which the member is defined (class ''C' for C::overloadedMethod'), but we want the context in which the member is used (that is 'method').

Thu, May 31, 10:22 AM
ahatanak added a comment to D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer.

ping

Thu, May 31, 7:41 AM

Tue, May 29

ahatanak committed rC333447: [CodeGen][Darwin] Set the calling-convention of thread-local variable.
[CodeGen][Darwin] Set the calling-convention of thread-local variable
Tue, May 29, 11:33 AM
ahatanak committed rL333447: [CodeGen][Darwin] Set the calling-convention of thread-local variable.
[CodeGen][Darwin] Set the calling-convention of thread-local variable
Tue, May 29, 11:33 AM
ahatanak closed D47354: [CodeGen][Darwin] Set the calling-convention of a thread-local variable initialization function to fix calling-convention mismatch.
Tue, May 29, 11:32 AM

Thu, May 24

ahatanak created D47354: [CodeGen][Darwin] Set the calling-convention of a thread-local variable initialization function to fix calling-convention mismatch.
Thu, May 24, 6:01 PM
ahatanak added inline comments to D47290: [Sema] -Wformat-pedantic only for NSInteger/NSUInteger %zu/%zi on Darwin.
Thu, May 24, 9:41 AM

Wed, May 23

ahatanak updated the diff for D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer.

Add a test case for the Chromium failure. Also, simplify a bit by capturing the calling context in Sema::DeduceTemplateArguments.

Wed, May 23, 9:50 PM
ahatanak added a comment to D38708: [AST] Flag the typo-corrected nodes for better tooling.

Could you rebase this patch against ToT?

Wed, May 23, 5:29 PM
ahatanak committed rCXX333108: Do not define template specialization __libcpp_is_floating_point<__fp16>.
Do not define template specialization __libcpp_is_floating_point<__fp16>
Wed, May 23, 10:57 AM
ahatanak committed rL333108: Do not define template specialization __libcpp_is_floating_point<__fp16>.
Do not define template specialization __libcpp_is_floating_point<__fp16>
Wed, May 23, 10:56 AM
ahatanak committed rCXX333103: Teach __libcpp_is_floating_point that __fp16 and _Float16 are.
Teach __libcpp_is_floating_point that __fp16 and _Float16 are
Wed, May 23, 10:36 AM
ahatanak committed rL333103: Teach __libcpp_is_floating_point that __fp16 and _Float16 are.
Teach __libcpp_is_floating_point that __fp16 and _Float16 are
Wed, May 23, 10:35 AM

Tue, May 22

ahatanak added a comment to D45015: [Preprocessor] Allow libc++ to detect when aligned allocation is unavailable..

Hmm, perhaps our strategy for handling aligned allocation on Darwin should be revisited. We shouldn't be defining __cpp_aligned_allocation if we believe it doesn't work -- that will break code that uses aligned allocation where available and falls back to something else where it's unavailable.

@ahatanak: how about this:

  • Change the driver to not pass -faligned-alloc-unavailable if an explicit -faligned-allocation or -fno-aligned-allocation flag is given; update Clang's note to suggest explicitly passing -faligned-allocation rather than -Wno-aligned-alloc-unavailable if the user provides their own aligned allocation function.
  • Change -faligned-alloc-unavailable so that it does not define __cpp_aligned_allocation.
  • Change Sema's handling of the "aligned allocation unavailable" case so that, after warning on selecting an aligned allocation function, it then removes those functions from the candidate set and tries again.

    That is: on old Darwin, we should not define __cpp_aligned_allocation (even in C++17), produce the "no aligned allocation support" warning in C++17 mode, and then not try to call the aligned allocation function. But if -faligned-allocation or -fno-aligned-allocation is specified explicitly, then the user knows what they're doing and they get no warning.
Tue, May 22, 10:28 PM
ahatanak added a comment to D45898: [SemaCXX] Mark destructor as referenced .

As it happens, the C++ committee fixed the language wording hole here very recently. The new rule can be found here: http://wg21.link/p0968r0#2227
In summary: we should to consider the destructor for all elements of the aggregate to be potentially-invoked.

Tue, May 22, 7:02 PM

May 17 2018

ahatanak added a comment to D45898: [SemaCXX] Mark destructor as referenced .

Richard and Doug, do you have any thoughts on John's suggestion?

May 17 2018, 7:02 PM

May 15 2018

ahatanak accepted D46482: [ObjCARC] Prevent code motion into a catchswitch.

LGTM

May 15 2018, 9:50 PM
ahatanak committed rC332397: Address post-commit review comments after r328731. NFC..
Address post-commit review comments after r328731. NFC.
May 15 2018, 2:04 PM
ahatanak committed rL332397: Address post-commit review comments after r328731. NFC..
Address post-commit review comments after r328731. NFC.
May 15 2018, 2:04 PM
ahatanak added inline comments to D46482: [ObjCARC] Prevent code motion into a catchswitch.
May 15 2018, 10:11 AM

May 14 2018

ahatanak accepted D46778: Remove the fixit for the diagnostics regarding capturing autoreleasing variables in a block.

Sorry for the delay, LGTM.

May 14 2018, 12:00 PM

May 3 2018

ahatanak added a comment to D46042: Cap vector alignment at 16 for all Darwin platforms.

Note that this sort of attribute is stripped from template arguments in template substitution, so there's a possibility that code templated over vectors will produce inadequately-aligned objects.

May 3 2018, 11:41 AM

May 2 2018

ahatanak accepted D46371: [ObjCARC] Convert an if to an early continue. NFC.

LGTM

May 2 2018, 5:34 PM
ahatanak accepted D46042: Cap vector alignment at 16 for all Darwin platforms.

LGTM

May 2 2018, 3:17 PM

Apr 27 2018

ahatanak committed rC331020: [CodeGen] Avoid destructing a callee-destructued struct type in a.
[CodeGen] Avoid destructing a callee-destructued struct type in a
Apr 27 2018, 12:00 AM
ahatanak committed rL331020: [CodeGen] Avoid destructing a callee-destructued struct type in a.
[CodeGen] Avoid destructing a callee-destructued struct type in a
Apr 27 2018, 12:00 AM

Apr 26 2018

ahatanak committed rC331019: Revert "[CodeGen] Avoid destructing a callee-destructued struct type in a".
Revert "[CodeGen] Avoid destructing a callee-destructued struct type in a"
Apr 26 2018, 11:00 PM
ahatanak committed rL331019: Revert "[CodeGen] Avoid destructing a callee-destructued struct type in a".
Revert "[CodeGen] Avoid destructing a callee-destructued struct type in a"
Apr 26 2018, 11:00 PM
ahatanak committed rL331016: [CodeGen] Avoid destructing a callee-destructued struct type in a.
[CodeGen] Avoid destructing a callee-destructued struct type in a
Apr 26 2018, 9:25 PM
ahatanak committed rC331016: [CodeGen] Avoid destructing a callee-destructued struct type in a.
[CodeGen] Avoid destructing a callee-destructued struct type in a
Apr 26 2018, 9:25 PM
ahatanak closed D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor.
Apr 26 2018, 9:25 PM
ahatanak committed rC331010: [Driver] Don't enable "-fregister-global-dtors-with-atexit" by default.
[Driver] Don't enable "-fregister-global-dtors-with-atexit" by default
Apr 26 2018, 6:46 PM
ahatanak committed rL331010: [Driver] Don't enable "-fregister-global-dtors-with-atexit" by default.
[Driver] Don't enable "-fregister-global-dtors-with-atexit" by default
Apr 26 2018, 6:45 PM
ahatanak updated the diff for D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor.

Rename variable to something OldCleanupScopeDepth.

Apr 26 2018, 3:52 PM

Apr 23 2018

ahatanak added a comment to D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor.

x.

Apr 23 2018, 2:48 PM
ahatanak updated the diff for D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor.

Address review comments.

Apr 23 2018, 12:58 PM

Apr 20 2018

ahatanak created D45898: [SemaCXX] Mark destructor as referenced .
Apr 20 2018, 12:49 PM

Apr 18 2018

ahatanak committed rC330304: [CodeGen] Do not push a destructor cleanup for a struct that doesn't.
[CodeGen] Do not push a destructor cleanup for a struct that doesn't
Apr 18 2018, 4:38 PM
ahatanak committed rL330304: [CodeGen] Do not push a destructor cleanup for a struct that doesn't.
[CodeGen] Do not push a destructor cleanup for a struct that doesn't
Apr 18 2018, 4:37 PM

Apr 17 2018

ahatanak committed rC330202: [Sema] Warn about memcpy'ing non-trivial C structs..
[Sema] Warn about memcpy'ing non-trivial C structs.
Apr 17 2018, 12:17 PM
ahatanak committed rL330202: [Sema] Warn about memcpy'ing non-trivial C structs..
[Sema] Warn about memcpy'ing non-trivial C structs.
Apr 17 2018, 12:17 PM
ahatanak closed D45310: Warn about memcpy'ing non-trivial C structs.
Apr 17 2018, 12:17 PM
ahatanak committed rC330201: Move the visitor classes that are used to traverse non-trivial C structs.
Move the visitor classes that are used to traverse non-trivial C structs
Apr 17 2018, 12:09 PM
ahatanak committed rL330201: Move the visitor classes that are used to traverse non-trivial C structs.
Move the visitor classes that are used to traverse non-trivial C structs
Apr 17 2018, 12:09 PM
ahatanak committed rL330199: Add a command line option 'fregister_global_dtors_with_atexit' to.
Add a command line option 'fregister_global_dtors_with_atexit' to
Apr 17 2018, 11:47 AM
ahatanak committed rC330199: Add a command line option 'fregister_global_dtors_with_atexit' to.
Add a command line option 'fregister_global_dtors_with_atexit' to
Apr 17 2018, 11:47 AM
ahatanak closed D45578: Add a command line option `fregister_global_dtors_with_atexit` to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit..
Apr 17 2018, 11:47 AM
ahatanak updated the diff for D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor.

Deactivate the cleanups for callee-destructed parameters that are being forwarded to a delegated constructor.

Apr 17 2018, 11:06 AM

Apr 16 2018

ahatanak updated the diff for D45310: Warn about memcpy'ing non-trivial C structs.

Fix indentation.

Apr 16 2018, 3:11 PM
ahatanak updated the diff for D45310: Warn about memcpy'ing non-trivial C structs.

Move method visitArray to the derived classes and pass the array type to the method instead of the QualType.

Apr 16 2018, 2:04 PM
ahatanak added inline comments to D45310: Warn about memcpy'ing non-trivial C structs.
Apr 16 2018, 2:04 PM
ahatanak committed rL330155: [CodeGen] Fix a crash that occurs when a non-trivial C struct with a.
[CodeGen] Fix a crash that occurs when a non-trivial C struct with a
Apr 16 2018, 1:27 PM
ahatanak committed rC330155: [CodeGen] Fix a crash that occurs when a non-trivial C struct with a.
[CodeGen] Fix a crash that occurs when a non-trivial C struct with a
Apr 16 2018, 1:27 PM
ahatanak committed rC330153: Revert "[CodeGen] Fix a crash that occurs when a non-trivial C struct with a".
Revert "[CodeGen] Fix a crash that occurs when a non-trivial C struct with a"
Apr 16 2018, 12:57 PM
ahatanak committed rL330153: Revert "[CodeGen] Fix a crash that occurs when a non-trivial C struct with a".
Revert "[CodeGen] Fix a crash that occurs when a non-trivial C struct with a"
Apr 16 2018, 12:57 PM
ahatanak committed rL330151: [CodeGen] Fix a crash that occurs when a non-trivial C struct with a.
[CodeGen] Fix a crash that occurs when a non-trivial C struct with a
Apr 16 2018, 12:41 PM
ahatanak committed rC330151: [CodeGen] Fix a crash that occurs when a non-trivial C struct with a.
[CodeGen] Fix a crash that occurs when a non-trivial C struct with a
Apr 16 2018, 12:41 PM

Apr 15 2018

ahatanak updated the diff for D45578: Add a command line option `fregister_global_dtors_with_atexit` to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit..

Address review comments.

Apr 15 2018, 10:46 PM
ahatanak added inline comments to D45578: Add a command line option `fregister_global_dtors_with_atexit` to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit..
Apr 15 2018, 10:46 PM

Apr 12 2018

ahatanak updated the diff for D45578: Add a command line option `fregister_global_dtors_with_atexit` to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit..

Fix an error in emitGlobalDtorWithCXAAtExit and make sure @dso_handle is hidden.

Apr 12 2018, 10:47 AM
ahatanak created D45578: Add a command line option `fregister_global_dtors_with_atexit` to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit..
Apr 12 2018, 10:12 AM

Apr 11 2018

ahatanak committed rL329879: [Sema][ObjC] Ensure that the return type of an ObjC method is a complete.
[Sema][ObjC] Ensure that the return type of an ObjC method is a complete
Apr 11 2018, 11:04 PM
ahatanak committed rC329879: [Sema][ObjC] Ensure that the return type of an ObjC method is a complete.
[Sema][ObjC] Ensure that the return type of an ObjC method is a complete
Apr 11 2018, 11:04 PM

Apr 9 2018

ahatanak committed rC329671: [ExprConstant] Use an AST node and a version number as a key to create.
[ExprConstant] Use an AST node and a version number as a key to create
Apr 9 2018, 10:18 PM
ahatanak committed rL329671: [ExprConstant] Use an AST node and a version number as a key to create.
[ExprConstant] Use an AST node and a version number as a key to create
Apr 9 2018, 10:18 PM
ahatanak closed D42776: [Sema] Fix an assertion failure in constant expression evaluation of calls to functions with default arguments.
Apr 9 2018, 10:18 PM
ahatanak updated the diff for D42776: [Sema] Fix an assertion failure in constant expression evaluation of calls to functions with default arguments.

Use pair<const void*, unsigned> as the key.

Apr 9 2018, 10:16 PM
ahatanak committed rC329635: [ObjC++] Never pass structs that transitively contain __weak fields in.
[ObjC++] Never pass structs that transitively contain __weak fields in
Apr 9 2018, 3:51 PM
ahatanak committed rL329635: [ObjC++] Never pass structs that transitively contain __weak fields in.
[ObjC++] Never pass structs that transitively contain __weak fields in
Apr 9 2018, 3:51 PM
ahatanak committed rL329627: Revert "[ObjC++] Never pass structs that transitively contain __weak fields in".
Revert "[ObjC++] Never pass structs that transitively contain __weak fields in"
Apr 9 2018, 2:51 PM
ahatanak committed rC329627: Revert "[ObjC++] Never pass structs that transitively contain __weak fields in".
Revert "[ObjC++] Never pass structs that transitively contain __weak fields in"
Apr 9 2018, 2:51 PM
ahatanak closed D45384: [ObjC++] Never pass structs with `__weak` fields in registers .

Committed in r329617.

Apr 9 2018, 1:45 PM
ahatanak accepted D45384: [ObjC++] Never pass structs with `__weak` fields in registers .
Apr 9 2018, 1:45 PM
ahatanak committed rL329617: [ObjC++] Never pass structs that transitively contain __weak fields in.
[ObjC++] Never pass structs that transitively contain __weak fields in
Apr 9 2018, 1:43 PM
ahatanak committed rC329617: [ObjC++] Never pass structs that transitively contain __weak fields in.
[ObjC++] Never pass structs that transitively contain __weak fields in
Apr 9 2018, 1:43 PM
ahatanak updated the diff for D45384: [ObjC++] Never pass structs with `__weak` fields in registers .

Address review comments.

Apr 9 2018, 1:41 PM
ahatanak committed rL329608: Revert "[ObjC] Make C++ triviality type traits available to non-trivial C".
Revert "[ObjC] Make C++ triviality type traits available to non-trivial C"
Apr 9 2018, 12:42 PM
ahatanak committed rC329608: Revert "[ObjC] Make C++ triviality type traits available to non-trivial C".
Revert "[ObjC] Make C++ triviality type traits available to non-trivial C"
Apr 9 2018, 12:42 PM

Apr 6 2018

ahatanak updated the diff for D45384: [ObjC++] Never pass structs with `__weak` fields in registers .

Replace flags CanPassInRegisters and CannotPassInRegisters with a 2-bit enum in RecordDecl.

Apr 6 2018, 6:39 PM
ahatanak added a comment to D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor.

Hmm. I'm not actually sure *why* it's not okay to forward callee-cleanup arguments. Do we just not have the necessary logic to disable the cleanup in the caller?

Apr 6 2018, 4:19 PM
ahatanak added a comment to D45384: [ObjC++] Never pass structs with `__weak` fields in registers .

Yes. I intended it as a property that propagates to classes that contain or derive from the type.

Apr 6 2018, 3:23 PM
ahatanak added a comment to D45384: [ObjC++] Never pass structs with `__weak` fields in registers .

Well, but I think CanPassInRegisters==false in the base class does always mean CanPassInRegisters==false in the subclass.

Apr 6 2018, 12:59 PM