r278956 - [CodeGen][ObjC] Fix infinite recursion in getObjCEncodingForTypeImpl.

2016-08-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Aug 17 14:42:22 2016 New Revision: 278956 URL: http://llvm.org/viewvc/llvm-project?rev=278956&view=rev Log: [CodeGen][ObjC] Fix infinite recursion in getObjCEncodingForTypeImpl. Check that ExpandStructures is true before visiting the list of ivars. rdar://problem/27135

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

2016-08-17 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL278956: [CodeGen][ObjC] Fix infinite recursion in getObjCEncodingForTypeImpl. (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D22929?vs=65969&id=68400#toc Repository: rL LLV

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-08-18 Thread Akira Hatanaka via cfe-commits
ahatanak added a subscriber: ahatanak. ahatanak added a comment. Thanks Vedant, this also fixes the crash that occurs when -mtune=native is provided. https://reviews.llvm.org/D14471. Comment at: lib/Driver/Tools.cpp:1163 @@ -1162,3 +1162,3 @@ // FIXME: Should this be picked

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-08-18 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Driver/Tools.cpp:1163 @@ -1162,3 +1162,3 @@ // FIXME: Should this be picked by checking the target triple instead? - if (Args.getLastArg(options::OPT_arch)) + if ((A = Args.getLastArg(options::OPT_arch))) return "cyclone";

Re: r278984 - Add test missed from r278983.

2016-08-22 Thread Akira Hatanaka via cfe-commits
Hi Richard, This test has been failing since it was committed. http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_check/2277/ > On Aug 17, 2016, at 2:42 PM, Richard Smith via cfe-commits > wrote: > > Author: rsmith > Date: Wed Aug 17 16:42:10 2016 > New Revision: 278984 > > URL: htt

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-23 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D23236#523173, @parallaxe wrote: > In https://reviews.llvm.org/D23236#509013, @ahatanak wrote: > > > +cfe-commits > > > > If this patch is applied, does clang issue a warning if a method marked > > "nonnull" returns a null value? I see a warn

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

2016-08-25 Thread Akira Hatanaka via cfe-commits
ahatanak abandoned this revision. ahatanak added a comment. Abandoning this revision. It looks like we cannot correctly implement this warning without introducing a lot of complexity to clang. Users can use the static analyzer instead as it already warns about this case. https://reviews.llvm.

Re: r262189 - [modules] Prefer more complete array types.

2016-08-31 Thread Akira Hatanaka via cfe-commits
Vassil and Richard, After this commit, clang errors out when compiling the following code, which used to compile without any errors. $ cat f2.cpp extern int compile_time_assert_failed[1]; template class C { enum { D }; public: template void foo1() { extern int compile_time_assert_failed[ (

[PATCH] D24110: [Sema] Don't diagnose an array type mismatch when the new or previous declaration has a dependent type

2016-08-31 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: v.g.vassilev, rsmith. ahatanak added a subscriber: cfe-commits. We shouldn't compare the bounds of two arrays and issue a diagnostic if one of them is dependent. https://reviews.llvm.org/D24110 Files: lib/Sema/SemaDecl.cpp test/SemaT

Re: r262189 - [modules] Prefer more complete array types.

2016-08-31 Thread Akira Hatanaka via cfe-commits
I’ve come up with a patch and sent it to the list today since it is urgent to fix. https://reviews.llvm.org/D24110 Thank you. > On Aug 31, 2016, at 1:50 PM, Vassil Vassilev wrote: > > Hi Akira, > Thanks for your email. I am on vacation right now and I will

Re: [PATCH] D24110: [Sema] Don't diagnose an array type mismatch when the new or previous declaration has a dependent type

2016-08-31 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaDecl.cpp:3377-3378 @@ -3376,4 +3376,4 @@ if (!Context.hasSameType(NewArray, PrevVDTy)) return diagnoseVarDeclTypeMismatch(*this, New, PrevVD); } rsmith wrote: > If you do u

Re: [PATCH] D24110: [Sema] Don't diagnose an array type mismatch when the new or previous declaration has a dependent type

2016-08-31 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaDecl.cpp:3377-3378 @@ -3376,4 +3376,4 @@ if (!Context.hasSameType(NewArray, PrevVDTy)) return diagnoseVarDeclTypeMismatch(*this, New, PrevVD); } rsmith wrote: > ahatanak wr

Re: [PATCH] D24110: [Sema] Don't diagnose an array type mismatch when the new or previous declaration has a dependent type

2016-08-31 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. I'll commit the patch as-is first and come up with a new patch which implements the improvements you suggested later. https://reviews.llvm.org/D24110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

r280330 - [Sema] Don't diagnose an array type mismatch when the new or previous

2016-08-31 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Aug 31 20:03:21 2016 New Revision: 280330 URL: http://llvm.org/viewvc/llvm-project?rev=280330&view=rev Log: [Sema] Don't diagnose an array type mismatch when the new or previous declaration has a dependent type. This fixes a bug where clang errors out on a valid code.

Re: [PATCH] D24110: [Sema] Don't diagnose an array type mismatch when the new or previous declaration has a dependent type

2016-08-31 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280330: [Sema] Don't diagnose an array type mismatch when the new or previous (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D24110?vs=69927&id=69935#toc Repository: rL LLV

Re: [PATCH] D21678: Fix For pr28288 - Error message in shift of vector values

2016-09-01 Thread Akira Hatanaka via cfe-commits
ahatanak added a subscriber: ahatanak. ahatanak added a comment. This patch causes clang to error out on the following code, which used to compile fine: $ cat f2.c typedef __attribute__((__ext_vector_type__(8))) unsigned short vector_ushort8; vector_ushort8 foo1(void) { return 1 << (

Re: [PATCH] D21678: Fix For pr28288 - Error message in shift of vector values

2016-09-06 Thread Akira Hatanaka via cfe-commits
This is urgent, so I’ve tried to come up with a patch to fix this. I tried reverting r278501 and then made changes to have Sema::CheckVectorOperands call tryVectorConvertAndSplat when the vector type is a normal gcc vector. This fixes the test case I sent and also doesn’t affect the regression t

Re: [PATCH] D21678: Fix For pr28288 - Error message in shift of vector values

2016-09-06 Thread Akira Hatanaka via cfe-commits
It seems to me that the test case in test/Sema/vector-cast.c looks incorrect. According to gcc’s documentation, you can cast vectors to and from scalars of the same size, so clang shouldn’t reject “double += <1 x double>". https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html

Re: [PATCH] D21678: Fix For pr28288 - Error message in shift of vector values

2016-09-07 Thread Akira Hatanaka via cfe-commits
Thanks, I’ll take a look at your patch today. vec1.patch Description: Binary data > On Sep 7, 2016, at 12:53 AM, Vladimir Yakovlev wrote: > > I did another fix (attached). It fixes the error and chang-check has not any > new errors. Please take a look. > > Where can I see your fix? > > ​ >

[PATCH] D24312: [CodeGen] Fix an assert in EmitNullConstant

2016-09-07 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. ahatanak added a subscriber: cfe-commits. r235815 changed CGRecordLowering::accumulateBases to ignore non-virtual bases of size 0, which prevented adding those non-virtual bases to CGRecordLayout's NonVirtualBases. EmitNullCons

Re: [PATCH] D21678: Fix For pr28288 - Error message in shift of vector values

2016-09-07 Thread Akira Hatanaka via cfe-commits
I looked at r278501 and realized it’s doing more than just fixing the test case in PR28288. For example, when the following code was compiled, vi8 = vi8 << vuc8; // vuc8: <8 x unsigned char>, vi8: <8 x int> vc8 = vc8 << vs4; // vc8: <8 x char>, vs4: <4 x short> prior to r278501, clang would re

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-09-08 Thread Akira Hatanaka via cfe-commits
ahatanak accepted this revision. ahatanak added a reviewer: ahatanak. ahatanak added a comment. This revision is now accepted and ready to land. LGTM. We should fix this longstanding bug. https://reviews.llvm.org/D23643 ___ cfe-commits mailing list

r281132 - [tablegen] Check that an optional IdentifierArgument of an attribute is

2016-09-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Sep 9 22:29:43 2016 New Revision: 281132 URL: http://llvm.org/viewvc/llvm-project?rev=281132&view=rev Log: [tablegen] Check that an optional IdentifierArgument of an attribute is provided before trying to print it. This fixes a segfault that occurs when function printP

Re: [PATCH] D24467: Fix an error after D21678

2016-09-12 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8733 @@ -8731,2 +8732,3 @@ if (!IsCompAssign) { -LHS = S.UsualUnaryConversions(LHS.get()); +if (S.LangOpts.OpenCL || S.LangOpts.ZVector) + LHS = S.UsualUnaryConversions(LHS.get()); -

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

2016-09-12 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. You can create a separate patch for the changes made to lib/Headers/intrin.h and have it reviewed before committing this patch. Also, __dst, __x and __n should be added to the output list and "memory" to the clobber list as majnemer pointed out. I think you can use con

Re: [PATCH] D24312: [CodeGen] Fix an assert in EmitNullConstant

2016-09-13 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281405: [CodeGen] Fix an assert in EmitNullConstant. (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D24312?vs=70589&id=71248#toc Repository: rL LLVM https://reviews.llvm.o

r281405 - [CodeGen] Fix an assert in EmitNullConstant.

2016-09-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Sep 13 17:13:02 2016 New Revision: 281405 URL: http://llvm.org/viewvc/llvm-project?rev=281405&view=rev Log: [CodeGen] Fix an assert in EmitNullConstant. r235815 changed CGRecordLowering::accumulateBases to ignore non-virtual bases of size 0, which prevented adding those

Re: [PATCH] D24467: Fix an error after D21678

2016-09-14 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8751 @@ -8747,3 +8750,3 @@ // OpenCL v1.1 s6.3.j says that the operands need to be integers. if (!LHSEleType->isIntegerType()) { Should we mention that any vectors used as s

Re: [PATCH] D24467: Fix an error after D21678

2016-09-14 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: llvm/tools/clang/test/Sema/vecshift.c:56 @@ +55,3 @@ + + vc4 = vc4 << vc8; // expected-error {{vector operands do not have the same number of elements}} + vi4 = vi4 << vuc8; // expected-error {{vector operands do not have the same nu

Re: [PATCH] D24467: Fix an error after D21678

2016-09-15 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. LGTM with a nit in test case. Comment at: llvm/tools/clang/test/CodeGen/vecshift.c:43 @@ +42,3 @@ + vi8 = 1 << vi8; +// CHECK: [[t2:%.+]] = load <8 x i32>, <8 x i32>* @vi8, align 32 +// CHECK: shl <8 x i32> , [[t2]] This test fails on

Re: [PATCH] D24467: Fix an error after D21678

2016-09-15 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281669: [Sema] Allow shifting a scalar operand by a vector operand. (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D24467?vs=71545&id=71569#toc Repository: rL LLVM https:/

r281669 - [Sema] Allow shifting a scalar operand by a vector operand.

2016-09-15 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Sep 15 17:19:25 2016 New Revision: 281669 URL: http://llvm.org/viewvc/llvm-project?rev=281669&view=rev Log: [Sema] Allow shifting a scalar operand by a vector operand. r278501 inadvertently introduced a bug in which it disallowed shifting scalar operands by vector opera

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

2016-09-15 Thread Akira Hatanaka via cfe-commits
ahatanak abandoned this revision. ahatanak added a comment. The crash I was trying to fix was fixed in https://reviews.llvm.org/D23643. https://reviews.llvm.org/D14471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

Re: [PATCH] D21104: [CodeGen][ObjC] Block captures should inherit the type of the captured field in the enclosing lambda or block

2016-09-15 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281682: [CodeGen][ObjC] Block captures should inherit the type of the captured (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D21104?vs=64199&id=71575#toc Repository: rL LL

r281682 - [CodeGen][ObjC] Block captures should inherit the type of the captured

2016-09-15 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Sep 15 19:02:06 2016 New Revision: 281682 URL: http://llvm.org/viewvc/llvm-project?rev=281682&view=rev Log: [CodeGen][ObjC] Block captures should inherit the type of the captured field in the enclosing lambda or block. This patch fixes a bug in code-gen where it uses th

r297866 - [Driver] Define macro __APPLE_EMBEDDED_SIMULATOR__ when option

2017-03-15 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Mar 15 13:04:13 2017 New Revision: 297866 URL: http://llvm.org/viewvc/llvm-project?rev=297866&view=rev Log: [Driver] Define macro __APPLE_EMBEDDED_SIMULATOR__ when option -m(i|tv|watch)os-simulator-version-min is on the command line. Previously the driver would treat -m

r298332 - Add support for attribute enum_extensibility.

2017-03-20 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Mar 20 21:23:00 2017 New Revision: 298332 URL: http://llvm.org/viewvc/llvm-project?rev=298332&view=rev Log: Add support for attribute enum_extensibility. This commit adds support for a new attribute that will be used to distinguish between extensible and inextensible en

Re: [libcxx] r299734 - Allow a standard library to implement conditional noexcept for optional and unique_ptr hash functions.

2017-04-06 Thread Akira Hatanaka via cfe-commits
It looks like this commit and r299735 are causing bots to fail: http://green.lab.llvm.org/green/job/libcxx_master_cmake_32/66/ The test hash_unique_ptr.pass.cpp doesn’t compile when -std=c++03 is on the command line because Pointe

[libcxx] r299744 - Revert "Allow a standard library to implement conditional noexcept for optional and unique_ptr hash functions."

2017-04-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Apr 7 00:55:28 2017 New Revision: 299744 URL: http://llvm.org/viewvc/llvm-project?rev=299744&view=rev Log: Revert "Allow a standard library to implement conditional noexcept for optional and unique_ptr hash functions." This reverts commit r299734. Modified: libc

Re: [libcxx] r299734 - Allow a standard library to implement conditional noexcept for optional and unique_ptr hash functions.

2017-04-06 Thread Akira Hatanaka via cfe-commits
I reverted r299734 in r299744. Feel free to recommit it once the test is fixed. > On Apr 6, 2017, at 10:36 PM, Akira Hatanaka via cfe-commits > wrote: > > It looks like this commit and r299735 are causing bots to fail: > > http://green.lab.llvm.org/green/job/libcxx_

r299992 - [Sema][ObjC] Check whether a variable has a definition, rather than

2017-04-11 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Apr 11 17:01:33 2017 New Revision: 22 URL: http://llvm.org/viewvc/llvm-project?rev=22&view=rev Log: [Sema][ObjC] Check whether a variable has a definition, rather than checking its storage class, when determining whether casting a C pointer to an ObjC pointer is

Re: r300122 - [clang-cl] Make all sanitizer flags available in clang-cl

2017-04-12 Thread Akira Hatanaka via cfe-commits
I think this broke some of the bots. http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/30152/ Could you take a look? > On Apr 12, 2017, at 3:50 PM, Reid Kleckner via cfe-commits > wrote: > > Author:

Re: r300122 - [clang-cl] Make all sanitizer flags available in clang-cl

2017-04-13 Thread Akira Hatanaka via cfe-commits
I’m afraid I have to revert this to turn the bots green again. > On Apr 12, 2017, at 10:41 PM, Akira Hatanaka via cfe-commits > wrote: > > I think this broke some of the bots. > > http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/30152/ > <http://lab

r300181 - Revert "[clang-cl] Make all sanitizer flags available in clang-cl"

2017-04-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Apr 13 03:02:29 2017 New Revision: 300181 URL: http://llvm.org/viewvc/llvm-project?rev=300181&view=rev Log: Revert "[clang-cl] Make all sanitizer flags available in clang-cl" This reverts commit 47979b20b475664013d19382fc6875b5b9f3ed9d. This was causing a couple of bot

Re: r300122 - [clang-cl] Make all sanitizer flags available in clang-cl

2017-04-13 Thread Akira Hatanaka via cfe-commits
12 AM, Akira Hatanaka <mailto:ahatan...@apple.com>> wrote: > I’m afraid I have to revert this to turn the bots green again. > >> On Apr 12, 2017, at 10:41 PM, Akira Hatanaka via cfe-commits >> mailto:cfe-commits@lists.llvm.org>> wrote: >> >> I thi

r300389 - [ObjC] Use empty Objective-C collection literal constants when

2017-04-14 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Sat Apr 15 00:31:35 2017 New Revision: 300389 URL: http://llvm.org/viewvc/llvm-project?rev=300389&view=rev Log: [ObjC] Use empty Objective-C collection literal constants when available. Original patch by Douglas Gregor with minor modifications. rdar://problem/20689633 Add

r300391 - Revert "[ObjC] Use empty Objective-C collection literal constants when"

2017-04-14 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Sat Apr 15 00:44:27 2017 New Revision: 300391 URL: http://llvm.org/viewvc/llvm-project?rev=300391&view=rev Log: Revert "[ObjC] Use empty Objective-C collection literal constants when" This reverts commit r300389. There were mistakes in the changes I made to CodeGen. Remove

r300396 - [ObjC] Use empty Objective-C collection literal constants when

2017-04-14 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Sat Apr 15 01:42:00 2017 New Revision: 300396 URL: http://llvm.org/viewvc/llvm-project?rev=300396&view=rev Log: [ObjC] Use empty Objective-C collection literal constants when available. Original patch by Douglas Gregor with minor modifications. This recommits r300389, whic

r300454 - [ObjC] Mark loads from __NSArray0 and __NSDictionary0 as invariant.load.

2017-04-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Apr 17 10:21:55 2017 New Revision: 300454 URL: http://llvm.org/viewvc/llvm-project?rev=300454&view=rev Log: [ObjC] Mark loads from __NSArray0 and __NSDictionary0 as invariant.load. Also, simplify code by calling MakeNaturalAlignAddrLValue. This is a follow-up to r30039

r292245 - [Sema] Fix bug in handling of designated initializer.

2017-01-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Jan 17 13:35:54 2017 New Revision: 292245 URL: http://llvm.org/viewvc/llvm-project?rev=292245&view=rev Log: [Sema] Fix bug in handling of designated initializer. CheckDesignatedInitializer wasn't taking into account the base classes when computing the index for the fiel

r293106 - [CodeGen] Suppress emission of lifetime markers if a label has been seen

2017-01-25 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Jan 25 16:55:13 2017 New Revision: 293106 URL: http://llvm.org/viewvc/llvm-project?rev=293106&view=rev Log: [CodeGen] Suppress emission of lifetime markers if a label has been seen in the current lexical scope. clang currently emits the lifetime.start marker of a variab

r293108 - Remove the return type from the check string in test case.

2017-01-25 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Jan 25 17:16:32 2017 New Revision: 293108 URL: http://llvm.org/viewvc/llvm-project?rev=293108&view=rev Log: Remove the return type from the check string in test case. Bots were failing because some targets emit signext before i32. Modified: cfe/trunk/test/CodeGen/l

r293111 - Fix test case committed in r293106 so that it passes on targets whose

2017-01-25 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Jan 25 17:36:15 2017 New Revision: 293111 URL: http://llvm.org/viewvc/llvm-project?rev=293111&view=rev Log: Fix test case committed in r293106 so that it passes on targets whose pointers are 4-bytes instead of 8-bytes. Modified: cfe/trunk/test/CodeGen/lifetime2.c M

r293194 - [Sema][ObjC] Make sure -Wblock-capture-autoreleasing issues a warning

2017-01-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jan 26 12:13:06 2017 New Revision: 293194 URL: http://llvm.org/viewvc/llvm-project?rev=293194&view=rev Log: [Sema][ObjC] Make sure -Wblock-capture-autoreleasing issues a warning even in the presence of nullability qualifiers. This commit fixes bugs in r285031 where -Wbl

r293199 - Turn on -Wblock-capture-autoreleasing by default.

2017-01-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jan 26 12:51:10 2017 New Revision: 293199 URL: http://llvm.org/viewvc/llvm-project?rev=293199&view=rev Log: Turn on -Wblock-capture-autoreleasing by default. Turning on the warning by default helps the users as it's a common mistake to capture out-parameters in a block

r293596 - Handle ObjCEncodeExpr in extractStringLiteralCharacter.

2017-01-30 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Jan 30 20:31:39 2017 New Revision: 293596 URL: http://llvm.org/viewvc/llvm-project?rev=293596&view=rev Log: Handle ObjCEncodeExpr in extractStringLiteralCharacter. This fixes an assertion failure that occurs later in the function when an ObjCEncodeExpr is cast to String

Re: r293596 - Handle ObjCEncodeExpr in extractStringLiteralCharacter.

2017-01-30 Thread Akira Hatanaka via cfe-commits
Hans, can this be merged to 4.0? This fixes a regression from 3.9 (the part I touched was committed a few years ago, but didn’t cause an assert until recently). > On Jan 30, 2017, at 6:31 PM, Akira Hatanaka via cfe-commits > wrote: > > Author: ahatanak > Date: Mon Jan 30 20:3

r293678 - [Sema] Transform a templated name before looking it up in

2017-01-31 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Jan 31 13:53:32 2017 New Revision: 293678 URL: http://llvm.org/viewvc/llvm-project?rev=293678&view=rev Log: [Sema] Transform a templated name before looking it up in FindInstantiatedDecl or passing it to RebuildMemberExpr. This fixes PR30361. rdar://problem/17341274 D

Re: [PATCH] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

2017-01-31 Thread Akira Hatanaka via cfe-commits
Thanks for the review. r293678. Should this be merged to 4.0? > On Jan 31, 2017, at 12:04 PM, Akira Hatanaka via Phabricator via cfe-commits > wrote: > > This revision was automatically updated to reflect the committed changes. > Closed by commit rL293678: [Sema] Transform a templated name bef

r293808 - [Sema][ObjC] Don't pass a DeclRefExpr that doesn't reference a VarDecl

2017-02-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Feb 1 14:22:26 2017 New Revision: 293808 URL: http://llvm.org/viewvc/llvm-project?rev=293808&view=rev Log: [Sema][ObjC] Don't pass a DeclRefExpr that doesn't reference a VarDecl to WeakObjectProfileTy's constructor. This fixes an assertion failure in WeakObjectProfileT

r306317 - [Sema] Fix a crash-on-invalid when a template parameter list has a class

2017-06-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Jun 26 11:46:12 2017 New Revision: 306317 URL: http://llvm.org/viewvc/llvm-project?rev=306317&view=rev Log: [Sema] Fix a crash-on-invalid when a template parameter list has a class definition or non-reference class type. The crash occurs when there is a template paramet

r306364 - [CodeGen][ObjC] Fix GNU's encoding of bit-field ivars.

2017-06-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Jun 26 21:34:04 2017 New Revision: 306364 URL: http://llvm.org/viewvc/llvm-project?rev=306364&view=rev Log: [CodeGen][ObjC] Fix GNU's encoding of bit-field ivars. According to the documentation, when encoding a bit-field, GNU runtime needs its starting position in addit

Re: r297702 - [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded

2017-06-26 Thread Akira Hatanaka via cfe-commits
This should be fixed in r306364. > On Jun 22, 2017, at 1:26 PM, Akira Hatanaka wrote: > > According to the documentation, the starting position of the field has to be > encoded too: > > https://gcc.gnu.org/onlinedocs/gcc/Type-encoding.html >

Re: [Diffusion] rL306364: [CodeGen][ObjC] Fix GNU's encoding of bit-field ivars.

2017-06-27 Thread Akira Hatanaka via cfe-commits
Thanks for the fix! The change looks reasonable to me. On Tue, Jun 27, 2017 at 12:46 AM, NAKAMURA Takumi via Phabricator < revi...@reviews.llvm.org> wrote: > chapuni added subscribers: cfe-commits, chapuni. > chapuni added a comment. > > Could you confirm if my change were reasonable? Or rewrite

r306494 - [CodeGen] Fix assertion failure in EmitCallArg.

2017-06-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Jun 27 17:42:48 2017 New Revision: 306494 URL: http://llvm.org/viewvc/llvm-project?rev=306494&view=rev Log: [CodeGen] Fix assertion failure in EmitCallArg. The assertion was failing when a method of a parameterized class was called and the types of the argument and para

r306722 - [Sema] Issue diagnostics if a new/delete expression generates a call to

2017-06-29 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jun 29 11:48:40 2017 New Revision: 306722 URL: http://llvm.org/viewvc/llvm-project?rev=306722&view=rev Log: [Sema] Issue diagnostics if a new/delete expression generates a call to a c++17 aligned allocation/deallocation function that is unavailable in the standard librar

r306739 - Insert llvm_unreachable at the end of a function to silence gcc's

2017-06-29 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jun 29 13:44:20 2017 New Revision: 306739 URL: http://llvm.org/viewvc/llvm-project?rev=306739&view=rev Log: Insert llvm_unreachable at the end of a function to silence gcc's -Werror=return-type error. This is an attempt to fix the following failing bot: http://lab.llvm

[libcxx] r306859 - Revert "[libcxx] Annotate c++17 aligned new/delete operators with availability"

2017-06-30 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Jun 30 11:50:23 2017 New Revision: 306859 URL: http://llvm.org/viewvc/llvm-project?rev=306859&view=rev Log: Revert "[libcxx] Annotate c++17 aligned new/delete operators with availability" This reverts commit r306310. r306310 causes clang to reject a call to an aligned

r306922 - [Driver] Check that the iOS deployment target is iOS 10 or earlier if

2017-06-30 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Jun 30 17:57:52 2017 New Revision: 306922 URL: http://llvm.org/viewvc/llvm-project?rev=306922&view=rev Log: [Driver] Check that the iOS deployment target is iOS 10 or earlier if the target is 32-bit. The following changes are made to the driver since 32-bit apps do not

r306944 - Fix indentation.

2017-06-30 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Jun 30 21:37:54 2017 New Revision: 306944 URL: http://llvm.org/viewvc/llvm-project?rev=306944&view=rev Log: Fix indentation. This is an attempt to fix a failing bot: http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror Modified: cfe/trunk/lib/Driver/ToolChains/D

Re: [PATCH] D34574: [Sema] Disable c++17 aligned new and delete operators if not implemented in the deployment target's c++ standard library

2017-07-05 Thread Akira Hatanaka via cfe-commits
No, it was not deliberate. I'll take a look at the failing tests today. > On Jul 5, 2017, at 10:02 AM, Marshall Clow via Phabricator via cfe-commits > wrote: > > mclow.lists added a comment. > > This commit breaks all the libc++ aligned new/delete tests on Mac OS. Was > that deliberate? > >

Re: r305860 - Special-case handling of destructors in override lists when dumping ASTs.

2017-07-12 Thread Akira Hatanaka via cfe-commits
Hi Lang, clang crashes when I compile the following code with "-Xclang -ast-dump”: class Base { public: virtual void operator()() {} }; class Derived : public Base { public: void operator()() override {} }; If I change “OS << D->getName()” to “OS << D->getNameAsString()”, the crash disappe

r307883 - [Sema] Mark a virtual CXXMethodDecl as used if a call to it can be

2017-07-12 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Jul 12 23:08:27 2017 New Revision: 307883 URL: http://llvm.org/viewvc/llvm-project?rev=307883&view=rev Log: [Sema] Mark a virtual CXXMethodDecl as used if a call to it can be devirtualized. The code to detect devirtualized calls is already in IRGen, so move the code to

r307982 - [Driver] Respect -target when determining target platform on Apple

2017-07-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jul 13 17:21:32 2017 New Revision: 307982 URL: http://llvm.org/viewvc/llvm-project?rev=307982&view=rev Log: [Driver] Respect -target when determining target platform on Apple platforms. Set the target OS based on -target if it is present on the command line and -arch is

r308496 - [Sema] Improve diagnostic message for unavailable C++17 aligned

2017-07-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Jul 19 10:17:50 2017 New Revision: 308496 URL: http://llvm.org/viewvc/llvm-project?rev=308496&view=rev Log: [Sema] Improve diagnostic message for unavailable C++17 aligned allocation functions. This changes the error message Sema prints when an unavailable C++17 aligned

r308498 - Add AlignedAllocation.h.

2017-07-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Jul 19 10:26:42 2017 New Revision: 308498 URL: http://llvm.org/viewvc/llvm-project?rev=308498&view=rev Log: Add AlignedAllocation.h. I forgot to "git add" it in r308496. Added: cfe/trunk/include/clang/Basic/AlignedAllocation.h Added: cfe/trunk/include/clang/Basic/

r309308 - Revert r264998 and r265035.

2017-07-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jul 27 11:52:44 2017 New Revision: 309308 URL: http://llvm.org/viewvc/llvm-project?rev=309308&view=rev Log: Revert r264998 and r265035. r303175 made changes to have __cxa_allocate_exception return a 16-byte aligned pointer, so it's no longer necessary to specify a lower

r309352 - Update comment in test case after r309308.

2017-07-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jul 27 18:58:14 2017 New Revision: 309352 URL: http://llvm.org/viewvc/llvm-project?rev=309352&view=rev Log: Update comment in test case after r309308. Modified: cfe/trunk/test/CodeGenCXX/eh.cpp Modified: cfe/trunk/test/CodeGenCXX/eh.cpp URL: http://llvm.org/viewvc

r323578 - [CodeGen] Use the non-virtual alignment when emitting the base

2018-01-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Jan 26 16:34:09 2018 New Revision: 323578 URL: http://llvm.org/viewvc/llvm-project?rev=323578&view=rev Log: [CodeGen] Use the non-virtual alignment when emitting the base constructor. Previously, clang would emit an over-aligned (16-byte) store to initialize B::x in B's

r323814 - Revert "CodeGen: annotate ObjC ARC functions with ABI constraints"

2018-01-30 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Jan 30 12:19:34 2018 New Revision: 323814 URL: http://llvm.org/viewvc/llvm-project?rev=323814&view=rev Log: Revert "CodeGen: annotate ObjC ARC functions with ABI constraints" This reverts commit r294872. Although this patch is correct, it caused the objc_autoreleaseRV

Re: r294872 - CodeGen: annotate ObjC ARC functions with ABI constraints

2018-01-30 Thread Akira Hatanaka via cfe-commits
Hi Saleem, I had to revert this patch since this patch caused crashes in code that was working fine before. As I mentioned in the commit message, I believe this patch is correct, but it causes the objc_retainAutoreleasedReturnValue/objc_autoreleaseReturnValue handshake to fail in some cases be

Re: r294872 - CodeGen: annotate ObjC ARC functions with ABI constraints

2018-01-31 Thread Akira Hatanaka via cfe-commits
> On Jan 30, 2018, at 4:32 PM, Saleem Abdulrasool wrote: > > Thanks for the note here. I’ll try to take a look at that, but, yes, the > frontend change itself is correct. I’ve seen many, many places where the > ObjCARC passes break down in the backend, and I’ve filed a few bugs on it in >

r323943 - [CodeGen] Fix an assertion failure in CGRecordLowering.

2018-01-31 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Jan 31 19:04:15 2018 New Revision: 323943 URL: http://llvm.org/viewvc/llvm-project?rev=323943&view=rev Log: [CodeGen] Fix an assertion failure in CGRecordLowering. This patch fixes a bug in CGRecordLowering::accumulateBitFields where it unconditionally starts a new run

Re: r293199 - Turn on -Wblock-capture-autoreleasing by default.

2017-02-12 Thread Akira Hatanaka via cfe-commits
enceCounting.html#indirect-parameters> > suggests NSError ** should "be implicitly qualified with __autoreleasing." > Is that a bug in the implementation of the warning, is > AutomaticReferenceCounting.html incorrect, or are we just misunderstanding > that document? >

r295034 - [CodeGen][ObjC] Use the type of the captured field of the enclosing

2017-02-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Feb 14 00:46:55 2017 New Revision: 295034 URL: http://llvm.org/viewvc/llvm-project?rev=295034&view=rev Log: [CodeGen][ObjC] Use the type of the captured field of the enclosing block or lambda. This is a follow-up to r281682, which fixed a bug in computeBlockInfo where t

Re: r291955 - PR31606: Generalize our tentative DR resolution for inheriting copy/move

2017-02-14 Thread Akira Hatanaka via cfe-commits
Hi Richard, It looks like this commit causes an assertion failure when the following code is compiled: $ cat test1.cpp template struct S3 { }; template struct S2 { S2(S3 &&); }; template struct S1 : S2 { using S2::S2; S1(); }; template struct S0 { S0(); S0(S0&&) = default; S1 m1;

Re: r293199 - Turn on -Wblock-capture-autoreleasing by default.

2017-02-14 Thread Akira Hatanaka via cfe-commits
ttp://clang.llvm.org/docs/AutomaticReferenceCounting.html#indirect-parameters >> >> <http://clang.llvm.org/docs/AutomaticReferenceCounting.html#indirect-parameters> >> suggests NSError ** should "be implicitly qualified with __autoreleasing." >> Is that

Re: r291955 - PR31606: Generalize our tentative DR resolution for inheriting copy/move

2017-02-14 Thread Akira Hatanaka via cfe-commits
Thanks! > On Feb 14, 2017, at 8:31 PM, Richard Smith wrote: > > On 14 February 2017 at 19:48, Richard Smith > wrote: > On 14 February 2017 at 18:14, Akira Hatanaka > wrote: > Hi Richard, > > It looks like this commit causes an assertio

r295150 - [Sema] Disallow returning a __block variable via a move.

2017-02-14 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Feb 14 23:15:28 2017 New Revision: 295150 URL: http://llvm.org/viewvc/llvm-project?rev=295150&view=rev Log: [Sema] Disallow returning a __block variable via a move. r274291 made changes to prefer calling a move constructor to calling a copy constructor when returning fr

Re: r295150 - [Sema] Disallow returning a __block variable via a move.

2017-02-15 Thread Akira Hatanaka via cfe-commits
Hans, Can this be merged to 4.0 too? > On Feb 14, 2017, at 9:15 PM, Akira Hatanaka via cfe-commits > wrote: > > Author: ahatanak > Date: Tue Feb 14 23:15:28 2017 > New Revision: 295150 > > URL: http://llvm.org/viewvc/llvm-project?rev=295150&view=rev > Log

Re: Patch for Bug 30413, including test case

2017-02-19 Thread Akira Hatanaka via cfe-commits
This patch changes the encoding of an id conforming to a protocol, which I think was not intended: For example: @encode(id) Would passing IVD to the call to getObjCEncodingForType in CGObjCGNU::GenerateClass solve the problem? > On Feb 15, 2017, at 1:59 PM, Lobron, David via cfe-commits > wr

r296584 - [Sema] Add variable captured by a block to the enclosing lambda's

2017-02-28 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Mar 1 00:11:25 2017 New Revision: 296584 URL: http://llvm.org/viewvc/llvm-project?rev=296584&view=rev Log: [Sema] Add variable captured by a block to the enclosing lambda's potential capture list. Fix Sema::getCurLambda() to return the innermost lambda scope when there

Re: Patch for Bug 30413, including test case

2017-03-06 Thread Akira Hatanaka via cfe-commits
> On Mar 6, 2017, at 10:17 AM, Lobron, David wrote: > > Hi Akira, > > Pardon my slowness in addressing your question. > >> This patch changes the encoding of an id conforming to a protocol, which I >> think was not intended: For example: >> >> @encode(id) >> >> Would passing IVD to the call

Re: Patch for Bug 30413, including test case

2017-03-09 Thread Akira Hatanaka via cfe-commits
Hi David, The patch looks good to me. > On Mar 9, 2017, at 1:01 PM, Lobron, David wrote: > > Hi Akira, > >> My concern is that the patch changes the encoding of @encode(id) >> on Darwin, which I think isn’t what you are trying to fix. If you compile >> the following code with command “clang

Re: Patch for Bug 30413, including test case

2017-03-13 Thread Akira Hatanaka via cfe-commits
Do you need someone to commit this patch for you? > On Mar 10, 2017, at 6:44 AM, Lobron, David wrote: > > Hi Akira, > > Thank you very much! Please let me know if I need to take any further steps > beyond this email to cfe-commits in order for the patch and the unit test to > be committed. >

r297702 - [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded

2017-03-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Mar 13 23:00:52 2017 New Revision: 297702 URL: http://llvm.org/viewvc/llvm-project?rev=297702&view=rev Log: [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded correctly. This fixes PR30413. Patch by David Lobron. Added: cfe/trunk/test/CodeGenObjC/i

Re: Patch for Bug 30413, including test case

2017-03-13 Thread Akira Hatanaka via cfe-commits
Committed r297702. > On Mar 13, 2017, at 10:02 AM, Lobron, David wrote: > > Yes, please, if you don't mind! I'd like to commit both the path and the > unit test, if possible. > > Thanks, > > David > >> On Mar 13, 2017, at 12:47 PM, Akira Hatanaka wrote: >> >> Do you need someone to commit

[PATCH] D22997: [cxx1z-constexpr-lambda] Make conversion function constexpr, and teach the expression-evaluator to evaluate the static-invoker.

2016-11-14 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/AST/ExprConstant.cpp:4427 +const CXXRecordDecl *ClosureClass = MD->getParent(); +assert((std::distance(ClosureClass->captures_begin(), + ClosureClass->captures_end()) == 0) && ---

[PATCH] D25206: [Parser] Correct typo after lambda capture initializer is parsed

2016-11-14 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Are there any further comments? https://reviews.llvm.org/D25206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D21099: [Sema] Teach -Wcast-align to look at the aligned attribute of the declared variables

2016-11-16 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 78300. ahatanak added a comment. Rebase and ping. https://reviews.llvm.org/D21099 Files: lib/Sema/SemaChecking.cpp test/Sema/warn-cast-align.c Index: test/Sema/warn-cast-align.c === ---

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