Re: [PATCH] D19990: [CUDA] Implement __ldg using intrinsics.

2016-05-05 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: include/clang/Basic/BuiltinsNVPTX.def:569-603 @@ -568,1 +568,37 @@ +// __ldg. This is not implemented as a builtin by nvcc. +BUILTIN(__nvvm_ldg_c, "ccC*", "") +BUILTIN(__nvvm_ldg_s, "ssC*", "") +BUILTIN(__nvvm_ldg_i, "iiC*", ""

Re: [PATCH] D19654: PR27132: Proper mangling for __unaligned qualifier (now with PR27367 fixed)

2016-05-06 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D19654#423382, @andreybokhanko wrote: > David, thank you for the thorough review! -- it definitely made the patch > stronger and me even more paranoid than the rest of Intel. :-) Thanks for implementing this :) > > > In http://reviews.l

Re: [Clang] Convergent Attribute

2016-05-06 Thread David Majnemer via cfe-commits
I think it could be useful for CUDA too. On Friday, May 6, 2016, Anastasia Stulova via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi Ettore, > > LGTM generally! > > I was just wondering whether it would make sense to restrict the usage of > the attribute to OpenCL language i.e. to add "l

Re: [Clang] Convergent Attribute

2016-05-06 Thread David Majnemer via cfe-commits
On Fri, May 6, 2016 at 2:36 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Fri, May 6, 2016 at 1:56 PM, Ettore Speziale via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Hello, >> >> > In the case of foo, there could be a problem. >> > If you do not mark it c

Re: [PATCH] D20103: PR27132: Proper mangling for __unaligned qualifier (now with both PR27367 and PR27666 fixed)

2016-05-10 Thread David Majnemer via cfe-commits
majnemer added a comment. Can we test pointers to data members? Is it possible to have `__unaligned int *S::*` or `int *S::* __unaligned` or even `__unaligned int *S::* __unaligned` ? Comment at: include/clang/AST/Type.h:446 @@ -437,1 +445,3 @@ + // U qualifier may su

Re: [PATCH] D20136: Get default -fms-compatibility-version from cl.exe's version

