Page MenuHomePhabricator

ahatanak (Akira Hatanaka)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 4 2013, 1:37 PM (272 w, 6 h)

Recent Activity

Thu, Feb 14

ahatanak requested changes to D58164: Block+lambda: allow reference capture.

Sorry, I didn't mean to accept this yet. I think this is something that is better fixed in Sema.

Thu, Feb 14, 9:34 PM · Restricted Project
ahatanak accepted D58164: Block+lambda: allow reference capture.

Sorry, I was misunderstanding the problem.

Thu, Feb 14, 9:31 PM · Restricted Project

Wed, Feb 13

ahatanak added a comment to D58164: Block+lambda: allow reference capture.

I think the root of the problem is that BlockDecl knows the captured variable but doesn't know the type of the capture. The type of the variable and the type of the capture can be different if the block is nested inside a lambda or another block, which is why CI.hasCopyExpr() can return a non-null value when VT is a lvalue reference:

Wed, Feb 13, 10:31 AM · Restricted Project
ahatanak added a comment to D58164: Block+lambda: allow reference capture.

The code is crashing here because the loop in computeBlockInfo is trying to capture a variable that is captured by reference by the enclosing lambda as if it were captured by value. This is the type of VT:

Wed, Feb 13, 10:26 AM · Restricted Project

Fri, Feb 8

ahatanak added inline comments to D57626: Disallow trivial_abi on a class if all copy and move constructors are deleted.
Fri, Feb 8, 5:35 PM · Restricted Project
ahatanak updated the diff for D57626: Disallow trivial_abi on a class if all copy and move constructors are deleted.

Improve diagnostic messages.

Fri, Feb 8, 5:33 PM · Restricted Project
ahatanak accepted D57427: [CodeGen][ObjC] Fix assert on calling `__builtin_constant_p` with ObjC objects..

LGTM

Fri, Feb 8, 2:32 PM · Restricted Project
ahatanak committed rG67b1b451b5f4: Pass the base element type of an array type to the visit method instead of the… (authored by ahatanak).
Pass the base element type of an array type to the visit method instead of the…
Fri, Feb 8, 11:50 AM
ahatanak committed rC353556: Pass the base element type of an array type to the visit method instead.
Pass the base element type of an array type to the visit method instead
Fri, Feb 8, 11:46 AM
ahatanak committed rL353556: Pass the base element type of an array type to the visit method instead.
Pass the base element type of an array type to the visit method instead
Fri, Feb 8, 11:46 AM

Thu, Feb 7

ahatanak committed rG5fbdccd83487: [Sema][ObjC] Disallow non-trivial C struct fields in unions. (authored by ahatanak).
[Sema][ObjC] Disallow non-trivial C struct fields in unions.
Thu, Feb 7, 12:24 PM
ahatanak committed rC353459: [Sema][ObjC] Disallow non-trivial C struct fields in unions..
[Sema][ObjC] Disallow non-trivial C struct fields in unions.
Thu, Feb 7, 12:22 PM
ahatanak committed rL353459: [Sema][ObjC] Disallow non-trivial C struct fields in unions..
[Sema][ObjC] Disallow non-trivial C struct fields in unions.
Thu, Feb 7, 12:22 PM
ahatanak closed D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions.
Thu, Feb 7, 12:21 PM · Restricted Project, Restricted Project

Tue, Feb 5

ahatanak updated the diff for D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions.

Make sure that volatile trivial fields in a struct don't cause Sema to emit a diagnostic. Simplify the code in Sema::ActOnFields .

Tue, Feb 5, 6:50 PM · Restricted Project, Restricted Project
ahatanak planned changes to D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions.

This patch is unnecessarily complicated and is not correct.

Tue, Feb 5, 4:09 PM · Restricted Project, Restricted Project
ahatanak added inline comments to D57626: Disallow trivial_abi on a class if all copy and move constructors are deleted.
Tue, Feb 5, 3:42 PM · Restricted Project

Mon, Feb 4

ahatanak updated the diff for D57626: Disallow trivial_abi on a class if all copy and move constructors are deleted.

Add a note diagnostic to inform the user of the reason for not allowing annotating a class with trivial_abi.

Mon, Feb 4, 2:38 PM · Restricted Project

Fri, Feb 1

