r362183 - Fix the predefined exponent limit macros for the 16-bit IEEE format.

2019-05-30 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu May 30 18:21:36 2019 New Revision: 362183 URL: http://llvm.org/viewvc/llvm-project?rev=362183=rev Log: Fix the predefined exponent limit macros for the 16-bit IEEE format. The magnitude range of normalized _Float16 is 2^-14 (~6e-5) to (2-2^-10)*2^15 (65504). You might

r362054 - Add the `objc_class_stub` attribute.

2019-05-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed May 29 21:09:01 2019 New Revision: 362054 URL: http://llvm.org/viewvc/llvm-project?rev=362054=rev Log: Add the `objc_class_stub` attribute. Swift requires certain classes to be not just initialized lazily on first use, but actually allocated lazily using information

Re: r358104 - Don't emit an unreachable return block.

2019-04-10 Thread John McCall via cfe-commits
- From: cfe-commits On Behalf Of John McCall via cfe-commits Sent: Wednesday, April 10, 2019 10:03 AM To: cfe-commits@lists.llvm.org Subject: r358104 - Don't emit an unreachable return block. Author: rjmccall Date: Wed Apr 10 10:03:09 2019 New Revision: 358104 URL: http://llvm.org/viewvc/llvm

r358132 - Add IRGen APIs to fetch ctor/dtor helper functions for non-trivial structs.

2019-04-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Apr 10 12:57:20 2019 New Revision: 358132 URL: http://llvm.org/viewvc/llvm-project?rev=358132=rev Log: Add IRGen APIs to fetch ctor/dtor helper functions for non-trivial structs. Patch by Tony Allevato! Modified: cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h

r358125 - Fix for different build configurations.

2019-04-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Apr 10 12:11:32 2019 New Revision: 358125 URL: http://llvm.org/viewvc/llvm-project?rev=358125=rev Log: Fix for different build configurations. Modified: cfe/trunk/test/CodeGen/unreachable-ret.c Modified: cfe/trunk/test/CodeGen/unreachable-ret.c URL:

r358115 - Fix an off-by-one mistake in IRGen's copy-construction

2019-04-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Apr 10 11:07:18 2019 New Revision: 358115 URL: http://llvm.org/viewvc/llvm-project?rev=358115=rev Log: Fix an off-by-one mistake in IRGen's copy-construction special cases in the presence of zero-length arrays. Patch by Joran Bigalet! Modified:

r358104 - Don't emit an unreachable return block.

2019-04-10 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Apr 10 10:03:09 2019 New Revision: 358104 URL: http://llvm.org/viewvc/llvm-project?rev=358104=rev Log: Don't emit an unreachable return block. Patch by Brad Moody. Added: cfe/trunk/test/CodeGen/unreachable-ret.c Modified: cfe/trunk/lib/CodeGen/CGCall.cpp

Re: r311065 - Further refactoring of the constant emitter. NFC.

2019-03-18 Thread John McCall via cfe-commits
On 18 Mar 2019, at 18:05, John McCall wrote: On 18 Mar 2019, at 15:38, Don Hinton wrote: Hi John: I found this investigating the cast assert noted here: http://lists.llvm.org/pipermail/cfe-dev/2019-March/061685.html I subsequently did quick grep and found a number of cases in clang+llvm

Re: r311065 - Further refactoring of the constant emitter. NFC.

2019-03-18 Thread John McCall via cfe-commits
On 18 Mar 2019, at 15:38, Don Hinton wrote: Hi John: I found this investigating the cast assert noted here: http://lists.llvm.org/pipermail/cfe-dev/2019-March/061685.html I subsequently did quick grep and found a number of cases in clang+llvm (didn't find any in other projects) . I'm happy

Re: r311065 - Further refactoring of the constant emitter. NFC.

