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=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 the

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

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=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

Re: [PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

2016-09-23 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D24693#551050, @vitalybuka wrote: > I can see how to insert starts, e.g. on every label which bypass declaration, > but I am not sure where to put ends. > Probably it's possible, but patch will be significantly more complicated. > I'd

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

2016-09-23 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 72356. ahatanak added a comment. I agree that extending the logic of getTemplateInstantiationArgs seems like a better approach. I changed Sema::getTemplateInstantiationArgs to search for the template arguments twice, first for the initializer's template

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-09-26 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. This looks fine to me. https://reviews.llvm.org/D23236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-10-05 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. > TargetInfo.cpp:430 >if (AN == Name && ARN.RegNum < Names.size()) > -return Name; > +if (ReturnCanonical) > + return Names[ARN.RegNum]; Please use braces or a ternary operator here. > ahatanak wrote in Targets.cpp:2718 > Can we

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

2016-10-04 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. > rsmith wrote in SemaTemplateInstantiateDecl.cpp:4849 > Do we need to do this for conversion function names too? (Eg, `operator > C1*`) I added a definition of "operator C1*" and called it in C1::foo1. I didn't see any crashes or asserts. Calls to a

[PATCH] D24669: {Sema] Gcc compatibility of vector shift.

2016-10-04 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. > SemaExpr.cpp:8787 > } > +if (!S.LangOpts.OpenCL && !S.LangOpts.ZVector) { > + const BuiltinType *LHSBT = LHSEleType->getAs(); Is it possible to use ASTContext::getTypeSize here? https://reviews.llvm.org/D24669

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

2016-10-04 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. ping 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] D24969: [Sema] Use the instantiated name of destructors in FindInstantiatedDecl and RebuildMemberExpr

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

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

2016-10-07 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. I have a couple of minor comments, but patch looks good to me. Comment at: lib/Sema/SemaStmtAsm.cpp:141 +// Extracting the register name from the Expression value, +// if there is no register name to extract, returns "" Please

Re: [PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

2016-09-21 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Do we want to remove lifetime intrinsics when we aren't doing the asan-use-after-scope check? Since this isn't a mis-compile caused by inaccurate lifetime intrinsics, I was wondering whether we should do this only when asan-use-after-scope is on to minimize the impact

Re: [PATCH] D24472: [Sema] Support lax conversions for compound assignments

2016-09-21 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Thanks Bruno. I have a couple more questions. Comment at: lib/Sema/SemaExpr.cpp:8090 @@ +8089,3 @@ + *RHSExpr = ImpCastExprToType(RHSExpr->get(), LHSType, CK_BitCast); + return VecType; +} Sorry I wasn't clear, but I was

Re: [PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

2016-09-19 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. It looks like the test case was removed when this patch we rebased. https://reviews.llvm.org/D24693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24472: [Sema] Support lax conversions for compound assignments

2016-09-19 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:8084 @@ +8083,3 @@ + *RHSExpr = ImpCastExprToType(RHSExpr->get(), LHSType, CK_BitCast); + return LHSType; +} My understanding is that, when we have a compound assign like "LHS +=

