Re: [PATCH] D31363: [libc++] Remove cmake glob for source files

2017-10-04 Thread Zachary Turner via cfe-commits
It’s not, but the point is we’re already skirting the line On Wed, Oct 4, 2017 at 9:37 PM Duncan P. N. Exon Smith wrote: > I haven't looked at the patch. If this is guarded behind NOT > LIBCXX_STANDALONE_BUILD checks, then it's probably fine. > > > On Oct 4, 2017, at

Re: [PATCH] D31363: [libc++] Remove cmake glob for source files

2017-10-04 Thread Duncan P. N. Exon Smith via cfe-commits
I haven't looked at the patch. If this is guarded behind NOT LIBCXX_STANDALONE_BUILD checks, then it's probably fine. > On Oct 4, 2017, at 21:36, Zachary Turner wrote: > > This doesn’t match up with what beanz said. While I assume Duncan is the > final word, can we get

Re: [PATCH] D31363: [libc++] Remove cmake glob for source files

2017-10-04 Thread Zachary Turner via cfe-commits
This doesn’t match up with what beanz said. While I assume Duncan is the final word, can we get some confirmation from beanz that everyone is on the same page? (Note that libcxx already uses some of LLVM’s cmake, but it’s behind some NOT LIBCXX_STANDALONE_BUILD checks) Assuming the answer

Re: [PATCH] D31363: [libc++] Remove cmake glob for source files

2017-10-04 Thread Duncan P. N. Exon Smith via cfe-commits
Thanks correct. > On Oct 4, 2017, at 18:49, Shoaib Meenai via Phabricator via cfe-commits > wrote: > > smeenai added subscribers: zturner, rjmccall. > smeenai added a comment. > > @rjmccall, this adds a libc++ build dependency on LLVM's cmake modules. There > were

[PATCH] D37826: Refine generation of TBAA information in clang

2017-10-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D37826#888086, @kosarev wrote: > In https://reviews.llvm.org/D37826#887820, @rjmccall wrote: > > > I assume I should wait on reviewing this until all of these smaller TBAA > > patches land? > > > These small patches are actually part of this

[PATCH] D38503: [CodeGen] Unify generation of scalar and struct-path TBAA tags

2017-10-04 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM with one comment fix that I noticed. Comment at: lib/CodeGen/CodeGenModule.h:659 - llvm::MDNode *getTBAAInfoForVTablePtr(); + /// getTBAAAccessInfo - Get TBAA

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-10-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Are you sure it's a good idea to not print the address space when it's implicit? Won't that often lead to really confusing diagnostics? Also, we do already have a way of expressing that an extended qualifier was explicit: AttributedType. We have very similar sorts

[PATCH] D31363: [libc++] Remove cmake glob for source files

2017-10-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a reviewer: dexonsmith. rjmccall added a comment. I'll let Duncan answer that question. https://reviews.llvm.org/D31363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D38473: Include getting generated struct offsets in CodegenABITypes

2017-10-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D38473#888597, @rsmith wrote: > In https://reviews.llvm.org/D38473#888159, @mppf wrote: > > > > You should also indicate *which* record layout (complete object type or > > > base subobject type) the field number is for. I don't think there's

Re: [libcxx] r314949 - [libc++] Allow users to explicitly specify ABI

2017-10-04 Thread Shoaib Meenai via cfe-commits
Eric and I discussed this further on IRC, and r314965 implements his suggestions. From: Eric Fiselier Date: Wednesday, October 4, 2017 at 6:11 PM To: Shoaib Meenai Cc: cfe-commits Subject: Re: [libcxx] r314949 - [libc++] Allow users to

[libcxx] r314965 - [libc++] Clarify names of ABI forcing macros

2017-10-04 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Wed Oct 4 19:18:08 2017 New Revision: 314965 URL: http://llvm.org/viewvc/llvm-project?rev=314965=rev Log: [libc++] Clarify names of ABI forcing macros Make it clear that these are intended only to force a specific ABI when the autodetection would give the wrong result by

[PATCH] D38517: Enabling new pass manager in LTO (and thinLTO) link step via -fexperimental-new-pass-manager option

