Re: [PATCH] D12922: Add support for function attribute "notail"

2015-10-26 Thread Akira Hatanaka via cfe-commits
ping On Mon, Oct 19, 2015 at 5:59 PM, Akira Hatanaka wrote: > ahatanak updated this revision to Diff 37816. > ahatanak added a comment. > > Address review comments: > > 1. Renamed the attribute to "not_tail_called". > > I chose "not_tail_called" over "notailcall" or "notail" to better > distingu

Re: [PATCH] D13928: [CodeGen] Attach function attributes to Objective-c and OpenMP functions.

2015-10-27 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. I'm taking incremental steps here, but I agree that we should refactor this in a better way later. http://reviews.llvm.org/D13928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

r251476 - [CodeGen] Attach function attributes to Objective-C and OpenMP

2015-10-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Oct 27 21:30:47 2015 New Revision: 251476 URL: http://llvm.org/viewvc/llvm-project?rev=251476&view=rev Log: [CodeGen] Attach function attributes to Objective-C and OpenMP functions. This commit fixes a bug in CGOpenMPRuntime.cpp and CGObjC.cpp where some of the function

Re: [PATCH] D13928: [CodeGen] Attach function attributes to Objective-c and OpenMP functions.

2015-10-27 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL251476: [CodeGen] Attach function attributes to Objective-C and OpenMP (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D13928?vs=37967&id=38619#toc Repository: rL LLVM http:

r251477 - Add a test case for r251476.

2015-10-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Oct 27 21:32:19 2015 New Revision: 251477 URL: http://llvm.org/viewvc/llvm-project?rev=251477&view=rev Log: Add a test case for r251476. Added: cfe/trunk/test/OpenMP/function-attr.cpp Added: cfe/trunk/test/OpenMP/function-attr.cpp URL: http://llvm.org/viewvc/llvm-

r251734 - [CodeGen] Call SetInternalFunctionAttributes to attach function

2015-10-30 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Oct 30 20:28:07 2015 New Revision: 251734 URL: http://llvm.org/viewvc/llvm-project?rev=251734&view=rev Log: [CodeGen] Call SetInternalFunctionAttributes to attach function attributes to internal functions. This patch fixes CodeGenModule::CreateGlobalInitOrDestructFuncti

Re: [PATCH] D13610: [CodeGen] Fix CodeGenModule::CreateGlobalInitOrDestructFunction

2015-10-30 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL251734: [CodeGen] Call SetInternalFunctionAttributes to attach function (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D13610?vs=37001&id=38835#toc Repository: rL LLVM http

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-01 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5374 @@ +5373,3 @@ + + // Virtual functions cannot be marked as 'notail'. + if (auto *Attr = ND.getAttr()) aaron.ballman wrote: > Is there a reason this is here instead of SemaDeclAttr.cpp? It see

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-02 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 38967. ahatanak added a comment. Fixed test cases: - Added a test case for the attribute being specified on a variable. - Added a missing 's' to "virtual function" in the check strings. http://reviews.llvm.org/D12922 Files: include/clang/Basic/Attr.td

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-02 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: test/Sema/attr-notail.c:9 @@ +8,3 @@ +} + +int g0 __attribute__((not_tail_called)); // expected-warning {{'not_tail_called' attribute only applies to functions}} I didn't understand what kind of test case is required fo

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-02 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 39003. ahatanak added a comment. Added test case that produces an error diagnostic if an argument is passed for not_tail_called. http://reviews.llvm.org/D12922 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/Di

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-02 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5374 @@ +5373,3 @@ + + // Virtual functions cannot be marked as 'notail'. + if (auto *Attr = ND.getAttr()) aaron.ballman wrote: > I am not home yet, and so I don't have the source code to try this

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-04 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Thanks, I'll see how the review for the llvm-side patch goes and commit both patches after it is approved. http://reviews.llvm.org/D12922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

Re: [PATCH] D13834: Produce a better diagnostic for global register variables

2015-11-04 Thread Akira Hatanaka via cfe-commits
ping On Fri, Oct 16, 2015 at 2:51 PM, Akira Hatanaka wrote: > ahatanak created this revision. > ahatanak added a subscriber: cfe-commits. > > clang doesn't print a very user-friendly message when an invalid register > is used for a global register variable: > > For example, when the following co

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-11-06 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. I intend to change the documentation, but other than that there should be no changes. I'll upload a rebased patch after I commit the other tail call patches. http://reviews.llvm.org/D12547 ___ cfe-commits mailing list cfe

r252369 - Add support for function attribute 'not_tail_called'.

2015-11-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Nov 6 17:56:15 2015 New Revision: 252369 URL: http://llvm.org/viewvc/llvm-project?rev=252369&view=rev Log: Add support for function attribute 'not_tail_called'. This attribute is used to prevent tail-call optimizations to the marked function. For example, in the follow

Re: [PATCH] D12922: Add support for function attribute "notail"

2015-11-06 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL252369: Add support for function attribute 'not_tail_called'. (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D12922?vs=39003&id=39607#toc Repository: rL LLVM http://reviews

r252376 - Use regex in test case.

2015-11-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Nov 6 18:48:18 2015 New Revision: 252376 URL: http://llvm.org/viewvc/llvm-project?rev=252376&view=rev Log: Use regex in test case. This is a follow-up to r252369. Modified: cfe/trunk/test/CodeGen/attr-no-tail.c Modified: cfe/trunk/test/CodeGen/attr-no-tail.c URL:

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2015-11-06 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Send the patch to cfe-commits. http://reviews.llvm.org/D14471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 39702. ahatanak added a comment. I ended up making a few more changes based on the feedback on the not_tail_called attribute: - Changed wording in docs and added a code example. - Made changes to detect both (naked,disable_tail_calls) and (disable_tail_cal

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2015-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Hi Renato In http://reviews.llvm.org/D14471#285138, @rengolin wrote: > I'm uncomfortable with this change, since it introduces a dependency between > the two calls, and that's fragile. Also, the nullptr fiddling is not a good > design overall. > > If there is a depend

Re: [PATCH] D13834: Produce a better diagnostic for global register variables

2015-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 39774. ahatanak added a comment. Added comments to clarify what the code is doing. http://reviews.llvm.org/D13834 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/TargetInfo.h lib/Basic/Targets.cpp lib/Sema/SemaDecl.cpp test/

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2015-11-10 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. I think I understand some of your concerns, but I'm not sure I fully understand what you are suggesting. I think I can use macro __aarch64__ to have getAArch64TargetCPU return "native" when the compiler is not run on an AArch64 platform, but it doesn't sound like that

r252693 - Reorder the check strings in test case following r252692.

2015-11-10 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Nov 10 20:13:36 2015 New Revision: 252693 URL: http://llvm.org/viewvc/llvm-project?rev=252693&view=rev Log: Reorder the check strings in test case following r252692. rdar://problem/19836465 Modified: cfe/trunk/test/CodeGen/ms-declspecs.c Modified: cfe/trunk/test/C

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-11-11 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Marking virtual functions as disable_tail_calls is fine since disable_tail_calls affects the call sites inside the body of the marked function. In your example, it prevents tail call optimization on call sites inside B::g, but doesn't affect call sites in D::g. http:

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2015-11-11 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In http://reviews.llvm.org/D14471#287412, @rengolin wrote: > In http://reviews.llvm.org/D14471#286380, @ahatanak wrote: > > > I think I can use macro __aarch64__ to have getAArch64TargetCPU return > > "native" when the compiler is not run on an AArch64 platform, but it

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2015-11-11 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Sorry, there were mistakes in my comments. What I meant to say is that changing getAArch64TargetCPU to return "native" would break the case where clang is being run on an aarch64 host. The current code in trunk will get the host cpu name (which I believe is currently a

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Akira Hatanaka via cfe-commits
I think you are suggesting we change the inliner to produce a diagnostic (error or warning?) when the callee is marked always_inline and its function attributes are not compatible with the caller's (functionsHaveCompatibleAttributes returns false). Is that correct? On Wed, Nov 11, 2015 at 4:48 PM,

Re: r252834 - Provide a frontend based error for always_inline functions that require

2015-11-11 Thread Akira Hatanaka via cfe-commits
Currently, we inline a function only if the call to isInlineViable returns true, which means there are cases where we don't inline functions marked always_inline. Is there a reason we haven't made changes to produce any diagnostic in those cases? The comment also says "should be inlined whenever po

r252849 - [AttrDocs] Insert blank lines before and after code-block directives.

2015-11-11 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Nov 11 20:41:56 2015 New Revision: 252849 URL: http://llvm.org/viewvc/llvm-project?rev=252849&view=rev Log: [AttrDocs] Insert blank lines before and after code-block directives. The code snippets were not being displayed. This commit fixes the bug. Modified: cfe/tr

Re: [PATCH] D12547: Add support for function attribute "disable_tail_calls"

2015-11-11 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 40011. ahatanak added a comment. Address review comments. http://reviews.llvm.org/D12547 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/CodeGen/CGCall.cpp lib/Sema/SemaDeclAttr.cpp test/CodeGen/attr-disable-tail-calls.c

[PATCH] D11815: Pass subtarget feature "force-align-stack"

2015-08-06 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: echristo, dexonsmith. ahatanak added a subscriber: cfe-commits. This patch makes changes to pass subtarget feature "force-align-stack" instead of passing a backend-option when users provide "-mstackrealign" on the command line. The llvm-

Re: [PATCH] D22392: [Sema] Fix an invalid nullability warning for binary conditional operators

2016-07-19 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 64551. ahatanak added a comment. Address review comments. - Rename function to computeConditionalNullability. - Rewrite the function to compute the nullability of both normal and binary conditional expressions. - Add more test cases. https://reviews.llvm.

Re: [PATCH] D22392: [Sema] Fix an invalid nullability warning for binary conditional operators

2016-07-19 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 64557. ahatanak added a comment. Remove the check "if (LHSKind == RHSKind)" in computeConditionalNullability as it's not needed. https://reviews.llvm.org/D22392 Files: lib/Sema/SemaExpr.cpp test/Sema/nullability.c test/SemaCXX/nullability.cpp Index

Re: [PATCH] D21453: Add support for attribute "overallocated"

2016-07-19 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. ping https://reviews.llvm.org/D21453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r276076 - [Sema] Compute the nullability of a conditional expression based on the

2016-07-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Jul 19 20:48:11 2016 New Revision: 276076 URL: http://llvm.org/viewvc/llvm-project?rev=276076&view=rev Log: [Sema] Compute the nullability of a conditional expression based on the nullabilities of its operands. This patch defines a function to compute the nullability of

Re: [PATCH] D22392: [Sema] Fix an invalid nullability warning for binary conditional operators

2016-07-19 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL276076: [Sema] Compute the nullability of a conditional expression based on the (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D22392?vs=64557&id=64628#toc Repository: rL L

Re: [PATCH] D15075: No error for conflict between inputs\outputs and clobber list

2016-07-21 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D15075#486986, @zizhar wrote: > Akira, > You've mentioned a good point, this X86 logic should indeed be moved to > X86TargetInfo. > The current convertConstraint() implementation is not doing what I need – it > doesn’t handle all the input

r276696 - [Sema][ObjC] Compute the nullability of a conditional expression based

2016-07-25 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Jul 25 16:58:19 2016 New Revision: 276696 URL: http://llvm.org/viewvc/llvm-project?rev=276696&view=rev Log: [Sema][ObjC] Compute the nullability of a conditional expression based on the nullabilities of its operands. This commit is a follow-up to r276076 and enables com

Re: [PATCH] D22391: [Sema] Add warning for implicitly casting a null constant to a non null pointer type

2016-07-25 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 65446. ahatanak added a comment. Addressed review comment and made a couple of other changes. - Move Sema::diagnoseNullPtrToNonnullCast to SemaChecking.cpp. - In diagnoseNullPtrToNonnullCast, call "Type::isAnyPointerType" instead of "Type::isPointerType" so

[PATCH] D22794: [Sema] Propagate nullability when deducing type of auto

2016-07-25 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: doug.gregor. ahatanak added a subscriber: cfe-commits. This patch fixes Sema to propagate the nullability of the initializer expression of a variable declared with auto or __auto_type to the deduced type. The patch consists of two parts:

Re: [PATCH] D22857: [ARM] Add a test for inline assembly when targeting armv7-windows

2016-07-27 Thread Akira Hatanaka via cfe-commits
ahatanak added a subscriber: ahatanak. ahatanak added a comment. Is r276859 fixing a bug in the assembler? I'm trying to understand why we have to add a clang test in this particular case because I don't think we normally add a test in clang every time we fix a bug in the backend or assembler.

[PATCH] D22929: [CodeGen][ObjC] Fix infinite recursion in getObjCEncodingForTypeImpl

2016-07-28 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: doug.gregor, akyrtzi. ahatanak added a subscriber: cfe-commits. This patch fixes a stack overflow bug in ASTContext::getObjCEncodingForTypeImpl where it keeps expanding a class recursively. I added a check to avoid expanding a class if Ex

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

2016-08-02 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rsmith, sepavloff. ahatanak added a subscriber: cfe-commits. This fixes PR28795. https://llvm.org/bugs/show_bug.cgi?id=28795 Sema wasn't replacing DependentScopeDeclRefExpr with DeclRefExpr during template instantiation of the default ar

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-08-03 Thread Akira Hatanaka via cfe-commits
ahatanak added a subscriber: ahatanak. ahatanak added a comment. I'm wondering what the status of this patch is since someone has asked us to add support for this attribute in clang. Are you still waiting for review? Comment at: test/CodeGenCXX/alloc-size.cpp:66 @@ +65,3 @@ +

Re: [PATCH] D21453: Add support for attribute "overallocated"

2016-08-03 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. ping https://reviews.llvm.org/D21453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-08-03 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. OK, I'll add the test. When I apply this patch and compile your test, I see DependentScopeDeclRefExpr gets converted to DeclRefExpr when the function is instantiated. This doesn't happen without this patch, but somehow clang still manages to emit the same code. Also,

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-08-03 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: test/CodeGenCXX/alloc-size.cpp:66 @@ +65,3 @@ + // CHECK: ret i32 122 + return __builtin_object_size(my_malloc(), 0) + + __builtin_object_size(my_calloc(5), 0) + george.burgess.iv wrote: > ahatanak wrote: > > I

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

2016-08-03 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In each of these cases, "foo::a" is a non-dependent type, so it seems that clang shouldn't use DependentScopeDeclRefExpr or CXXDependentScopeMemberExpr in the AST when the template definitions are parsed. https://reviews.llvm.org/D23096

Re: [PATCH] D23236: When ARC is enabled, no warning will be generated when a method1. Returns 'nil' in a method that is attributed to return a 'nonnull'2. The return-statement is a ConditionalOperator

2016-08-08 Thread Akira Hatanaka via cfe-commits
ahatanak added a subscriber: cfe-commits. ahatanak added a comment. +cfe-commits If this patch is applied, does clang issue a warning if a method marked "nonnull" returns a null value? I see a warning is issued for conditional expressions in the test case you've added, but I don't see a test ca

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

2016-08-10 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 67623. ahatanak added a comment. Handle the case in which the enum is declared inside a member function and add test cases. The variable template test case still crashes. It looks like it crashes whenever the lambda expression takes a default argument: te

Re: [PATCH] D14471: [AArch64] Fix a crash in driver

2016-02-02 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 46725. ahatanak added a comment. Sorry for taking so long to get back to this patch. I've updated the patch based on your review comments. I defined a new helper function getAArch64FeaturesFromCPU which gets the target features from the cpu name and checks

[PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-02 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: doug.gregor, rjmccall, vsk. ahatanak added a subscriber: cfe-commits. This patch fixes a bug in the code between line 117-126 of TypeLocBuilder.cpp which was causing the assert in line 132. The bug manifests itself when an element of size

[PATCH] D16914: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

2016-02-04 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a subscriber: cfe-commits. The assert near CGCall.cpp:2465 is triggered because QualType::isObjCRetainableType() is called on different types. In CodeGenFunction::StartFunction, it returns true because it is called on the typedef marked with __attr

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-05 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 47037. ahatanak added a comment. Fixed a couple of bugs: - Make sure Capacity is a multiple of 8-byte. - "||=" isn't a valid operator. Use "||" instead. http://reviews.llvm.org/D16843 Files: lib/Sema/TypeLocBuilder.cpp lib/Sema/TypeLocBuilder.h test

Re: [PATCH] D16914: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

2016-02-05 Thread Akira Hatanaka via cfe-commits
I agree with you, that was actually what John suggested too. I'll update the patch shortly. On Fri, Feb 5, 2016 at 3:38 PM, Duncan P. N. Exon Smith < dexonsm...@apple.com> wrote: > > > On 2016-Feb-04, at 18:54, Akira Hatanaka via cfe-commits < > cfe-com

Re: [PATCH] D16914: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

2016-02-05 Thread Akira Hatanaka via cfe-commits
ahatanak added a reviewer: rjmccall. ahatanak updated this revision to Diff 47062. ahatanak added a comment. Enclose the code with "#ifndef NDEBUG". http://reviews.llvm.org/D16914 Files: lib/CodeGen/CGCall.cpp test/CodeGenObjCXX/auto-release-result-assert.mm Index: test/CodeGenObjCXX/auto-

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-09 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 47413. ahatanak added a comment. Rename and add variables. Add comments to make it clearer what the code is doing. http://reviews.llvm.org/D16843 Files: lib/Sema/TypeLocBuilder.cpp lib/Sema/TypeLocBuilder.h test/SemaObjCXX/typeloc-data-alignment.mm

r260360 - [Sema] Issue a warning for integer overflow in nested struct initializer

2016-02-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Feb 10 00:06:06 2016 New Revision: 260360 URL: http://llvm.org/viewvc/llvm-project?rev=260360&view=rev Log: [Sema] Issue a warning for integer overflow in nested struct initializer r257357 fixed clang to warn on integer overflow in struct initializers. However, it didn'

r260496 - [Objective-c] Stop attaching section "datacoal_nt" to global variables.

2016-02-10 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Feb 11 00:36:35 2016 New Revision: 260496 URL: http://llvm.org/viewvc/llvm-project?rev=260496&view=rev Log: [Objective-c] Stop attaching section "datacoal_nt" to global variables. The current macho linker just copies symbols in section datacoal_nt to section data, so it

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-15 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 48033. ahatanak added a comment. The bug is in the handling of elements whose LocalAlignment is 8, so I've fixed just that part. I'll resend a patch to simplify the logic of TypeLocBuilder::pushImpl later as it's not urgent. http://reviews.llvm.org/D1684

r260921 - Remove unnecessary regex in the test cases I fixed in r260496.

2016-02-15 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Feb 15 18:46:03 2016 New Revision: 260921 URL: http://llvm.org/viewvc/llvm-project?rev=260921&view=rev Log: Remove unnecessary regex in the test cases I fixed in r260496. Modified: cfe/trunk/test/CodeGenObjC/exceptions-asm-attribute.m cfe/trunk/test/CodeGenObjC/

Re: r260496 - [Objective-c] Stop attaching section "datacoal_nt" to global variables.

2016-02-15 Thread Akira Hatanaka via cfe-commits
Thanks for the catch! Those checks aren’t necessary at all. I’ve removed them in r260921. > On Feb 14, 2016, at 1:08 PM, Duncan P. N. Exon Smith > wrote: > > >> On 2016-Feb-10, at 22:36, Akira Hatanaka via cfe-commits >> wrote: >> >> Author: ahatan

Re: [PATCH] D16914: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

2016-02-17 Thread Akira Hatanaka via cfe-commits
ahatanak added a reviewer: manmanren. ahatanak added a comment. ping http://reviews.llvm.org/D16914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r261151 - [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

2016-02-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Feb 17 15:09:50 2016 New Revision: 261151 URL: http://llvm.org/viewvc/llvm-project?rev=261151&view=rev Log: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog The assert is triggered because isObjCRetainableType() is called on the canonicalized return type t

Re: [PATCH] D16914: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog

2016-02-17 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261151: [CodeGen] Fix an assert in CodeGenFunction::EmitFunctionEpilog (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D16914?vs=47062&id=48232#toc Repository: rL LLVM http:

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-17 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 48241. ahatanak added a comment. Address some of Manman's review comments. - Add comments that explain what the code is doing (I should add some high-level comments too later). - Simplify the if-else statement. I haven't implemented the other changes you'v

[PATCH] D17355: [Sema] Remove assert in TreeTransform::TransformObjCObjectType

2016-02-17 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: doug.gregor. ahatanak added a subscriber: cfe-commits. The assert is triggered when there is a template function whose return type is a protocol without an object type (e.g., ""). clang treats such a protocol as a synonym for "id" and se

Re: [PATCH] D17355: [Sema] Remove assert in TreeTransform::TransformObjCObjectType

2016-02-17 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Note that the test case currently asserts. The patch that is currently under review in http://reviews.llvm.org/D16843 has to be applied first. http://reviews.llvm.org/D17355 ___ cfe-commits mailing list cfe-commits@lists.l

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-17 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. OK, I now understand what you meant. > How about the following? > > else if (LocalAlignment == 8) { > if (NumBytesAtAlign8 == 0) { > // We have not seen any 8-byte aligned element yet. There is no padding > and we are either 4-byte > // aligned o

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-18 Thread Akira Hatanaka via cfe-commits
On Thu, Feb 18, 2016 at 8:10 AM, Manman Ren wrote: > > > On Wed, Feb 17, 2016 at 10:33 PM, Akira Hatanaka > wrote: > >> ahatanak added a comment. >> >> OK, I now understand what you meant. >> >> > How about the following? >> >> > >> >> > else if (LocalAlignment == 8) { >> >> > if (NumBytes

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-18 Thread Akira Hatanaka via cfe-commits
On Thu, Feb 18, 2016 at 8:47 AM, Akira Hatanaka wrote: > On Thu, Feb 18, 2016 at 8:10 AM, Manman Ren wrote: > >> >> >> On Wed, Feb 17, 2016 at 10:33 PM, Akira Hatanaka >> wrote: >> >>> ahatanak added a comment. >>> >>> OK, I now understand what you meant. >>> >>> > How about the following? >>>

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-18 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 48384. ahatanak added a comment. Address Manman's review comments. Handle elements with "LocalAlignment == 8" similarly to those with "LocalAlignment == 4". http://reviews.llvm.org/D16843 Files: lib/Sema/TypeLocBuilder.cpp test/SemaObjCXX/typeloc-data

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-18 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 48387. ahatanak added a comment. Fix indentation. http://reviews.llvm.org/D16843 Files: lib/Sema/TypeLocBuilder.cpp test/SemaObjCXX/typeloc-data-alignment.mm Index: test/SemaObjCXX/typeloc-data-alignment.mm

r261260 - [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-18 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Feb 18 15:05:09 2016 New Revision: 261260 URL: http://llvm.org/viewvc/llvm-project?rev=261260&view=rev Log: [Sema] Fix bug in TypeLocBuilder::pushImpl The code in TypeLocBuilder::pushImpl wasn't correctly handling the case where an element that has an 8-byte alignment w

Re: [PATCH] D16843: [Sema] Fix bug in TypeLocBuilder::pushImpl

2016-02-18 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261260: [Sema] Fix bug in TypeLocBuilder::pushImpl (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D16843?vs=48387&id=48392#toc Repository: rL LLVM http://reviews.llvm.org/D

Re: [PATCH] D17355: [Sema] Remove assert in TreeTransform::TransformObjCObjectType

2016-02-24 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Is this OK to commit? I've committed the patch to fix the TypeLocBuilder bug in r261260. http://reviews.llvm.org/D17355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

Re: [PATCH] D17355: [Sema] Remove assert in TreeTransform::TransformObjCObjectType

2016-02-24 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Thanks, I'll commit this shortly. http://reviews.llvm.org/D17355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r261829 - [Sema] Remove assert in TreeTransform::TransformObjCObjectType.

2016-02-24 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Feb 25 01:08:33 2016 New Revision: 261829 URL: http://llvm.org/viewvc/llvm-project?rev=261829&view=rev Log: [Sema] Remove assert in TreeTransform::TransformObjCObjectType. The assert isn't correct since TypeLoc::ObjCObjectTypeLoc doesn't indicate whether the type is a d

Re: [PATCH] D17355: [Sema] Remove assert in TreeTransform::TransformObjCObjectType

2016-02-24 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL261829: [Sema] Remove assert in TreeTransform::TransformObjCObjectType. (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D17355?vs=48247&id=49012#toc Repository: rL LLVM http

r261976 - [Driver] Disable frame pointer elimination by default if target is

2016-02-25 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Feb 25 23:07:00 2016 New Revision: 261976 URL: http://llvm.org/viewvc/llvm-project?rev=261976&view=rev Log: [Driver] Disable frame pointer elimination by default if target is x86_64-pc-win32-macho. rdar://problem/24470634 Modified: cfe/trunk/lib/Driver/Tools.cpp

Re: [PATCH] D15599: [CodeGen] Fix a crash that occurs when attribute "naked" is attached to a c++ member function

2016-02-26 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 49213. ahatanak added a comment. ping and rebase. http://reviews.llvm.org/D15599 Files: lib/CodeGen/CGCall.cpp lib/CodeGen/CGStmt.cpp lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenFunction.h test/CodeGen/attr-naked.c test/CodeGenCXX/attr-n

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-26 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. I'm looking for a way to avoid the assert in Sema::PerformDependentDiagnostics that is fired when a template parameter doesn't have a name. In order to avoid the assert, CXXRecordDecl::isDependentLambda() should return true for the old lambda class, and in order to do

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-27 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 55356. ahatanak added a comment. Made a couple of changes to distinguish between an explicit specialization ('template<>') and a template declaration which doesn't have a named template parameter (see the variable template fn0 in test case vartemplate-lambd

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-28 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 55453. ahatanak added a comment. Use ParseScopeFlags to clear the TemplateParamScope rather than calling setFlags directly. I tried calling Init(AnyParent, F) is Scope::setFlags, but it caused a lot of test cases to fail, which I'm currently investigating.

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-28 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. If I try calling Init(AnyParent, F) in Scope::setFlags, clang fails to compile the following code because it cannot find the definition of struct "foo": void foo3(void) struct foo { int a, f; }; char *np = nullptr; int *ip = &(((struct foo *)np)

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-28 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 55484. ahatanak added a comment. - Defined a private overload of Scope::setFlags which is called from Scope::setFlags and Scope::Init. - Stop checking TmplScope->isTemplateParamScope() in Sema::ActOnStartOfLambdaDefinition. - Fix test case test/CXX/drs/dr1x

r267956 - [Sema] Fix a crash that occurs when a variable template is initialized

2016-04-28 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Apr 28 18:50:12 2016 New Revision: 267956 URL: http://llvm.org/viewvc/llvm-project?rev=267956&view=rev Log: [Sema] Fix a crash that occurs when a variable template is initialized with a generic lambda. This patch fixes Sema::InstantiateVariableInitializer to switch to t

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-28 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL267975: [Parser] Clear the TemplateParamScope bit of the current scope's flag (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D19175?vs=55484&id=55523#toc Repository: rL LLVM

r267975 - [Parser] Clear the TemplateParamScope bit of the current scope's flag

2016-04-28 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Apr 28 21:24:14 2016 New Revision: 267975 URL: http://llvm.org/viewvc/llvm-project?rev=267975&view=rev Log: [Parser] Clear the TemplateParamScope bit of the current scope's flag if we are parsing a template specialization. This commit makes changes to clear the Template

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-28 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Thanks for the review. I committed the patch in r267956 and r267975. Do you think I should make setFlags(unsigned F) return early if F == Flags? Repository: rL LLVM http://reviews.llvm.org/D19175 ___ cfe-commits mailing

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-29 Thread Akira Hatanaka via cfe-commits
6 at 7:34 PM, Akira Hatanaka via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > ahatanak added a comment. > > Thanks for the review. I committed the patch in r267956 and r267975. > > Do you think I should make setFlags(unsigned F) return early if F == Flags? >

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-29 Thread Akira Hatanaka via cfe-commits
11:07 AM, Akira Hatanaka via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > If I add an assert to check (F != Flags) in setFlags, 2700+ out of 5000+ > clang regression tests fail. I haven’t figured out which parts of clang are > passing the same value to setFlags. >

Re: [PATCH] D19175: Fix for PR27015 (variable template initialized with a generic lambda expression)

2016-04-29 Thread Akira Hatanaka via cfe-commits
PM, Richard Smith wrote: > > On Fri, Apr 29, 2016 at 12:12 PM, Akira Hatanaka via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > Scope’s constructor passes the parameter ScopeFlags to Scope::Init, which > calls setFlags(Scope *parent, unsigned flags) and setFlags ini

r268314 - [CodeGenObjCXX] Don't rematerialize default arguments of function

2016-05-02 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon May 2 16:52:57 2016 New Revision: 268314 URL: http://llvm.org/viewvc/llvm-project?rev=268314&view=rev Log: [CodeGenObjCXX] Don't rematerialize default arguments of function parameters in the body of a block. This fixes a bug where clang would materialize the default ar

Re: r268314 - [CodeGenObjCXX] Don't rematerialize default arguments of function

2016-05-02 Thread Akira Hatanaka via cfe-commits
I see. Perhaps this should be an assert? > On May 2, 2016, at 3:05 PM, Richard Smith wrote: > > On Mon, May 2, 2016 at 2:52 PM, Akira Hatanaka via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > Author: ahatanak > Date: Mon May 2 16:52:57 2016 > New Revi

Re: r268314 - [CodeGenObjCXX] Don't rematerialize default arguments of function

2016-05-02 Thread Akira Hatanaka via cfe-commits
It looks like turning it to an assert wouldn’t be correct, I’ll probably just remove it. > On May 2, 2016, at 3:12 PM, Akira Hatanaka via cfe-commits > wrote: > > I see. Perhaps this should be an assert? > >> On May 2, 2016, at 3:05 PM, Richard Smith > <mailto:ri

r268318 - Remove unneeded test in tryCaptureAsConstant.

2016-05-02 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon May 2 17:29:40 2016 New Revision: 268318 URL: http://llvm.org/viewvc/llvm-project?rev=268318&view=rev Log: Remove unneeded test in tryCaptureAsConstant. It isn't necessary to call hasDefaultArg because we can't rematerialize a captured variable that is a function param

Re: [PATCH] D19536: [CodeGenObjCXX] Fix handling of blocks in lambda

2016-05-02 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:806 @@ -792,1 +805,3 @@ + } + src = Builder.CreateStructGEP(Addr, Idx, Offset, FD->getName()); } else { rjmccall wrote: > Hmm. It's become increasingly clear that my original deci

Re: r268314 - [CodeGenObjCXX] Don't rematerialize default arguments of function

2016-05-02 Thread Akira Hatanaka via cfe-commits
Thanks, fixed in r268318. > On May 2, 2016, at 3:05 PM, Richard Smith wrote: > > On Mon, May 2, 2016 at 2:52 PM, Akira Hatanaka via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > Author: ahatanak > Date: Mon May 2 16:52:57 2016 > New Revision: 26831

<    2   3   4   5   6   7   8   9   10   11   >