[clang] [clang][MicrosoftCXXABI] Avoid Type::getPointerTo() (NFC) (PR #110915)

2024-10-03 Thread David Majnemer via cfe-commits
https://github.com/majnemer approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/110915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Correct Microsoft mangling of lifetime extended temporary objects. (PR #85529)

2024-03-18 Thread David Majnemer via cfe-commits
@@ -54,6 +54,12 @@ ABI Changes in This Version inline member function that contains a static local variable with a dynamic initializer is declared with ``__declspec(dllimport)``. (#GH83616). +- Fixed Microsoft name mangling of lifetime extended temporary objects. This + c

[clang] [clang][MSVC] Correct mangling of thread-safe static initialization variables. (PR #85300)

2024-03-14 Thread David Majnemer via cfe-commits
@@ -47,6 +47,12 @@ C++ Specific Potentially Breaking Changes ABI Changes in This Version --- +- Fixed Microsoft name mangling of implicitly defined variables used for thread + safe static initialization of static local variables. This change resolves +

[clang] 2f086f2 - [APFloat] Add E4M3B11FNUZ

2023-03-24 Thread David Majnemer via cfe-commits
Author: David Majnemer Date: 2023-03-24T20:06:40Z New Revision: 2f086f265bf97fe6543fb199f4ef874ca3522479 URL: https://github.com/llvm/llvm-project/commit/2f086f265bf97fe6543fb199f4ef874ca3522479 DIFF: https://github.com/llvm/llvm-project/commit/2f086f265bf97fe6543fb199f4ef874ca3522479.diff LOG

[clang] 955d7c3 - [clang] Add support for #pragma strict_gs_check

2022-09-19 Thread David Majnemer via cfe-commits
Author: David Majnemer Date: 2022-09-19T20:07:14Z New Revision: 955d7c39ff74868a28c848a0462ff41be972043e URL: https://github.com/llvm/llvm-project/commit/955d7c39ff74868a28c848a0462ff41be972043e DIFF: https://github.com/llvm/llvm-project/commit/955d7c39ff74868a28c848a0462ff41be972043e.diff LOG

[clang] 8a868d8 - Revert "Revert "[clang, llvm] Add __declspec(safebuffers), support it in CodeView""

2022-09-16 Thread David Majnemer via cfe-commits
Author: David Majnemer Date: 2022-09-16T19:39:48Z New Revision: 8a868d8859f9da23ee051848863045208c17ab47 URL: https://github.com/llvm/llvm-project/commit/8a868d8859f9da23ee051848863045208c17ab47 DIFF: https://github.com/llvm/llvm-project/commit/8a868d8859f9da23ee051848863045208c17ab47.diff LOG

[clang] ab56719 - [clang, llvm] Add __declspec(safebuffers), support it in CodeView

2022-09-12 Thread David Majnemer via cfe-commits
Author: David Majnemer Date: 2022-09-12T21:15:34Z New Revision: ab56719acd98778fb2e48fa425ac7c8d27bdea86 URL: https://github.com/llvm/llvm-project/commit/ab56719acd98778fb2e48fa425ac7c8d27bdea86 DIFF: https://github.com/llvm/llvm-project/commit/ab56719acd98778fb2e48fa425ac7c8d27bdea86.diff LOG

[clang] bd28bd5 - [clang-cl] /kernel should toggle bit 30 in @feat.00

2022-08-25 Thread David Majnemer via cfe-commits
Author: David Majnemer Date: 2022-08-25T14:17:26Z New Revision: bd28bd59a3693b6abc12231f2140e02760c0ada0 URL: https://github.com/llvm/llvm-project/commit/bd28bd59a3693b6abc12231f2140e02760c0ada0 DIFF: https://github.com/llvm/llvm-project/commit/bd28bd59a3693b6abc12231f2140e02760c0ada0.diff LOG

[clang] 2c923b8 - [clang-cl] Expose the /volatile:{iso, ms} choice via _ISO_VOLATILE

2022-08-23 Thread David Majnemer via cfe-commits
Author: David Majnemer Date: 2022-08-23T14:29:52Z New Revision: 2c923b88631cda41cbddf58a13ccfb5c04a2fc3c URL: https://github.com/llvm/llvm-project/commit/2c923b88631cda41cbddf58a13ccfb5c04a2fc3c DIFF: https://github.com/llvm/llvm-project/commit/2c923b88631cda41cbddf58a13ccfb5c04a2fc3c.diff LOG

[clang] 0bf525b - [clang-cl] Add _M_FP_* #defines for floating point modes

2022-08-22 Thread David Majnemer via cfe-commits
Author: David Majnemer Date: 2022-08-22T20:04:35Z New Revision: 0bf525bf902e3cd2072ddac82069f28e6d01fdc5 URL: https://github.com/llvm/llvm-project/commit/0bf525bf902e3cd2072ddac82069f28e6d01fdc5 DIFF: https://github.com/llvm/llvm-project/commit/0bf525bf902e3cd2072ddac82069f28e6d01fdc5.diff LOG

[clang] 3d89323 - [clang-cl] Increase /fp flag fidelity

2022-08-22 Thread David Majnemer via cfe-commits
Author: David Majnemer Date: 2022-08-22T18:32:58Z New Revision: 3d89323d1896fde5dc69ecb8306917718c5e3aed URL: https://github.com/llvm/llvm-project/commit/3d89323d1896fde5dc69ecb8306917718c5e3aed DIFF: https://github.com/llvm/llvm-project/commit/3d89323d1896fde5dc69ecb8306917718c5e3aed.diff LOG

[clang] 072e2a7 - [MS] Implement on-demand TLS initialization for Microsoft CXX ABI

2022-01-13 Thread David Majnemer via cfe-commits
Author: Maurice Heumann Date: 2022-01-13T21:23:23-08:00 New Revision: 072e2a7c67b74b8bde35f78ac0b0b13a269380f8 URL: https://github.com/llvm/llvm-project/commit/072e2a7c67b74b8bde35f78ac0b0b13a269380f8 DIFF: https://github.com/llvm/llvm-project/commit/072e2a7c67b74b8bde35f78ac0b0b13a269380f8.dif

Re: r350643 - Limit COFF 'common' emission to <=32 alignment types.

2019-01-08 Thread David Majnemer via cfe-commits
Yes, the MinGW toolchain can handle this by specifying the alignment of a common symbol using the aligncomm directive. The MSVC toolchain has no such mechanism. This is why the check uses isKnownWindowsMSVCEnvironment. On Tue, Jan 8, 2019 at 1:09 PM Shoaib Meenai wrote: > It checks for both OS=

Re: r331244 - Implement P0482R2, support for char8_t type.

2018-05-01 Thread David Majnemer via cfe-commits
On Mon, Apr 30, 2018 at 10:02 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Mon Apr 30 22:02:45 2018 > New Revision: 331244 > > URL: http://llvm.org/viewvc/llvm-project?rev=331244&view=rev > Log: > Implement P0482R2, support for char8_t type. > > T

Re: r316518 - mplement __has_unique_object_representations

2017-10-24 Thread David Majnemer via cfe-commits
On Tue, Oct 24, 2017 at 2:31 PM, Erich Keane via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: erichkeane > Date: Tue Oct 24 14:31:50 2017 > New Revision: 316518 > > URL: http://llvm.org/viewvc/llvm-project?rev=316518&view=rev > Log: > mplement __has_unique_object_representations > >

Re: r314226 - Sema: Windows/ARM __va_start is not const correct

2017-09-26 Thread David Majnemer via cfe-commits
Shouldn't you only loosen the check for things targeting the Windows SDK? GNU platforms shouldn't need this. On Tue, Sep 26, 2017 at 10:44 AM, Saleem Abdulrasool via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: compnerd > Date: Tue Sep 26 10:44:10 2017 > New Revision: 314226 > > URL

Re: r309058 - [CodeGen] Correctly model std::byte's aliasing properties

2017-07-25 Thread David Majnemer via cfe-commits
Should this go into 5.0 ? On Tue, Jul 25, 2017 at 4:33 PM, David Majnemer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: majnemer > Date: Tue Jul 25 16:33:58 2017 > New Revision: 309058 > > URL: http://llvm.org/viewvc/llvm-project?rev=309058&view=rev >

r309058 - [CodeGen] Correctly model std::byte's aliasing properties

2017-07-25 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue Jul 25 16:33:58 2017 New Revision: 309058 URL: http://llvm.org/viewvc/llvm-project?rev=309058&view=rev Log: [CodeGen] Correctly model std::byte's aliasing properties std::byte, when defined as an enum, needs to be given special treatment with regards to its aliasing pro

Re: [libcxx] r307751 - Fix unrepresentable enum for clang-cl unstable ABI

2017-07-11 Thread David Majnemer via cfe-commits
FWIW, I think you could just give the enum an explicit underlying type of size_type. On Tue, Jul 11, 2017 at 6:45 PM, Ben Craig via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: bcraig > Date: Tue Jul 11 18:45:13 2017 > New Revision: 307751 > > URL: http://llvm.org/viewvc/llvm-projec

Re: [PATCH] D31022: Implement P0298R3: `std::byte`

2017-07-05 Thread David Majnemer via cfe-commits
FWIW, doesn't this just need a may_alias attribute on the definition? On Wed, Jul 5, 2017 at 2:39 PM James Y Knight via Phabricator via cfe-commits wrote: > jyknight added a comment. > > Ping. I don't think this got resolved, and I really wouldn't like to see > released in this state...can you ei

Re: [PATCH] D34972: [CodeGen] Propagate dllexport to thunks

2017-07-05 Thread David Majnemer via cfe-commits
scenarios > in > mind where you thought it would make a difference. > > From: cfe-commits on behalf of David > Majnemer via cfe-commits > Reply-To: David Majnemer > Date: Tuesday, July 4, 2017 at 8:42 AM > To: Shoaib Meenai via Phabricator , " > compn...@compnerd.or

Re: [PATCH] D34992: Emit static constexpr member as available_externally definition

2017-07-05 Thread David Majnemer via cfe-commits
On Wed, Jul 5, 2017 at 12:22 PM Mehdi AMINI wrote: > The LLVM verifier is complaining that dllimport have to be external > linkage and isn't happy with available_externally, is the verifier wrong? > IMO, yes. I imagine that it is fine with dllimport available_externally functions already. > 20

Re: [PATCH] D34992: Emit static constexpr member as available_externally definition

2017-07-05 Thread David Majnemer via cfe-commits
I don't think you need the dllimport restriction. On Wed, Jul 5, 2017 at 12:05 PM Alex Lorenz via Phabricator via cfe-commits wrote: > arphaman added a comment. > > Does this apply to all constexpr global variables? It could potentially > fix https://bugs.llvm.org/show_bug.cgi?id=31860 . > > > h

Re: [PATCH] D34972: [CodeGen] Propagate dllexport to thunks

2017-07-05 Thread David Majnemer via cfe-commits
What about the import side? On Mon, Jul 3, 2017 at 10:37 PM Shoaib Meenai via Phabricator via cfe-commits wrote: > smeenai created this revision. > > Under Windows Itanium, we need to export virtual and non-virtual thunks > if the functions being thunked are exported. These thunks would > previo

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-25 Thread David Majnemer via cfe-commits
On Tue, Apr 25, 2017 at 2:12 PM, Nico Weber wrote: > On Tue, Apr 25, 2017 at 4:14 PM, David Majnemer > wrote: > >> >> >> On Tue, Apr 25, 2017 at 11:42 AM, Nico Weber wrote: >> >>> On Tue, Apr 25, 2017 at 2:06 PM, David Majnemer < >>> david.majne...@gmail.com> wrote: >>> On Tue, A

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-25 Thread David Majnemer via cfe-commits
On Tue, Apr 25, 2017 at 11:42 AM, Nico Weber wrote: > On Tue, Apr 25, 2017 at 2:06 PM, David Majnemer > wrote: > >> >> >> On Tue, Apr 25, 2017 at 8:46 AM, Nico Weber wrote: >> >>> On Mon, Apr 24, 2017 at 10:00 PM, David Majnemer < >>> david.majne...@gmail.com> wrote: >>> On Mon,

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-25 Thread David Majnemer via cfe-commits
On Tue, Apr 25, 2017 at 8:46 AM, Nico Weber wrote: > On Mon, Apr 24, 2017 at 10:00 PM, David Majnemer > wrote: > >> >> >> On Mon, Apr 24, 2017 at 11:56 AM, Nico Weber wrote: >> >>> "Opting into the conforming mode, /permissive-, during the series of VS >>> 2017 update is a commitment to keeping

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-24 Thread David Majnemer via cfe-commits
On Mon, Apr 24, 2017 at 11:56 AM, Nico Weber wrote: > "Opting into the conforming mode, /permissive-, during the series of VS > 2017 update is a commitment to keeping your code base clean and to fixing > non-conforming constructs we fix conformance issues in Visual C++." [...] > "By contrast /per

Re: [PATCH] D32435: clang-cl: Add support for /permissive-

2017-04-24 Thread David Majnemer via cfe-commits
-pedantic means "Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++." I believe it is more akin to -fno-ms-compatibility as it disables compatibility hacks. On Mon, Apr 24, 201

Re: r299774 - Sema: prevent __declspec(naked) use on x64

2017-04-07 Thread David Majnemer via cfe-commits
On Fri, Apr 7, 2017 at 8:30 AM, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Fri, Apr 7, 2017 at 11:13 AM, Saleem Abdulrasool via cfe-commits > wrote: > > Author: compnerd > > Date: Fri Apr 7 10:13:47 2017 > > New Revision: 299774 > > > > URL: http://llvm.org/viewvc/ll

Re: r299058 - [APInt] Remove references to integerPartWidth and integerPart outside of APFloat implentation.

2017-03-30 Thread David Majnemer via cfe-commits
On Thu, Mar 30, 2017 at 7:48 AM, Craig Topper via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ctopper > Date: Thu Mar 30 00:48:58 2017 > New Revision: 299058 > > URL: http://llvm.org/viewvc/llvm-project?rev=299058&view=rev > Log: > [APInt] Remove references to integerPartWidth and i

Re: r298765 - Add the _CALL_LINUX preprocessor define for ppc linux platforms.

2017-03-25 Thread David Majnemer via cfe-commits
Shouldn't this only be defined on 64-bit PPC platforms? I think that's what GCC does: https://github.com/gcc-mirror/gcc/blob/700a97608cadfe8adcd1a98e6388a5cbee9d76f6/gcc/config/rs6000/linux64.h#L372 On Fri, Mar 24, 2017 at 8:33 PM, Eric Christopher via cfe-commits < cfe-commits@lists.llvm.org> wro

r295010 - [MS ABI] Correctly mangling vbase destructors

2017-02-13 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Feb 13 18:54:11 2017 New Revision: 295010 URL: http://llvm.org/viewvc/llvm-project?rev=295010&view=rev Log: [MS ABI] Correctly mangling vbase destructors They are a little bit of a special case in the mangling. They are always mangled without taking into account their v

r292194 - [AST] AttributedType should derive type properties from the EquivalentType

2017-01-16 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jan 16 22:14:25 2017 New Revision: 292194 URL: http://llvm.org/viewvc/llvm-project?rev=292194&view=rev Log: [AST] AttributedType should derive type properties from the EquivalentType Using the canonical type instead of the equivalent type can result in insufficient temp

Re: [libcxx] r291192 - config_elast: fix typo (NFC)

2017-01-05 Thread David Majnemer via cfe-commits
On Thu, Jan 5, 2017 at 3:25 PM, Saleem Abdulrasool via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: compnerd > Date: Thu Jan 5 17:25:44 2017 > New Revision: 291192 > > URL: http://llvm.org/viewvc/llvm-project?rev=291192&view=rev > Log: > config_elast: fix typo (NFC) > > Missed the o

r290509 - [MS ABI] Mangle unnamed enums correctly

2016-12-24 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sat Dec 24 23:26:02 2016 New Revision: 290509 URL: http://llvm.org/viewvc/llvm-project?rev=290509&view=rev Log: [MS ABI] Mangle unnamed enums correctly Unnamed enums take the name of the first enumerator they define. Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp

r288826 - [MS ABI] Implement more of the Itanium mangling rules

2016-12-06 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue Dec 6 11:01:02 2016 New Revision: 288826 URL: http://llvm.org/viewvc/llvm-project?rev=288826&view=rev Log: [MS ABI] Implement more of the Itanium mangling rules We didn't implement handle corner cases like: - lambdas used to initialize a field - lambdas in default ar

Re: r288207 - Don't try to merge DLL attributes on redeclaration of invalid decl (PR31069)

2016-11-29 Thread David Majnemer via cfe-commits
On Tue, Nov 29, 2016 at 2:31 PM, Hans Wennborg via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: hans > Date: Tue Nov 29 16:31:00 2016 > New Revision: 288207 > > URL: http://llvm.org/viewvc/llvm-project?rev=288207&view=rev > Log: > Don't try to merge DLL attributes on redeclaration of

[PATCH] D26846: __uuidof() and declspec(uuid("...")) should be allowed on enumeration types

2016-11-18 Thread David Majnemer via cfe-commits
majnemer added a comment. Do we have a testcase where the declspec is applied to something inappropriate like an int? Comment at: lib/Sema/SemaDeclAttr.cpp:4669-4673 + if (!(isa(D) || isa(D))) { S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type) - << Attr.g

[PATCH] D22334: Fix for Bug 28172 : clang crashes on invalid code (with too few arguments to __builtin_signbit) without any proper diagnostics.

2016-11-17 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM with nits Comment at: lib/Sema/SemaChecking.cpp:110 +S.Diag(ValArg->getLocStart(), diag::err_typecheck_cond_expect_float) + << ValArg->getType() << ValArg->

[PATCH] D26657: [Sema] Respect DLL attributes more faithfully

2016-11-16 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:7683-7685 +// or implicit instantiation. MinGW doesn't allow this. In the implicit +// instantiation case, we limit clang to only adding dllexport; see the +// discussion in https://revi

r285612 - Add a warning flag for warn_alloca_align_alignof

2016-10-31 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Oct 31 13:23:02 2016 New Revision: 285612 URL: http://llvm.org/viewvc/llvm-project?rev=285612&view=rev Log: Add a warning flag for warn_alloca_align_alignof Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Modified: cfe/trunk/include/clang/Basic/Diagn

Re: r285544 - Add support for __builtin_alloca_with_align

2016-10-31 Thread David Majnemer via cfe-commits
omes with a warning for people writing the > obvious-but-wrong __builtin_alloca_with_align(sizeof(T), alignof(T))". We > should add the warning. > > Thanks again, > Hal > > ----- Original Message - > > From: "David Majnemer via cfe-commits" > >

r285609 - [Sema] Warn when alignof is used with __builtin_alloca_with_align

2016-10-31 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Oct 31 13:07:57 2016 New Revision: 285609 URL: http://llvm.org/viewvc/llvm-project?rev=285609&view=rev Log: [Sema] Warn when alignof is used with __builtin_alloca_with_align The second argument to __builtin_alloca_with_align is supposed to be in bits, not bytes. Using

r285595 - Use toCharUnitsFromBits instead of TargetInfo::getCharWidth

2016-10-31 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Oct 31 11:48:30 2016 New Revision: 285595 URL: http://llvm.org/viewvc/llvm-project?rev=285595&view=rev Log: Use toCharUnitsFromBits instead of TargetInfo::getCharWidth Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp URL:

r285544 - Add support for __builtin_alloca_with_align

2016-10-30 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Oct 31 00:37:48 2016 New Revision: 285544 URL: http://llvm.org/viewvc/llvm-project?rev=285544&view=rev Log: Add support for __builtin_alloca_with_align __builtin_alloca always uses __BIGGEST_ALIGNMENT__ for the alignment of the allocation. __builtin_alloca_with_align a

[PATCH] D13330: Implement __attribute__((unique_instantiation))

2016-10-27 Thread David Majnemer via cfe-commits
majnemer added a comment. I think this looks good but I'd like @rsmith to take a look. https://reviews.llvm.org/D13330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25204: Register Calling Convention, Clang changes

2016-10-27 Thread David Majnemer via cfe-commits
majnemer added a comment. The __ namespace is reserved for us and I can't imagine how __regcall would upset any existing code out there. https://reviews.llvm.org/D25204 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D24378: [CodeGen] Provide an appropriate alignment for dynamic allocas

2016-10-27 Thread David Majnemer via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285316: [CodeGen] Provide an appropriate alignment for dynamic allocas (authored by majnemer). Changed prior to commit: https://reviews.llvm.org/D24378?vs=70789&id=76060#toc Repository: rL LLVM http

r285316 - [CodeGen] Provide an appropriate alignment for dynamic allocas

2016-10-27 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu Oct 27 12:18:24 2016 New Revision: 285316 URL: http://llvm.org/viewvc/llvm-project?rev=285316&view=rev Log: [CodeGen] Provide an appropriate alignment for dynamic allocas GCC documents __builtin_alloca as aligning the storage to at least __BIGGEST_ALIGNMENT__. MSVC doc

[PATCH] D25895: [MS ABI] Reuse getVFPtrOffsets instead of using getClassAtVTableLocation

2016-10-27 Thread David Majnemer via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285315: [MS ABI] Reuse getVFPtrOffsets instead of using getClassAtVTableLocation (authored by majnemer). Changed prior to commit: https://reviews.llvm.org/D25895?vs=75523&id=76059#toc Repository: rL

r285315 - [MS ABI] Reuse getVFPtrOffsets instead of using getClassAtVTableLocation

2016-10-27 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu Oct 27 12:11:51 2016 New Revision: 285315 URL: http://llvm.org/viewvc/llvm-project?rev=285315&view=rev Log: [MS ABI] Reuse getVFPtrOffsets instead of using getClassAtVTableLocation getClassAtVTableLocation hunts through virtual bases without using the MDC layout which i

[PATCH] D25204: Register Calling Convention, Clang changes

2016-10-26 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/AST/MicrosoftMangle.cpp:433 Out << Prefix; + mangleName(D); Please remove this stray newline. Comment at: lib/CodeGen/TargetInfo.cpp: + if (classifyArgumentType(FD->getType(), +

[PATCH] D25888: Add support for __builtin_os_log_format[_buffer_size]

2016-10-21 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: clang/include/clang/Analysis/Analyses/OSLog.h:117-129 +return std::any_of( +Items.begin(), Items.end(), +[](const OSLogBufferItem &item) { return item.getIsPrivate(); }); + } + + bool getHasPublicItems() const { +

[PATCH] D25888: Add support for __builtin_os_log_format[_buffer_size]

2016-10-21 Thread David Majnemer via cfe-commits
majnemer added a comment. You could use `llvm::any_of` instead of `std::any_of`. Comment at: clang/include/clang/Analysis/Analyses/OSLog.h:84-86 + result |= 0x01; +if (getIsPublic()) + result |= 0x02; IsPublic/IsPrivate instead of magic numbers?

[PATCH] D25895: [MS ABI] Reuse getVFPtrOffsets instead of using getClassAtVTableLocation

2016-10-21 Thread David Majnemer via cfe-commits
majnemer created this revision. majnemer added reviewers: rnk, pcc. majnemer added a subscriber: cfe-commits. getClassAtVTableLocation hunts through virtual bases without using the MDC layout which is indicative of a bug. Instead, reuse the getVFPtrOffsets machinery to calculate which subobject w

Re: r284624 - MS ABI: Fix assert when generating virtual function call with virtual bases and -flto (PR30731)

2016-10-19 Thread David Majnemer via cfe-commits
On Wed, Oct 19, 2016 at 2:04 PM, Hans Wennborg via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: hans > Date: Wed Oct 19 13:04:27 2016 > New Revision: 284624 > > URL: http://llvm.org/viewvc/llvm-project?rev=284624&view=rev > Log: > MS ABI: Fix assert when generating virtual function c

[PATCH] D25779: MS ABI: Don't assert when generating virtual function call with virtual bases and -flto (PR30731)

2016-10-19 Thread David Majnemer via cfe-commits
majnemer added a comment. Why did this only fail with -flto? Seems strange. Repository: rL LLVM https://reviews.llvm.org/D25779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25334: Implement __stosb intrinsic as a volatile memset

2016-10-14 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D25334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D25579: [codeview] emit debug info for indirect virtual base classes

2016-10-13 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:1392 +auto *BaseTy = getOrCreateType(BI.getType(), Unit); +if (SeenTypes.find(BaseTy) != SeenTypes.end()) + continue; ruiu wrote: > zturner wrote: > > rnk wrote: > > > IMO `SeenT

[PATCH] D25334: Implement __stosb intrinsic as a volatile memset

2016-10-13 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp: +Address Dest = EmitPointerWithAlignment(E->getArg(0)); +return Builder.CreateMemSet(Dest, Ops[1], Ops[2], true); } I think we should manually force the alignment to 1 instead o

[PATCH] D25540: Implement MS _ReturnAddress and _AddressOfReturnAddress intrinsics

2016-10-13 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1151-1152 + case Builtin::BI_ReturnAddress: { +Value *Depth = +Constant::getNullValue(ConvertType(getContext().UnsignedIntTy)); +Value *F = CGM.getIntrinsic(Intrinsic::returnaddress); -

[PATCH] D25264: Implement MS _BitScan intrinsics

2016-10-12 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. This looks right to me. https://reviews.llvm.org/D25264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D22955: [MSVC] Improved late parsing of template functions.

2016-10-12 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/Sema/SemaLookup.cpp:1044-1070 +static bool isBaseClass(const CXXRecordDecl *Record, CXXRecordDecl *Base) { + SmallVector Queue; + + while (true) { +for (const auto &I : Record->bases()) { + const RecordType *Ty = I.getTyp

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

2016-10-10 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: llvm/tools/clang/lib/Sema/SemaExpr.cpp:8795-8798 +if (S.Diags.getDiagnosticLevel( +diag::warn_typecheck_vector_element_sizes_not_equal, Loc) == +DiagnosticsEngine::Level::Error) + return Qual

[PATCH] D25334: Implement __stosb intrinsic as a volatile memset

2016-10-10 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:7610 +Value *SizeVal = EmitScalarExpr(E->getArg(2)); +EmitNonNullArgCheck(RValue::get(Dest.getPointer()), E->getArg(0)->getType(), +E->getArg(0)->getExprLoc(), FD, 0); -

[PATCH] D25442: Implement MS read/write barriers and __faststorefence intrinsic

2016-10-10 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D25442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-06 Thread David Majnemer via cfe-commits
majnemer added a comment. The change from an algorithmic POV looks good but I can't speak to whether or not the approach is sound, I'll leave that to @rsmith. > majnemer wrote in PrintPreprocessedOutput.cpp:404 > !SearchPath.empty() This review comment was never addressed. https://reviews.ll

[PATCH] D25349: [coroutines] Build fallthrough and set_exception statements.

2016-10-06 Thread David Majnemer via cfe-commits
majnemer added inline comments. > AnalysisBasedWarnings.cpp:537 >if (const FunctionDecl *FD = dyn_cast(D)) { > -ReturnsVoid = FD->getReturnType()->isVoidType(); > +if (const CoroutineBodyStmt *CBody = dyn_cast(Body)) > + ReturnsVoid = CBody->getFallthroughHandler() != nullptr; `

[PATCH] D25292: [coroutines] Add diagnostics for copy/move assignment operators and functions with deduced return types.

2016-10-05 Thread David Majnemer via cfe-commits
majnemer added inline comments. > SemaCoroutine.cpp:140 > + // or the function 'main' are declared as a coroutine. > + CXXMethodDecl *MD = dyn_cast(FD); > + if (MD && isa(MD)) `auto *` https://reviews.llvm.org/D25292 ___ cfe-commits mailing list

[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-05 Thread David Majnemer via cfe-commits
majnemer added inline comments. > PrintPreprocessedOutput.cpp:331-349 > + const size_t N = Path.size(); > + size_t I = 0; > + while (I < N) { > +if (Path[I] == '\\' || Path[I] == '\"') { > + // Have to escape backslashes or double-quotes. > + // Send out backslash to escape the n

[PATCH] D25264: Implement MS _BitScan intrinsics

2016-10-05 Thread David Majnemer via cfe-commits
majnemer added inline comments. > agutowski wrote in CGBuiltin.cpp:2665 > Is this line needed? I took it from __builtin_fpclassify, but I don't know > what could be its purpose (it's repeated below, where the "bitscan_end" block > really starts). It's needed for the call to CreatePHI to be in

[PATCH] D25264: Implement MS _BitScan intrinsics

2016-10-05 Thread David Majnemer via cfe-commits
majnemer added inline comments. > agutowski wrote in CGBuiltin.cpp:2656-2684 > MSDN doesn't specify what should be put under the "Index" address when the > argument is zero; as I checked, VS2015 with optimizations puts undefined > value there, and I hope that's what I'm doing here. Intel (http

[PATCH] D25264: Implement MS _BitScan intrinsics

2016-10-04 Thread David Majnemer via cfe-commits
majnemer added inline comments. > CGBuiltin.cpp:2640-2647 > +// Many of MSVC builtins are on both x64 and ARM; to avoid repeating code, we > +// handle them here. > +namespace MSVC { > + enum { > +_BitScanForward, > +_BitScanReverse > + }; This should be in an anonymous namespace. Also

[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-04 Thread David Majnemer via cfe-commits
majnemer added inline comments. > PrintPreprocessedOutput.cpp:101 >PrintPPOutputPPCallbacks(Preprocessor &pp, raw_ostream &os, bool > lineMarkers, > - bool defines, bool UseLineDirectives) > + bool defines, bool dumpIncludeDirectives, > +

[PATCH] D25258: [coroutines] Create allocation and deallocation sub-statements.

2016-10-04 Thread David Majnemer via cfe-commits
majnemer added inline comments. > CGCoroutine.cpp:68-69 > +void CodeGenFunction::EmitCoroutineBody(const CoroutineBodyStmt &S) { > + auto *NullPtr = llvm::ConstantPointerNull::get(Builder.getInt8PtrTy()); > + // FIXME: Instead of 0, pass an equivalent of alignas(maxalign_t). > + auto *CoroId =

[PATCH] D25204: Register Calling Convention, Clang changes

2016-10-04 Thread David Majnemer via cfe-commits
majnemer added inline comments. > ItaniumMangle.cpp:1234 > > - mangleSourceName(II); > + auto FD = dyn_cast(ND); > + bool isRegCall = (FD != nullptr) && `auto *` > ItaniumMangle.cpp:1235 > + auto FD = dyn_cast(ND); > + bool isRegCall = (FD != nullptr) && > +FD

[PATCH] D25204: Register Calling Convention, Clang changes

2016-10-04 Thread David Majnemer via cfe-commits
majnemer added inline comments. > ItaniumMangle.cpp:1413-1414 > > -void CXXNameMangler::mangleSourceName(const IdentifierInfo *II) { > - // ::= > +void CXXNameMangler::mangleSourceName(const IdentifierInfo *II, > + bool isRegCall) { > + // ::= [__regc

[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-04 Thread David Majnemer via cfe-commits
majnemer added inline comments. > majnemer wrote in PrintPreprocessedOutput.cpp:321-325 > Variables should start with uppercase characters. Please uppercase all your other variables too. > PrintPreprocessedOutput.cpp:344 > + */ > +bool tryGetTokenText(StringRef *text, const Token &tok) { > + i

[PATCH] D25153: preprocessor supports `-dI` flag

2016-10-03 Thread David Majnemer via cfe-commits
majnemer added inline comments. > PrintPreprocessedOutput.cpp:321 > + */ > +std::string sanitizePath(const StringRef& path) { > + std::string str(path.size() * 2, '\0'); Don't pass `StringRef` by const reference, just pass it by value. > PrintPreprocessedOutput.cpp:321-325 > +std::string sanit

[PATCH] D24986: [MS] Implement __iso_volatile loads/stores as builtins

2016-09-30 Thread David Majnemer via cfe-commits
majnemer added inline comments. > mstorsjo wrote in ms-volatile-arm.c:2 > Well, originally, the point was to clarify that these volatile stores end up > without atomic semantics, regardless of whether -volatile:ms has been > specified. The original version of this patch (with an inline implemen

[PATCH] D24986: [MS] Implement __iso_volatile loads/stores as builtins

2016-09-30 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM > ms-volatile-arm.c:2 > +// REQUIRES: arm-registered-target > +// RUN: %clang_cc1 -triple thumbv7-win32 -emit-llvm -fms-extensions > -fms-volatile -o - < %s | FileCheck %s > + You

[PATCH] [Commented On] D24986: [MS] Implement __iso_volatile loads/stores as builtins

2016-09-29 Thread David Majnemer via cfe-commits
majnemer added inline comments. > CGBuiltin.cpp:2597-2611 > +case ARM::BI__iso_volatile_load8: > +case ARM::BI__iso_volatile_load16: > +case ARM::BI__iso_volatile_load32: > +case ARM::BI__iso_volatile_load64: > + return RValue::get(EmitVolatileLoad(*this, E)); > +case ARM

[PATCH] [Changed Subscribers] D25068: [coroutines] Switch to using std::experimental namespace per P0057R5

2016-09-29 Thread David Majnemer via cfe-commits
majnemer added inline comments. View RevisionView InlineSemaDeclCXX.cpp:8287-8290 NamespaceDecl *Sema::getStdExperimentalNamespace() const { return cast_or_null( StdExperimentalNamespace.get(Context.getExternalSource())); } Is this clang-format'd?https://reviews.

Re: [PATCH] D24998: Add a new optimization option -Og

2016-09-27 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. Please include full context with your diff. Comment at: lib/Frontend/CompilerInvocation.cpp:101-103 @@ -100,1 +100,5 @@ +if (S == "g") { +return 1; +} + Please clang-format this.

Re: [PATCH] D24986: Headers: Add iso_volatile load/store intrinsics

2016-09-27 Thread David Majnemer via cfe-commits
majnemer added a comment. IMO, this should be implemented in clang CodeGen so that we don't get extra acquire/release barriers with /volatile:ms but that might be overkill; feel free to disregard this. https://reviews.llvm.org/D24986 ___ cfe-commi

Re: [PATCH] D24841: [asan] Fix incorrect SEH symbol mangling on win64.

2016-09-22 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer accepted this revision. majnemer added a reviewer: majnemer. majnemer added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D24841 ___ cfe-commits mailing list

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

2016-09-21 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. In https://reviews.llvm.org/D24693#548739, @ahatanak wrote: > 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 intrinsic

Re: [PATCH] D24751: [cleanup] Remove excessive padding from TextTokenRetokenizer::Position

2016-09-19 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer accepted this revision. majnemer added a reviewer: majnemer. majnemer added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D24751 ___ c

Re: [PATCH] D24648: Fix unused result from sign extending an Offset.

2016-09-15 Thread David Majnemer via cfe-commits
sext should probably be marked WARN_UNUSED_RESULT On Thursday, September 15, 2016, Stephen Hines via cfe-commits < cfe-commits@lists.llvm.org> wrote: > srhines created this revision. > srhines added a reviewer: cfe-commits. > srhines added a subscriber: meikeb. > > Offset was doubled in size, but

Re: r281401 - Temporary fix for MS _Interlocked intrinsics

2016-09-13 Thread David Majnemer via cfe-commits
What issue is this addressing? On Tue, Sep 13, 2016 at 2:51 PM, Albert Gutowski via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: agutowski > Date: Tue Sep 13 16:51:37 2016 > New Revision: 281401 > > URL: http://llvm.org/viewvc/llvm-project?rev=281401&view=rev > Log: > Temporary fix

Re: [PATCH] D24469: [clang-cl] Diagnose duplicate uuids.

2016-09-12 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. Does __uuidof walk bases to find [uuid] in cl.exe? They walk bases for the __declspec spelling. https://reviews.llvm.org/D24469 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

r281189 - [MS ABI] Add /include directives for dynamic TLS

2016-09-11 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Sep 11 21:51:43 2016 New Revision: 281189 URL: http://llvm.org/viewvc/llvm-project?rev=281189&view=rev Log: [MS ABI] Add /include directives for dynamic TLS MSVC emits /include directives in the .drective section for the __dyn_tls_init function (decorated as ___dyn_tls_

[PATCH] D24378: [CodeGen] Provide an appropriate alignment for dynamic allocas

2016-09-08 Thread David Majnemer via cfe-commits
majnemer created this revision. majnemer added reviewers: rnk, rsmith, efriedma, chandlerc. majnemer added a subscriber: cfe-commits. GCC documents __builtin_alloca as aligning the storage to at least __BIGGEST_ALIGNMENT__. MSVC documents essentially the same for the x64 ABI: https://msdn.microso

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-08 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/AST/ExprConstant.cpp:7024-7050 @@ -7023,1 +7023,29 @@ + case Builtin::BI_rotl8: + case Builtin::BI_rotl16: + case Builtin::BI_rotl: + case Builtin::BI_lrotl: + case Builtin::BI_rotl64: { +APSInt Val, Shift; +if (!Evalu

Re: [PATCH] D24330: Add some MS aliases for existing intrinsics

2016-09-08 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: include/clang/Basic/BuiltinsX86.def:304 @@ -303,2 +303,3 @@ TARGET_BUILTIN(__builtin_ia32_ldmxcsr, "vUi", "", "sse") +TARGET_BUILTIN(_mm_setcsr, "vUi", "", "sse") TARGET_BUILTIN(__builtin_ia32_stmxcsr, "Ui", "", "sse")

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/AST/ExprConstant.cpp:7024-7050 @@ -7023,1 +7023,29 @@ + case Builtin::BI_rotl8: + case Builtin::BI_rotl16: + case Builtin::BI_rotl: + case Builtin::BI_lrotl: + case Builtin::BI_rotl64: { +APSInt Val, Shift; +if (!Evalu

Re: [PATCH] D24311: Implement MS _rot intrinsics

2016-09-07 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. In https://reviews.llvm.org/D24311#536545, @agutowski wrote: > In https://reviews.llvm.org/D24311#536333, @rnk wrote: > > > You should locally verify that this generates the correct assembly when > > optimizations are enabled, and

Re: [PATCH] D24153: Add bunch of _Interlocked builtins

2016-09-07 Thread David Majnemer via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D24153#535992, @rnk wrote: > Looks good to me. David, do you remember any subtleties here? I seem to > recall there were some bugs in our intrin.h implementations, or > inconsistencies between us and MSVC. I can't seem to recall anything m

Re: [PATCH] D23503: [clang-cl] Check that we are in clang cl mode before enabling support for the CL environment variable.

2016-09-05 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D23503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

  1   2   3   4   5   6   >