2017-10-04 Thread Sean Fertile via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314964: Enabling new pass manager in LTO (and thinLTO) link step. (authored by sfertile). Changed prior to commit: https://reviews.llvm.org/D38517?vs=117677=117771#toc Repository: rL LLVM

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-10-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D35082#887855, @rjmccall wrote: > Why is most of this patch necessary under the design of adding a > non-canonical __private address space? There are two reasons that we need a flag to indicate an address space is simplicit: 1. We need a

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-10-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 117770. yaxunl marked 9 inline comments as done. yaxunl added a comment. Revised by John's comments. https://reviews.llvm.org/D35082 Files: include/clang/AST/ASTContext.h include/clang/AST/Type.h include/clang/Basic/AddressSpaces.h

Re: [libcxx] r314949 - [libc++] Allow users to explicitly specify ABI

2017-10-04 Thread Eric Fiselier via cfe-commits
On Wed, Oct 4, 2017 at 5:44 PM, Shoaib Meenai via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: smeenai > Date: Wed Oct 4 16:44:38 2017 > New Revision: 314949 > > URL: http://llvm.org/viewvc/llvm-project?rev=314949=rev > Log: > [libc++] Allow users to explicitly specify ABI > >

r314960 - [Analyzer Tests] Fix misc bugs in analyzer reference results updater.

2017-10-04 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Oct 4 18:02:20 2017 New Revision: 314960 URL: http://llvm.org/viewvc/llvm-project?rev=314960=rev Log: [Analyzer Tests] Fix misc bugs in analyzer reference results updater. Modified: cfe/trunk/utils/analyzer/SATestUpdateDiffs.py Modified:

[PATCH] D38101: [Sema] Diagnose tautological comparison with type's min/max values

2017-10-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Thanks for the refactoring :) Comment at: lib/Sema/SemaChecking.cpp:8697 + + return true; } lebedev.ri wrote: > If the diagnostic we are about to output is disabled, should we still `return > true;` and suppress potential

r314957 - Add testcase for r314956:

2017-10-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Oct 4 17:48:18 2017 New Revision: 314957 URL: http://llvm.org/viewvc/llvm-project?rev=314957=rev Log: Add testcase for r314956: PR33924: Merge block-scope anonymous declarations if there are multiple definitions of the enclosing function. Added:

r314955 - Remove PendingBody mechanism for function and ObjC method deserialization.

2017-10-04 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Oct 4 17:43:38 2017 New Revision: 314955 URL: http://llvm.org/viewvc/llvm-project?rev=314955=rev Log: Remove PendingBody mechanism for function and ObjC method deserialization. In its place, track on the canonical function declaration whether there is a declaration with

Re: r314262 - Emit section information for extern variables.

2017-10-04 Thread Nico Weber via cfe-commits
That does the trick. Thanks for the quick help, everyone! On Wed, Oct 4, 2017 at 6:18 PM, Keane, Erich wrote: > Elizabeth gave me a patch, submitted it with a test in r314939 > > > > *From:* Andrews, Elizabeth > *Sent:* Wednesday, October 4, 2017 1:54 PM > *To:* Friedman,

[PATCH] D38525: Cleanup and generalize -shared-libasan.

2017-10-04 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis updated this revision to Diff 117767. eugenis added a comment. renamed flags to *-libsan https://reviews.llvm.org/D38525 Files: clang/include/clang/Driver/Options.td clang/include/clang/Driver/SanitizerArgs.h clang/lib/Driver/SanitizerArgs.cpp

[libcxx] r314950 - [libc++] Move cache variable definition. NFC

2017-10-04 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Wed Oct 4 16:51:57 2017 New Revision: 314950 URL: http://llvm.org/viewvc/llvm-project?rev=314950=rev Log: [libc++] Move cache variable definition. NFC Move it to where the other ABI cache variables/options are defined. Modified: libcxx/trunk/CMakeLists.txt Modified:

[libcxx] r314949 - [libc++] Allow users to explicitly specify ABI

2017-10-04 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Wed Oct 4 16:44:38 2017 New Revision: 314949 URL: http://llvm.org/viewvc/llvm-project?rev=314949=rev Log: [libc++] Allow users to explicitly specify ABI libc++'s current heuristic for detecting Itanium vs. Microsoft ABI falls short in some cases. For example, it will

[libcxx] r314947 - Fix accidental assignment inside test asserts