2019-03-18 Thread John McCall via cfe-commits
On 18 Mar 2019, at 14:39, Don Hinton wrote: It looks like this change introduced a small bug; Specifically, the following cast test: - if (auto PT = dyn_cast(DestTy)) { ... + // If we're producing a pointer, this is easy. + if (auto destPtrTy = cast(destTy)) { Since the cast can fail,

Re: r350920 - [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed

2019-01-31 Thread John McCall via cfe-commits
an important use-case. John. On Jan 16, 2019, at 8:37 PM, John McCall via cfe-commits wrote: On 16 Jan 2019, at 20:03, Richard Smith wrote: On Wed, 16 Jan 2019 at 16:20, John McCall via cfe-commits < cfe-commits@lists.llvm.org> wrote: On 16 Jan 2019, at 18:32, Richard Smith wrote:

Re: r350920 - [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed

2019-01-16 Thread John McCall via cfe-commits
On 16 Jan 2019, at 20:03, Richard Smith wrote: > On Wed, 16 Jan 2019 at 16:20, John McCall via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On 16 Jan 2019, at 18:32, Richard Smith wrote: >> >>> On Wed, 16 Jan 2019 at 09:10, John McCall via cfe-comm

Re: r350920 - [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed

2019-01-16 Thread John McCall via cfe-commits
On 16 Jan 2019, at 18:32, Richard Smith wrote: > On Wed, 16 Jan 2019 at 09:10, John McCall via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On 16 Jan 2019, at 9:13, Aaron Ballman wrote: >> >>> On Wed, Jan 16, 2019 at 1:57 AM Akira Hatanaka &g

Re: r350920 - [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed

2019-01-16 Thread John McCall via cfe-commits
On 16 Jan 2019, at 9:13, Aaron Ballman wrote: On Wed, Jan 16, 2019 at 1:57 AM Akira Hatanaka wrote: Yes, the behavior of the compiler doesn’t match what’s explained in the documentation anymore. Please take a look at the attached patch, which updates the documentation. Patch mostly

r345536 - In swiftcall, don't merge FP/vector types within a chunk.

2018-10-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Oct 29 13:32:36 2018 New Revision: 345536 URL: http://llvm.org/viewvc/llvm-project?rev=345536=rev Log: In swiftcall, don't merge FP/vector types within a chunk. Modified: cfe/trunk/include/clang/CodeGen/SwiftCallingConv.h

Re: [PATCH] D52344: [Clang][CodeGen][ObjC]: Fix non-bridged CoreFoundation builds on ELF targets that use `-fconstant-cfstrings`.

2018-09-23 Thread John McCall via cfe-commits
On Sun, Sep 23, 2018 at 5:39 AM David Chisnall via Phabricator < revi...@reviews.llvm.org> wrote: > theraven added a comment. > > In https://reviews.llvm.org/D52344#1242530, @rjmccall wrote: > > > In https://reviews.llvm.org/D52344#1242451, @kristina wrote: > > > > > Would you be okay with me

r341491 - Forbid address spaces on compound literals in local scope.

2018-09-05 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Sep 5 12:22:40 2018 New Revision: 341491 URL: http://llvm.org/viewvc/llvm-project?rev=341491=rev Log: Forbid address spaces on compound literals in local scope. Patch by Bevin Hansson! Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

r341489 - Add -Wobjc-property-assign-on-object-type.

2018-09-05 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Sep 5 12:02:00 2018 New Revision: 341489 URL: http://llvm.org/viewvc/llvm-project?rev=341489=rev Log: Add -Wobjc-property-assign-on-object-type. This is a warning about using 'assign' instead of 'unsafe_unretained' in Objective-C property declarations. It's off by

r337525 - Document -fobjc-weak as an extension.

2018-07-19 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Jul 19 22:40:12 2018 New Revision: 337525 URL: http://llvm.org/viewvc/llvm-project?rev=337525=rev Log: Document -fobjc-weak as an extension. Fixes rdar://24091053. Modified: cfe/trunk/docs/LanguageExtensions.rst Modified: cfe/trunk/docs/LanguageExtensions.rst

r337524 - Fix and improve the ARC spec's wording about unmanaged objects.

2018-07-19 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Jul 19 22:40:09 2018 New Revision: 337524 URL: http://llvm.org/viewvc/llvm-project?rev=337524=rev Log: Fix and improve the ARC spec's wording about unmanaged objects. Modified: cfe/trunk/docs/AutomaticReferenceCounting.rst Modified:

r333791 - Cap "voluntary" vector alignment at 16 for all Darwin platforms.

2018-06-01 Thread John McCall via cfe-commits
Author: rjmccall Date: Fri Jun 1 14:34:26 2018 New Revision: 333791 URL: http://llvm.org/viewvc/llvm-project?rev=333791=rev Log: Cap "voluntary" vector alignment at 16 for all Darwin platforms. This fixes two major problems: - We were not capping vector alignment as desired on 32-bit ARM. - We

Re: [PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread John McCall via cfe-commits
I think you and Richard agreed that you weren’t going to synthesize a whole expression tree at every use of the operator, and I agree with that decision. That’s very different from what I’m asking you to do, which is to synthesize in isolation a call to the copy-constructor. There are several

Re: [PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread John McCall via cfe-commits
On Mon, Apr 23, 2018 at 8:23 PM, Richard Smith wrote: > On 23 April 2018 at 16:23, David Blaikie via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Mon, Apr 23, 2018 at 4:12 PM John McCall wrote: >> >>> On Mon, Apr 23, 2018 at 6:32 PM,

Re: [PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread John McCall via cfe-commits
On Mon, Apr 23, 2018 at 6:32 PM, David Blaikie wrote: > On Mon, Apr 23, 2018 at 3:29 PM John McCall via Phabricator < > revi...@reviews.llvm.org> wrote: > >> rjmccall added a comment. >> >> In https://reviews.llvm.org/D45766#1076176, @dblaikie wrote: >> >> > Is there anything

Re: [PATCH] D45685: [Sema] Add -wtest global flag that silences -Wself-assign for overloaded operators.

2018-04-18 Thread John McCall via cfe-commits
Let me try to summarize where I think we are. 1. I think it’s now generally agreed that this is a useful warning — certainly for field assignments, but we also have (at least?) one example with a local variable. 2. It’s also generally agreed that this warning has a problem with unit tests and

Re: r328680 - [ObjC] Make C++ triviality type traits available to non-trivial C

2018-04-13 Thread John McCall via cfe-commits
> On Apr 9, 2018, at 3:47 PM, Akira Hatanaka wrote: > > >> On Apr 5, 2018, at 1:25 PM, John McCall > > wrote: >> >> >> >>> On Apr 5, 2018, at 3:54 PM, Akira Hatanaka >> >

Re: [PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-13 Thread John McCall via cfe-commits
(Sorry for the delay in responding — I'm actually on vacation.) On Tue, Apr 10, 2018 at 1:52 PM, David Blaikie wrote: > On Tue, Apr 10, 2018 at 10:20 AM John McCall wrote: > >> Do you think they’re bad precedent? > > > Somewhat, yes - though -Wparens is

Re: [PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-10 Thread John McCall via cfe-commits
Do you think they’re bad precedent? Do you have a replacement for that approach to warning about those problems? Because they certainly were precedent for -Wfallthrough, and they certainly catch a class of bugs at least as large and important as that warning, and they certainly have exactly the

Re: [PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-10 Thread John McCall via cfe-commits
Also, the standard for the static analyzer is not lower than it is for the compiler. The static analyzer tries to catch a much larger class of bugs, but it also tries very hard to make all the warnings it emits count. There’s a really common problem in the static analysis field where users try a

Re: [PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-10 Thread John McCall via cfe-commits
Yeah, -Wself-assign in general is about catching a class of live-coding errors which is pretty unlikely to ever make it into committed code, since the code would need to be dead/redundant for the mistake to not be noticed. So it’s specifically a rather poor match for the static analyzer, and I

Re: [PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-10 Thread John McCall via cfe-commits
If you have a concrete suggestion of how to suppress this warning for user-defined operators just in unit tests, great. I don’t think 8 easily-suppressed warnings is an unacceptably large false-positive problem, though. Most warnings have similar problems, and the standard cannot possibly be “must

r329513 - Generalize the swiftcall API since being passed indirectly isn't

2018-04-07 Thread John McCall via cfe-commits
Author: rjmccall Date: Sat Apr 7 13:16:47 2018 New Revision: 329513 URL: http://llvm.org/viewvc/llvm-project?rev=329513=rev Log: Generalize the swiftcall API since being passed indirectly isn't C++-specific anymore. Modified: cfe/trunk/include/clang/CodeGen/SwiftCallingConv.h

r329508 - Allow equality comparisons between block pointers and

2018-04-07 Thread John McCall via cfe-commits
Author: rjmccall Date: Sat Apr 7 10:42:06 2018 New Revision: 329508 URL: http://llvm.org/viewvc/llvm-project?rev=329508=rev Log: Allow equality comparisons between block pointers and block-pointer-compatible ObjC object pointer types. Patch by Dustin Howett! Added:

Re: r328680 - [ObjC] Make C++ triviality type traits available to non-trivial C

2018-04-05 Thread John McCall via cfe-commits
> On Apr 5, 2018, at 3:54 PM, Akira Hatanaka wrote: > > >> On Apr 5, 2018, at 12:39 PM, John McCall > > wrote: >> >> >> >>> On Apr 4, 2018, at 7:37 PM, Akira Hatanaka >>

Re: r328680 - [ObjC] Make C++ triviality type traits available to non-trivial C

2018-04-05 Thread John McCall via cfe-commits
> On Apr 4, 2018, at 7:37 PM, Akira Hatanaka wrote: > > > >> On Apr 4, 2018, at 4:24 PM, Akira Hatanaka via cfe-commits >> > wrote: >> >>> >>> On Apr 4, 2018, at 3:38 PM, Richard Smith

r328942 - Fix a major swiftcall ABI bug with trivial C++ class types.

2018-04-01 Thread John McCall via cfe-commits
Author: rjmccall Date: Sun Apr 1 14:04:30 2018 New Revision: 328942 URL: http://llvm.org/viewvc/llvm-project?rev=328942=rev Log: Fix a major swiftcall ABI bug with trivial C++ class types. The problem with the previous logic was that there might not be any explicit copy/move constructor

Re: r326946 - CodeGen: Fix address space of indirect function argument

2018-03-10 Thread John McCall via cfe-commits
> On Mar 9, 2018, at 8:51 PM, Richard Smith wrote: > > Hi, > > This change increases the size of a CallArg, and thus that of a CallArgList, > dramatically (an LValue is *much* larger than an RValue, and unlike an > RValue, does not appear to be at all optimized for

r324377 - Pass around function pointers as CGCallees, not bare llvm::Value*s.

2018-02-06 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Feb 6 10:52:44 2018 New Revision: 324377 URL: http://llvm.org/viewvc/llvm-project?rev=324377=rev Log: Pass around function pointers as CGCallees, not bare llvm::Value*s. The intention here is to make it easy to write frontend-assisted CFI systems by propagating extra

r322406 - Allocate and access NormalCleanupDest with the natural alignment of i32.

2018-01-12 Thread John McCall via cfe-commits
Author: rjmccall Date: Fri Jan 12 14:07:01 2018 New Revision: 322406 URL: http://llvm.org/viewvc/llvm-project?rev=322406=rev Log: Allocate and access NormalCleanupDest with the natural alignment of i32. This alignment can be less than 4 on certain embedded targets, which may not even be able to

Re: trivial_abi

2018-01-08 Thread John McCall via cfe-commits
PM Richard Smith via cfe-commits > <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: > On 3 January 2018 at 15:24, John McCall via cfe-commits > <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: >> On Jan 3, 2018, at

r321957 - Simplify the internal API for checking whether swiftcall passes a type indirectly and expose that API externally.

2018-01-06 Thread John McCall via cfe-commits
Author: rjmccall Date: Sat Jan 6 22:28:49 2018 New Revision: 321957 URL: http://llvm.org/viewvc/llvm-project?rev=321957=rev Log: Simplify the internal API for checking whether swiftcall passes a type indirectly and expose that API externally. Modified:

Re: [PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-03 Thread John McCall via cfe-commits
On Wed, Jan 3, 2018 at 2:07 PM, Akira Hatanaka wrote: > On Jan 3, 2018, at 10:25 AM, John McCall wrote: > > On Wed, Jan 3, 2018 at 12:24 PM, Akira Hatanaka > wrote: > >> On Jan 2, 2018, at 9:42 AM, David Blaikie via cfe-commits < >>

Re: trivial_abi

2018-01-03 Thread John McCall via cfe-commits
> On Jan 3, 2018, at 5:53 PM, Richard Smith <rich...@metafoo.co.uk> wrote: > On 3 January 2018 at 14:29, John McCall via cfe-commits > <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: > >> On Jan 3, 2018, at 5:12 PM, Richard Smith <

Re: trivial_abi

2018-01-03 Thread John McCall via cfe-commits
> On Jan 3, 2018, at 5:12 PM, Richard Smith <rich...@metafoo.co.uk> wrote: > > On 2 January 2018 at 20:55, John McCall via cfe-commits > <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: >> On Jan 2, 2018, at 10:43 PM, Richard Smith <

Re: [PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-03 Thread John McCall via cfe-commits
On Wed, Jan 3, 2018 at 12:24 PM, Akira Hatanaka wrote: > On Jan 2, 2018, at 9:42 AM, David Blaikie via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > > > On Tue, Dec 19, 2017 at 9:43 PM Akira Hatanaka wrote: > >> On Tue, Dec 12, 2017 at 12:12 PM,

Re: trivial_abi

2018-01-02 Thread John McCall via cfe-commits
> On Jan 2, 2018, at 10:43 PM, Richard Smith <rich...@metafoo.co.uk> wrote: > > On 2 January 2018 at 19:02, John McCall via cfe-commits > <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: > >> On Jan 2, 2018, at 9:15

Re: trivial_abi

2018-01-02 Thread John McCall via cfe-commits
> On Jan 2, 2018, at 9:15 PM, Akira Hatanaka <ahatan...@apple.com> wrote: > > > >> On Jan 2, 2018, at 4:56 PM, Richard Smith via cfe-commits >> <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: >> >> On 2 Janua

trivial_abi

2018-01-02 Thread John McCall via cfe-commits
Hey, Richard et al. Akira and I were talking about the right ABI rule for deciding can-pass-in-registers-ness for structs in the presence of trivial_abi, and I think I like Akira's approach but wanted to get your input. The current definition in Itanium is: non-trivial for the purposes of

r320721 - In an ARC lambda-to-block conversion thunk, reclaim the return value of

2017-12-14 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Dec 14 10:21:14 2017 New Revision: 320721 URL: http://llvm.org/viewvc/llvm-project?rev=320721=rev Log: In an ARC lambda-to-block conversion thunk, reclaim the return value of the lambda so that we don't over-release it. Patch by Dan Zimmerman! Added:

Re: [PATCH] D41039: Add support for attribute "trivial_abi"

2017-12-12 Thread John McCall via cfe-commits
On Tue, Dec 12, 2017 at 1:45 PM, David Blaikie wrote: > On Mon, Dec 11, 2017 at 5:38 PM John McCall wrote: > >> On Mon, Dec 11, 2017 at 6:19 PM, David Blaikie >> wrote: >> >>> On Mon, Dec 11, 2017 at 3:16 PM John McCall via

Re: [PATCH] D41039: Add support for attribute "trivial_abi"

2017-12-11 Thread John McCall via cfe-commits
On Mon, Dec 11, 2017 at 6:19 PM, David Blaikie wrote: > On Mon, Dec 11, 2017 at 3:16 PM John McCall via Phabricator < > revi...@reviews.llvm.org> wrote: > >> rjmccall added a comment. >> >> In https://reviews.llvm.org/D41039#951648, @ahatanak wrote: >> >> > I had a discussion

r317776 - Fix a bug with the use of __builtin_bzero in a conditional expression.

2017-11-09 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Nov 9 01:32:32 2017 New Revision: 317776 URL: http://llvm.org/viewvc/llvm-project?rev=317776=rev Log: Fix a bug with the use of __builtin_bzero in a conditional expression. Patch by Bharathi Seshadri! Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp

Re: [PATCH] D36501: add flag to undo ABI change in r310401

2017-08-24 Thread John McCall via cfe-commits
> On Aug 24, 2017, at 3:48 PM, Richard Smith wrote: > On 24 August 2017 at 12:24, Paul Robinson via Phabricator via cfe-commits > > wrote: > probinson added a comment. > > Locally we have a couple different

r311065 - Further refactoring of the constant emitter. NFC.

2017-08-16 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Aug 16 22:03:55 2017 New Revision: 311065 URL: http://llvm.org/viewvc/llvm-project?rev=311065=rev Log: Further refactoring of the constant emitter. NFC. Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp URL:

r310962 - Allow StmtVisitor visitation to be parameterized. NFC.

2017-08-15 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Aug 15 14:42:42 2017 New Revision: 310962 URL: http://llvm.org/viewvc/llvm-project?rev=310962=rev Log: Allow StmtVisitor visitation to be parameterized. NFC. Modified: cfe/trunk/include/clang/AST/StmtVisitor.h Modified: cfe/trunk/include/clang/AST/StmtVisitor.h

r310963 - Allow the target field of a CK_ToUnion to be more easily recovered.

2017-08-15 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Aug 15 14:42:47 2017 New Revision: 310963 URL: http://llvm.org/viewvc/llvm-project?rev=310963=rev Log: Allow the target field of a CK_ToUnion to be more easily recovered. Modified: cfe/trunk/include/clang/AST/Expr.h cfe/trunk/lib/AST/Expr.cpp

r310964 - Extract IRGen's constant-emitter into its own helper class and clean up

2017-08-15 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Aug 15 14:42:52 2017 New Revision: 310964 URL: http://llvm.org/viewvc/llvm-project?rev=310964=rev Log: Extract IRGen's constant-emitter into its own helper class and clean up the interface. The ultimate goal here is to make it easier to do some more interesting things

r308092 - Use ARC parsing rules for ns_returns_retained in MRC so that code can

2017-07-15 Thread John McCall via cfe-commits
Author: rjmccall Date: Sat Jul 15 04:06:46 2017 New Revision: 308092 URL: http://llvm.org/viewvc/llvm-project?rev=308092=rev Log: Use ARC parsing rules for ns_returns_retained in MRC so that code can be shared without warnings. Build AttributedTypes to leave breadcrumbs for tools like the static

r307760 - Expose some type-conversion functions as part of the IRGen ABI.

2017-07-12 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Jul 12 00:44:17 2017 New Revision: 307760 URL: http://llvm.org/viewvc/llvm-project?rev=307760=rev Log: Expose some type-conversion functions as part of the IRGen ABI. Patch by Benoit Vey! Modified: cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h

r305169 - Don't crash when forming a destructor name on an incomplete type.

2017-06-11 Thread John McCall via cfe-commits
Author: rjmccall Date: Sun Jun 11 15:33:00 2017 New Revision: 305169 URL: http://llvm.org/viewvc/llvm-project?rev=305169=rev Log: Don't crash when forming a destructor name on an incomplete type. Fixes PR25156. Patch by Don Hinton! Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp

Re: [PATCH] D17143: [Sema] PR25156 Crash when parsing dtor call on incomplete type

2017-06-11 Thread John McCall via cfe-commits
On Sun, Jun 11, 2017 at 9:26 AM, don hinton wrote: > On Sat, Jun 10, 2017 at 8:55 PM John McCall via Phabricator < > revi...@reviews.llvm.org> wrote: > >> rjmccall accepted this revision. >> rjmccall added a comment. >> This revision is now accepted and ready to land. >> >>

r304951 - When determining the target function of an explicit instantiation, make

2017-06-07 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Jun 7 18:00:05 2017 New Revision: 304951 URL: http://llvm.org/viewvc/llvm-project?rev=304951=rev Log: When determining the target function of an explicit instantiation, make sure that non-template functions don't end up in the candidate set. Fixes PR14211. Patch by

Re: [PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-05-01 Thread John McCall via cfe-commits
On Mon, May 1, 2017 at 7:06 PM, Daniel Berlin wrote: > On Mon, May 1, 2017 at 3:58 PM, John McCall wrote: > >> On Mon, May 1, 2017 at 6:40 PM, Daniel Berlin >> wrote: >> >>> On Mon, May 1, 2017 at 3:09 PM, Daniel Berlin

Re: [PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-05-01 Thread John McCall via cfe-commits
On Mon, May 1, 2017 at 6:40 PM, Daniel Berlin wrote: > On Mon, May 1, 2017 at 3:09 PM, Daniel Berlin wrote: > >> On Mon, May 1, 2017 at 2:07 PM, John McCall wrote: >> >>> On Mon, May 1, 2017 at 3:31 PM, Daniel Berlin

Re: [PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-05-01 Thread John McCall via cfe-commits
On Mon, May 1, 2017 at 3:31 PM, Daniel Berlin wrote: > So you believe that you can index into an object randomly by pointer >>> arithmetic and pull out a different field? >>> >> >> For starters, this is illegal because you don't know where the padding >> bytes are. >> You

r297050 - Further fixes and improvements to the ConstantInitBuilder API.

2017-03-06 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Mar 6 13:04:16 2017 New Revision: 297050 URL: http://llvm.org/viewvc/llvm-project?rev=297050=rev Log: Further fixes and improvements to the ConstantInitBuilder API. Added: cfe/trunk/include/clang/CodeGen/ConstantInitFuture.h Modified:

r296980 - GCC workaround: use explicit qualification to avoid injected class name.

2017-03-04 Thread John McCall via cfe-commits
Author: rjmccall Date: Sat Mar 4 15:46:14 2017 New Revision: 296980 URL: http://llvm.org/viewvc/llvm-project?rev=296980=rev Log: GCC workaround: use explicit qualification to avoid injected class name. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52625 Modified:

r296979 - Refactor ConstantInitBuilder to allow other frontends to more

2017-03-04 Thread John McCall via cfe-commits
Author: rjmccall Date: Sat Mar 4 15:26:29 2017 New Revision: 296979 URL: http://llvm.org/viewvc/llvm-project?rev=296979=rev Log: Refactor ConstantInitBuilder to allow other frontends to more easily extend the aggregate-builder API. Stupid missing language features. Also add APIs for

r296806 - Promote ConstantInitBuilder to be a public CodeGen API; it's

2017-03-02 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Mar 2 14:04:19 2017 New Revision: 296806 URL: http://llvm.org/viewvc/llvm-project?rev=296806=rev Log: Promote ConstantInitBuilder to be a public CodeGen API; it's a generally useful utility for other frontends. NFC. Added:

r288440 - Struct GEPs must use i32, not whatever size_t is. It should be safe

2016-12-01 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Dec 1 17:51:30 2016 New Revision: 288440 URL: http://llvm.org/viewvc/llvm-project?rev=288440=rev Log: Struct GEPs must use i32, not whatever size_t is. It should be safe to do this unconditionally, given that the indices will always be small constant integers anyway.

r288313 - Teach ConstantBuilder how to emit a reference to the current position

2016-11-30 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Nov 30 23:33:30 2016 New Revision: 288313 URL: http://llvm.org/viewvc/llvm-project?rev=288313=rev Log: Teach ConstantBuilder how to emit a reference to the current position that will be filled in when the initializer is set. Modified:

Re: r288269 - Finish adopting ConstantInitBuilder in CGObjCGNU. NFC.

2016-11-30 Thread John McCall via cfe-commits
operly> > > I only mention it because you're modifying code that was clearly in the > leading uppercase camp to leading lower case, so you weren't fitting into an > existing style common to some local source file. > > On Wed, Nov 30, 2016 at 12:19 PM, John McCall

r288295 - Clean up CGObjCMac's APIs for deriving class references. NFC.

2016-11-30 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Nov 30 17:54:50 2016 New Revision: 288295 URL: http://llvm.org/viewvc/llvm-project?rev=288295=rev Log: Clean up CGObjCMac's APIs for deriving class references. NFC. Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp cfe/trunk/lib/CodeGen/CGObjCMac.cpp

r288289 - Introduce a type-safe enum for ForDefinition.

2016-11-30 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Nov 30 17:25:13 2016 New Revision: 288289 URL: http://llvm.org/viewvc/llvm-project?rev=288289=rev Log: Introduce a type-safe enum for ForDefinition. Modified: cfe/trunk/lib/CodeGen/CGCXX.cpp cfe/trunk/lib/CodeGen/CodeGenModule.cpp

r288287 - Fix some layering violations where CGObjCMac's NSString emission was

2016-11-30 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Nov 30 17:15:55 2016 New Revision: 288287 URL: http://llvm.org/viewvc/llvm-project?rev=288287=rev Log: Fix some layering violations where CGObjCMac's NSString emission was performed at the CodeGenModule level. Would be NFC except we now also use a different uniquing

r288272 - Prospective MSVC workaround.

2016-11-30 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Nov 30 14:46:55 2016 New Revision: 288272 URL: http://llvm.org/viewvc/llvm-project?rev=288272=rev Log: Prospective MSVC workaround. Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp URL:

r288269 - Finish adopting ConstantInitBuilder in CGObjCGNU. NFC.

2016-11-30 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Nov 30 14:19:46 2016 New Revision: 288269 URL: http://llvm.org/viewvc/llvm-project?rev=288269=rev Log: Finish adopting ConstantInitBuilder in CGObjCGNU. NFC. Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp cfe/trunk/lib/CodeGen/ConstantBuilder.h Modified:

r288231 - Prospective GCC build fix: the unelaborated form of this friend

2016-11-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Nov 29 22:18:19 2016 New Revision: 288231 URL: http://llvm.org/viewvc/llvm-project?rev=288231=rev Log: Prospective GCC build fix: the unelaborated form of this friend declaration should find the right type, assuming it's supported evenly across all our hosts. Modified:

r288203 - getObjCEncodingForMethodDecl cannot fail. Simplify. NFC.

2016-11-29 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Nov 29 15:57:00 2016 New Revision: 288203 URL: http://llvm.org/viewvc/llvm-project?rev=288203=rev Log: getObjCEncodingForMethodDecl cannot fail. Simplify. NFC. Modified: cfe/trunk/include/clang/AST/ASTContext.h cfe/trunk/lib/AST/ASTContext.cpp

Re: [PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-11-28 Thread John McCall via cfe-commits
On Mon, Nov 28, 2016 at 2:48 PM, Richard Smith wrote: > (Dropping Phabricator, since this isn't really about D27163...) > > On 28 November 2016 at 14:27, John McCall via Phabricator via cfe-commits > wrote: > >> In

r288080 - Hide the result of building a constant initializer. NFC.

2016-11-28 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Nov 28 16:18:30 2016 New Revision: 288080 URL: http://llvm.org/viewvc/llvm-project?rev=288080=rev Log: Hide the result of building a constant initializer. NFC. Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp

r288079 - ConstantBuilder -> ConstantInitBuilder for clarity, and

2016-11-28 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Nov 28 16:18:27 2016 New Revision: 288079 URL: http://llvm.org/viewvc/llvm-project?rev=288079=rev Log: ConstantBuilder -> ConstantInitBuilder for clarity, and move the member classes up to top level to allow forward declarations to name them. NFC. Modified:

r288081 - Make CGVTables use ConstantInitBuilder. NFC.

2016-11-28 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Nov 28 16:18:33 2016 New Revision: 288081 URL: http://llvm.org/viewvc/llvm-project?rev=288081=rev Log: Make CGVTables use ConstantInitBuilder. NFC. Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp cfe/trunk/lib/CodeGen/CGVTables.h

[PATCH] D26978: [Sema][Atomics] Treat expected pointer in compare exchange atomics as _Nonnull

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

r287691 - Remove variable only used in an assertion.

2016-11-22 Thread John McCall via cfe-commits
Author: rjmccall Date: Tue Nov 22 14:12:32 2016 New Revision: 287691 URL: http://llvm.org/viewvc/llvm-project?rev=287691=rev Log: Remove variable only used in an assertion. Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp URL:

[PATCH] D26196: Add support for non-zero null pointer for C and OpenCL

2016-11-22 Thread John McCall via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D26196#602660, @yaxunl wrote: > > But if you do need to support these conversions for some reason, the > > correct behavior is to ensure that null is mapped to null. > > I only need to do this for constant folding, right? I found that the

r287458 - Remove alignment from ctors/dtors lists in an attempt to placate LTO.

2016-11-19 Thread John McCall via cfe-commits
Author: rjmccall Date: Sat Nov 19 14:12:25 2016 New Revision: 287458 URL: http://llvm.org/viewvc/llvm-project?rev=287458=rev Log: Remove alignment from ctors/dtors lists in an attempt to placate LTO. Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp Modified:

r287437 - Introduce a helper class for building complex constant initializers. NFC.

2016-11-19 Thread John McCall via cfe-commits
Author: rjmccall Date: Sat Nov 19 02:17:24 2016 New Revision: 287437 URL: http://llvm.org/viewvc/llvm-project?rev=287437=rev Log: Introduce a helper class for building complex constant initializers. NFC. I've adopted this in most of the places it makes sense, but v-tables and CGObjCMac will

r287291 - Forward ns_consumed delegate arguments with a move.

2016-11-17 Thread John McCall via cfe-commits
Author: rjmccall Date: Thu Nov 17 19:08:24 2016 New Revision: 287291 URL: http://llvm.org/viewvc/llvm-project?rev=287291=rev Log: Forward ns_consumed delegate arguments with a move. StartFunction enters a release cleanup for ns_consumed arguments in ARC, so we need to balance that somehow. We

[PATCH] D26196: Add support for non-zero null pointer for C and OpenCL

2016-11-13 Thread John McCall via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D26196#593741, @yaxunl wrote: > >> It seems the casting from a pointer to different address space is not > >> affected by this change. When a null pointer is casted to different > >> address space, it is casted the same way as an ordinary

[PATCH] D26196: Add support for non-zero null pointer for C and OpenCL

2016-11-12 Thread John McCall via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D26196#592823, @yaxunl wrote: > Hi John, > > It seems the casting from a pointer to different address space is not > affected by this change. When a null pointer is casted to different address > space, it is casted the same way as an

[PATCH] D26410: [CodeGen] Don't emit the same global block multiple times.

2016-11-10 Thread John McCall via cfe-commits
rjmccall added a comment. This looks great. One minor tweak and then it's ready. Comment at: lib/CodeGen/CGBlocks.cpp:1057 +void CodeGenModule::putAddrOfGlobalBlock(const BlockExpr *BE, + llvm::Constant *Addr) { + bool Ok =

[PATCH] D26196: Add support for non-zero null pointers

2016-11-10 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:7040 + auto AS = PT->getAddressSpace(); + return AS != Ctx.getTargetAddressSpace(LangAS::opencl_local) && AS != 0; +} yaxunl wrote: > rjmccall wrote: > > This check is definitely not correct;

[PATCH] D25764: Add end location of loop to loop metadata.

2016-11-09 Thread John McCall via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Looks good, thanks! https://reviews.llvm.org/D25764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D26196: Add support for non-zero null pointers

2016-11-08 Thread John McCall via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D26196#589493, @yaxunl wrote: > Fixed list initialization of large struct which are mostly initialized by 0 > through memset. > Added tests for casting literal 0 and non-literal integer to pointer. > > There are many more places need to be

[PATCH] D26196: Add support for non-zero null pointers

2016-11-08 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1340 + return C; +return getNullPtr(PT, DestType); } yaxunl wrote: > efriedma wrote: > > yaxunl wrote: > > > yaxunl wrote: > > > > rjmccall wrote: > > > > >

[PATCH] D25764: Add end location of loop to loop metadata.

2016-11-07 Thread John McCall via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D25764#588752, @hfinkel wrote: > This makes sense to me; @anemet , @rjmccall , any thoughts? Why are the constructor arguments optional? Are there actually any loops that we push that lack start and end locs?

[PATCH] D26196: [WIP] Add support for non-zero null pointers

2016-11-07 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1340 + return C; +return getNullPtr(PT, DestType); } efriedma wrote: > Consider code like the following: > > int x = 0; > auto y1 = (__specialaddrspace

Re: r285258 - Refactor call emission to package the function pointer together with

2016-11-07 Thread John McCall via cfe-commits
286152. John. > > > 2016-10-27 2:46 GMT+03:00 John McCall via cfe-commits > <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>>: > Author: rjmccall > Date: Wed Oct 26 18:46:34 2016 > New Revision: 285258 > > URL: http://llvm.org/viewvc/llvm-pro

r286152 - Name some anonymous structs to avoid using a (very common) extension.

2016-11-07 Thread John McCall via cfe-commits
Author: rjmccall Date: Mon Nov 7 15:13:27 2016 New Revision: 286152 URL: http://llvm.org/viewvc/llvm-project?rev=286152=rev Log: Name some anonymous structs to avoid using a (very common) extension. Modified: cfe/trunk/lib/CodeGen/CGCall.h Modified: cfe/trunk/lib/CodeGen/CGCall.h URL:

  1   2   3   4   5   >