Re: [PATCH] D20407: [CodeGen][ObjC] zero-ext an i1 value to i8

2016-05-20 Thread John McCall via cfe-commits
rjmccall added a comment. Top-level attributes shouldn't really be affecting the ABI or code-generation in any way, so desugaring should be fine. http://reviews.llvm.org/D20407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

Re: [PATCH] D20113: Fix mangled name of method with ns_consumed parameters.

2016-05-20 Thread John McCall via cfe-commits
rjmccall added a comment. That looks great, thank you. http://reviews.llvm.org/D20113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-03-29 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaType.cpp:1569 @@ +1568,3 @@ +// Mark them as invalid. +attr.setInvalid(); + } It's not generally a good idea to set things as invalid if you're just emitting a warning. It might be dif

Re: [PATCH] D18618: [ObjC] Pop all cleanups created in CodeGenFunction::EmitObjCForCollectionStmt

2016-03-30 Thread John McCall via cfe-commits
rjmccall added a comment. If multiple cleanups can be entered, the appropriate thing to do is enter a RunCleanupsScope of some sort and then pop it at the right time. But you should find out why the cleanup is being entered — it's possible that it's not being properly bound to a full-expressio

Re: [PATCH] D18479: [CodeGenCXX] Fix ItaniumCXXABI::getAlignmentOfExnObject to return 8-byte alignment on Darwin

2016-03-30 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/ItaniumCXXABI.cpp:174 @@ +173,3 @@ +else + Align = CGM.getContext().getTargetDefaultAlignForAttributeAligned(); + Just add a ExnObjectAlignment field to TargetInfo, please. We already have a Darwin

Re: [PATCH] D18618: [ObjC] Pop all cleanups created in CodeGenFunction::EmitObjCForCollectionStmt

2016-03-30 Thread John McCall via cfe-commits
rjmccall added a comment. In http://reviews.llvm.org/D18618#387847, @ahatanak wrote: > In CodeGenFunction::EmitARCRetainScalarExpr, if I move the declaration of > "scope" above the call to enterFullExpression, the cleanup is popped before > the loop body is entered right after the method return

Re: [PATCH] D18479: [CodeGenCXX] Fix ItaniumCXXABI::getAlignmentOfExnObject to return 8-byte alignment on Darwin

2016-03-31 Thread John McCall via cfe-commits
rjmccall added a comment. Otherwise, LGTM. Repository: rL LLVM http://reviews.llvm.org/D18479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18479: [CodeGenCXX] Fix ItaniumCXXABI::getAlignmentOfExnObject to return 8-byte alignment on Darwin

2016-03-31 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: cfe/trunk/include/clang/Basic/TargetInfo.h:426 @@ +425,3 @@ +/// we assume that alignment here. (It's generally 16 bytes, but +/// some targets overwrite it.) +return getDefaultAlignForAttributeAligned(); Th

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-03-31 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaType.cpp:1569 @@ +1568,3 @@ +// Mark them as invalid. +attr.setInvalid(); + } manmanren wrote: > rjmccall wrote: > > It's not generally a good idea to set things as invalid if you're jus

Re: [PATCH] D18196: [CodeGen] Emit lifetime.end intrinsic after destructor call in landing pad

2016-04-01 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM. http://reviews.llvm.org/D18196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-01 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1421 @@ -1415,1 +1420,3 @@ +else + return Builder.CreateBitCast(Src, DstTy); } This is just CreatePointerBitCastOrAddrSpaceCast. http://reviews.llvm.org/D18713 __

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-01 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM, thanks! http://reviews.llvm.org/D18713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r263191 - Preserve ExtParameterInfos into CGFunctionInfo.

2016-04-01 Thread John McCall via cfe-commits
> On Apr 1, 2016, at 3:50 PM, Nico Weber wrote: > On Thu, Mar 10, 2016 at 8:30 PM, John McCall via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > Author: rjmccall > Date: Thu Mar 10 22:30:31 2016 > New Revision: 263191 > > URL: http://llvm.org/viewvc/ll

r265324 - IRGen-level lowering for the Swift calling convention.