2017-10-04 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Oct 4 16:21:18 2017 New Revision: 314947 URL: http://llvm.org/viewvc/llvm-project?rev=314947=rev Log: Fix accidental assignment inside test asserts Modified: libcxx/trunk/test/std/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp

[PATCH] D36719: [libc++] Add site config option for ABI macros

2017-10-04 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314946: [libc++] Add site config option for ABI macros (authored by smeenai). Changed prior to commit: https://reviews.llvm.org/D36719?vs=117758=117759#toc Repository: rL LLVM

[libcxx] r314946 - [libc++] Add site config option for ABI macros

2017-10-04 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Wed Oct 4 16:17:12 2017 New Revision: 314946 URL: http://llvm.org/viewvc/llvm-project?rev=314946=rev Log: [libc++] Add site config option for ABI macros Some ABI macros affect headers, so it's nice to have a site config option for them. Add a LIBCXX_ABI_DEFINES cmake macro

[PATCH] D36719: [libc++] Add site config option for ABI macros

2017-10-04 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai updated this revision to Diff 117758. smeenai added a comment. Fix RST https://reviews.llvm.org/D36719 Files: CMakeLists.txt docs/BuildingLibcxx.rst include/__config_site.in utils/libcxx/test/config.py Index: utils/libcxx/test/config.py

[PATCH] D38525: Cleanup and generalize -shared-libasan.

2017-10-04 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In https://reviews.llvm.org/D38525#26, @rsmith wrote: > Could we perhaps rename these flags to e.g. `-static-libsan` (with a > `-static-libasan` alias for compatibility)? It seems confusing that the way > to enable a static tsan runtime would be with

[PATCH] D36719: [libc++] Add site config option for ABI macros

2017-10-04 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai updated this revision to Diff 117757. smeenai added a comment. Address comments https://reviews.llvm.org/D36719 Files: CMakeLists.txt docs/BuildingLibcxx.rst include/__config_site.in utils/libcxx/test/config.py Index: utils/libcxx/test/config.py

[PATCH] D35046: [coroutines] Include "this" type when looking up coroutine_traits

2017-10-04 Thread Toby Allsopp via Phabricator via cfe-commits
toby-allsopp abandoned this revision. toby-allsopp added a comment. Yes, @EricWF made a much more comprehensive change that has been in for a while now. Abandoning. https://reviews.llvm.org/D35046 ___ cfe-commits mailing list

[PATCH] D36713: [libc++] Add a persistent way to disable availability

2017-10-04 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai abandoned this revision. smeenai added a comment. I ended up handling this differently internally (via a custom site config). If someone else ends up needing the same functionality, they can revive it. https://reviews.llvm.org/D36713 ___

[PATCH] D38567: [config] Warn when POSIX_C_SOURCE breaks threading support on Darwin

2017-10-04 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. I'm not sure how to test the warning against anything but the macOS SDK. When I tried, I hit a -Wincompatible-sysroot issue. I can leave those changes out of this patch if we want to be more conservative. https://reviews.llvm.org/D38567

[PATCH] D38567: [config] Warn when POSIX_C_SOURCE breaks threading support on Darwin

2017-10-04 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Prior to macOS 10.13 and iOS 11, defining POSIX_C_SOURCE before including resulted in hard-to-understand errors. That definition causes a bunch of important definitions from the system headers to be skipped, so users see failures like "can't find mach_port_t". This