ahatanak committed rL352949: [Sema][ObjC] Allow declaring ObjC pointer members with non-trivial.
[Sema][ObjC] Allow declaring ObjC pointer members with non-trivial
Fri, Feb 1, 6:23 PM
ahatanak committed rC352949: [Sema][ObjC] Allow declaring ObjC pointer members with non-trivial.
[Sema][ObjC] Allow declaring ObjC pointer members with non-trivial
Fri, Feb 1, 6:23 PM
ahatanak closed D57438: [Sema][ObjC] Allow declaring ObjC pointer members in C++ unions under ARC.
Fri, Feb 1, 6:23 PM · Restricted Project
ahatanak created D57626: Disallow trivial_abi on a class if all copy and move constructors are deleted.
Fri, Feb 1, 3:10 PM · Restricted Project
ahatanak updated the diff for D57438: [Sema][ObjC] Allow declaring ObjC pointer members in C++ unions under ARC.

Add a test case for an anonymous struct nested inside an anonymous union.

Fri, Feb 1, 2:50 PM · Restricted Project
ahatanak added inline comments to D57438: [Sema][ObjC] Allow declaring ObjC pointer members in C++ unions under ARC.
Fri, Feb 1, 2:48 PM · Restricted Project

Thu, Jan 31

ahatanak added inline comments to D57438: [Sema][ObjC] Allow declaring ObjC pointer members in C++ unions under ARC.
Thu, Jan 31, 6:34 PM · Restricted Project
ahatanak updated the diff for D57438: [Sema][ObjC] Allow declaring ObjC pointer members in C++ unions under ARC.

Address review comments.

Thu, Jan 31, 6:34 PM · Restricted Project
ahatanak committed rL352822: Revert "[Sema] Make canPassInRegisters return true if the CXXRecordDecl passed".
Revert "[Sema] Make canPassInRegisters return true if the CXXRecordDecl passed"
Thu, Jan 31, 4:12 PM
ahatanak committed rC352822: Revert "[Sema] Make canPassInRegisters return true if the CXXRecordDecl passed".
Revert "[Sema] Make canPassInRegisters return true if the CXXRecordDecl passed"
Thu, Jan 31, 4:12 PM

Tue, Jan 29

ahatanak added a comment to D57427: [CodeGen][ObjC] Fix assert on calling `__builtin_constant_p` with ObjC objects..

LGTM with one minor nit.

Tue, Jan 29, 10:19 PM · Restricted Project
ahatanak added inline comments to D57438: [Sema][ObjC] Allow declaring ObjC pointer members in C++ unions under ARC.
Tue, Jan 29, 10:16 PM · Restricted Project
ahatanak created D57438: [Sema][ObjC] Allow declaring ObjC pointer members in C++ unions under ARC.
Tue, Jan 29, 10:06 PM · Restricted Project

Tue, Jan 22

ahatanak committed rL351911: [Sema][ObjC] Check whether a DelayedDiagnosticPool has been pushed.
[Sema][ObjC] Check whether a DelayedDiagnosticPool has been pushed
Tue, Jan 22, 4:56 PM
ahatanak committed rC351911: [Sema][ObjC] Check whether a DelayedDiagnosticPool has been pushed.
[Sema][ObjC] Check whether a DelayedDiagnosticPool has been pushed
Tue, Jan 22, 4:56 PM
ahatanak abandoned D2393: support for directive .reloc.
Tue, Jan 22, 11:14 AM

Jan 10 2019