2016-04-04 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Apr 4 13:33:08 2016 New Revision: 265324 URL: http://llvm.org/viewvc/llvm-project?rev=265324&view=rev Log: IRGen-level lowering for the Swift calling convention. Added: cfe/trunk/include/clang/CodeGen/SwiftCallingConv.h cfe/trunk/lib/CodeGen/SwiftCallingConv.cp

r265323 - Add a couple of convenience operations to CharUnits.

2016-04-04 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Apr 4 13:33:00 2016 New Revision: 265323 URL: http://llvm.org/viewvc/llvm-project?rev=265323&view=rev Log: Add a couple of convenience operations to CharUnits. Modified: cfe/trunk/include/clang/AST/CharUnits.h Modified: cfe/trunk/include/clang/AST/CharUnits.h URL:

Re: r265323 - Add a couple of convenience operations to CharUnits.

2016-04-04 Thread John McCall via cfe-commits
> On Apr 4, 2016, at 11:49 AM, Sean Silva wrote: > On Mon, Apr 4, 2016 at 11:33 AM, John McCall via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > Author: rjmccall > Date: Mon Apr 4 13:33:00 2016 > New Revision: 265323 > > URL: http://llvm.org/viewv

r265328 - Assignment operators should return by reference.

2016-04-04 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Apr 4 13:53:01 2016 New Revision: 265328 URL: http://llvm.org/viewvc/llvm-project?rev=265328&view=rev Log: Assignment operators should return by reference. Thanks to Sean Silva for pointing this out. Modified: cfe/trunk/include/clang/AST/CharUnits.h Modified: cfe

r265344 - Fix an unused-variable warning by using the variable in the place

2016-04-04 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Apr 4 15:39:50 2016 New Revision: 265344 URL: http://llvm.org/viewvc/llvm-project?rev=265344&view=rev Log: Fix an unused-variable warning by using the variable in the place it was supposed to have been used. Modified: cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp

Re: [PATCH] D18618: [ObjC] Pop all cleanups created in CodeGenFunction::EmitObjCForCollectionStmt

2016-04-06 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM, thanks! http://reviews.llvm.org/D18618 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15524: [GCC] Attribute ifunc support in clang

2016-04-07 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2371 @@ +2370,3 @@ + +Not all targets support this attribute. ELF targets support this attribute when using binutils v2.20.1 or higher and glibc v2.11.1 or higher. Non-ELF targets currently do not supp

Re: [PATCH] D18823: Implementation of VlA of GNU C++ extension

2016-04-11 Thread John McCall via cfe-commits
rjmccall added a comment. It requires careful IRGen support which at one point did not exist. When I implemented VLAs of __strong/__weak references for ARC, I deliberately tried to make sure that the infrastructure would also work for the C++ cases, but I didn't have time to go actually test a

Re: [PATCH] D17993: [CodeGen] Apply 'nonnull' to 'this' pointer arguments.

2016-04-11 Thread John McCall via cfe-commits
rjmccall added a comment. In the cases where we can emit nonnull, I agree that we should be able to safely use dereferenceable for the non-virtual data size of of the type. I'm not too concerned about people calling methods on entirely the wrong type, especially to the relatively small degree

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-04-11 Thread John McCall via cfe-commits
rjmccall added a comment. Seems okay to me. Normally we wouldn't want to remove an attribute from the DeclSpec because it can apply to multiple declarators, but that's not possible with a block-literal declarator, so it's fine. Richard should sign off, though. http://reviews.llvm.org/D18567

Re: [PATCH] D18657: Propagate missing empty exception spec from function declared in system header

2016-04-11 Thread John McCall via cfe-commits
rjmccall added a comment. IIRC, isInSystemHeader isn't a terribly cheap check. Please extract this into a function that only needs to be called if the other checks succeed. You should also be able to just ask about the first declaration. There are contrived situations where isInSystemHeader c

Re: [PATCH] D19278: [scan-build] fix logic error warnings emitted on clang code base