[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-10-04 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D35216#888506, @NoQ wrote: > Do you think this patch should be blocked in favor of complete modeling? Please, let's get this landed. We can add more precise modeling when the need arises. https://reviews.llvm.org/D35216

[libcxx] r314940 - Initial cut at infastructure for fuzzing support for OSS-fuzz

2017-10-04 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Oct 4 15:23:03 2017 New Revision: 314940 URL: http://llvm.org/viewvc/llvm-project?rev=314940=rev Log: Initial cut at infastructure for fuzzing support for OSS-fuzz Added: libcxx/trunk/fuzzing/ libcxx/trunk/fuzzing/fuzzing.cpp libcxx/trunk/fuzzing/fuzzing.h

RE: r314262 - Emit section information for extern variables.

2017-10-04 Thread Keane, Erich via cfe-commits
Elizabeth gave me a patch, submitted it with a test in r314939 From: Andrews, Elizabeth Sent: Wednesday, October 4, 2017 1:54 PM To: Friedman, Eli ; Keane, Erich ; Nico Weber Cc: cfe-commits

r314939 - Fix 'section' warning behavior with tentatively-defined values

2017-10-04 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Wed Oct 4 15:16:24 2017 New Revision: 314939 URL: http://llvm.org/viewvc/llvm-project?rev=314939=rev Log: Fix 'section' warning behavior with tentatively-defined values As reported on cfe-commits, r314262 resulted in tentatively-defined variables not being excluded for

[PATCH] D38525: Cleanup and generalize -shared-libasan.

2017-10-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Could we perhaps rename these flags to e.g. `-static-libsan` (with a `-static-libasan` alias for compatibility)? It seems confusing that the way to enable a static tsan runtime would be with `-static-libasan`. https://reviews.llvm.org/D38525

[PATCH] D38134: [OpenCL] Emit enqueued block as kernel

2017-10-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 117739. yaxunl marked an inline comment as done. yaxunl edited the summary of this revision. yaxunl added a comment. Emit enqueued block as a wrapper kernel which calls the block invoke function. Added test for calling and enqueue the same block.

RE: r314262 - Emit section information for extern variables.

2017-10-04 Thread Andrews, Elizabeth via cfe-commits
Alright. Will do. Thanks! From: Friedman, Eli [mailto:efrie...@codeaurora.org] Sent: Wednesday, October 4, 2017 4:51 PM To: Keane, Erich ; Andrews, Elizabeth ; Nico Weber Cc: cfe-commits

Re: r314262 - Emit section information for extern variables.

2017-10-04 Thread Friedman, Eli via cfe-commits
On 10/4/2017 1:48 PM, Keane, Erich wrote: Ah, cool!  I didn’t realize that, and that is actually exactly what Elizabeth is looking into now. Elizabeth, if you send me a diff, I’ll commit it as review-after-commit if Eli is alright with this.  It should be something like changing: +     

RE: r314262 - Emit section information for extern variables.

2017-10-04 Thread Keane, Erich via cfe-commits
Ah, cool! I didn’t realize that, and that is actually exactly what Elizabeth is looking into now. Elizabeth, if you send me a diff, I’ll commit it as review-after-commit if Eli is alright with this. It should be something like changing: + if (VD->isThisDeclarationADefinition() !=

[PATCH] D38134: [OpenCL] Emit enqueued block as kernel

2017-10-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 10 inline comments as done. yaxunl added a comment. In https://reviews.llvm.org/D38134#880133, @Anastasia wrote: > I think we should add a test case when the same block is both called and > enqueued. Will do. Comment at:

Re: r314262 - Emit section information for extern variables.

2017-10-04 Thread Friedman, Eli via cfe-commits
Oh, that's easy to explain; sorry, I didn't think of it when I was reviewing. DefinitionKind has three possible values: DeclarationOnly, TentativeDefinition, and Definition.  (Tentative definitions are C weirdness that allows you to write "int x; int x = 10;".) For the purpose of this

RE: r314262 - Emit section information for extern variables.

2017-10-04 Thread Andrews, Elizabeth via cfe-commits
Hello, I just spoke to Erich. The warning isn’t supposed to be emitted when the section attribute is specified on a definition. I’m not sure why struct r_debug _r_debug __attribute__((nocommon, section(".r_debug"))); failed the isThisDeclarationADefiniton check. I need to look into it. Thanks,

RE: r314262 - Emit section information for extern variables.

2017-10-04 Thread Keane, Erich via cfe-commits
Elizabeth pointed out to me separately that the “isDeclarationADefinition” check ought to have prevented this from happening, so she’s taking a look I believe. The usage proposal I mentioned below might be handy as well. My fear is that this is a case where the existing functionality in

[PATCH] D37822: [OpenCL] Clean up and add missing fields for block struct

2017-10-04 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rL314932: [OpenCL] Clean up and add missing fields for block struct (authored by yaxunl). Changed prior to commit:

r314932 - [OpenCL] Clean up and add missing fields for block struct

2017-10-04 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Wed Oct 4 13:32:17 2017 New Revision: 314932 URL: http://llvm.org/viewvc/llvm-project?rev=314932=rev Log: [OpenCL] Clean up and add missing fields for block struct Currently block is translated to a structure equivalent to struct Block { void *isa; int flags; int

Re: r314262 - Emit section information for extern variables.

2017-10-04 Thread Nico Weber via cfe-commits
All I know about this code that it used to build (and still builds with gcc) and now it doesn't, sorry :-) What that code does seems somewhat questionable, but also somewhat useful, and it feels like the behavior change from this change here for that code might have been unintentional. Your

RE: r314262 - Emit section information for extern variables.

2017-10-04 Thread Keane, Erich via cfe-commits
I saw that… I don’t see where it prevents the same change from being made in link.h. As I mentioned, there is a solution to make this Warning less aggressive (in the lib/Sema/SemaDecl.cpp changes, add a condition that Old->isUsed() before the warning. I’m wondering if that solves your issue.

Re: r314262 - Emit section information for extern variables.

2017-10-04 Thread Nico Weber via cfe-commits
For why, here's the comment from the code I linked to: /* * GDB looks for this symbol name when it cannot find PT_DYNAMIC->DT_DEBUG. * We don't have a PT_DYNAMIC, so it will find this. Now all we have to do * is arrange for this space to be filled in with the dynamic linker's * _r_debug

RE: r314262 - Emit section information for extern variables.

2017-10-04 Thread Keane, Erich via cfe-commits
I’ve added Elizabeth, who is the original patch author. Hopefully she can help out here. Additionally, Eli did the original review, so hopefully he can chime in as well. I believe the necessity for this warning came out of the discussion on fixing the section behavior. The issue here is

[PATCH] D36471: [StaticAnalyzer] Try to calculate arithmetic result when operand has a range of possible values

2017-10-04 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D36471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-10-04 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D30295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r314262 - Emit section information for extern variables.

2017-10-04 Thread Nico Weber via cfe-commits
Hi Erich, this breaks existing code. NaCl does this: #include struct r_debug _r_debug __attribute__((nocommon, section(".r_debug"))); (There's a lengthy-ish comment for why in

[PATCH] D38430: Enable -pie and --enable-new-dtags by default on Android.

2017-10-04 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. ping https://reviews.llvm.org/D38430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38101: [Sema] Diagnose tautological comparison with type's min/max values

2017-10-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 117710. lebedev.ri marked 6 inline comments as done. lebedev.ri edited the summary of this revision. lebedev.ri added a comment. @rsmith thank you for the review! Address review notes: 1. Merge `CheckTautologicalComparisonWithZero()` and

[PATCH] D38473: Include getting generated struct offsets in CodegenABITypes

2017-10-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D38473#888159, @mppf wrote: > > You should also indicate *which* record layout (complete object type or > > base subobject type) the field number is for. I don't think there's any > > guarantee that the same indexes work in both. > > I added

[PATCH] D38548: Hexagon] Move getHexagonTargetFeatures to Hexagon.cpp (NFC)

2017-10-04 Thread Sumanth Gundapaneni via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314926: [Hexagon] Move getHexagonTargetFeatures to Hexagon.cpp (NFC) (authored by sgundapa). Changed prior to commit: https://reviews.llvm.org/D38548?vs=117686=117709#toc Repository: rL LLVM

r314926 - [Hexagon] Move getHexagonTargetFeatures to Hexagon.cpp (NFC)

2017-10-04 Thread Sumanth Gundapaneni via cfe-commits
Author: sgundapa Date: Wed Oct 4 12:09:29 2017 New Revision: 314926 URL: http://llvm.org/viewvc/llvm-project?rev=314926=rev Log: [Hexagon] Move getHexagonTargetFeatures to Hexagon.cpp (NFC) Differential Revision: https://reviews.llvm.org/D38548 Modified:

[libclc] r314925 - Add vstore_half helpers for ptx

2017-10-04 Thread Jeroen Ketema via cfe-commits
Author: jketema Date: Wed Oct 4 12:07:48 2017 New Revision: 314925 URL: http://llvm.org/viewvc/llvm-project?rev=314925=rev Log: Add vstore_half helpers for ptx Reviewed-by: Jan Vesely Added: libclc/trunk/ptx/lib/SOURCES_3.9 libclc/trunk/ptx/lib/SOURCES_4.0

[PATCH] Ensure std::getline always 0-terminates string.

2017-10-04 Thread Reimar Döffinger via cfe-commits
If the sentinel failed (e.g. due to having reached EOF before) or an exception was caught it failed to do that. The C++14 standard says: "In any case, if n is greater than zero, it then stores a null character (using charT()) into the next successive location of the array." Other implementations

[PATCH] D37822: [OpenCL] Clean up and add missing fields for block struct

2017-10-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: test/CodeGenOpenCL/blocks.cl:30 + // COMMON: %[[block_captured:.*]] = getelementptr inbounds <{ i32, i32, i8 addrspace(4)*, i32 }>, <{ i32, i32, i8 addrspace(4)*, i32 }>* %[[block]], i32 0, i32

[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-10-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D35216#886212, @rsmith wrote: > This is precisely how the rest of the compiler handles > `CXXStdInitializerListExpr` Wow. Cool. I'd see what I can do. Yeah, it seems that this is a great case for us to pattern-match the implementations as well

[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-10-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/objc-for.m:328 for (id key in array) clang_analyzer_eval(0); // expected-warning{{FALSE}} } I guess these old tests should be replaced with `warnIfReached()`. https://reviews.llvm.org/D35216

[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-10-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 117699. NoQ added a comment. Herald added a subscriber: szepet. Escape into array and dictionary literals, add relevant tests. Fix the null statement check. https://reviews.llvm.org/D35216 Files: lib/StaticAnalyzer/Core/ExprEngine.cpp

[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-10-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked 3 inline comments as done. NoQ added a comment. In https://reviews.llvm.org/D35216#886212, @rsmith wrote: > This is precisely how the rest of the compiler handles > `CXXStdInitializerListExpr` Wow. Cool. I'd see what I can do. Yeah, it seems that this is a great case for us to

[PATCH] D38358: [analyzer] Fix autodetection of getSVal()'s type argument.

2017-10-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1404 + // When trying to dereference a void pointer, read the first byte. + T = Ctx.CharTy; +} dcoughlin wrote: > NoQ wrote: > > dcoughlin wrote: > > > Nit:

[PATCH] D38548: Hexagon] Move getHexagonTargetFeatures to Hexagon.cpp (NFC)

2017-10-04 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz accepted this revision. kparzysz added a comment. This revision is now accepted and ready to land. Thanks! Repository: rL LLVM https://reviews.llvm.org/D38548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D38048: [clangd] Add textDocument/signatureHelp

2017-10-04 Thread Francisco Lopes da Silva via Phabricator via cfe-commits
francisco.lopes added a comment. In https://reviews.llvm.org/D38048#887960, @ilya-biryukov wrote: > Another case where this might be bad is overloaded functions. I may choose > one overload in completion, but `signatureHelp` will initially point into a > different one. Hi, I'd just like to

[PATCH] D38358: [analyzer] Fix autodetection of getSVal()'s type argument.

2017-10-04 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1404 + // When trying to dereference a void pointer, read the first byte. + T = Ctx.CharTy; +} NoQ wrote: > dcoughlin wrote: > > Nit: It seems a bit

[PATCH] D35082: [OpenCL] Add LangAS::opencl_private to represent private address space in AST

2017-10-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:6872 + ImpAddr = LangAS::opencl_private; +else if (IsStatic) + ImpAddr = LangAS::opencl_global; yaxunl wrote: > Anastasia wrote: > > I think we can't have this case for CL1.2 see

[PATCH] D38549: [clang-tidy] Link targets and Asm parsers

2017-10-04 Thread Zachary Turner via Phabricator via cfe-commits
zturner created this revision. Herald added subscribers: xazax.hun, mgorny. Currently clang-tidy fails on any file that includes inline assembly. This is not a great out-of-the-box experience since many system headers include inline assembly, particularly on Windows. I checked through the

[clang-tools-extra] r314913 - [clang-tidy] Emit note for variable declaration that are later deleted

2017-10-04 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Wed Oct 4 09:49:20 2017 New Revision: 314913 URL: http://llvm.org/viewvc/llvm-project?rev=314913=rev Log: [clang-tidy] Emit note for variable declaration that are later deleted This patch introduces a note for variable declaration that are later deleted. Adds FIXME notes

[PATCH] D37822: [OpenCL] Clean up and add missing fields for block struct

2017-10-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: test/CodeGenOpenCL/blocks.cl:30 + // COMMON: %[[block_captured:.*]] = getelementptr inbounds <{ i32, i32, i8 addrspace(4)*, i32 }>, <{ i32,

[PATCH] D38358: [analyzer] Fix autodetection of getSVal()'s type argument.

2017-10-04 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314910: [analyzer] Fix autodetection of binding types. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D38358?vs=117360=117681#toc Repository: rL LLVM

r314910 - [analyzer] Fix autodetection of binding types.

2017-10-04 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Oct 4 08:59:40 2017 New Revision: 314910 URL: http://llvm.org/viewvc/llvm-project?rev=314910=rev Log: [analyzer] Fix autodetection of binding types. In ProgramState::getSVal(Location, Type) API which dereferences a pointer value, when the optional Type parameter is

[PATCH] D38358: [analyzer] Fix autodetection of getSVal()'s type argument.

2017-10-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Whoops forgot to submit inline comments. Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1404 + // When trying to dereference a void pointer, read the first byte. + T = Ctx.CharTy; +} dcoughlin wrote: > Nit:

[PATCH] D38517: Enabling new pass manager in LTO (and thinLTO) link step via -fexperimental-new-pass-manager option

2017-10-04 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM thanks! Repository: rL LLVM https://reviews.llvm.org/D38517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D38517: Enabling new pass manager in LTO (and thinLTO) link step via -fexperimental-new-pass-manager option

2017-10-04 Thread Graham Yiu via Phabricator via cfe-commits
gyiu updated this revision to Diff 117677. gyiu added a comment. Add new testcase to make sure plugin-opt is passed to gold linker to enable new pass manager. Repository: rL LLVM https://reviews.llvm.org/D38517 Files: lib/Driver/ToolChains/CommonArgs.cpp

r314905 - [OpenMP] Initial implementation of teams distribute code generation

2017-10-04 Thread Carlo Bertolli via cfe-commits
Author: cbertol Date: Wed Oct 4 07:12:09 2017 New Revision: 314905 URL: http://llvm.org/viewvc/llvm-project?rev=314905=rev Log: [OpenMP] Initial implementation of teams distribute code generation https://reviews.llvm.org/D38371 This patch implements codegen for the combined 'teams distribute"

[PATCH] D38371: [OpenMP] Initial implementation of teams distribute code generation

2017-10-04 Thread Carlo Bertolli via Phabricator via cfe-commits
carlo.bertolli closed this revision. carlo.bertolli added a comment. Committed revision 314905. Repository: rL LLVM https://reviews.llvm.org/D38371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D38473: Include getting generated struct offsets in CodegenABITypes

2017-10-04 Thread Michael Ferguson via Phabricator via cfe-commits
mppf added a comment. Thanks for the feedback! > "Given a non-bitfield struct field, return its index within the elements of > the struct's converted type." Done > I think "getLLVMFieldNumber" is probably the right name for this. Great suggestion, done. > This interface does not seem to be

r314904 - [test] Pass in fixed triple for openmp-offload.c

2017-10-04 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Wed Oct 4 06:54:09 2017 New Revision: 314904 URL: http://llvm.org/viewvc/llvm-project?rev=314904=rev Log: [test] Pass in fixed triple for openmp-offload.c This should fix the test on other architectures. Related to: https://reviews.llvm.org/D38372 Modified:

[PATCH] D38473: Include getting generated struct offsets in CodegenABITypes

2017-10-04 Thread Michael Ferguson via Phabricator via cfe-commits
mppf updated this revision to Diff 117665. mppf added a comment. - Improve comments, rename to getLLVMFieldNumber https://reviews.llvm.org/D38473 Files: include/clang/CodeGen/CodeGenABITypes.h lib/CodeGen/CodeGenABITypes.cpp unittests/CodeGen/CMakeLists.txt

r314902 - [OpenMP] Fix passing of -m arguments correctly

2017-10-04 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Wed Oct 4 06:32:59 2017 New Revision: 314902 URL: http://llvm.org/viewvc/llvm-project?rev=314902=rev Log: [OpenMP] Fix passing of -m arguments correctly The recent fix in D38258 was wrong: getAuxTriple() only returns non-null values for the CUDA toolchain. That is why the

[PATCH] D38372: [OpenMP] Fix passing of -m arguments correctly

2017-10-04 Thread Jonas Hahnfeld via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314902: [OpenMP] Fix passing of -m arguments correctly (authored by Hahnfeld). Changed prior to commit: https://reviews.llvm.org/D38372?vs=117023=117664#toc Repository: rL LLVM

[PATCH] D38538: Avoid printing some redundant name qualifiers in completion

2017-10-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: test/CodeCompletion/enum-switch-case-qualified.cpp:25 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:23:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s -// CHECK-CC1: Blue : [#M::N::C::Color#]N::C::Blue -//

[PATCH] D38479: Make -mgeneral-regs-only more like GCC's

2017-10-04 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a comment. In https://reviews.llvm.org/D38479#886587, @efriedma wrote: > 1. We don't correctly ignore inline asm clobbers for registers which aren't > allocatable (https://bugs.llvm.org/show_bug.cgi?id=30792) This looks like a different (but related) issue. That should be fixed

[PATCH] D38538: Avoid printing some redundant name qualifiers in completion

2017-10-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Herald added a subscriber: eraman. Adjusted PrintingPolicy inside code completion to avoid printing some redundant name qualifiers. Before this change, typedefs that were written unqualified in source code were printed with qualifiers in completion. For

[PATCH] D33765: Show correct column nr. when multi-byte utf8 chars are used.

2017-10-04 Thread Erik Verbruggen via Phabricator via cfe-commits
erikjv updated this revision to Diff 117660. erikjv edited the summary of this revision. https://reviews.llvm.org/D33765 Files: include/clang/Basic/SourceManager.h lib/Basic/SourceManager.cpp test/Misc/diag-utf8.cpp Index: test/Misc/diag-utf8.cpp

[PATCH] D37826: Refine generation of TBAA information in clang

2017-10-04 Thread Ivan A. Kosarev via Phabricator via cfe-commits
kosarev added a comment. In https://reviews.llvm.org/D37826#887820, @rjmccall wrote: > I assume I should wait on reviewing this until all of these smaller TBAA > patches land? These small patches are actually part of this diff. Generally, It depends on how you would like it: if you can

[PATCH] D37826: Refine generation of TBAA information in clang

2017-10-04 Thread Ivan A. Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 117653. kosarev added a comment. Rebased. This is how how the rebased patch differs from the mainline: - It incorporates changes from (not landed yet) https://reviews.llvm.org/D38503. - Simplifies generation of TBAA info in EmitLValueForField(). - Replaces

[PATCH] D38458: Fix assertion failure in thread safety analysis (PR34800).

2017-10-04 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314895: Fix assertion failure in thread safety analysis (PR34800). (authored by alexfh). Repository: rL LLVM https://reviews.llvm.org/D38458 Files:

r314895 - Fix assertion failure in thread safety analysis (PR34800).

2017-10-04 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Oct 4 03:24:36 2017 New Revision: 314895 URL: http://llvm.org/viewvc/llvm-project?rev=314895=rev Log: Fix assertion failure in thread safety analysis (PR34800). Summary: Fix an assertion failure (http://llvm.org/PR34800) and clean up unused code relevant to the fixed

[PATCH] D38458: Fix assertion failure in thread safety analysis (PR34800).

2017-10-04 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 117650. alexfh added a comment. Get rid of a local string variable. https://reviews.llvm.org/D38458 Files: include/clang/Analysis/Analyses/ThreadSafetyTIL.h test/SemaCXX/warn-thread-safety-analysis.cpp Index:

[PATCH] D38464: [clangd] less boilerplate in RPC dispatch

2017-10-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdLSPServer.h:47 // Implement ProtocolCallbacks. - void onInitialize(StringRef ID, InitializeParams IP, -JSONOutput ) override; - void onShutdown(JSONOutput ) override; - void

[PATCH] D38048: [clangd] Add textDocument/signatureHelp

2017-10-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. Do you need my help in landing this? > 1. If it finds a callable, provide the name of the callable, followed by an > opening parenthesis, followed by `$0`, followed by a