[PATCH] D44913: [ObjC] Enable using C++ triviality type traits for non-trivial C structs

2018-03-26 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, doug.gregor, rsmith. r326307 and r327870 made changes that allowed C structs to have __strong and __weak fields in ARC and be non-trivial. This patch make changes that allow using the following type traits for non-trivial C stru

[PATCH] D44908: [ObjC++] Make parameter passing and function return compatible with ObjC

2018-03-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 139935. ahatanak added a comment. Make ClangABICompat a LangOption and remove ForcePassIndirectly. Move the logic in CodeGen that decides whether a parameter should be passed indirectly to Sema. Repository: rC Clang https://reviews.llvm.org/D44908 File

[PATCH] D44913: [ObjC] Enable using C++ triviality type traits for non-trivial C structs

2018-03-27 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328680: [ObjC] Make C++ triviality type traits available to non-trivial C (authored by ahatanak, committed by ). Repository: rC Clang https://reviews.llvm.org/D44913 Files: include/clang/Basic/Token

[PATCH] D44913: [ObjC] Enable using C++ triviality type traits for non-trivial C structs

2018-03-27 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328680: [ObjC] Make C++ triviality type traits available to non-trivial C (authored by ahatanak, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.or

[PATCH] D44968: [ObjC] Generalize NRVO to cover non-trivial C structs

2018-03-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, doug.gregor, rsmith. r326307 and r327870 made changes that allowed using non-trivial C structs with fields qualified with __strong or __weak. This commit generalizes NRVO, which could only be applied to C++ structs, to cover non-

[PATCH] D44908: [ObjC++] Make parameter passing and function return compatible with ObjC

2018-03-28 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328731: [ObjC++] Make parameter passing and function return compatible with ObjC (authored by ahatanak, committed by ). Changed prior to commit: https://reviews.llvm.org/D44908?vs=139935&id=140137#toc

[PATCH] D44908: [ObjC++] Make parameter passing and function return compatible with ObjC

2018-03-28 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328731: [ObjC++] Make parameter passing and function return compatible with ObjC (authored by ahatanak, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D44536#1039428, @rjmccall wrote: > Hmm. Sema is lazy about actually creating implicit destructor declarations, > but it's supposed to only do it whenever the destructor is actually used for > something. I'm looking at a similar problem wh

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-03-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I see, so Sema::CheckCompletedCXXClass probably isn't the right place to call DeclareImplicitDestructor as that could significantly increase the size of the AST. Repository: rC Clang https://reviews.llvm.org/D44536 ___

[PATCH] D45101: [ObjC] Use the name specified by objc_runtime_name instead of the class identifier

2018-03-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. This patch fixes a few places in CGObjCMac.cpp where the class identifier was used instead of the name specified by objc_runtime_name. rdar://problem/37910822 Repository: rC Clang https://reviews.llvm.org/D45101 Files:

[PATCH] D45101: [ObjC] Use the name specified by objc_runtime_name instead of the class identifier

2018-03-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Note that CGObjCNonFragileABIMac::EmitClassRef also passes the class identifier to CGObjCNonFragileABIMac::EmitClassRefFromId, but it doesn't cause a problem. CGObjCNonFragileABIMac::EmitClassRefFromId uses the identifier only when the ObjCInterfaceDecl passed to it is

[PATCH] D25001: [Module] Merge function prototype with a non-prototype function declaration

2018-04-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak abandoned this revision. ahatanak added a comment. This appears to have been fixed. https://reviews.llvm.org/D25001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45101: [ObjC] Use the name specified by objc_runtime_name instead of the class identifier

2018-04-03 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329128: [ObjC] Use the name specified by objc_runtime_name instead of the class (authored by ahatanak, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[PATCH] D45310: Warn about memcpy'ing non-trivial C structs

2018-04-04 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. Issue a warning when non-trivial C structs (structs with '__weak' or '__strong' fields) are copied or initialized by calls to memset, bzero, memcpy, and memmove. This is similar to gcc's -Wclass-memaccess warning. It might be b

[PATCH] D45310: Warn about memcpy'ing non-trivial C structs

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 141291. ahatanak marked 3 inline comments as done. ahatanak added a comment. Address review comments. Repository: rC Clang https://reviews.llvm.org/D45310 Files: include/clang/AST/NonTrivialTypeVisitor.h include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D45310: Warn about memcpy'ing non-trivial C structs

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/AST/NonTrivialCStructTypeVisitor.h:30 +if (asDerived().getContext().getAsArrayType(FT)) + return asDerived().visitArray(DK, FT, std::forward(Args)...); + rjmccall wrote: > Should you have this pas

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, rsmith. Herald added a subscriber: kristof.beyls. This patch fixes a bug where a struct with an ObjC `__weak` field gets destructed after it has already been destructed. This bug was introduced in r328731, which made changes to

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, rsmith. This patch fixes a bug in r328731 that caused structs with `__weak` fields to be passed in registers. This happens when a struct doesn't have a `__weak` field but one of its subobjects does. To fix this, I added flag CX

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D45384#1060164, @rjmccall wrote: > Well, but I think CanPassInRegisters==false in the base class does always > mean CanPassInRegisters==false in the subclass. I think there are cases that is not true. If I compile the following code, S0 (b

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Yes. I intended it as a property that propagates to classes that contain or derive from the type. Would it make it less confusing if I merged CXXRecordDecl::CanPassInRegisters and RecordDecl::CannotPassInRegisters into a single enum? For example, the enum could have t

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D45382#1060163, @rjmccall wrote: > 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? It seems that it would be OK if ther

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 141471. ahatanak added a comment. Replace flags CanPassInRegisters and CannotPassInRegisters with a 2-bit enum in RecordDecl. Repository: rC Clang https://reviews.llvm.org/D45384 Files: include/clang/AST/Decl.h include/clang/AST/Type.h lib/AST/De

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 141730. ahatanak marked 2 inline comments as done. ahatanak added a comment. Address review comments. Repository: rC Clang https://reviews.llvm.org/D45384 Files: clang/include/clang/AST/Decl.h clang/include/clang/AST/Type.h clang/lib/AST/Decl.cpp

[PATCH] D45384: [ObjC++] Never pass structs with `__weak` fields in registers

2018-04-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak closed this revision. ahatanak added a comment. Committed in r329617. Repository: rC Clang https://reviews.llvm.org/D45384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42776: [Sema] Fix an assertion failure in constant expression evaluation of calls to functions with default arguments

2018-04-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 141788. ahatanak marked an inline comment as done. ahatanak set the repository for this revision to rC Clang. ahatanak added a comment. Use pair as the key. Repository: rC Clang https://reviews.llvm.org/D42776 Files: clang/include/clang/AST/APValue.h

[PATCH] D42776: [Sema] Fix an assertion failure in constant expression evaluation of calls to functions with default arguments

2018-04-09 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329671: [ExprConstant] Use an AST node and a version number as a key to create (authored by ahatanak, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.ll

[PATCH] D39562: [CodeGen][ObjC] Fix an assertion failure caused by copy elision

2017-11-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. Herald added subscribers: kristof.beyls, aemerson. The assertion failure occurs when a setter is called using the dot syntax to set a property of a class type that doesn't have trivial copy/move constructors or assignment operators. It happens only when clang is c

[PATCH] D39562: [CodeGen][ObjC] Fix an assertion failure caused by copy elision

2017-11-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. This is tracked by rdar://problem/34363596. https://reviews.llvm.org/D39562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39762: [ObjC] Boxed strings should use the nullability from stringWithUTF8String's return type

2017-11-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D39762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D39776: [libcxx] Mark test cxa_deleted_virtual.pass.cpp as failing for previous libcxx versions.

2017-11-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D39776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D39913: [ObjC] warn about availability attributes missing from a method's declaration when they're specified for a method's definition

2017-11-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Is it not necessary to print a diagnostic when a non-member function declaration is missing an availability attribute? void foo1(); __attribute__((availability(macos, introduced=10.1))) void foo1() { } Repository: rL LLVM https://reviews.llvm.org/D39913

[PATCH] D40112: [CodeGen][X86] Fix handling of __fp16 vectors

2017-11-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. Herald added a subscriber: javed.absar. IRGen for __fp16 vectors on X86 is currently completely broken. For example when the following code is compiled: half4 hv0, hv1, hv2; // these are vectors of __fp16. void foo221() { hv0 = hv1 + hv2; } clang gen

[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

2023-02-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/Frontend/CompilerInstance.cpp:1093 +StatsFile, EC, +llvm::sys::fs::OF_Append | llvm::sys::fs::OF_TextWithCRLF); if (EC) { `OF_Append` is necessary when the results are written to a single

[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

2023-03-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/test/Driver/save-stats.c:26 // CHECK-LTO: "-plugin-opt=stats-file=save-stats.stats" +// CHECK-LTO: "-plugin-opt=-stats-file-append" Doesn't this require `stats-file-append` to be supported by the plugin just l

[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

2023-03-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/test/Driver/save-stats.c:26 // CHECK-LTO: "-plugin-opt=stats-file=save-stats.stats" +// CHECK-LTO: "-plugin-opt=-stats-file-append" ahatanak wrote: > Doesn't this require `stats-file-append` to be supported by

[PATCH] D83906: [CodeGen] Emit a call instruction instead of an invoke if the called llvm function is marked nounwind

2023-03-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. clang marks the called function `foo` in p1.cpp as nounwind here: https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CodeGenFunction.cpp#L1284 clang can also mark a function declaration as nounwind based on the information in the source code, for example,

[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.

2023-03-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144981/new/ https://reviews.llvm.org/D144981 ___

[PATCH] D154251: Add a flag to disable "duplicate definition of category" warnings

2023-06-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: Bigcheese, vsapsai. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D154251 Files: clang/include/clang/Basic/Diagno

[PATCH] D147263: Fix an assertion failure in unwrapSugar

2023-03-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: mizvekov, arphaman, fahad. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. An assertion in `Qualifiers::addObjCLifetime` fails when the ObjC lifetime bits are already set. Instead

[PATCH] D147283: [Sema] Search template parameter scopes before searching namespace/file scopes when performing unqualified name lookup

2023-03-30 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rsmith, aaron.ballman. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. This fixes a bug where namespace scopes were being searched before template parameter scopes. Delay searching

[PATCH] D143813: [ClangFE] Check that __sync builtins are naturally aligned.

2023-04-10 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I think this patch is causing the assertion in `CodeGenFunction::setAddrOfLocalVar` to fail when the following code is compiled: void foo(unsigned long long t) { __sync_bool_compare_and_swap(({int x = 1; &t;}), t, t); } Could you take a look? Repository: r

[PATCH] D143813: [ClangFE] Check that __sync builtins are naturally aligned.

2023-04-11 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D143813#4257943 , @jonpa wrote: > I don't understand the first argument - I thought it was supposed to be just > an address... It's a statement expression. https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html The value

[PATCH] D147263: Fix an assertion failure in unwrapSugar

2023-04-11 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147263/new/ https://reviews.llvm.org/D147263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D147263: Fix an assertion failure in unwrapSugar

2023-04-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 513010. ahatanak marked an inline comment as done. ahatanak added a comment. Simplify test case and move it to clang/test/SemaCXX/sugar-common-types.cpp. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147263/new

[PATCH] D147263: Fix an assertion failure in unwrapSugar

2023-04-12 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2ba88443b31a: Fix an assertion failure in unwrapSugar (authored by ahatanak). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-05-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148851/new/ https://reviews.llvm.org/D148851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. We found another case where the assertion fails. $ cat test.cpp struct S { int len; int i[]; }; S value{0, 0}; $ clang++ -std=c++11 -c test.cpp `CstSize` is only 4 while `VarSize` is 8. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. The assertion also fails when the following code is compiled: struct S { int i[]; }; S value{0}; According to C99, flexible array members have to belong to structs that have more than one named member. But clang allows that as a GNU extension although gcc seems to

[PATCH] D123649: Allow flexible array initialization in C++.

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Looks like `Init`'s type is wrong. It should be `{ i32, [1 x i32] }` instead of `{ i32, [0 x i32] }` in the case where `S` has two members. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123649/new/ https://reviews.llvm.or

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-22 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: efriedma, aaron.ballman, rjmccall. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. `EmitArrayConstant` was incorrectly returning a zeroinitializer of zero-element array type when th

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 524746. ahatanak added a comment. Fix the desired type of incomplete arrays that is passed to `EmitArrayConstant`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151172/new/ https://reviews.llvm.org/D151172 Fi

[PATCH] D151172: [CodeGen] Fix the type of the constant that is used to zero-initialize a flexible array member

2023-05-23 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6796053723a6: [CodeGen] Fix the type of the constant that is used to zero-initialize a (authored by ahatanak). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. @efriedma do you have any comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142584/new/ https://reviews.llvm.org/D142584 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-02-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 495615. ahatanak marked an inline comment as done. ahatanak added a comment. Instead of pushing an empty lambda scope, switch to the enclosing context if the variable is used in a default argument expression of a lambda call operator. Repository: rG LLV

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-02-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 495619. ahatanak added a comment. Fix indentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143109/new/ https://reviews.llvm.org/D143109 Files: clang/lib/Sema/SemaExpr.cpp clang/test/SemaCXX/lambda-d

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-02-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I agree that pushing an empty scope without initializing any of its members seems wrong. Instead of doing that, the updated patch changes the decl context instead if we are trying to capture a variable in a default argument expression of a lambda call operator. I thin

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 496132. ahatanak marked 4 inline comments as done. ahatanak added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142584/new/ https://reviews.llvm.org/D142584 Files: clang/

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:65 : Pointer(Pointer), ElementType(ElementType) { if (Alignment.isZero()) return; efriedma wrote: > Do you need to do something with IsKnownNonNull in the `Alignment.isZero

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:1723 + Addr = + Addr.withPointer(Builder.CreateThreadLocalAddress(GV), KnownNonNull); `KnownNonNull` is being passed here because the address of a load must be non-null. Do

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 496305. ahatanak added a comment. - Set the `KnownNonNull` bit correctly when `Address::withAlignment` is called. - Pass `NotKnownNonNull` to the call to `Addr.withPointer` when the address of thread local storage is created. Repository: rG LLVM Github M

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:1723 + Addr = + Addr.withPointer(Builder.CreateThreadLocalAddress(GV), KnownNonNull); ahatanak wrote: > `KnownNonNull` is being passed here because the address of a load must

[PATCH] D144016: [Sema] Relax a failing assertion in TransformBlockExpr

2023-02-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: arphaman, fahad, aaron.ballman. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. The assertion fails when the expression causing the this pointer to be captured is part of a constexp

[PATCH] D144016: [Sema] Relax a failing assertion in TransformBlockExpr

2023-02-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 497530. ahatanak added a comment. Add comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144016/new/ https://reviews.llvm.org/D144016 Files: clang/lib/Sema/TreeTransform.h clang/test/CodeGenCXX/cxx1z-

[PATCH] D143109: [Sema] Push a LambdaScopeInfo before calling SubstDefaultArgument

2023-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. @tahonermann @cor3ntin have you had a chance to take a look at the updated patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143109/new/ https://reviews.llvm.org/D143109 ___

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 497719. ahatanak added a comment. Fix type and add comment. Remove unnecessary cast. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142584/new/ https://reviews.llvm.org/D142584 Files: clang/lib/CodeGen/Addre

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG57865bc5ad27: [CodeGen] Add a flag to `Address` and `Lvalue` that is used to keep (authored by ahatanak). Repository: rG LLVM Github Monorepo CHA

[PATCH] D144016: [Sema] Relax a failing assertion in TransformBlockExpr

2023-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 497776. ahatanak added a comment. Add triple to the test and add release note for the fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144016/new/ https://reviews.llvm.org/D144016 Files: clang/docs/Releas

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:67 return; -// Currently the max supported alignment is much less than 1 << 63 and is +// Currently the max supported alignment is much less than 1 << 32 and is // guaranteed to be a power

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a subscriber: aeubanks. ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:67 return; -// Currently the max supported alignment is much less than 1 << 63 and is +// Currently the max supported alignment is much less than 1 << 32

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:67 return; -// Currently the max supported alignment is much less than 1 << 63 and is +// Currently the max supported alignment is much less than 1 << 32 and is // guaranteed to be a power

[PATCH] D144016: [Sema] Relax a failing assertion in TransformBlockExpr

2023-02-16 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGcda4a0e918b5: [Sema] Relax a failing assertion in TransformBlockExpr (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D14

[PATCH] D142584: [CodeGen] Add a boolean flag to `Address::getPointer` and `Lvalue::getPointer` that indicates whether the pointer is known not to be null

2023-02-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/Address.h:67 return; -// Currently the max supported alignment is much less than 1 << 63 and is +// Currently the max supported alignment is much less than 1 << 32 and is // guaranteed to be a power

[PATCH] D144686: [CodeGen] Remove the template specialization of `Address` that stores alignment information into pointers

2023-02-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: aeubanks, efriedma, rjmccall. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. This fixes a bug introduced in https://reviews.llvm.org/D142584. The patch reduced the number of bits u

[PATCH] D144686: [CodeGen] Remove the template specialization of `Address` that stores alignment information into pointers

2023-02-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I don't have a test case for this change because there is a bug that prevents using the maximum allowed alignment (see https://github.com/llvm/llvm-project/issues/60752). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1446

[PATCH] D144686: [CodeGen] Remove the template specialization of `Address` that stores alignment information into pointers

2023-02-24 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 500222. ahatanak added a comment. Remove AddressImpl altogether. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144686/new/ https://reviews.llvm.org/D144686 Files: clang/lib/CodeGen/Address.h Index: clang/l

[PATCH] D144686: [CodeGen] Remove the template specialization of `Address` that stores alignment information into pointers

2023-02-24 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe419e22ff6fd: [CodeGen] Stop storing alignment information into pointers in Address (authored by ahatanak). Repository: rG LLVM Github Monorepo C

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-05-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D148851#4328345 , @shafik wrote: > In D148851#4328084 , @dblaikie > wrote: > >> In D148851#4311266 , @ahatanak >> wrote: >> >>> Disable llvm

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-05-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 520861. ahatanak added a comment. Disable `llvm-symbolizer` individually. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148851/new/ https://reviews.llvm.org/D148851 Files: clang/test/Driver/crash-diagnostic

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-04-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: delcypher, MaskRay, dblaikie. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. These tests don't require invoking llvm-symbolizer. Repository: rG LLVM Github Monorepo https://rev

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-04-20 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. These tests are all timing out after 600 seconds. https://green.lab.llvm.org/green/job/clang-stage1-RA/34005/#showFailuresLink Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148851/new/ https://reviews.llvm.org/D148851 __

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-05-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 518610. ahatanak added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Disable llvm-symbolizer when running lit tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148851/new/

[PATCH] D148851: Disable llvm-symbolizer on some of the driver tests that are timing out

2023-05-01 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 518630. ahatanak added a comment. Enable llvm-symbolizer when running disable-crash-reports.test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148851/new/ https://reviews.llvm.org/D148851 Files: llvm/test/

[PATCH] D151523: [ASTStructuralEquivalence] Fix crash when ObjCCategoryDecl doesn't have corresponding ObjCInterfaceDecl.

2023-06-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D151523#4374808 , @vsapsai wrote: > Kinda a follow-up to D121176 . > > One big alternative that I've considered is to store interface name in > `ObjCCategoryDecl` because when we parse `@inte

[PATCH] D151587: [clang][ConstantEmitter] have tryEmitPrivateForVarInit try ConstExprEmitter fast-path first

2023-06-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In D151587#4397499 , @nickdesaulniers wrote: > In D151587#4397446 , @efriedma > wrote: > >> The following also crashes, with no MaterializeTemporaryExpr involved. >> >> struct X { >>

[PATCH] D152303: [ExprConstant] fix ICE from Evaluate on _Atomic structs

2023-06-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152303/new/ https://reviews.llvm.org/D152303 ___

[PATCH] D152485: Fix regex in test case so that it doesn't match "coverage" in directory names

2023-06-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: tra, MaskRay. ahatanak added a project: clang. Herald added a subscriber: wenlei. Herald added a project: All. ahatanak requested review of this revision. The test case was failing because "-f{{[^"]*coverage.*}}" was matching the following

[PATCH] D152485: Fix regex in test case so that it doesn't match "coverage" in directory names

2023-06-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Example of the test failing: https://green.lab.llvm.org/green/job/coverage/467/consoleText Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152485/new/ https://reviews.llvm.org/D152485 __

[PATCH] D152485: Fix regex in test case so that it doesn't match "coverage" in directory names

2023-06-09 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGde3c01b06fe5: Fix regex in test case so that it doesn't match "coverage" in directory (authored by ahatanak). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D137996: Add support for a backdoor driver option that enables emitting header usage information in JSON to a file

2022-12-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 480101. ahatanak marked an inline comment as done. ahatanak added a comment. Add another environment variable `CC_PRINT_HEADERS_FILTERING`, which can be used to specify whether header information should be filtered or not. Currently, `CC_PRINT_HEADERS_FORMA

[PATCH] D137996: Add support for a backdoor driver option that enables emitting header usage information in JSON to a file

2022-12-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/Frontend/HeaderIncludeGen.cpp:161 + case HIF_Textual: { +assert(!DepOpts.HeaderIncludeFiltering && + "header filtering is currently always disabled when output format is" jansvoboda11 wrote: >

[PATCH] D137996: Add support for a backdoor driver option that enables emitting header usage information in JSON to a file

2022-12-06 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 480737. ahatanak marked 3 inline comments as done. ahatanak added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137996/new/ https://reviews.llvm.org/D137996 Files: clang/

[PATCH] D137996: Add support for a backdoor driver option that enables emitting header usage information in JSON to a file

2022-12-07 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3738ce05a70c: Add support for a backdoor driver option that enables emitting header (authored by ahatanak). Repository: rG LLVM Github Monorepo C

[PATCH] D137996: Add support for a backdoor driver option that enables emitting header usage information in JSON to a file

2022-12-07 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. abc87ad4ed6cc5e6568751f375d1c646edb502f7 should fix the failing test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137996/new/ https://reviews.llvm.o

[PATCH] D137944: [ObjC][ARC] Teach the OptimizeSequences step of ObjCARCOpts about WinEH funclet tokens

2022-12-09 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp:767 +const ColorVector &CV = BlockColors.find(BB)->second; +assert(CV.size() == 1 && "non-unique color for block!"); +BasicBlock *EHPadBB = CV.front(); sgraenitz w

[PATCH] D139713: [Sema] Fix crash when evaluating nested call with value-dependent arg

2022-12-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. I read the patches and review comments in https://reviews.llvm.org/D42776, but I don't remember why I added that assert. Maybe I was just trying to ensure the version number passed to `getTemporary` was the one that was used to create the temporary. For example, if a t

[PATCH] D136639: [CodeGen][ObjC] Fix a memory leak that occurs when a non-trivial C struct property is set using dot notation

2022-12-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/test/CodeGenObjC/nontrivial-c-struct-property.m:89 + +// CHECK: call void @__destructor_8_s0(ptr %[[AGG_TMP_ENSURED]]) + rjmccall wrote: > It looks like we're copying `a` into a temporary and then copying out of t

[PATCH] D27800: Add overload of TransformToPotentiallyEvaluated for TypeSourceInfo

2016-12-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Can you add a test case? https://reviews.llvm.org/D27800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27837: Add fix-it notes to the nullability consistency warning

2016-12-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8772 +def note_nullability_fix_it : Note< + "insert '%select{_Nonnull|_Nullable|_Null_unspecified}0' if the " + "%select{pointer|block pointer|member pointer|array parameter}1 " -

[PATCH] D27837: Add fix-it notes to the nullability consistency warning

2016-12-16 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8772 +def note_nullability_fix_it : Note< + "insert '%select{_Nonnull|_Nullable|_Null_unspecified}0' if the " + "%select{pointer|block pointer|member pointer|array parameter}1 " -

[PATCH] D23096: [Sema] Pass CombineWithOuterScope = true to constructor of LocalInstantiationScope

2016-12-16 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289990: [Sema] Transform the default arguments of a lambda expression when the (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D23096?vs=81171&id=81787#toc Repository: rL LL

<    5   6   7   8   9   10   11   12   13   >