ahatanak committed rC350920: [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed.
[Sema] Make canPassInRegisters return true if the CXXRecordDecl passed
Jan 10 2019, 11:10 PM
ahatanak committed rL350920: [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed.
[Sema] Make canPassInRegisters return true if the CXXRecordDecl passed
Jan 10 2019, 11:10 PM
ahatanak committed rL350917: [Sema] If CheckPlaceholderExpr rewrites the initializer of an auto.
[Sema] If CheckPlaceholderExpr rewrites the initializer of an auto
Jan 10 2019, 9:01 PM
ahatanak committed rC350917: [Sema] If CheckPlaceholderExpr rewrites the initializer of an auto.
[Sema] If CheckPlaceholderExpr rewrites the initializer of an auto
Jan 10 2019, 9:01 PM
ahatanak committed rC350887: [Sema] Call CheckPlaceholderExpr to resolve typeof or decltype.
[Sema] Call CheckPlaceholderExpr to resolve typeof or decltype
Jan 10 2019, 12:16 PM
ahatanak committed rL350887: [Sema] Call CheckPlaceholderExpr to resolve typeof or decltype.
[Sema] Call CheckPlaceholderExpr to resolve typeof or decltype
Jan 10 2019, 12:16 PM
ahatanak closed D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..
Jan 10 2019, 12:16 PM · Restricted Project

Jan 9 2019

ahatanak added a comment to D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

Oh, and please update the commit message to primarily talk about the changes to placeholder checking. You can discuss the impact on the repeated-use-of-weak warning in a follow-up paragraph.

Jan 9 2019, 9:29 PM · Restricted Project
ahatanak updated the diff for D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

Pass Init by reference and use the rewritten expression returned in it to perform variable initialization. Add a test case that tests new expression with auto types.

Jan 9 2019, 9:15 PM · Restricted Project

Jan 8 2019

ahatanak accepted D56445: [Sema] Teach Clang that aligned allocation is not supported with macosx10.13.

We should probably check that alignedAllocMinVersion returns the correct versions for other OSes too, but this patch is fine.

Jan 8 2019, 11:32 AM

Jan 7 2019

ahatanak updated the diff for D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

Make deduceVarTypeFromInitializer and DeduceVariableDeclarationType return the new initialization expression and use it in Sema::AddInitializerToDecl. Add a test case that tests lambda capture with an initializer.

Jan 7 2019, 5:56 PM · Restricted Project
ahatanak added a comment to D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

We can make DeduceVariableDeclarationType return the rewritten expression and replace Init in Sema::AddInitializerToDecl with it.

Jan 7 2019, 12:05 PM · Restricted Project

Jan 4 2019

ahatanak added a comment to D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

Hmm. Are we resolving the placeholder expression twice here? That might be the basic problem.

Jan 4 2019, 6:38 PM · Restricted Project
ahatanak added a comment to rL344207: Distinguish between library and language support for aligned allocation..

I'm not sure whether this is something libc++ (as opposed to the compiler) should handle or not. I just wanted to understand what the expected behavior is first.

Jan 4 2019, 4:46 PM
ahatanak updated subscribers of rL344207: Distinguish between library and language support for aligned allocation..

It seems like this patch causes clang to accept the following code when compiled with -std=c++11. Is this the expected behavior? Shouldn't the compiler reject the code if it's not compiled with -std=c++17 or newer?

Jan 4 2019, 4:20 PM

Jan 3 2019

ahatanak added a comment to D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

I think you could just disable the diagnostic in an unevaluated context.

Jan 3 2019, 9:49 PM · Restricted Project
ahatanak updated the diff for D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

Do not record use of weak variables when the type of an auto variable is being deduced.

Jan 3 2019, 6:10 PM · Restricted Project

Jan 2 2019

ahatanak accepted D56235: Teach ObjCARC optimizer about equivalent PHIs when eliminating autoreleaseRV/retainRV pairs.
Jan 2 2019, 5:33 PM
ahatanak added a comment to D56235: Teach ObjCARC optimizer about equivalent PHIs when eliminating autoreleaseRV/retainRV pairs.

LGTM

Jan 2 2019, 5:33 PM

Dec 29 2018

ahatanak committed rC350157: [CodeGen] Replace '@' characters in block descriptors' symbol names with.
[CodeGen] Replace '@' characters in block descriptors' symbol names with
Dec 29 2018, 9:33 AM
ahatanak committed rL350157: [CodeGen] Replace '@' characters in block descriptors' symbol names with.
[CodeGen] Replace '@' characters in block descriptors' symbol names with
Dec 29 2018, 9:32 AM
ahatanak closed D54539: [CodeGen] Replace '@' characters in block descriptors' symbol names with '\1' on ELF targets..
Dec 29 2018, 9:32 AM · Restricted Project
ahatanak updated the diff for D54539: [CodeGen] Replace '@' characters in block descriptors' symbol names with '\1' on ELF targets..

Sorry for the delay. The updated patch replaces '@' with '\1' on all targets.

Dec 29 2018, 7:13 AM · Restricted Project

Dec 20 2018

ahatanak committed rC349890: [Sema] Produce diagnostics when C++17 aligned allocation/deallocation.
[Sema] Produce diagnostics when C++17 aligned allocation/deallocation
Dec 20 2018, 11:09 PM
ahatanak committed rL349890: [Sema] Produce diagnostics when C++17 aligned allocation/deallocation.
[Sema] Produce diagnostics when C++17 aligned allocation/deallocation
Dec 20 2018, 11:09 PM
ahatanak closed D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called.
Dec 20 2018, 11:09 PM
ahatanak added a comment to D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

Okay. You may need to push an unevaluated context when doing that.

Since I'm just moving the call to CheckPlaceholderExpr to the call site, I don't think I have to push an unevaluated context there?

Hmm. Right, for the auto inference specifically it's fine because the expression is in fact evaluated: we're not just eliminating placeholders in order to resolve decltype, we're eliminating placeholders to actually figure out what's going on with the initialization.

Dec 20 2018, 9:39 PM · Restricted Project
ahatanak updated the diff for D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called.

Check whether the declaration passed to Sema::CanUseDecl is an aligned allocation/deallocation function that is unavailable.

Dec 20 2018, 4:11 PM

Dec 19 2018

ahatanak added a comment to D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

Okay. You may need to push an unevaluated context when doing that.

Dec 19 2018, 1:53 PM · Restricted Project
ahatanak updated the diff for D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

Remove the call to CheckPlaceholderExpr in Sema::BuildDecltypeType and move it to Sema::DeduceAutoType. Assert that the expression that is passed to Sema::BuildDecltypeType isn't a placeholder.

Dec 19 2018, 1:49 PM · Restricted Project

Dec 18 2018

ahatanak added a comment to D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

Sorry, please ignore my previous comment. I was looking at the wrong place.

Dec 18 2018, 3:15 PM · Restricted Project
ahatanak added a comment to D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

Here are a couple of examples I found running the regression tests:

Dec 18 2018, 12:52 PM · Restricted Project

Dec 14 2018

ahatanak added inline comments to D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..
Dec 14 2018, 10:56 PM · Restricted Project
ahatanak updated the diff for D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..

Call CheckPlaceholderExpr instead of pushing an unevaluated evaluation context.

Dec 14 2018, 10:49 PM · Restricted Project
ahatanak added a comment to D55544: Warning: objc-encodings-larger-than=.

The patch looks largely fine to me.

Dec 14 2018, 4:41 PM · Restricted Project

Dec 13 2018

ahatanak created D55662: [Sema] If CheckPlaceholderExpr rewrites a placeholder expression when the type of an auto variable is being deduced, use the rewritten expression when performing initialization of the variable..
Dec 13 2018, 11:20 AM · Restricted Project
ahatanak added a comment to D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions.

Just to clarify, this patch doesn't change clang's handling of C++ unions that have non-static data members with non-trivial special member functions.

Dec 13 2018, 9:51 AM · Restricted Project, Restricted Project
ahatanak created D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions.
Dec 13 2018, 9:33 AM · Restricted Project, Restricted Project

Dec 10 2018

ahatanak added a comment to D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called.

ping

Dec 10 2018, 8:50 AM

Dec 9 2018

ahatanak accepted D55348: Change the objc ARC optimizer to use the new objc.* intrinsics.

LGTM

Dec 9 2018, 11:19 PM

Dec 4 2018

ahatanak accepted D55233: Add objc_retain and objc_release intrinsics and codegen them to their runtime methods.

LGTM

Dec 4 2018, 10:04 AM

Dec 3 2018

ahatanak added inline comments to D55233: Add objc_retain and objc_release intrinsics and codegen them to their runtime methods.
Dec 3 2018, 4:37 PM

Nov 30 2018

ahatanak updated the diff for D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called.

I've reverted the changes I made to test/SemaCUDA/call-host-fn-from-device.cu since r342749 fixed the overload resolution bug.

Nov 30 2018, 3:19 PM

Nov 14 2018

ahatanak added a comment to D54539: [CodeGen] Replace '@' characters in block descriptors' symbol names with '\1' on ELF targets..

This should not be changing the actual @-encoding value. If we want to use the @-encoding in the symbol name, we can change it when naming the symbol, provided that \1 is not legal in the @encoding.

Nov 14 2018, 2:37 PM · Restricted Project
ahatanak created D54539: [CodeGen] Replace '@' characters in block descriptors' symbol names with '\1' on ELF targets..
Nov 14 2018, 12:53 PM · Restricted Project

Nov 5 2018

ahatanak committed rL346212: Cast to uint64_t instead of to unsigned..
Cast to uint64_t instead of to unsigned.
Nov 5 2018, 11:15 PM
ahatanak committed rC346212: Cast to uint64_t instead of to unsigned..
Cast to uint64_t instead of to unsigned.
Nov 5 2018, 11:15 PM
ahatanak committed rL346211: os_log: Allow specifying mask type in format string..
os_log: Allow specifying mask type in format string.
Nov 5 2018, 11:07 PM
ahatanak committed rC346211: os_log: Allow specifying mask type in format string..
os_log: Allow specifying mask type in format string.
Nov 5 2018, 11:07 PM
ahatanak committed rL346210: os_log: Add a new privacy annotation "sensitive"..
os_log: Add a new privacy annotation "sensitive".
Nov 5 2018, 10:28 PM
ahatanak committed rC346210: os_log: Add a new privacy annotation "sensitive"..
os_log: Add a new privacy annotation "sensitive".
Nov 5 2018, 10:28 PM
ahatanak committed rC346209: os_log: Minor code cleanups. NFC..
os_log: Minor code cleanups. NFC.
Nov 5 2018, 9:43 PM
ahatanak committed rL346209: os_log: Minor code cleanups. NFC..
os_log: Minor code cleanups. NFC.
Nov 5 2018, 9:43 PM

Oct 30 2018

ahatanak added a comment to D53860: [SemaCXX] Don't check base's dtor is accessible.

http://wg21.link/p0968r0#2227 says:

Oct 30 2018, 11:19 AM

Oct 20 2018

ahatanak committed rCTE344856: Check that __MAC_OS_X_VERSION_MIN_REQUIRED is defined before checking.
Check that __MAC_OS_X_VERSION_MIN_REQUIRED is defined before checking
Oct 20 2018, 10:38 AM
ahatanak committed rL344856: Check that __MAC_OS_X_VERSION_MIN_REQUIRED is defined before checking.
Check that __MAC_OS_X_VERSION_MIN_REQUIRED is defined before checking
Oct 20 2018, 10:37 AM

Oct 19 2018

ahatanak committed rC344833: [CodeGen] Use the mangle context owned by CodeGenModule to correctly.
[CodeGen] Use the mangle context owned by CodeGenModule to correctly
Oct 19 2018, 10:47 PM
ahatanak committed rL344833: [CodeGen] Use the mangle context owned by CodeGenModule to correctly.
[CodeGen] Use the mangle context owned by CodeGenModule to correctly
Oct 19 2018, 10:47 PM
ahatanak committed rCTE344827: Disable unittests/clangd/JSONTransportTests.cpp on versions of macosx.
Disable unittests/clangd/JSONTransportTests.cpp on versions of macosx
Oct 19 2018, 7:14 PM
ahatanak committed rL344827: Disable unittests/clangd/JSONTransportTests.cpp on versions of macosx.
Disable unittests/clangd/JSONTransportTests.cpp on versions of macosx
Oct 19 2018, 7:13 PM

Oct 11 2018

ahatanak added a comment to D53154: [CodeGen] Handle extern references to OBJC_CLASS_$_*.

LGTM

Oct 11 2018, 11:24 PM

Oct 1 2018

ahatanak committed rC343556: [CodeGen] Before entering the loop that copies a non-trivial array field.
[CodeGen] Before entering the loop that copies a non-trivial array field
Oct 1 2018, 6:02 PM
ahatanak committed rL343556: [CodeGen] Before entering the loop that copies a non-trivial array field.
[CodeGen] Before entering the loop that copies a non-trivial array field
Oct 1 2018, 6:02 PM
ahatanak committed rL343542: Distinguish `__block` variables that are captured by escaping blocks.
Distinguish `__block` variables that are captured by escaping blocks
Oct 1 2018, 2:54 PM
ahatanak committed rC343542: Distinguish `__block` variables that are captured by escaping blocks.
Distinguish `__block` variables that are captured by escaping blocks
Oct 1 2018, 2:54 PM
ahatanak committed rL343531: Revert r343518..
Revert r343518.
Oct 1 2018, 1:31 PM