Re: [PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-24 Thread Mikhail Ramalho via cfe-commits
> > Why wasn't there a file for function parameter? Function parameters *are* > declared in some file, or am I missing something? > > They are declared in some file defined by the line markers; the file are not registered in the SourceManager as actual files, so getting the FileEntry will always fa

[PATCH] D45755: [Sema] Do not match function type with const T in template argument deduction

2018-04-24 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. Fix seems right. Repository: rC Clang https://reviews.llvm.org/D45755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-04-24 Thread John McCall via Phabricator via cfe-commits
rjmccall created this revision. Herald added a reviewer: javed.absar. Herald added subscribers: cfe-commits, kristof.beyls. This fixes two major problems: - We were not capping vector alignment as desired on 32-bit ARM. - We were using different alignments based on the AVX settings on Intel, so w

r330798 - [NFC] Make dependent parameter non-deducible, so that we are forced to use the default template parameter.

2018-04-24 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Tue Apr 24 20:54:20 2018 New Revision: 330798 URL: http://llvm.org/viewvc/llvm-project?rev=330798&view=rev Log: [NFC] Make dependent parameter non-deducible, so that we are forced to use the default template parameter. This might provide users with more graceful diagnostics

r330796 - Fix rC330794 - a parameter that should have been dependent was inadvertently not -

2018-04-24 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Tue Apr 24 20:28:23 2018 New Revision: 330796 URL: http://llvm.org/viewvc/llvm-project?rev=330796&view=rev Log: Fix rC330794 - a parameter that should have been dependent was inadvertently not - and compiled in MSVC - but not so for the other bots. The fix was to make it d

r330795 - Fix lit test kernel-call.cu failure on ps4 due to dso_local

2018-04-24 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Apr 24 20:16:07 2018 New Revision: 330795 URL: http://llvm.org/viewvc/llvm-project?rev=330795&view=rev Log: Fix lit test kernel-call.cu failure on ps4 due to dso_local Modified: cfe/trunk/test/CodeGenCUDA/kernel-call.cu Modified: cfe/trunk/test/CodeGenCUDA/kernel-cal

r330794 - [c++2a] [concepts] Add rudimentary parsing support for template concept declarations

2018-04-24 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Tue Apr 24 19:42:26 2018 New Revision: 330794 URL: http://llvm.org/viewvc/llvm-project?rev=330794&view=rev Log: [c++2a] [concepts] Add rudimentary parsing support for template concept declarations This patch is a tweak of changyu's patch: https://reviews.llvm.org/D40381. I

r330793 - Fix failure in lit test kernel-call.cu

2018-04-24 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Apr 24 19:34:04 2018 New Revision: 330793 URL: http://llvm.org/viewvc/llvm-project?rev=330793&view=rev Log: Fix failure in lit test kernel-call.cu There is signext on ppc64. Just remove check for function argument. Modified: cfe/trunk/test/CodeGenCUDA/kernel-call.cu

[PATCH] D45294: [libcxx] [test] Remove non-portable assertions from filebuf tests

2018-04-24 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal added a comment. @mclow.lists Are you OK with this one? It's conceptually similar to the previous review. https://reviews.llvm.org/D45294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D45715: [libcxx] [test] Remove nonportable that errc::is_a_directory produces "Is a directory" from ios_base::failure tests

2018-04-24 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal closed this revision. BillyONeal added a comment. D:\msvc\src\qa\VC\Libs\libcxx\upstream>git svn dcommit Committing to https://llvm.org/svn/llvm-project/libcxx/trunk ... Authentication realm: https://llvm.org:443 LLVM Subversion repository Password for 'bion': M test/std/input

[libcxx] r330791 - [libcxx] [test] Remove nonportable that errc::is_a_directory produces "Is a directory" from ios_base::failure tests

2018-04-24 Thread Billy Robert O'Neal III via cfe-commits
Author: bion Date: Tue Apr 24 18:58:55 2018 New Revision: 330791 URL: http://llvm.org/viewvc/llvm-project?rev=330791&view=rev Log: [libcxx] [test] Remove nonportable that errc::is_a_directory produces "Is a directory" from ios_base::failure tests These io_error asserts that std::errc::is_a_direc

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44882#1077516, @sammccall wrote: > It makes sense, but @bkramer came up with some deep magic in > https://reviews.llvm.org/rL330754 so I think we're actually good now. Nice! Thanks @bkramer ! Repository: rCTE Clang Tools Extra https:

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I agree that this is one of those warnings that just can't be done in any reasonable way. https://reviews.llvm.org/D45601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D46037: [analyzer] pr37166, pr37139: Disable constructor inlining when lifetime extension through aggregate initialization occurs.

2018-04-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 143850. NoQ added a comment. Add a test similar to pr37166. It should be actually fixed now with this patch. Essentially, we may also be lifetime-extended by an array of aggregate structures (with arbitrary amounts of interleaving array and aggregate structure

[PATCH] D46037: [analyzer] pr37166, pr37139: Disable constructor inlining when lifetime extension through aggregate initialization occurs.

2018-04-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs, baloghadamsoftware. This hotfix is similar to https://reviews.llvm.org/D43689 (and needs a follow-up similar to https://reviews.llvm.org/D442

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-24 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330790: [HIP] Add hip input kind and codegen for kernel launching (authored by yaxunl, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D44984?v

r330790 - [HIP] Add hip input kind and codegen for kernel launching

2018-04-24 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Apr 24 18:10:37 2018 New Revision: 330790 URL: http://llvm.org/viewvc/llvm-project?rev=330790&view=rev Log: [HIP] Add hip input kind and codegen for kernel launching HIP is a language similar to CUDA (https://github.com/ROCm-Developer-Tools/HIP/blob/master/docs/markdown/

r330789 - [ODRHash] Hash template arguments of methods.

2018-04-24 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Apr 24 17:31:15 2018 New Revision: 330789 URL: http://llvm.org/viewvc/llvm-project?rev=330789&view=rev Log: [ODRHash] Hash template arguments of methods. Modified: cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td cfe/trunk/lib/AST/ODRHash.cpp cfe/

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: bkramer. sammccall added a comment. In https://reviews.llvm.org/D44882#1076927, @malaperle wrote: > In https://reviews.llvm.org/D44882#1076864, @sammccall wrote: > > > So this fails if there's no standard library available without flags, which > > is the case in goo

[PATCH] D46035: [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 143838. sammccall added a comment. Remove some debugging junk, tweak a comment. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46035 Files: clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/CodeComplete.cpp

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-04-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In https://reviews.llvm.org/D45050#1071897, @xbolva00 wrote: > Shouldn't it catch in curl also this code? > > urllen = strlen(url_clone); > > > > memcpy(newest, url_clone, urllen); > > Edit: if possible, report these bugs to project developers :) Thanks for your

[PATCH] D46035: [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, ilya-biryukov, klimek. The Language Server Protocol unfortunately mandates that locations in files be represented by line/column pairs, where the "column" is actua

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-24 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. Thank you. https://reviews.llvm.org/D44984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46035: [clangd] Fix unicode handling, using UTF-16 where LSP requires it.

2018-04-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 143836. sammccall added a comment. clang-format Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46035 Files: clangd/ClangdServer.cpp clangd/ClangdUnit.cpp clangd/ClangdUnit.h clangd/CodeComplete.cpp clangd/Protocol.h clangd/Sou

[PATCH] D46033: add check for long double for __builtin_dump_struct

2018-04-24 Thread Paul Semel via Phabricator via cfe-commits
paulsemel created this revision. paulsemel added a reviewer: aaron.ballman. This patch adds a test for long double format. Repository: rC Clang https://reviews.llvm.org/D46033 Files: test/CodeGen/dump-struct-builtin.c Index: test/CodeGen/dump-struct-builtin.c

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen

2018-04-24 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 143825. Charusso marked an inline comment as done. Charusso added a comment. Defined an option to switch off the `_s` suffixed functions usage. https://reviews.llvm.org/D45050 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeL

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-24 Thread Alexey Sotkin via Phabricator via cfe-commits
AlexeySotkin added inline comments. Comment at: lib/CodeGen/CGOpenCLRuntime.h:65 virtual llvm::Type *getPipeType(const PipeType *T); + virtual llvm::Type *getPipeType(const PipeType *T, StringRef Name, + llvm::Type *&PipeTy);

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-24 Thread Alexey Sotkin via Phabricator via cfe-commits
AlexeySotkin added a comment. It is not clear why we need two versions of get_pipe_num_packets and get_pipe_max_packets builtins. There is only one instruction per builtin in the SPIR-V spec. I think splitting the IR type is enough for translation to SPIR-V purposes. Repository: rC Clang h

[PATCH] D46030: [TargetInfo] Sort target features before passing them to the backend

2018-04-24 Thread Eli Friedman via Phabricator via cfe-commits
efriedma updated this revision to Diff 143821. efriedma added a comment. Add REQUIRES line to testcase. Repository: rC Clang https://reviews.llvm.org/D46030 Files: lib/Basic/Targets.cpp test/CodeGen/arm-build-attributes.c Index: test/CodeGen/arm-build-attributes.c =

[PATCH] D46030: [TargetInfo] Sort target features before passing them to the backend

2018-04-24 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: fhahn, SjoerdMeijer. Herald added a reviewer: javed.absar. Herald added a subscriber: kristof.beyls. Passing the features in random order will lead to unpredictable results when some of the features are related (like the architecture-versi

r330780 - Revert "[Driver] Android triples are not aliases for other triples."

2018-04-24 Thread Dan Albert via cfe-commits
Author: danalbert Date: Tue Apr 24 15:06:40 2018 New Revision: 330780 URL: http://llvm.org/viewvc/llvm-project?rev=330780&view=rev Log: Revert "[Driver] Android triples are not aliases for other triples." Revering while I diagnose the failures. This reverts commit 82dc3bf2157da280420f80e654292cb

[PATCH] D45470: Emit an error when mixing and

2018-04-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 143817. vsapsai added a comment. - Tighten up a test with expected-error per review comment. https://reviews.llvm.org/D45470 Files: clang/lib/Headers/stdatomic.h clang/test/Headers/stdatomic.cpp libcxx/include/atomic libcxx/test/libcxx/atomics/c_com

[clang-tools-extra] r330772 - [clang-tidy] Improve bugprone-unused-return-value check

2018-04-24 Thread Jonathan Coe via cfe-commits
Author: jbcoe Date: Tue Apr 24 14:25:16 2018 New Revision: 330772 URL: http://llvm.org/viewvc/llvm-project?rev=330772&view=rev Log: [clang-tidy] Improve bugprone-unused-return-value check Summary: Add support for checking class template member functions. Also add the following functions to be ch

[PATCH] D45891: [clang-tidy] Improve bugprone-unused-return-value check

2018-04-24 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE330772: [clang-tidy] Improve bugprone-unused-return-value check (authored by jbcoe, committed by ). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45891 Files: clang-tidy/bugprone/Un

[PATCH] D45597: [Driver] Android triples are not aliases for other triples.

2018-04-24 Thread Dan Albert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330770: [Driver] Android triples are not aliases for other triples. (authored by danalbert, committed by ). Changed prior to commit: https://reviews.llvm.org/D45597?vs=142281&id=143807#toc Repository:

r330770 - [Driver] Android triples are not aliases for other triples.

2018-04-24 Thread Dan Albert via cfe-commits
Author: danalbert Date: Tue Apr 24 14:18:37 2018 New Revision: 330770 URL: http://llvm.org/viewvc/llvm-project?rev=330770&view=rev Log: [Driver] Android triples are not aliases for other triples. Summary: Android targets should never use tools/libraries for non-Android targets or vice versa. Rev

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-04-24 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/modernize/RawStringLiteralCheck.cpp:71 + // supported by specific code pages only. + if (Bytes.find_if_not(isASCII) != StringRef::npos) +return false; aaron.ballman wrote: > zinovy.nis wrote: > > aaro

[PATCH] D45407: [StaticAnalyzer] Added notes to the plist output

2018-04-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Yup thanks!~ Repository: rC Clang https://reviews.llvm.org/D45407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45407: [StaticAnalyzer] Added notes to the plist output

2018-04-24 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330766: [analyzer] Add support for the note diagnostic pieces to plist output format. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://re

[PATCH] D45407: [StaticAnalyzer] Added notes to the plist output

2018-04-24 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330766: [analyzer] Add support for the note diagnostic pieces to plist output format. (authored by dergachev, committed by ). Repository: rC Clang https://reviews.llvm.org/D45407 Files: lib/StaticAn

r330766 - [analyzer] Add support for the note diagnostic pieces to plist output format.

2018-04-24 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Apr 24 13:45:48 2018 New Revision: 330766 URL: http://llvm.org/viewvc/llvm-project?rev=330766&view=rev Log: [analyzer] Add support for the note diagnostic pieces to plist output format. Note diagnostic pieces are an additional way of highlighting code sections to the u

Re: r313784 - Remove offset size check in nullptr arithmetic handling

2018-04-24 Thread Dimitry Andric via cfe-commits
On 20 Sep 2017, at 20:06, Andrew Kaylor via cfe-commits wrote: > > Author: akaylor > Date: Wed Sep 20 11:06:44 2017 > New Revision: 313784 > > URL: http://llvm.org/viewvc/llvm-project?rev=313784&view=rev > Log: > Remove offset size check in nullptr arithmetic handling > > Differential Revision

[PATCH] D38680: [libunwind] Fix handling of DW_CFA_GNU_args_size

2018-04-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D38680#1077262, @joerg wrote: > I'm back to the point where I can't reproduce the problem :( Can we start > providing an actual failing test case? It's annoying to debug a problem when > you can't reproduce it. My testcase that triggers th

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 143800. yaxunl marked 5 inline comments as done. yaxunl added a comment. Add back HIP related changes to the tests. https://reviews.llvm.org/D44984 Files: include/clang/Basic/IdentifierTable.h include/clang/Basic/LangOptions.def include/clang/Frontend/

[PATCH] D38680: [libunwind] Fix handling of DW_CFA_GNU_args_size

2018-04-24 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I'm back to the point where I can't reproduce the problem :( Can we start providing an actual failing test case? It's annoying to debug a problem when you can't reproduce it. https://reviews.llvm.org/D38680 ___ cfe-commits m

[PATCH] D45839: [analyzer] Add support for WebKit "unified sources".

2018-04-24 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Aha, ok, yeah, that sounds like a lot, thank you. I think i'll follow up with a separate commit that will enable first-level-code-file-include analysis in all files under an on-by-default `-analyzer-config` flag, would that make sense? https://reviews.llvm.org/D45839 __

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: test/CodeGenCUDA/device-stub.cu:2-8 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ +// RUN: -fcuda-include-gpubinary %t -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-linux-

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2018-04-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 143797. vsapsai added a comment. - Move tests to test/std. https://reviews.llvm.org/D34331 Files: libcxx/include/__functional_03 libcxx/include/functional libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_ree

[PATCH] D45891: [clang-tidy] Improve bugprone-unused-return-value check

2018-04-24 Thread Kalle Huttunen via Phabricator via cfe-commits
khuttun added a comment. Thank you! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-24 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a subscriber: arphaman. mikhail.ramalho added a comment. > Why wasn't there a file for function parameter? Function parameters *are* > declared in some file, or am I missing something? They are declared in some file defined by the line markers; the file are not registered i

[PATCH] D45865: [Sema] Emit -Warray-bounds for multiple levels of subscript expressions.

2018-04-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in r330759, thank you for the patch! https://reviews.llvm.org/D45865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

r330759 - Improve -Warray-bounds to handle multiple array extents rather than only handling the top-most array extent.

2018-04-24 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Apr 24 12:21:04 2018 New Revision: 330759 URL: http://llvm.org/viewvc/llvm-project?rev=330759&view=rev Log: Improve -Warray-bounds to handle multiple array extents rather than only handling the top-most array extent. Patch by Bevin Hansson. Modified: cfe/trunk

[PATCH] D46027: [clang-tidy] Fix PR35824

2018-04-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. xazax.hun added a reviewer: alexfh. Herald added subscribers: dkrupp, rnkovacs, baloghadamsoftware, whisperity. This approach will also introduce false negatives. A better approach would be to check if the null statement is the result of folding an `if constexpr`.

[PATCH] D45470: Emit an error when mixing and

2018-04-24 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai planned changes to this revision. vsapsai added inline comments. Comment at: clang/test/Headers/stdatomic.cpp:4 + +#include + mclow.lists wrote: > Is there a reason we want to test this twice - once in clang and once in > libc++? > We can use `expected-

[PATCH] D45964: [Driver] Fix implicit config files from prefixed symlinks

2018-04-24 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 143794. mstorsjo added a comment. Added an isEmpty() method. Btw, did you see https://bugs.llvm.org/show_bug.cgi?id=37196? That one feels quite a bit more convolved so I don't really know (so far) how to approach fixing that. https://reviews.llvm.org/D45

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-24 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: test/CodeGenCUDA/device-stub.cu:2-8 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ +// RUN: -fcuda-include-gpubinary %t -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s \ +// RUN: -fcuda-includ

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 143792. yaxunl added a comment. Remove CodeGenModule argument from addPrefix* functions. https://reviews.llvm.org/D44984 Files: include/clang/Basic/IdentifierTable.h include/clang/Basic/LangOptions.def include/clang/Frontend/FrontendOptions.h include

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-04-24 Thread Ben Craig via Phabricator via cfe-commits
bcraig added a comment. For those that would prefer random device to not exist if it isn't cryptographically secure, please write a wg21 paper. I will gladly review such a paper, and if you need a presenter, then I will present it if I am attending. I won't be at Rapperswil, but I will be at

[PATCH] D45891: [clang-tidy] Improve bugprone-unused-return-value check

2018-04-24 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I can merge this for you. Congratulations on the commit! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[clang-tools-extra] r330754 - [clangd] Commit a heinous crime to make test hermetic and not depend on the standard library being around.

2018-04-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Apr 24 11:40:44 2018 New Revision: 330754 URL: http://llvm.org/viewvc/llvm-project?rev=330754&view=rev Log: [clangd] Commit a heinous crime to make test hermetic and not depend on the standard library being around. Added: clang-tools-extra/trunk/test/clangd/Inputs/

[PATCH] D45827: [CUDA] Enable CUDA compilation with CUDA-9.2

2018-04-24 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330753: [CUDA] Enable CUDA compilation with CUDA-9.2 (authored by tra, committed by ). Herald added subscribers: llvm-commits, bixia. Changed prior to commit: https://reviews.llvm.org/D45827?vs=143124&i

r330753 - [CUDA] Enable CUDA compilation with CUDA-9.2

2018-04-24 Thread Artem Belevich via cfe-commits
Author: tra Date: Tue Apr 24 11:23:19 2018 New Revision: 330753 URL: http://llvm.org/viewvc/llvm-project?rev=330753&view=rev Log: [CUDA] Enable CUDA compilation with CUDA-9.2 Differential Revision: https://reviews.llvm.org/D45827 Modified: cfe/trunk/include/clang/Basic/Cuda.h cfe/trunk/l

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/__config:1016 +// because GCC does not silence them via (void) cast. +#if __has_cpp_attribute(nodiscard) && _LIBCPP_STD_VER > 17 +# define _LIBCPP_NODISCARD [[nodiscard]] mclow.lists wrote: > lebedev.ri wrote

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D41316#1054968, @efriedma wrote: > Yes, the standard says you're allowed to throw an exception from the > random_device constructor, or use a PRNG with an arbitrary seed, or even just > return zeros from operator(). But none of those beha

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/__config:1016 +// because GCC does not silence them via (void) cast. +#if __has_cpp_attribute(nodiscard) && _LIBCPP_STD_VER > 17 +# define _LIBCPP_NODISCARD [[nodiscard]] lebedev.ri wrote: > mclow.lists wrot

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/__config:1016 +// because GCC does not silence them via (void) cast. +#if __has_cpp_attribute(nodiscard) && _LIBCPP_STD_VER > 17 +# define _LIBCPP_NODISCARD [[nodiscard]] mclow.lists wrote: > `[[nodiscard]]`

[clang-tools-extra] r330746 - [clangd] Initialize candidate count in unit test

2018-04-24 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Tue Apr 24 10:57:53 2018 New Revision: 330746 URL: http://llvm.org/viewvc/llvm-project?rev=330746&view=rev Log: [clangd] Initialize candidate count in unit test Found by msan. Modified: clang-tools-extra/trunk/unittests/clangd/FindSymbolsTests.cpp Modified: clang-tools-ext

[PATCH] D46024: [clang-format] Add SpaceBeforeCpp11BracedList option.

2018-04-24 Thread Ross Kirsling via Phabricator via cfe-commits
rkirsling created this revision. rkirsling added reviewers: djasper, klimek. Herald added a subscriber: cfe-commits. WebKit C++ style for object initialization is as follows: Foo foo { bar }; Yet using `clang-format -style=webkit` changes this to: Foo foo{ bar }; As there is no existing co

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D45179#1077055, @thakis wrote: > So you're happy with this opt-in version? I'm happy with an opt-in mechanism, yes. This one is not quite right yet. BTW, I expect a //large// set of calls in the standard library to get marked as `[[nodi

[PATCH] D45964: [Driver] Fix implicit config files from prefixed symlinks

2018-04-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. Thank you for fixing this issue! LGTM Comment at: lib/Driver/Driver.cpp:132 ArrayRef Args) { - ClangNameParts = ToolChain::getTargetAndM

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D45179#1077048, @mclow.lists wrote: > In https://reviews.llvm.org/D45179#1056183, @rjmccall wrote: > > > Is Marshall arguing that the standard doesn't allow compilers to warn about > > failing to use these function results prior to C++17? Be

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-24 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:51-52 llvm::Constant *getLaunchFn() const; + std::string addPrefixToName(CodeGenModule &CGM, StringRef FuncName) const; + std::string addUnderscoredPrefixToName(CodeGenModule &CGM, +

[PATCH] D45996: [HWASan] Update HWASan assembly snippet in the docs

2018-04-24 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330745: [HWASan] Update HWASan assembly snippet in the docs (authored by alekseyshl, committed by ). Changed prior to commit: https://reviews.llvm.org/D45996?vs=143671&id=143782#toc Repository: rL LL

[PATCH] D45891: [clang-tidy] Improve bugprone-unused-return-value check

2018-04-24 Thread Kalle Huttunen via Phabricator via cfe-commits
khuttun added a comment. Could someone help getting this merged? I don't have commit access to the repo. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D45996: [HWASan] Update HWASan assembly snippet in the docs

2018-04-24 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330745: [HWASan] Update HWASan assembly snippet in the docs (authored by alekseyshl, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D45996 Files:

r330745 - [HWASan] Update HWASan assembly snippet in the docs

2018-04-24 Thread Alex Shlyapnikov via cfe-commits
Author: alekseyshl Date: Tue Apr 24 10:41:48 2018 New Revision: 330745 URL: http://llvm.org/viewvc/llvm-project?rev=330745&view=rev Log: [HWASan] Update HWASan assembly snippet in the docs Summary: To complement https://reviews.llvm.org/D45840 Reviewers: eugenis Subscribers: cfe-commits Differ

r330744 - [X86] Add recently added intrinsic headers to the module map.

2018-04-24 Thread Craig Topper via cfe-commits
Author: ctopper Date: Tue Apr 24 10:40:49 2018 New Revision: 330744 URL: http://llvm.org/viewvc/llvm-project?rev=330744&view=rev Log: [X86] Add recently added intrinsic headers to the module map. Modified: cfe/trunk/lib/Headers/module.modulemap Modified: cfe/trunk/lib/Headers/module.modulema

r330743 - [X86] Consistently use double underscore at the beginning of the include guards in our intrinsic headers.

2018-04-24 Thread Craig Topper via cfe-commits
Author: ctopper Date: Tue Apr 24 10:40:47 2018 New Revision: 330743 URL: http://llvm.org/viewvc/llvm-project?rev=330743&view=rev Log: [X86] Consistently use double underscore at the beginning of the include guards in our intrinsic headers. Most files used double underscore, but a few used single

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-04-24 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:287 +CtorSuffix.append("_"); +CtorSuffix.append(ModuleName); + } SimeonEhrig wrote: > tra wrote: > > There is a general problem with this approach. File name can contain the > > characters

Re: [PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-24 Thread Nico Weber via cfe-commits
So you're happy with this opt-in version? On Tue, Apr 24, 2018 at 1:29 PM, Marshall Clow via Phabricator via cfe-commits wrote: > mclow.lists added a comment. > > In https://reviews.llvm.org/D45179#1056183, @rjmccall wrote: > > > Is Marshall arguing that the standard doesn't allow compilers to w

[PATCH] D45179: [libc++] Add _LIBCPP_FORCE_NODISCARD define to force-enable nodiscard in pre-C++17

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. In https://reviews.llvm.org/D45179#1056183, @rjmccall wrote: > Is Marshall arguing that the standard doesn't allow compilers to warn about > failing to use these function results prior to C++17? Because I don't think > that's true; warnings are thoroughly non-norma

[PATCH] D45921: Add getDeserializationListener to ASTReader

2018-04-24 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. This seems fine, but I wonder if we should expose a mechanism that will create a multiplex listener automatically as needed? https://reviews.llvm.org/D45921 ___

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I'm not sure that doing this in the lexer is appropriate; you should just diagnose the unsupported feature in Sema, or at best the parser. Repository: rC Clang https://reviews.llvm.org/D46022 ___ cfe-commits mailing lis

[PATCH] D46007: [analyzer] Add `TaintBugVisitor` to the ArrayBoundV2, DivideZero and VLASize.

2018-04-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Mostly LG. Comment at: lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp:75 auto report = llvm::make_unique(*BT, os.str(), N); + report->addVisitor(std::move(Visitor)); report->addRange(SizeE->getSourceRange()); In this patch, som

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-04-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I see that gcc implements all of this with wrappers around inline assembly. Any reason we couldn't just do that? Comment at: lib/Headers/pconfigintrin.h:31 + +#define MKTME_KEY_PROGRAM 0x0001 + This doesn't match the name used

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-24 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I'd also like to point out that as I mentioned before, the checker's name itself is misleading (it is a leftover from an earlier implementation of this checker). Here are just some ideas I came up with: - UninitializedObjectChecker - UninitializedFieldsChecker - Unin

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-04-24 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. This LGTM, but could you please add a test? Repository: rC Clang https://reviews.llvm.org/D46019 ___ cfe-commits mailing list cfe-commit

[PATCH] D45722: [X86] Lowering SAD (sum of absolute differences) intrinsics to native IR (clang side)

2018-04-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:8425 + llvm::Type *VTy = llvm::VectorType::get(QTy, N); + llvm::Type *BTy = llvm::VectorType::get(CGF.Builder.getInt8Ty(), N * 8); + SmallVector ShuffleMask; Is this not a dead var

[PATCH] D45984: [X86] directstore and movdir64b intrinsics

2018-04-24 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D45984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-04-24 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added reviewers: yaxunl, bader. Herald added subscribers: cfe-commits, Anastasia. Restrict the following keywords in the OpenCL C++ language mode, according to Section 2.9 of the OpenCL C++ 1.0 Specification. - dynamic_cast - typeid - goto - register (already

[PATCH] D45985: [test] Add a testcase for MinGW sysroot detections from SVN r330244. NFC.

2018-04-24 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Comment at: test/Driver/mingw-sysroot.cpp:1-2 +// REQUIRES: shell +// UNSUPPORTED: system-windows + Hah. :) Repository: rC Clang https://reviews.llvm.org

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44882#1076864, @sammccall wrote: > So this fails if there's no standard library available without flags, which > is the case in google's test environment to ensure hermeticity :-( > > In the short-term, we've disabled the test internally -

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. Please move the tests into test/std and commit. https://reviews.llvm.org/D34331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-04-24 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a.sidorin, xazax.hun, szepet. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. Do early return if we can't import the found decl for a member expr. This follows the pre-existing scheme, e.g with E->getMemberDecl(). Repository: rC

[PATCH] D45470: Emit an error when mixing and

2018-04-24 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: clang/test/Headers/stdatomic.cpp:4 + +#include + Is there a reason we want to test this twice - once in clang and once in libc++? We can use `expected-error` in libc++ tests to check the error. https://reviews.ll

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D44882#1066743, @malaperle wrote: > In https://reviews.llvm.org/D44882#1065632, @sammccall wrote: > > > In https://reviews.llvm.org/D44882#1065631, @malaperle wrote: > > > > > In https://reviews.llvm.org/D44882#1065622, @sammccall wrote: > >

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for the delay. In https://reviews.llvm.org/D42966#1069674, @mikhail.ramalho wrote: > Sure. Basically, the previous code would not generate the USR for the > function's parameters. > The issue was that SM.getFileEntryForID would return NULL because there is

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D42966#1069674, @mikhail.ramalho wrote: > Sure. Basically, the previous code would not generate the USR for the > function's parameters. > > The issue was that SM.getFileEntryForID would return NULL because there is no > actual file, th

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Otherwise LGTM. Comment at: lib/CodeGen/CGCUDANV.cpp:51-52 llvm::Constant *getLaunchFn() const; + std::string addPrefixToName(CodeGenModule &CGM, StringRef FuncName) const; + std::string addUnderscoredPrefixToName(CodeGenModule &CGM, +

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-24 Thread Stuart Brady via Phabricator via cfe-commits
stuart created this revision. stuart added reviewers: Anastasia, yaxunl. Herald added a subscriber: cfe-commits. SPIR-V encodes the read_only and write_only access qualifiers of pipes, so separate LLVM IR types are required to target SPIR-V. Other backends may also find this useful. These new ty

  1   2   >