2016-05-10 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/Driver/MSVCToolChain.cpp:472 @@ +471,3 @@ + + const DWORD VersionSize = ::GetFileVersionInfoSizeA(ClExe.c_str(), nullptr); + if (VersionSize == 0) { Why not use the `GetFileVersionInfoSizeW` variant? http:

Re: [PATCH] D20136: Get default -fms-compatibility-version from cl.exe's version

2016-05-10 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/Driver/MSVCToolChain.cpp:472 @@ +471,3 @@ + + const DWORD VersionSize = ::GetFileVersionInfoSizeA(ClExe.c_str(), nullptr); + if (VersionSize == 0) { amccarth wrote: > majnemer wrote: > > Why not use the `GetFileVer

Re: r269148 - Disable -Wcast-calling-convention by default (follow-up to r269116)

2016-05-10 Thread David Majnemer via cfe-commits
Er, why? Why not just disable this warning in chromium? Clangs diagnostics wouldn't have developed as well as they have if we took this approach to all warnings. On Tuesday, May 10, 2016, Hans Wennborg via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: hans > Date: Tue May 10 19:49:20

Re: [PATCH] D20171: Support for MSVS default calling convention options (/Gd, /Gz, /Gv, /Gr)

2016-05-11 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/AST/ASTContext.cpp:8604-8606 @@ -8603,5 +8603,5 @@ bool IsCXXMethod) const { // Pass through to the C++ ABI object if (IsCXXMethod) return ABI->getDefaultMethodCa

Re: [PATCH] D20103: PR27132: Proper mangling for __unaligned qualifier (now with both PR27367 and PR27666 fixed)

2016-05-11 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM, thanks! http://reviews.llvm.org/D20103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

Re: [PATCH] D20171: Support for MSVS default calling convention options (/Gd, /Gz, /Gv, /Gr)

2016-05-11 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/AST/ASTContext.cpp:8604-8606 @@ -8603,5 +8603,5 @@ bool IsCXXMethod) const { // Pass through to the C++ ABI object if (IsCXXMethod) return ABI->getDefaultMethodCallConv(

r269271 - [MS ABI] Don't crash when zero-initializing a vbase which contains a vbase

2016-05-11 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed May 11 22:51:52 2016 New Revision: 269271 URL: http://llvm.org/viewvc/llvm-project?rev=269271&view=rev Log: [MS ABI] Don't crash when zero-initializing a vbase which contains a vbase Bases can be zero-initialized: the storage is zero-initialized before the base construc

Re: [PATCH] D20171: Support for MSVS default calling convention options (/Gd, /Gz, /Gv, /Gr)

2016-05-12 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: include/clang/Basic/LangOptions.def:175 @@ -174,2 +174,3 @@ ENUM_LANGOPT(MSPointerToMemberRepresentationMethod, PragmaMSPointersToMembersKind, 2, PPTMK_BestCase, "member-pointer representation method") +ENUM_LANGOPT(DefaultMSCallingCo

Re: [PATCH] D20136: Get default -fms-compatibility-version from cl.exe's version

2016-05-13 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/Driver/MSVCToolChain.cpp:481 @@ +480,3 @@ + + std::vector VersionBlock(VersionSize); + if (!::GetFileVersionInfoW(ClExeWide.c_str(), 0, VersionSize, It might be nicer to use a `SmallVector`, or whatever `VersionSi

Re: r269220 - [MSVC] Implementation of __unaligned as a proper type qualifier

2016-05-13 Thread David Majnemer via cfe-commits
This seems to crash clang: struct S { void f() __unaligned; }; void S::f() __unaligned { } clang/lib/Sema/DeclSpec.cpp:214: static clang::DeclaratorChunk clang::DeclaratorChunk::getFunction(bool, bool, clang::SourceLocation, clang::DeclaratorChunk::ParamInfo *, unsigned int, clang::SourceLocatio

Re: [PATCH] D20136: Get default -fms-compatibility-version from cl.exe's version

2016-05-13 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: lib/Driver/MSVCToolChain.cpp:481 @@ +480,3 @@ + + std::vector VersionBlock(VersionSize); + if (!::GetFileVersionInfoW(ClExeWide.c_str(), 0, VersionSize, amccarth wrote: > majnemer wrote: > > It might be nicer to use a

r269465 - [MS ABI] Delegating constructors should not assume they are most derived

2016-05-13 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri May 13 15:05:09 2016 New Revision: 269465 URL: http://llvm.org/viewvc/llvm-project?rev=269465&view=rev Log: [MS ABI] Delegating constructors should not assume they are most derived A constructor needs to know whether or not it is most derived in order to determine if it

Re: r269220 - [MSVC] Implementation of __unaligned as a proper type qualifier

2016-05-13 Thread David Majnemer via cfe-commits
FYI, the following is a little shorter: using Ty = int () __unaligned; Also, this case (in C mode) is interesting: void f(int x[__unaligned 4]); DeclaratorChunk::getArray will truncate the TypeQuals because ArrayTypeInfo's TypeQuals doesn't have enough bits. similar issues arise with: struct A;

r269687 - [Lex] inferModuleFromLocation should do no work if there are no modules

2016-05-16 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon May 16 15:30:03 2016 New Revision: 269687 URL: http://llvm.org/viewvc/llvm-project?rev=269687&view=rev Log: [Lex] inferModuleFromLocation should do no work if there are no modules getModuleContainingLocation ends up on the hot-path for typical C code which can lead to c

Re: [PATCH] D20437: [MSVC] Support of __unaligned qualifier for function types

2016-05-19 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: include/clang/Sema/DeclSpec.h:1152-1169 @@ -1153,19 +1151,20 @@ struct ArrayTypeInfo : TypeInfoCommon { -/// The type qualifiers for the array: const/volatile/restrict/_Atomic. -unsigned TypeQuals : 4; +/// The type qual

r270089 - [MS ABI] Ignore transparent contexts when determining the effective context

2016-05-19 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu May 19 13:15:53 2016 New Revision: 270089 URL: http://llvm.org/viewvc/llvm-project?rev=270089&view=rev Log: [MS ABI] Ignore transparent contexts when determining the effective context We didn't skip over extern "C++" contexts, causing us to mangle things which don't nee

Re: [PATCH] D20454: Eliminate unnecessary file access checks in Clang driver on Windows

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

Re: [PATCH] D20492: Clang support for __is_assignable intrinsic

2016-05-20 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/Sema/SemaExprCXX.cpp:4523-4525 @@ -4521,1 +4522,5 @@ +if (BTT == BTT_IsAssignable) { + return true; +} + I'd remove the braces and sort it above the `BTT_IsNothrowAssignable` case. http://revi

Re: [PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

2016-03-30 Thread David Majnemer via cfe-commits
majnemer added a comment. I didn't implement a mangling for `__unaligned` because our implementation of it is broken. It should not be modeled as an attribute, it should be modeled as a qualifier because it is possible to overload on it. http://reviews.llvm.org/D18596 __

Re: [PATCH] D17933: Set MaxAtomicInlineWidth properly for i386, i486, and x86-64 cpus without cmpxchg16b.

2016-04-03 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/Basic/Targets.cpp:2565-2577 @@ -2569,1 +2564,15 @@ + + void setAtomic() { +if (getTriple().getArch() == llvm::Triple::x86_64) { + if (HasCX16) +MaxAtomicInlineWidth = 128; + else +MaxAtomicInline

Re: [PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

2016-04-05 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D18596#392098, @andreybokhanko wrote: > In http://reviews.llvm.org/D18596#388295, @aaron.ballman wrote: > > > Regression is a bit of a question mark, to me depending on the diagnostic. > > I think warning the user "this has absolutely no effec

r266089 - [FileManager] Don't crash if reading from stdin and stat(".") fails

2016-04-12 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue Apr 12 11:33:53 2016 New Revision: 266089 URL: http://llvm.org/viewvc/llvm-project?rev=266089&view=rev Log: [FileManager] Don't crash if reading from stdin and stat(".") fails addAncestorsAsVirtualDirs("") quickly returns without doing work because "" has no parent_path

Re: [PATCH] D19459: Cleanup redundant expression in InstCombineAndOrXor.

2016-04-25 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. LGTM http://reviews.llvm.org/D19459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18953: [ms][dll] #26935 Defining a dllimport function should cause it to be exported

2016-04-26 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: test/SemaCXX/dllimport.cpp:179 @@ -140,1 +178,3 @@ +template +int ExternVarTmplDeclInit = 1; avt77 wrote: > rnk wrote: > > Can you check with MSVC 2015 update 2 actually does with definitions of > > dllimport

r270353 - [AST] Cleanup comments regarding CXXRecordDecl::isEmpty

2016-05-21 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun May 22 00:34:26 2016 New Revision: 270353 URL: http://llvm.org/viewvc/llvm-project?rev=270353&view=rev Log: [AST] Cleanup comments regarding CXXRecordDecl::isEmpty We were missing references to the standard, some of our home-grown verbiage didn't make any sense. No fun

r270457 - [MS ABI] Implement __declspec(empty_bases) and __declspec(layout_version)

2016-05-23 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon May 23 12:16:12 2016 New Revision: 270457 URL: http://llvm.org/viewvc/llvm-project?rev=270457&view=rev Log: [MS ABI] Implement __declspec(empty_bases) and __declspec(layout_version) The layout_version attribute is pretty straightforward: use the layout rules from versio

r270458 - Clang support for __is_assignable intrinsic

2016-05-23 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon May 23 12:21:55 2016 New Revision: 270458 URL: http://llvm.org/viewvc/llvm-project?rev=270458&view=rev Log: Clang support for __is_assignable intrinsic MSVC now supports the __is_assignable type trait intrinsic, to enable easier and more efficient implementation of the

Re: [PATCH] D20492: Clang support for __is_assignable intrinsic

2016-05-23 Thread David Majnemer via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL270458: Clang support for __is_assignable intrinsic (authored by majnemer). Changed prior to commit: http://reviews.llvm.org/D20492?vs=58014&id=58112#toc Repository: rL LLVM http://reviews.llvm.org/

Re: r270457 - [MS ABI] Implement __declspec(empty_bases) and __declspec(layout_version)

2016-05-23 Thread David Majnemer via cfe-commits
On Mon, May 23, 2016 at 10:28 AM, Aaron Ballman wrote: > On Mon, May 23, 2016 at 1:16 PM, David Majnemer via cfe-commits > wrote: > > Author: majnemer > > Date: Mon May 23 12:16:12 2016 > > New Revision: 270457 > > > > URL: http://llvm.org/viewvc/llvm

r270461 - Address post-commit review feedback to r270457

2016-05-23 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon May 23 12:32:35 2016 New Revision: 270461 URL: http://llvm.org/viewvc/llvm-project?rev=270461&view=rev Log: Address post-commit review feedback to r270457 Add two tests which show our error handling behavior for invalid parameters in the layout_version and empty_bases a

r270576 - [MS Volatile] Don't make volatile loads/stores to underaligned objects atomic

2016-05-24 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue May 24 11:09:25 2016 New Revision: 270576 URL: http://llvm.org/viewvc/llvm-project?rev=270576&view=rev Log: [MS Volatile] Don't make volatile loads/stores to underaligned objects atomic Underaligned atomic LValues require libcalls which MSVC doesn't have. MSVC doesn't s

r270580 - [Lex] Support more type-traits in __has_feature

2016-05-24 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue May 24 11:53:13 2016 New Revision: 270580 URL: http://llvm.org/viewvc/llvm-project?rev=270580&view=rev Log: [Lex] Support more type-traits in __has_feature It looks like we forgot to update the __has_feature support when we added some of the type traits. Modified:

r270583 - Revert "[Lex] Support more type-traits in __has_feature"

2016-05-24 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue May 24 12:21:42 2016 New Revision: 270583 URL: http://llvm.org/viewvc/llvm-project?rev=270583&view=rev Log: Revert "[Lex] Support more type-traits in __has_feature" This reverts commit r270580. Using __has_feature to test for type-traits is deprecated. Modified: c

Re: r270580 - [Lex] Support more type-traits in __has_feature

2016-05-24 Thread David Majnemer via cfe-commits
s_feature. > > > On 24 May 2016 9:59 a.m., "David Majnemer via cfe-commits" < > cfe-commits@lists.llvm.org> wrote: > >> > >> Author: majnemer > >> Date: Tue May 24 11:53:13 2016 > >> New Revision: 270580 > >> > >> URL:

r270591 - [RecordLayout] Use an ASTVector instead of using a separate pointer and counter

2016-05-24 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue May 24 13:10:50 2016 New Revision: 270591 URL: http://llvm.org/viewvc/llvm-project?rev=270591&view=rev Log: [RecordLayout] Use an ASTVector instead of using a separate pointer and counter No functional change is intended. Modified: cfe/trunk/include/clang/AST/Recor

Re: [PATCH] D20608: clang-cl: Treat dllimport explicit template instantiation definitions as declarations (PR27810, PR27811)

2016-05-24 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. Does this change our behavior for mingw? http://reviews.llvm.org/D20608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

Re: [PATCH] D20437: [MSVC] Support of __unaligned qualifier for function types

2016-05-25 Thread David Majnemer via cfe-commits
majnemer accepted this revision. majnemer added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/Sema/SemaExprCXX.cpp:937 @@ -936,2 +936,3 @@ + CXXThisTypeQuals &= Qualifiers::FastMask; S.CXXThisTypeOverride Can you add

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

2016-05-25 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D18035#434095, @DmitryPolukhin wrote: > One more friendly ping.. :( I think the best way to make progress on this is to refactor this patch along the lines @rsmith suggested back on May 3. http://reviews.llvm.org/D18035

Re: [PATCH] D20617: [X86][SSE] _mm_store1_ps/_mm_store1_pd should require an aligned pointer

2016-05-25 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/Headers/emmintrin.h:598 @@ -594,3 +597,3 @@ static __inline__ void __DEFAULT_FN_ATTRS -_mm_store_pd(double *__dp, __m128d __a) +_mm_store_pd1(double *__dp, __m128d __a) { You could use `__attribute__((align_

r270952 - [Intrin.h] Sort the __read[fg]s intrinsics

2016-05-26 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu May 26 21:06:14 2016 New Revision: 270952 URL: http://llvm.org/viewvc/llvm-project?rev=270952&view=rev Log: [Intrin.h] Sort the __read[fg]s intrinsics No functional change is intended. Modified: cfe/trunk/lib/Headers/Intrin.h Modified: cfe/trunk/lib/Headers/Intrin

r270953 - [CodeGen] Don't crash when sizeof(long) != 4 for some intrins

2016-05-26 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu May 26 21:06:19 2016 New Revision: 270953 URL: http://llvm.org/viewvc/llvm-project?rev=270953&view=rev Log: [CodeGen] Don't crash when sizeof(long) != 4 for some intrins _InterlockedIncrement and _InterlockedDecrement have 'long' in their prototypes. We assumed 'long'

Re: r271162 - Handle -Wa,--mrelax-relocations=[no|yes].

2016-05-28 Thread David Majnemer via cfe-commits
On Sat, May 28, 2016 at 7:01 PM, Rafael Espindola via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rafael > Date: Sat May 28 21:01:14 2016 > New Revision: 271162 > > URL: http://llvm.org/viewvc/llvm-project?rev=271162&view=rev > Log: > Handle -Wa,--mrelax-relocations=[no|yes]. > > Ad

Re: [PATCH] D16948: [libcxx] Filesystem TS -- Complete

2016-05-30 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: include/experimental/filesystem:610 @@ +609,3 @@ +static void __append_range(string& __dest, _Iter __b, _Iter __e) { +// TODO(EricWF) We get better allocation behavior here if we don't +// provide the same exce

Re: [PATCH] D16948: [libcxx] Filesystem TS -- Complete

2016-05-31 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: src/experimental/operations.cpp:529 @@ +528,3 @@ + +if (::utimensat(AT_FDCWD, p.c_str(), tbuf, 0) == -1) { +m_ec = detail::capture_errno(); SUSv4 says: > The utime() function is marked obsolescent. However,

Re: [PATCH] D16948: [libcxx] Filesystem TS -- Complete

2016-05-31 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: src/experimental/operations.cpp:128-129 @@ +127,4 @@ +bool stat_equivalent(struct ::stat& st1, struct ::stat& st2) { +return (st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino); +} + It is possible for `st_ino` to

Re: r271387 - Adding front-end support to several intrinsics (bit scanning, conversion and state reading intrinsics)

2016-06-01 Thread David Majnemer via cfe-commits
Please implement _bit_scan_forward and _bit_scan_reverse in terms of __builtin_ctz and __builtin_clz. On Wed, Jun 1, 2016 at 5:21 AM, Michael Zuckerman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: mzuckerm > Date: Wed Jun 1 07:21:00 2016 > New Revision: 271387 > > URL: http://l

Re: [PATCH] D21107: Generate codeview for array types

2016-06-07 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:785 @@ +784,3 @@ + TypeIndex IndexType = Asm->MAI->getPointerSize() == 8 ? + TypeIndex(SimpleTypeKind::UInt64) : + TypeIndex(SimpleTypeKind::UInt32); They don't

r272079 - [ItaniumMangle] Mangle dependent __underlying_type correctly

2016-06-07 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue Jun 7 19:34:15 2016 New Revision: 272079 URL: http://llvm.org/viewvc/llvm-project?rev=272079&view=rev Log: [ItaniumMangle] Mangle dependent __underlying_type correctly We attempted to use the UnaryTransformType's UnderlyingType instead of it's BaseType. This is not co

r272159 - [Sema] Don't permit catching variably modified types

2016-06-08 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jun 8 11:05:07 2016 New Revision: 272159 URL: http://llvm.org/viewvc/llvm-project?rev=272159&view=rev Log: [Sema] Don't permit catching variably modified types Variably modified types shouldn't be permitted in catch clauses. This fixes PR28047. Modified: cfe/trun

r272247 - [Sema] Don't crash when a field w/ a mem-initializer clashes with a record name

2016-06-08 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu Jun 9 00:26:56 2016 New Revision: 272247 URL: http://llvm.org/viewvc/llvm-project?rev=272247&view=rev Log: [Sema] Don't crash when a field w/ a mem-initializer clashes with a record name It is possible for a field and a class to have the same name. In such cases, perf

Re: [PATCH] D21173: [X86] _MM_ALIGN16 attribute support for non-windows targets

2016-06-09 Thread David Majnemer via cfe-commits
On Thursday, June 9, 2016, Zvi Rackover via cfe-commits < cfe-commits@lists.llvm.org> wrote: > zvi created this revision. > zvi added reviewers: aaboud, mkuper, echristo, cfe-commits. > zvi set the repository for this revision to rL LLVM. > zvi added a project: clang-c. > Herald added a subscriber

Re: r272247 - [Sema] Don't crash when a field w/ a mem-initializer clashes with a record name

2016-06-09 Thread David Majnemer via cfe-commits
It would mean that the instantiation of the class template gained a field which should be impossible. On Thursday, June 9, 2016, Kim Gräsman wrote: > On Thu, Jun 9, 2016 at 7:26 AM, David Majnemer via cfe-commits > > wrote: > > Author: majnemer > > Date: Thu Jun 9

r272412 - [-fms-extensions] Permit incomplete types in dynamic exception specifications

2016-06-10 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Jun 10 13:24:41 2016 New Revision: 272412 URL: http://llvm.org/viewvc/llvm-project?rev=272412&view=rev Log: [-fms-extensions] Permit incomplete types in dynamic exception specifications Microsoft headers, comdef.h and comutil.h, assume that this is an OK thing to do. D

r272425 - [-fms-extensions] Don't crash on explicit class-scope specializations & default arguments

2016-06-10 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Jun 10 15:21:15 2016 New Revision: 272425 URL: http://llvm.org/viewvc/llvm-project?rev=272425&view=rev Log: [-fms-extensions] Don't crash on explicit class-scope specializations & default arguments The code had a typo it was doing: Param->setUninstantiatedDefaultArg(

r272447 - [Sema] Return an appropriate result from CheckSpecifiedExceptionType

2016-06-10 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Jun 10 20:25:04 2016 New Revision: 272447 URL: http://llvm.org/viewvc/llvm-project?rev=272447&view=rev Log: [Sema] Return an appropriate result from CheckSpecifiedExceptionType We shouldn't return true from CheckSpecifiedExceptionType if the record type is incomplete an

r272564 - [immintrin] Reimplement _bit_scan_{forward,reverse}

2016-06-13 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jun 13 12:26:16 2016 New Revision: 272564 URL: http://llvm.org/viewvc/llvm-project?rev=272564&view=rev Log: [immintrin] Reimplement _bit_scan_{forward,reverse} There is no need to use a target-specific intrinsic to implement _bit_scan_forward or _bit_scan_reverse, reimp

Re: [PATCH] D21301: Detect recursive default argument definition

2016-06-13 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 Comment at: lib/Sema/SemaExpr.cpp:4570 @@ +4569,3 @@ + // If the default argument express

r272628 - [Parser] Handle __pragma(pack, etc. after type definitions

2016-06-13 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jun 13 22:20:28 2016 New Revision: 272628 URL: http://llvm.org/viewvc/llvm-project?rev=272628&view=rev Log: [Parser] Handle __pragma(pack, etc. after type definitions Support certain MS pragmas right after the closing curly brace of a class. Clang did not expect __prag

r273020 - [CodeGen] Use pointer-sized integers for ptrtoint sources

2016-06-17 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Jun 17 12:47:24 2016 New Revision: 273020 URL: http://llvm.org/viewvc/llvm-project?rev=273020&view=rev Log: [CodeGen] Use pointer-sized integers for ptrtoint sources Given something like: void *v = (void *)100; We need to synthesize a ptrtoint operation from 100. Duri

Re: [PATCH] D21544: [MS] Don't expect vftables to be provided for extern template instantiations

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

r273237 - [CodeGen] Do not run initializers for imported variables

2016-06-20 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jun 20 22:40:16 2016 New Revision: 273237 URL: http://llvm.org/viewvc/llvm-project?rev=273237&view=rev Log: [CodeGen] Do not run initializers for imported variables The export side is responsible for running any initializers, they are run when the module is first loaded

r273239 - r273237 fixed PR28220, not PR28216

2016-06-20 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jun 20 22:43:11 2016 New Revision: 273239 URL: http://llvm.org/viewvc/llvm-project?rev=273239&view=rev Log: r273237 fixed PR28220, not PR28216 Added: cfe/trunk/test/CodeGenCXX/PR28220.cpp - copied, changed from r273237, cfe/trunk/test/CodeGenCXX/PR28216.cpp Re

r273522 - Use ranges to concisely express iteration

2016-06-22 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jun 22 19:15:04 2016 New Revision: 273522 URL: http://llvm.org/viewvc/llvm-project?rev=273522&view=rev Log: Use ranges to concisely express iteration No functional change is intended, this should just clean things up a little. Modified: cfe/trunk/include/clang/AST/

r273647 - Use more ArrayRefs

2016-06-23 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu Jun 23 23:05:48 2016 New Revision: 273647 URL: http://llvm.org/viewvc/llvm-project?rev=273647&view=rev Log: Use more ArrayRefs No functional change is intended, just a small refactoring. Modified: cfe/trunk/include/clang/AST/Decl.h cfe/trunk/include/clang/AST/D

r273646 - Use the same underlying type for bitfields

2016-06-23 Thread David Majnemer via cfe-commits
Author: majnemer Date: Thu Jun 23 23:05:35 2016 New Revision: 273646 URL: http://llvm.org/viewvc/llvm-project?rev=273646&view=rev Log: Use the same underlying type for bitfields MSVC allocates fresh storage for consecutive bitfields with different underlying types. Modified: cfe/trunk/includ

r273650 - Use even more ArrayRefs

2016-06-23 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Jun 24 00:33:44 2016 New Revision: 273650 URL: http://llvm.org/viewvc/llvm-project?rev=273650&view=rev Log: Use even more ArrayRefs No functional change is intended, just a small refactoring. Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h cfe/trunk

r273651 - try to fix the MSVC build

2016-06-23 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Jun 24 00:48:59 2016 New Revision: 273651 URL: http://llvm.org/viewvc/llvm-project?rev=273651&view=rev Log: try to fix the MSVC build Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h URL: http:

r273841 - [clang-cl] Implement support for /std

2016-06-26 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Jun 26 21:32:12 2016 New Revision: 273841 URL: http://llvm.org/viewvc/llvm-project?rev=273841&view=rev Log: [clang-cl] Implement support for /std /std: supports two arguments, c++14 and c++latest. Currently, c++latest maps to c++1z but this might change down the road.

Re: [PATCH] D21766: [codeview][clang] Added support for unnamed bitfield type.

2016-06-27 Thread David Majnemer via cfe-commits
majnemer added a comment. As I said in the other differential, I do not think this is the right approach. We should use the extraData for the bitfield member to indicate the offset of the storage unit. http://reviews.llvm.org/D21766 ___ cfe-commits

Re: r273950 -

2016-06-27 Thread David Majnemer via cfe-commits
Any tests? On Mon, Jun 27, 2016 at 5:12 PM, Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Did you land this intentionally? What was the commit message supposed to > be? > > On Mon, Jun 27, 2016 at 6:11 PM, Chris Dewhurst via cfe-commits < > cfe-commits@lists.llvm.org> wrote: >

[PATCH] D21783: [CodeView] Implement support for bitfields in Clang

2016-06-27 Thread David Majnemer via cfe-commits
majnemer created this revision. majnemer added reviewers: rnk, aaboud. majnemer added a subscriber: cfe-commits. Emit the underlying storage offset in addition to the starting bit position of the field. http://reviews.llvm.org/D21783 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebugInfo

r273986 - [intrin.h] Certain _Interlocked intrinsics return the old value

2016-06-27 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jun 27 21:54:43 2016 New Revision: 273986 URL: http://llvm.org/viewvc/llvm-project?rev=273986&view=rev Log: [intrin.h] Certain _Interlocked intrinsics return the old value This fixes PR28326. Modified: cfe/trunk/lib/Headers/intrin.h Modified: cfe/trunk/lib/Headers

r273987 - [clang-cl] Define _MSVC_LANG

2016-06-27 Thread David Majnemer via cfe-commits
Author: majnemer Date: Mon Jun 27 22:13:16 2016 New Revision: 273987 URL: http://llvm.org/viewvc/llvm-project?rev=273987&view=rev Log: [clang-cl] Define _MSVC_LANG Recently, Microsoft added support for a flag, /std, which controls which version of the language rules MSVC should use. MSVC hasn't u

Re: [PATCH] D21783: [CodeView] Implement support for bitfields in Clang

2016-06-28 Thread David Majnemer via cfe-commits
majnemer updated this revision to Diff 62095. majnemer added a comment. - Address review comments http://reviews.llvm.org/D21783 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebugInfo.h test/CodeGen/debug-info-packed-struct.c test/CodeGenCXX/debug-info-ms-bitfields.cpp Index: test/

Re: [PATCH] D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation

2016-06-28 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: src/cxa_thread_atexit.cpp:36-47 @@ +35,14 @@ + public: +DtorListHolder() { + pthread_key_create(&key_, run_dtors); +} + +~DtorListHolder() { + run_dtors(get()); + pthread_key_delete(key_); +} + +

Re: [PATCH] D21830: Remove -mrelax-all from Clang -O0

2016-06-29 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. majnemer added a comment. Why are you making this change? I cannot see a justification in the description. http://reviews.llvm.org/D21830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

Re: [PATCH] D21803: [libcxxabi] Provide a fallback __cxa_thread_atexit() implementation

2016-06-29 Thread David Majnemer via cfe-commits
majnemer added inline comments. Comment at: src/cxa_thread_atexit.cpp:64-90 @@ -18,8 +63,29 @@ +_LIBCXXABI_FUNC_VIS int __cxa_thread_atexit(Dtor dtor, void *obj, void *dso_symbol) throw() { - extern int __cxa_thread_atexit_impl(void (*

r274202 - [MS ABI] Pick an inheritance model if we resolve an overload set

2016-06-29 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jun 29 22:02:03 2016 New Revision: 274202 URL: http://llvm.org/viewvc/llvm-project?rev=274202&view=rev Log: [MS ABI] Pick an inheritance model if we resolve an overload set We didn't assign an inheritance model for 'Foo' if the event an exrepssion like '&Foo::Bar' occur

r274201 - [CodeView] Implement support for bitfields in Clang

2016-06-29 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jun 29 22:01:59 2016 New Revision: 274201 URL: http://llvm.org/viewvc/llvm-project?rev=274201&view=rev Log: [CodeView] Implement support for bitfields in Clang Emit the underlying storage offset in addition to the starting bit position of the field. This fixes PR28162.

Re: [PATCH] D21783: [CodeView] Implement support for bitfields in Clang

2016-06-29 Thread David Majnemer via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL274201: [CodeView] Implement support for bitfields in Clang (authored by majnemer). Changed prior to commit: http://reviews.llvm.org/D21783?vs=62095&id=62333#toc Repository: rL LLVM http://reviews.l

Re: [PATCH] D21863: Fix typo in atomic macros

2016-06-29 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 http://reviews.llvm.org/D21863 ___ cfe-commits mailing list

r274401 - [CodeView] Include MSVC style names for unnamed types

2016-07-01 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Jul 1 18:12:54 2016 New Revision: 274401 URL: http://llvm.org/viewvc/llvm-project?rev=274401&view=rev Log: [CodeView] Include MSVC style names for unnamed types The CodeView printer expects to be able to generate fully qualified names from the debug info graph. This m

r274475 - [AST] Use ArrayRef in more interfaces

2016-07-03 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Jul 3 16:17:51 2016 New Revision: 274475 URL: http://llvm.org/viewvc/llvm-project?rev=274475&view=rev Log: [AST] Use ArrayRef in more interfaces ArrayRef is a little better than passing around a pointer/length pair. No functional change is intended. Modified: cfe

r274477 - [Sema] A flexible array member must not be the only named member

2016-07-03 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sun Jul 3 19:24:59 2016 New Revision: 274477 URL: http://llvm.org/viewvc/llvm-project?rev=274477&view=rev Log: [Sema] A flexible array member must not be the only named member We didn't correctly detect situations where a flexible array member was the only named member in

r274601 - [AST] Use ArrayRef in more interfaces

2016-07-05 Thread David Majnemer via cfe-commits
Author: majnemer Date: Tue Jul 5 23:19:16 2016 New Revision: 274601 URL: http://llvm.org/viewvc/llvm-project?rev=274601&view=rev Log: [AST] Use ArrayRef in more interfaces ArrayRef is a little better than passing around a pointer/length pair. No functional change is intended. Modified: cfe

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. Hmm, I'm not so sure this will work with constexpr: #include struct __declspec(dllimport) S { virtual void fn() const {printf("%s\n", "hi");} constexpr S() = default; }; constexpr S s; auto &x = s; int main() { x.fn(); } Before my

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. FWIW, I think that we would be OK to import vftables (and thus use the _7 mangling) in contexts where their construction doesn't need to be constant. It seemed pretty complex to implement but I'd be open to such an implementation. http://reviews.llvm.org/D22034 __

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D22034#474937, @DmitryPolukhin wrote: > David, do you know real programs that relay on constexpr and dllexport > semantic that doesn't work on MSVC? Yes, Chrome relied on these semantics. > Anyway current implementation is not compatible wi

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D22034#475002, @DmitryPolukhin wrote: > In http://reviews.llvm.org/D22034#474985, @majnemer wrote: > > > In http://reviews.llvm.org/D22034#474937, @DmitryPolukhin wrote: > > > > > David, do you know real programs that relay on constexpr and dll

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. In http://reviews.llvm.org/D22034#475540, @DmitryPolukhin wrote: > In http://reviews.llvm.org/D22034#475331, @majnemer wrote: > > > Wait, can you give an example of MSVC exporting a vftable but not all the > > virtual methods (other than the deleting destructor)? I don

Re: [PATCH] D22034: [MSVC][DLL] use local vftable mangling only exported classes with virtual destructor

2016-07-06 Thread David Majnemer via cfe-commits
majnemer added a comment. Thinking about this some more, it is possible for clang to emit code that will make everybody happy: If a class is being constructed in a constexpr context and all the vftable entries it references are marked import, emit local vftables and reference them in the objec

r274677 - [CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage

2016-07-06 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jul 6 16:07:53 2016 New Revision: 274677 URL: http://llvm.org/viewvc/llvm-project?rev=274677&view=rev Log: [CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage For the purpose of emitting debug info, entities with private linkage should be treated the

r274733 - [AST] Tighten up the bitfield in TemplateSpecializationType

2016-07-06 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jul 6 23:43:11 2016 New Revision: 274733 URL: http://llvm.org/viewvc/llvm-project?rev=274733&view=rev Log: [AST] Tighten up the bitfield in TemplateSpecializationType Optimize the bitfield types to conserve space for the MSVC ABI. Modified: cfe/trunk/include/clang

r274732 - [AST] Use ArrayRef in more interfaces

2016-07-06 Thread David Majnemer via cfe-commits
Author: majnemer Date: Wed Jul 6 23:43:07 2016 New Revision: 274732 URL: http://llvm.org/viewvc/llvm-project?rev=274732&view=rev Log: [AST] Use ArrayRef in more interfaces ArrayRef is a little better than passing around a pointer/length pair. No functional change is intended. Modified: cfe

r274983 - [AST] Tighten up some bitfields

2016-07-09 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sat Jul 9 14:26:19 2016 New Revision: 274983 URL: http://llvm.org/viewvc/llvm-project?rev=274983&view=rev Log: [AST] Tighten up some bitfields Optimize the bitfield types to conserve space for the MSVC ABI. Modified: cfe/trunk/include/clang/AST/DeclFriend.h cfe/tr

<    1   2   3   4   5   6   >