Re: [PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

2016-09-19 Thread Akira Hatanaka via cfe-commits
ahatanak added a subscriber: ahatanak. ahatanak added a comment. Can you add some test cases? https://reviews.llvm.org/D24693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

2016-09-22 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Thank you for the great example! I can now see this patch does fix mis-compiles. There are probably other lifetime bugs you'll see when the code being compiled includes gotos that jump past variable declarations, including the one here:

Re: [PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables

2016-09-21 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D24693#549095, @majnemer wrote: > This doesn't sound right. Given the example in the description, we are > accessing the memory location after end has been called: this seems like a > real miscompile. It would appear unsafe to only do

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

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

2016-09-27 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: doug.gregor, rsmith. ahatanak added a subscriber: cfe-commits. This patch fixes a crash that occurs when a non-prototype function is declared before a header containing a prototype of the same function is included. This caused

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

2016-09-27 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: doug.gregor, rsmith. ahatanak added a subscriber: cfe-commits. This fixes PR30361. clang was failing to compile the test case because it was passing "~C1" instead of "~C1" to FindInstantiatedDecl and RebuildMemberExpr.

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

2016-10-03 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rsmith. ahatanak added a subscriber: cfe-commits. This fixes PR30566. The assertion is triggered when RecordLayoutBuilder tries to compute the size of a field (for capture "name" in the test case) whose type hasn't been deduced. This

[PATCH] D24999: [Sema] Only relax array-at-end-of-object checks in __builtin_object_size when -fno-strict-aliasing is given.

2016-10-03 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Just want to give you a heads up that I was going to abandon the patch that adds support for attribute "flexible_array" (https://reviews.llvm.org/D21453) after r281277, but I'll probably need the attribute after all if we are going to make the changes in this patch.

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

2016-09-30 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. This patch doesn't detect more complex conflicts (like the following code), but I think it's OK for now. asm ("foo" : "=Q" (x) : : "%rax", "%rbx", "%rcx", "%rdx"); // Q: Any register accessible as rh: a, b, c, and d. > TargetInfo.h:593 >/// >/// For

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

2016-10-10 Thread Akira Hatanaka via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. LGTM with a few nits. Please fix lib/Headers/intrin.h too and commit it as a separate patch. Comment at: lib/Sema/SemaStmtAsm.cpp:142 +// Extracting the register name from the Expression value, +// if there is no

Re: patch: clean up in EmitValueForIvarAtOffset

2016-10-10 Thread Akira Hatanaka via cfe-commits
LGTM > On Oct 9, 2016, at 2:39 PM, Nick Lewycky via cfe-commits > wrote: > > The attached patch makes the LValue created in EmitValueForIvarAtOffset have > the same Qualifiers in the LValue as the QualType in the LValue. Noticed when > auditing for reasons the

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

2016-10-25 Thread Akira Hatanaka via cfe-commits
ahatanak added reviewers: bruno, erik.pilkington, majnemer. ahatanak added a comment. Add more reviewers. https://reviews.llvm.org/D25206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2016-10-25 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 75819. ahatanak marked 2 inline comments as done. ahatanak added a comment. Skip the step to correct typo if ParseInitializer returns ExprError(). Add a test case that exercises the change. https://reviews.llvm.org/D25206 Files:

[PATCH] D26108: Add -Wnullability-completeness-on-arrays.

2016-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D26108#591270, @jordan_rose wrote: > Ah, my apologies, @ahatanak. I was testing against the Swift branch of Clang. That's OK. I haven't tested it yet, but the patch itself looks fine to me. Comment at:

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

2016-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Do you think we can transform the Exprs for the uninstantiated default arguments in TreeTransform::TransformLambdaExpr? I guess it would be much simpler than trying to make getTemplateInstantiationArgs return the correct template arguments.

[PATCH] D26108: Add -Wnullability-completeness-on-arrays.

2016-11-09 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaType.cpp:3988 // Allow arrays of auto if we are a generic lambda parameter. // i.e. [](auto ()[5]) { return array[0]; }; OK if (AT && D.getContext() != Declarator::LambdaExprParameterContext) {

[PATCH] D26108: Add -Wnullability-completeness-on-arrays.

2016-11-07 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. Hi Jordan, It seems that this patch doesn't apply cleanly. Can you rebase it? Repository: rL LLVM https://reviews.llvm.org/D26108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25547: [CodeGen][ObjC] Do not emit objc_storeStrong to initialize a constexpr variable

2016-10-14 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 74760. ahatanak added a comment. Fold EmitScalarInit into EmitStoreThroughLValue and remove EmitScalarInit. I don't think ElementType in EmitObjCCollectionLiteral has a lifetime qualifier, so it should be safe to call EmitStoreThroughLValue instead of

[PATCH] D25547: [CodeGen][ObjC] Do not emit objc_storeStrong to initialize a constexpr variable

2016-10-17 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 74944. ahatanak added a comment. Address review comments. Simplify and add comments. https://reviews.llvm.org/D25547 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CGObjC.cpp lib/CodeGen/CGStmtOpenMP.cpp

[PATCH] D25547: [CodeGen][ObjC] Do not emit objc_storeStrong to initialize a constexpr variable

2016-10-18 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. ahatanak marked 2 inline comments as done. Closed by commit rL284516: [CodeGen][ObjC] Do not call objc_storeStrong when initializing a (authored by ahatanak). Changed prior to commit:

r284516 - [CodeGen][ObjC] Do not call objc_storeStrong when initializing a

2016-10-18 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Oct 18 14:05:41 2016 New Revision: 284516 URL: http://llvm.org/viewvc/llvm-project?rev=284516=rev Log: [CodeGen][ObjC] Do not call objc_storeStrong when initializing a constexpr variable. When compiling a constexpr NSString initialized with an objective-c string

r285031 - [Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured

2016-10-24 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 24 16:45:54 2016 New Revision: 285031 URL: http://llvm.org/viewvc/llvm-project?rev=285031=rev Log: [Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured by blocks. Add a new warning "-Wblock-capture-autoreleasing". The warning warns about

[PATCH] D25844: [Sema][ObjC] Warn about implicitly autoreleasing indirect parameters that are captured by blocks

2016-10-24 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285031: [Sema][ObjC] Warn about implicitly autoreleasing out-parameters captured (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D25844?vs=75442=75650#toc Repository: rL

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:8044 // the vector element type and splat. - // FIXME: this should also work for regular vector types as supported in GCC. - if (!RHSVecType && isa(LHSVecType)) { + if (!RHSVecType && isa(LHSVecType)) {

[PATCH] D25844: [Sema][ObjC] Warn about implicitly autoreleasing indirect parameters that are captured by blocks

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 75442. ahatanak marked an inline comment as done. ahatanak added a comment. Improve warning messages. https://reviews.llvm.org/D25844 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:8044 // the vector element type and splat. - // FIXME: this should also work for regular vector types as supported in GCC. - if (!RHSVecType && isa(LHSVecType)) { + if (!RHSVecType && isa(LHSVecType)) {

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

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. ping 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] D25206: [Parser] Correct typo after lambda capture initializer is parsed

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:951 Init = ParseInitializer(); + Init = Actions.CorrectDelayedTyposInExpr(Init.get()); mehdi_amini wrote: > What happens when there is no typo correction to apply? If

[PATCH] D25844: [Sema][ObjC] Warn about implicitly autoreleasing indirect parameters that are captured by blocks

2016-10-20 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. ahatanak added a subscriber: cfe-commits. ARC implicitly marks indirect parameters passed to a function as autoreleasing and passing a block that captures those parameters to another function sometimes causes problems that are

[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] 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 === ---

r287410 - [Sema] Don't allow applying address-of operator to a call to a function

2016-11-18 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Nov 18 18:13:03 2016 New Revision: 287410 URL: http://llvm.org/viewvc/llvm-project?rev=287410=rev Log: [Sema] Don't allow applying address-of operator to a call to a function with __unknown_anytype return type. When the following code is compiled, Sema infers that the

[PATCH] D26808: [Sema] Don't allow applying address-of operator to a call to a function with __unknown_anytype return type

2016-11-18 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287410: [Sema] Don't allow applying address-of operator to a call to a function (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D26808?vs=78396=78598#toc Repository: rL

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

2016-11-18 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 78594. ahatanak marked 2 inline comments as done. ahatanak added a comment. Make the helper function return the Decl's alignment by value. https://reviews.llvm.org/D21099 Files: lib/Sema/SemaChecking.cpp test/Sema/warn-cast-align.c Index:

[PATCH] D26808: [Sema] Don't allow applying address-of operator to a call to a function with __unknown_anytype return type

2016-11-17 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: doug.gregor, spyffe. ahatanak added a subscriber: cfe-commits. This patch fixes an assert in CodeGenFunction::EmitCallExprLValue that is triggered when the CallExpr's return type is not a reference type:

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

2016-11-17 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 78399. ahatanak added a comment. Address Alex's review comments. Define a static function for setting SrcAlign. https://reviews.llvm.org/D21099 Files: lib/Sema/SemaChecking.cpp test/Sema/warn-cast-align.c Index: test/Sema/warn-cast-align.c

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

2016-11-11 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 77691. ahatanak added a comment. - Transform uninstantiated default arguments Exprs in TreeTransform::TransformLambdaExpr. - In default-expr-arguments-3.cpp, check that there are no crashes or diagnostics emitted instead of printing the AST.

[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] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-10-31 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rsmith, majnemer. ahatanak added a subscriber: cfe-commits. This patch makes AnalysisBasedWarnings::IssueWarnings return without issuing warnings based on CFG analysis when a fatal error has occurred. This is needed to avoid a crash that

[PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-10-31 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 76521. ahatanak added a comment. Thanks, that fixed the failing regression tests. https://reviews.llvm.org/D26166 Files: lib/Sema/SemaTemplateInstantiate.cpp test/SemaCXX/instantiate-template-fatal-error.cpp Index:

[PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-10-31 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 76513. ahatanak added a comment. I think the non-uncompilable error you mentioned is the one on line 7 of the test case and the uncompilable error is the one on line 15. Is that correct? The modified test case has only one error (on line 7, which is

[PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-11-03 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285923: [Sema] Avoid instantiating templates only when UncompilableErrorOccurred (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D26166?vs=76521=76863#toc Repository: rL

r285923 - [Sema] Avoid instantiating templates only when UncompilableErrorOccurred

2016-11-03 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Nov 3 10:04:58 2016 New Revision: 285923 URL: http://llvm.org/viewvc/llvm-project?rev=285923=rev Log: [Sema] Avoid instantiating templates only when UncompilableErrorOccurred and FatalErrorOccurred are both set. This fixes a crash that occurs when a warning promoted

r285938 - Fix spelling mistake.

2016-11-03 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Nov 3 12:11:28 2016 New Revision: 285938 URL: http://llvm.org/viewvc/llvm-project?rev=285938=rev Log: Fix spelling mistake. Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp URL:

Re: [PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-11-03 Thread Akira Hatanaka via cfe-commits
Thanks, fixed in r285938. > On Nov 3, 2016, at 8:27 AM, Malcolm Parsons via cfe-commits > wrote: > > malcolm.parsons added inline comments. > > > > Comment at: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp:213 > + // Don't allow further

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

2016-11-03 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 76883. ahatanak added a comment. Rebase. Pass the destructor's DeclarationNameInfo to the call to RebuildMemberExpr rather than getting it inside RebuildMemberExpr. https://reviews.llvm.org/D24969 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp

[PATCH] D25556: [Sema] Add variable captured by a block to the enclosing lambda's potential capture list

2016-10-26 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 75956. ahatanak added a comment. Add the variable to the list of potential captures only if it's declared outside of the lambda expression. I don't think we need to check that the variable is declared outside of the lambda because

[PATCH] D25480: __builtin_fpclassify missing one int parameter

2016-10-11 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. __builtin_fpclassify takes five int arguments followed by one last argument that is of floating point type. Do you know if there is a way to specify the last one argument is a floating point rather than using '.'? https://reviews.llvm.org/D25480

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

2016-10-11 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 74324. ahatanak added a comment. Added a call to operator C1* in test case. https://reviews.llvm.org/D24969 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp lib/Sema/TreeTransform.h test/SemaCXX/destructor.cpp Index: test/SemaCXX/destructor.cpp

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

2016-10-11 Thread Akira Hatanaka via cfe-commits
ahatanak marked an inline comment as done. ahatanak added a comment. (I'm replying to the comment near TreeTransform.h:11967 because phab doesn't let me hit save) It looks like RebuildCXXPseudoDestructorExpr isn't even called because a MemberExpr is created instead of a

[PATCH] D25556: [Sema] Add variable captured by a block to the enclosing lambda's potential capture list

2016-10-13 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rsmith, rjmccall. ahatanak added a subscriber: cfe-commits. When compiling the following code, DoMarkVarDeclReferenced fails to capture variable "outerp": auto lambda =[&](auto p) { return ^{ return p + outerp; }(); };

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

2016-10-12 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. It looks like this patch doesn't do what I thought would do when the unprototyped function declaration is in the header and the prototyped function declaration is in the source code. The DeclRefExpr created for the call to func1("abc", 12) points to the unprototyped

[PATCH] D25547: [CodeGen][ObjC] Do not emit objc_storeStrong to initialize a constexpr variable

2016-10-12 Thread Akira Hatanaka via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. ahatanak added a subscriber: cfe-commits. When compiling a constexpr NSString initialized with an objective-c string literal, CodeGen currently emits objc_storeStrong on an uninitialized alloca, which causes a crash:

[PATCH] D25547: [CodeGen][ObjC] Do not emit objc_storeStrong to initialize a constexpr variable

2016-10-17 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 74851. ahatanak added a comment. Simplify the code a bit more. https://reviews.llvm.org/D25547 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CGObjC.cpp lib/CodeGen/CGStmtOpenMP.cpp lib/CodeGen/CodeGenFunction.h

[PATCH] D25547: [CodeGen][ObjC] Do not emit objc_storeStrong to initialize a constexpr variable

2016-10-14 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. There are two overloaded functions of CodeGenFunction::EmitScalarInit. Are you suggesting we fold both of them into EmitStoreThroughLValue and remove them? https://reviews.llvm.org/D25547 ___ cfe-commits mailing list

[PATCH] D25556: [Sema] Add variable captured by a block to the enclosing lambda's potential capture list

2016-10-17 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D25556#569809, @rjmccall wrote: > Richard should probably weigh in about whether we should be recording > potential captures at *all* capturing scopes. But at the very least, I think > you have a bug here where the variable is declared

r289615 - [CodeGen][ObjC] Emit objc_unsafeClaimAutoreleasedReturnValue for

2016-12-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Dec 13 17:32:22 2016 New Revision: 289615 URL: http://llvm.org/viewvc/llvm-project?rev=289615=rev Log: [CodeGen][ObjC] Emit objc_unsafeClaimAutoreleasedReturnValue for fragile runtime too. Follow-up to r258962. rdar://problem/29269006 Modified:

r289919 - Remove "-disable-llvm-optzns -verify" from the RUN line.

2016-12-15 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Dec 15 22:18:53 2016 New Revision: 289919 URL: http://llvm.org/viewvc/llvm-project?rev=289919=rev Log: Remove "-disable-llvm-optzns -verify" from the RUN line. Modified: cfe/trunk/test/SemaTemplate/default-expr-arguments-3.cpp Modified:

Re: r289919 - Remove "-disable-llvm-optzns -verify" from the RUN line.

2016-12-15 Thread Akira Hatanaka via cfe-commits
Your commit seemed to have fixed the bot. Thanks! I’m going to wait until all the other bots are green again and then fix the test case later. > On Dec 15, 2016, at 9:45 PM, Akira Hatanaka via cfe-commits > <cfe-commits@lists.llvm.org> wrote: > > It looks like it faile

r289914 - [Sema] Fix handling of enumerators used as default arguments of lambda

2016-12-15 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Dec 15 21:19:41 2016 New Revision: 289914 URL: http://llvm.org/viewvc/llvm-project?rev=289914=rev Log: [Sema] Fix handling of enumerators used as default arguments of lambda expressions in a function or class template. This patch makes the following changes: - Create

Re: r289919 - Remove "-disable-llvm-optzns -verify" from the RUN line.

2016-12-15 Thread Akira Hatanaka via cfe-commits
t this is still failing on all the bots? > (http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/493 > <http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/493> eg) > > On Thu, Dec 15, 2016 at 11:18 PM, Akira Hatanaka via cfe-commits > <cfe-comm

Re: r289919 - Remove "-disable-llvm-optzns -verify" from the RUN line.

2016-12-15 Thread Akira Hatanaka via cfe-commits
ri, Dec 16, 2016 at 12:05 AM, Nico Weber <tha...@chromium.org >> <mailto:tha...@chromium.org>> wrote: >> Are you aware that this is still failing on all the bots? >> (http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/493 >> <http://lab.llvm.org:80

Re: r289919 - Remove "-disable-llvm-optzns -verify" from the RUN line.

2016-12-15 Thread Akira Hatanaka via cfe-commits
..@chromium.org > <mailto:tha...@chromium.org>> wrote: > Are you aware that this is still failing on all the bots? > (http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/493 > <http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/493> eg) >

r289990 - [Sema] Transform the default arguments of a lambda expression when the

2016-12-16 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Dec 16 15:16:57 2016 New Revision: 289990 URL: http://llvm.org/viewvc/llvm-project?rev=289990=rev Log: [Sema] Transform the default arguments of a lambda expression when the lambda expression is instantiated. Rather than waiting until Sema::CheckCXXDefaultArgExpr tries

Re: Patch for Bug 22877

2017-01-09 Thread Akira Hatanaka via cfe-commits
Perhaps you can check more explicitly that the destructor is called inside the loop? // CHECK: [[regex for LOOP_BODY]]: // CHECK: call void @_ZN3fooC1Ev // CHECK-NOT: br // CHECK: call void @_ZN3barC1E3foo // CHECK-NOT: br // CHECK: call void @_ZN3fooD1Ev // CHECK: br [[LOOP_BODY]] > On Jan 8,

r288267 - [Sema] Teach -Wcast-align to look at the aligned attribute of the

2016-11-30 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Nov 30 13:42:03 2016 New Revision: 288267 URL: http://llvm.org/viewvc/llvm-project?rev=288267=rev Log: [Sema] Teach -Wcast-align to look at the aligned attribute of the declared variables. Teach Sema to check the aligned attribute attached to variable declarations so

r288404 - [CodeGen][ARM] Make sure the value and type used to create a bitcast

2016-12-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Dec 1 13:25:14 2016 New Revision: 288404 URL: http://llvm.org/viewvc/llvm-project?rev=288404=rev Log: [CodeGen][ARM] Make sure the value and type used to create a bitcast have the same size. This fixes an asset that is triggered when an address of a boolean variable

r291253 - Make ASTContext::getDeclAlign return the correct alignment for

2017-01-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Jan 6 11:56:15 2017 New Revision: 291253 URL: http://llvm.org/viewvc/llvm-project?rev=291253=rev Log: Make ASTContext::getDeclAlign return the correct alignment for FunctionDecls. This commit silences an incorrect warning that is issued when a function pointer is cast

r290156 - [Parser] Correct typo after lambda capture initializer is parsed.

2016-12-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Dec 19 20:11:29 2016 New Revision: 290156 URL: http://llvm.org/viewvc/llvm-project?rev=290156=rev Log: [Parser] Correct typo after lambda capture initializer is parsed. This patch fixes an assertion that is triggered when RecordLayoutBuilder tries to compute the size

r289986 - Remove the temporary fix to the RUN line that was committed in r289924.

2016-12-16 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Dec 16 14:25:11 2016 New Revision: 289986 URL: http://llvm.org/viewvc/llvm-project?rev=289986=rev Log: Remove the temporary fix to the RUN line that was committed in r289924. Also, dump the AST and run FileCheck to make sure the expected nodes are created in the AST.

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=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 enums.

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=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

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=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 >

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=rev Log: [ObjC] Use empty Objective-C collection literal constants when available. Original patch by Douglas Gregor with minor modifications. rdar://problem/20689633 Added:

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

2017-04-15 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=rev Log: [ObjC] Use empty Objective-C collection literal constants when available. Original patch by Douglas Gregor with minor modifications. This recommits r300389, which

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=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. Removed:

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 <ahatan...@apple.com > <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 >> <cfe-commits@lists.llvm.org <mailto:cfe-commi

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=rev Log: [ObjC] Mark loads from __NSArray0 and __NSDictionary0 as invariant.load. Also, simplify code by calling MakeNaturalAlignAddrLValue. This is a follow-up to r300396.

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=rev Log: Revert "[clang-cl] Make all sanitizer flags available in clang-cl" This reverts commit 47979b20b475664013d19382fc6875b5b9f3ed9d. This was causing a couple of bots to

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 > <cfe-commits@lists.llvm.org> wrote: > > I think this broke some of the bots. > > http://lab.llvm.org:8080/green/job/clang-stage1-configure-

r300722 - [Sema][ObjC] Disallow jumping into ObjC fast enumeration loops.

2017-04-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Apr 19 12:54:08 2017 New Revision: 300722 URL: http://llvm.org/viewvc/llvm-project?rev=300722=rev Log: [Sema][ObjC] Disallow jumping into ObjC fast enumeration loops. rdar://problem/31635406 Differential Revision: https://reviews.llvm.org/D32187 Modified:

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

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

<    1   2   3   4   5   6   7   8   9   >