2016-04-19 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaOverload.cpp:9191 @@ -9189,1 +9190,3 @@ + ToTy->isLValueReferenceType() && + !FromExpr->isLValue() && ToTy.getNonReferenceType().getCanonicalType() == Interleaving

Re: [PATCH] D19278: [scan-build] fix logic error warnings emitted on clang code base

2016-04-20 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM, thanks. http://reviews.llvm.org/D19278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19385: [scan-build] fix logic error warnings emitted on clang code base

2016-04-22 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Frontend/CompilerInstance.cpp:763 @@ -762,8 +762,3 @@ Includers.push_back(std::make_pair(FindFile, FindFile->getDir())); - File = HS->LookupFile(InputFile, SourceLocation(), /*isAngled=*/false, -

Re: [PATCH] D18657: Propagate missing empty exception spec from function declared in system header

2016-04-22 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExceptionSpec.cpp:260 @@ -261,1 +259,3 @@ + (First->getLocation().isInvalid() || + Context.getSourceManager().isInSystemHeader(First->getLocation( { New->setType(Context.getFunctionType(

Re: [PATCH] D18657: Propagate missing empty exception spec from function declared in system header

2016-04-22 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExceptionSpec.cpp:260 @@ -261,1 +259,3 @@ + (First->getLocation().isInvalid() || + Context.getSourceManager().isInSystemHeader(First->getLocation( { New->setType(Context.getFunctionType(

Re: [PATCH] D19385: [scan-build] fix logic error warnings emitted on clang code base

2016-04-22 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Frontend/CompilerInstance.cpp:763 @@ -762,8 +762,3 @@ Includers.push_back(std::make_pair(FindFile, FindFile->getDir())); - File = HS->LookupFile(InputFile, SourceLocation(), /*isAngled=*/false, -

Re: [PATCH] D20407: [CodeGen][ObjC] zero-ext an i1 value to i8

2016-05-25 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Type.h:1084 @@ +1083,3 @@ + /// Strip typedefs and atomic from the given type. + QualType getDesugaredAtomicValueType(const ASTContext &ctx) const; + Please name this getAtomicUnqualifiedType() and ha

Re: [PATCH] D20407: [CodeGen][ObjC] zero-ext an i1 value to i8

2016-05-25 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/Type.cpp:1282 @@ -1277,1 +1281,3 @@ +} + Optional> Type::getObjCSubstitutions( ahatanak wrote: > I added getTypePtr() because the code didn't compile. Sure. Comment at: lib/CodeGen/CGObjC.cpp:9

Re: [PATCH] D20407: [CodeGen][ObjC] zero-ext an i1 value to i8

2016-05-25 Thread John McCall via cfe-commits
rjmccall added a comment. In http://reviews.llvm.org/D20407#439887, @ahatanak wrote: > I reverted the changes I made in SemaDeclObjC.cpp as they weren't needed to > pass the regression tests I added. clang still asserts when it compiles an > objective-c method returning _Atomic and those change

Re: [PATCH] D20407: [CodeGen][ObjC] zero-ext an i1 value to i8

2016-05-25 Thread John McCall via cfe-commits
rjmccall added a comment. In http://reviews.llvm.org/D20407#440050, @ahatanak wrote: > In http://reviews.llvm.org/D20407#439951, @rjmccall wrote: > > > The C standard is poorly-written in this area, but I think it would be > > reasonable for CheckFunctionReturnType to just silently remove _Atomi

Re: [PATCH] D20407: [CodeGen][ObjC] zero-ext an i1 value to i8

2016-05-25 Thread John McCall via cfe-commits
rjmccall added a comment. One minor improvement to the API and LGTM. Comment at: include/clang/AST/Type.h:1084 @@ +1083,3 @@ + /// Remove all qualifiers including _Atomic. + QualType getAtomicUnqualifiedType(const ASTContext &ctx) const; + This doesn't need an

Re: [PATCH] D20843: ObjC lifetime: pull sugar off when the qualifiers conflict.

2016-06-01 Thread John McCall via cfe-commits
rjmccall added a comment. Oh sure, because we don't strip the original type if there isn't a conflict. LGTM. http://reviews.llvm.org/D20843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

Re: [PATCH] D20844: FixIt: correctly set DeclSpec's range end for a type name annotation.

2016-06-01 Thread John McCall via cfe-commits
rjmccall added a comment. Hmm. No, I think the original code is correct here — RangeEnd is a token range, and those are generally inclusive rather than exclusive. The fix-it needs to be inserting at the end of the token. http://reviews.llvm.org/D20844 _

Re: [PATCH] D20844: FixIt: use getLocForEndOfToken to insert fix-it after a type name.

2016-06-01 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM. http://reviews.llvm.org/D20844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21566: Widen EHScope::ClenupBitFields::FixupDepth to avoid overflowing it (PR23490)

2016-06-22 Thread John McCall via cfe-commits
rjmccall added a comment. Yeah, 2048 is clearly too few. The other changes aren't necessary; if we're going to try to be that generous, there's a lot of places in the AST that need to be updated. Comment at: lib/CodeGen/CGCleanup.h:61 @@ -60,3 +60,3 @@ -unsigned NumHand

Re: [PATCH] D21566: Widen EHScope::ClenupBitFields::FixupDepth to avoid overflowing it (PR23490)

2016-06-22 Thread John McCall via cfe-commits
rjmccall added a comment. That looks great, thanks. http://reviews.llvm.org/D21566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21611: Fix small structures calling convention issue for some big endian architectures

2016-06-22 Thread John McCall via cfe-commits
rjmccall added a comment. Hmm. On MIPS64, a slot is 64 bits, right? How is a float passed? http://reviews.llvm.org/D21611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21611: Fix small structures calling convention issue for some big endian architectures

2016-06-22 Thread John McCall via cfe-commits
rjmccall added a comment. Oh, floats are promoted to doubles in varargs, of course, which neatly makes that an impossible situation. My inclination is that the right condition here is that only integer types should be right-justified in their slot, but I'll admit to not having an easy example

Re: [PATCH] D22189: llvm.noalias - Clang CodeGen - check restrict variable map only for restrict-qualified lvalues

2016-07-12 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CodeGenFunction.h:2725 @@ -2724,3 +2724,3 @@ void EmitStoreOfScalar(llvm::Value *Value, Address Addr, - bool Volatile, QualType Ty, + bool Volatile, bool Restrict, QualType T

Re: [PATCH] D9403: llvm.noalias - Clang CodeGen for local restrict-qualified pointers

2016-07-13 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGStmt.cpp:537 @@ +536,3 @@ + llvm::LLVMContext::MD_noalias), + NewScopeList)); + This is a very strange representation. Every memory

r262275 - Infrastructure improvements to Clang attribute TableGen.

2016-02-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Feb 29 18:18:05 2016 New Revision: 262275 URL: http://llvm.org/viewvc/llvm-project?rev=262275&view=rev Log: Infrastructure improvements to Clang attribute TableGen. This should make it easier to add new Attr subclasses. Modified: cfe/trunk/include/clang/AST/Attr.h

r262278 - Generalize the consumed-parameter array on FunctionProtoType

2016-02-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Feb 29 18:49:02 2016 New Revision: 262278 URL: http://llvm.org/viewvc/llvm-project?rev=262278&view=rev Log: Generalize the consumed-parameter array on FunctionProtoType to allow arbitrary data to be associated with a parameter. Also, fix a bug where we apparently haven'

Re: r262278 - Generalize the consumed-parameter array on FunctionProtoType

2016-02-29 Thread John McCall via cfe-commits
> On Feb 29, 2016, at 5:06 PM, Pariborz Jahanian wrote: >> On Feb 29, 2016, at 4:49 PM, John McCall via cfe-commits >> wrote: >> >> Author: rjmccall >> Date: Mon Feb 29 18:49:02 2016 >> New Revision: 262278 >> >> URL: http://llvm

r262288 - Add an llvm_unreachable back to the autogeneration of this covered switch.

2016-02-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Feb 29 20:09:20 2016 New Revision: 262288 URL: http://llvm.org/viewvc/llvm-project?rev=262288&view=rev Log: Add an llvm_unreachable back to the autogeneration of this covered switch. Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Modified: cfe/trunk/utils/

r262289 - Fix the template instantiation of ExtParameterInfos; tests to follow.

2016-02-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Feb 29 20:09:25 2016 New Revision: 262289 URL: http://llvm.org/viewvc/llvm-project?rev=262289&view=rev Log: Fix the template instantiation of ExtParameterInfos; tests to follow. Modified: cfe/trunk/include/clang/AST/Type.h cfe/trunk/include/clang/Sema/Sema.h

Re: r262275 - Infrastructure improvements to Clang attribute TableGen.

2016-02-29 Thread John McCall via cfe-commits
er-enumerations > > <http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations> Sorry, should be fixed in r262288. I’ll be back in a few hours, feel free to revert if it doesn’t clear up. John. > > -- Sean Silva >

r262308 - Better comments for ExtParameterInfo.

2016-02-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Mar 1 00:27:40 2016 New Revision: 262308 URL: http://llvm.org/viewvc/llvm-project?rev=262308&view=rev Log: Better comments for ExtParameterInfo. Modified: cfe/trunk/include/clang/AST/Type.h cfe/trunk/include/clang/Sema/Sema.h Modified: cfe/trunk/include/clang/

r262311 - Test template instantiation of ns_consumed and ns_returns_retained.

2016-02-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Mar 1 00:54:30 2016 New Revision: 262311 URL: http://llvm.org/viewvc/llvm-project?rev=262311&view=rev Log: Test template instantiation of ns_consumed and ns_returns_retained. Modified: cfe/trunk/test/SemaObjCXX/arc-templates.mm Modified: cfe/trunk/test/SemaObjCXX/

r262414 - Mangle extended qualifiers in the proper order and mangle the

2016-03-01 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Mar 1 16:18:03 2016 New Revision: 262414 URL: http://llvm.org/viewvc/llvm-project?rev=262414&view=rev Log: Mangle extended qualifiers in the proper order and mangle the ARC ownership-convention function type modifications. According to the Itanium ABI, vendor extended

r262551 - Improve some infrastructure for extended parameter infos and

2016-03-02 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Mar 2 18:10:03 2016 New Revision: 262551 URL: http://llvm.org/viewvc/llvm-project?rev=262551&view=rev Log: Improve some infrastructure for extended parameter infos and fix a bug with the instantiation of ns_consumed parameter attributes in ARC. Modified: cfe/trunk/

r262587 - Semantic analysis for the swiftcall calling convention.

2016-03-02 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Mar 3 00:39:32 2016 New Revision: 262587 URL: http://llvm.org/viewvc/llvm-project?rev=262587&view=rev Log: Semantic analysis for the swiftcall calling convention. I've tried to keep the infrastructure behind parameter ABI treatments fairly general. Added: cfe/trun

Re: [PATCH] D16797: Update clang support on recent Haiku

2016-03-08 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM. Repository: rL LLVM http://reviews.llvm.org/D16797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17993: [CodeGen] Apply 'nonnull' to 'this' pointer arguments.

2016-03-09 Thread John McCall via cfe-commits
rjmccall added a comment. Hal, I think you're talking about a slightly different thing. This patch is adding an assumption that C++ this pointers are non-null, but only when -fno-delete-null-pointer-checks is not passed. The flag is therefore at least somewhat functional. (I would argue that

Re: [PATCH] D17993: [CodeGen] Apply 'nonnull' to 'this' pointer arguments.

2016-03-09 Thread John McCall via cfe-commits
rjmccall added a comment. Er, sorry. You are not inspiring *me* to disagree with Chandler. http://reviews.llvm.org/D17993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17993: [CodeGen] Apply 'nonnull' to 'this' pointer arguments.

2016-03-09 Thread John McCall via cfe-commits
rjmccall added a comment. Well, no, we can do it under a different flag and just ensure that -fno-delete-null-pointer-checks *also* has the effect of disabling the optimization. But you are not inspiring to disagree with Chandler about whether this optimization should be enabled by default.

Re: [PATCH] D17627: Fix false positives for for-loop-analysis warning

2016-03-09 Thread John McCall via cfe-commits
rjmccall added a comment. The right fix is probably at the PseudoObjectExpr level; you should probably be looking at the semantic expressions instead of the syntactic. http://reviews.llvm.org/D17627 ___ cfe-commits mailing list cfe-commits@lists.ll

Re: [PATCH] D17627: Fix false positives for for-loop-analysis warning

2016-03-09 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaStmt.cpp:1448 @@ +1447,3 @@ +if (auto *OVE = dyn_cast(S)) { + // Look pass OVE for Decl. + if (Expr *E = OVE->getSourceExpr()) "Look past the OVE into the expression it binds." ===

Re: [PATCH] D17627: Fix false positives for for-loop-analysis warning

2016-03-09 Thread John McCall via cfe-commits
rjmccall added a comment. Thanks, LGTM. http://reviews.llvm.org/D17627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r263191 - Preserve ExtParameterInfos into CGFunctionInfo.

2016-03-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Mar 10 22:30:31 2016 New Revision: 263191 URL: http://llvm.org/viewvc/llvm-project?rev=263191&view=rev Log: Preserve ExtParameterInfos into CGFunctionInfo. As part of this, make the function-arrangement interfaces a little simpler and more semantic. NFC. Modified:

r263192 - Add a coerce-and-expand ABIArgInfo as a generalization of some

2016-03-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Mar 10 22:30:43 2016 New Revision: 263192 URL: http://llvm.org/viewvc/llvm-project?rev=263192&view=rev Log: Add a coerce-and-expand ABIArgInfo as a generalization of some of the things we do with Expand / Direct. NFC for now, but this will be used by swiftcall expansion

r263193 - Speculatively attempt to fix the MSVC build by making some

2016-03-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Mar 10 22:55:21 2016 New Revision: 263193 URL: http://llvm.org/viewvc/llvm-project?rev=263193&view=rev Log: Speculatively attempt to fix the MSVC build by making some methods non-private. Modified: cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h Modified: cfe/trun

r263194 - Removing the friend declaration was not a good idea.

2016-03-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Mar 10 23:03:01 2016 New Revision: 263194 URL: http://llvm.org/viewvc/llvm-project?rev=263194&view=rev Log: Removing the friend declaration was not a good idea. Modified: cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h Modified: cfe/trunk/include/clang/CodeGen/CGF

Re: [PATCH] D18071: CodeGen: Mark runtime functions with reserved names as unnamed_addr.

2016-03-10 Thread John McCall via cfe-commits
rjmccall added a comment. The underscore check seems over-broad; we support a lot of language dialects and runtimes besides the Itanium C++ runtime. This would be both more conservative and more convincing if it were constrained to the functions that we expect to put in v-tables. http://revi

Re: [PATCH] D18095: Add __attribute__((linkonce_odr_linkage))

2016-03-12 Thread John McCall via cfe-commits
rjmccall added a comment. Okay, first off, linkonce_odr is not an acceptable term to be introducing as an attribute name. If we need this, we can find some way to describe it that isn't a random internal compiler term. More importantly, I don't understand how your problem is solved by linkonce

Re: [PATCH] D18123: Fix implicit copy ctor and copy assignment operator warnings when -Wdeprecated passed.

2016-03-13 Thread John McCall via cfe-commits
rjmccall added a comment. It has side effects in the destructor. It's not copyable. It could reasonably be made movable, however, now that we require C++11 as a host requirement. (It was written before that was true.) http://reviews.llvm.org/D18123

Re: [PATCH] D18113: CodeGen: Use 32-bit gep offsets to address vtable address points.

2016-03-13 Thread John McCall via cfe-commits
rjmccall added a comment. Yes, I guess this is fine. http://reviews.llvm.org/D18113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18071: CodeGen: Mark functions used in vtables as unnamed_addr.

2016-03-13 Thread John McCall via cfe-commits
rjmccall added a comment. I see, they weren't being set on declarations, just definitions. Yes, this seems reasonable. http://reviews.llvm.org/D18071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-13 Thread John McCall via cfe-commits
rjmccall added a comment. In http://reviews.llvm.org/D14737#373532, @pete wrote: > I stepped through this one in the debugger to make sure I had it right. > > So the reason the bit cast ends up not being needed is because we restricted > this optimization to cases where the result type "isObjCOb

Re: [PATCH] D18095: Add __attribute__((linkonce_odr_linkage))

2016-03-14 Thread John McCall via cfe-commits
rjmccall added a comment. Your use case violates the "ODR" restriction on linkonce_odr. Do you maybe just want __attribute__((weak))? Repository: rL LLVM http://reviews.llvm.org/D18095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

Re: [PATCH] D18095: Add __attribute__((linkonce_odr_linkage))

2016-03-14 Thread John McCall via cfe-commits
rjmccall added a comment. linkonce_odr would allow them to be dropped if unused by the library. In fact, we don't normally emit IR for functions that are linkonce and not used. Do you actually want code in lib_common to e.g. inline the common implementation instead of calling the optimized one

Re: [PATCH] D18095: Add __attribute__((linkonce_odr_linkage))

2016-03-14 Thread John McCall via cfe-commits
rjmccall added a comment. Well, your overriding definitions will be strong definitions. The question is whether you want to allow inning of the weak definitions, i.e. the possibly-overridden ones, and there I would assume not. Repository: rL LLVM http://reviews.llvm.org/D18095 _

Re: [PATCH] D18071: CodeGen: Mark functions used in vtables as unnamed_addr.

2016-03-14 Thread John McCall via cfe-commits
rjmccall added a comment. Member function comparisons of virtual functions aren't required to work anyway. Itanium just happens to implement them in a way that kindof gets it right (for simple cases). Repository: rL LLVM http://reviews.llvm.org/D18071 ___

Re: [PATCH] D18175: Avoid using LookupResult's implicit copy ctor and assignment operator to avoid warnings

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. You can't call getFoundDecl() if !isSingleResult(). You should add a test case that actually tests the possibility that this lookup will fail. Repository: rL LLVM http://reviews.llvm.org/D18175 ___ cfe-commits mailing

Re: [PATCH] D18175: Avoid using LookupResult's implicit copy ctor and assignment operator to avoid warnings

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. Ignore Dave and fix the problem, please. :) Repository: rL LLVM http://reviews.llvm.org/D18175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18123: Fix implicit copy ctor and copy assignment operator warnings when -Wdeprecated passed.

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. Making UnresolvedSet copyable / movable seems reasonable to me. http://reviews.llvm.org/D18123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18035: [GCC] PR23529 Mangler part of attrbute abi_tag support

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. It's languished because the idea itself has unavoidable problems with incomplete types. http://reviews.llvm.org/D18035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. Can you find where that bitcast is being added? I know that different parts of IRGen are differently sensitive to types — it's possible that the return code is one of those more-permissive places. http://reviews.llvm.org/D14737

Re: [PATCH] D17988: Fix destructor definition of invalid classes

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. Seems okay to me. http://reviews.llvm.org/D17988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. Ah, okay, if you changed it to cast explicitly, that's all I was concerned about. http://reviews.llvm.org/D14737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D18182: [test] Don't use UNSUPPORTED in FileCheck prefixes

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM. http://reviews.llvm.org/D18182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18175: Avoid using LookupResult's implicit copy ctor and assignment operator to avoid warnings

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. Hmm. Checking whether LookupName returns false will catch a lot of simple cases. I think the test case you need might have to be a lookup that finds multiple overloads of a function in C++. Repository: rL LLVM http://reviews.llvm.org/D18175 ___

Re: [PATCH] D14737: Convert some ObjC msgSends to runtime calls

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. Yes, LGTM. http://reviews.llvm.org/D14737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18175: Avoid using LookupResult's implicit copy ctor and assignment operator to avoid warnings

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. Thank you, LGTM. Repository: rL LLVM http://reviews.llvm.org/D18175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18196: [CodeGen] Emit lifetime.end intrinsic after destructor call in landing pad

2016-03-15 Thread John McCall via cfe-commits
rjmccall added a comment. You should talk to Reid or someone else involved in MSVC-style EH support to ensure that they generate a reasonable code pattern for this. You should also check that any back-end peepholes we have in place (null type infos to signify a call-terminate landingpad?) aren'

Re: [PATCH] D17893: Sema: Add semantic analysis for the C++ ABI stability attributes and whitelist.

2016-03-19 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:4935-4943 @@ +4934,11 @@ + + bool HasStableAttr = Record->hasAttr(); + bool HasUnstableAttr = Record->hasAttr(); + if (HasStableAttr && HasUnstableAttr) { +Diag(Record->getLocation(), diag::err_abi_mismatc

Re: [PATCH] D17893: Sema: Add semantic analysis for the C++ ABI stability attributes and whitelist.

2016-03-19 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:4935-4943 @@ +4934,11 @@ + + bool HasStableAttr = Record->hasAttr(); + bool HasUnstableAttr = Record->hasAttr(); + if (HasStableAttr && HasUnstableAttr) { +Diag(Record->getLocation(), diag::err_abi_mismatc

Re: [PATCH] D18095: Add __attribute__((linkonce_odr_linkage))

2016-03-22 Thread John McCall via cfe-commits
rjmccall added a comment. You still don't actually want linkonce_odr linkage. You don't want the weak definition to be inlined, so it can't be ODR, and you want to force it to be emitted in your library, so it can't be linkonce. You just want weak linkage. There's an existing attribute for t

Re: [PATCH] D18095: Add __attribute__((linkonce_odr_linkage))

2016-03-22 Thread John McCall via cfe-commits
rjmccall added a comment. Does your linker not supported dead-code stripping? http://reviews.llvm.org/D18095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18095: Add __attribute__((linkonce_odr_linkage))

2016-03-22 Thread John McCall via cfe-commits
rjmccall added a comment. You could also get this effect by somehow making the definitions linkonce_odr when they're linked in from the library. Or you could simply use the classic static-archive technique of putting each symbol in its own object file and linking against the whole thing as a s

Re: [PATCH] D18095: Add __attribute__((linkonce_odr_linkage))

2016-03-22 Thread John McCall via cfe-commits
rjmccall added a comment. Yes, you should just stick with your post-processing pass or something like it. The design of linkonce_odr linkage is that such definitions will only be emitted when they are actually used. Even with this attribute, a translation unit that consists solely of: __att

Re: [PATCH] D18461: ObjCXX: Warn undeclared identifiers.

2016-03-24 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM. http://reviews.llvm.org/D18461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18461: ObjCXX: Warn undeclared identifiers.

2016-03-24 Thread John McCall via cfe-commits
rjmccall added a comment. Oh, you know, this should really propagate all the dependence bits, not just instantiation-dependence. It would be safer, at least. You could probably find a contrived example involving value-dependence. http://reviews.llvm.org/D18461

Re: [PATCH] D15524: [GCC] Attribute ifunc support in clang

2015-12-29 Thread John McCall via cfe-commits
rjmccall added a comment. This looks great, thanks. A few minor comment tweaks and this will be ready to commit. Comment at: include/clang/AST/DeclBase.h:562 @@ -561,1 +561,3 @@ + /// \brief Return true if this declaration is a definition of alias or ifunc. + bool hasDefin

Re: [PATCH] D15524: [GCC] Attribute ifunc support in clang

2015-12-29 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/DeclBase.h:563 @@ +562,3 @@ + /// \brief Return true if this declaration is a definition of alias or ifunc. + bool hasDefiningAttr() const; + aaron.ballman wrote: > I think this function and getDefini

Re: [PATCH] D15647: [X86] Fix stack alignment for MCU target (Clang part)

2016-01-03 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM, thanks. http://reviews.llvm.org/D15647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15709: [X86] Support 'interrupt' attribute for x86

2016-01-03 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:259 @@ +258,3 @@ +def err_anyx86_interrupt_attribute : Error< + "interrupt service routine %select{must have 'void' return value|" + "can only have a pointer argument and an optional integer a

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