[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115528. vlad.tsyrklevich added a comment. Address @eugenis' comments https://reviews.llvm.org/D37925 Files: include/clang/Basic/SanitizerBlacklist.h include/clang/Basic/SanitizerSpecialCaseList.h lib/AST/Decl.cpp lib/Basic/CMakeLists.txt

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: include/clang/Basic/SanitizerSpecialCaseList.h:33 + + bool inSection(SanitizerMask Mask, StringRef Prefix, StringRef Query, + StringRef Category = StringRef()) const; eugenis wrote: > Please

[PATCH] D37912: [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.

2017-09-15 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:442 +SmallString<256> Name = llvm::sys::path::relative_path(II.getFilename()); +SmallString<256> FullPath = llvm::sys::path::root_path(II.getFilename());

[PATCH] D37913: [OpenMP] Enable the existing nocudalib flag for OpenMP offloading toolchain.

2017-09-15 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. Please add a test case. Repository: rL LLVM https://reviews.llvm.org/D37913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r313430 - [WebAssembly] Restore __builtin_wasm_rethrow builtin

2017-09-15 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Fri Sep 15 18:07:43 2017 New Revision: 313430 URL: http://llvm.org/viewvc/llvm-project?rev=313430=rev Log: [WebAssembly] Restore __builtin_wasm_rethrow builtin Summary: Restore the `__builtin_wasm_rethrow` builtin deleted in D37931. On second thought, it appears it can be

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-09-15 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:477 Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); - assert((LangOpts.ShortWChar || - llvm::TargetLibraryInfoImpl::getTargetWCharSize(Target.getTriple()) ==

r313425 - [docs] add Windows examples to ThinLTO.rst

2017-09-15 Thread Bob Haarman via cfe-commits
Author: inglorion Date: Fri Sep 15 17:16:13 2017 New Revision: 313425 URL: http://llvm.org/viewvc/llvm-project?rev=313425=rev Log: [docs] add Windows examples to ThinLTO.rst Reviewers: pcc, ruiu Reviewed By: ruiu Subscribers: mehdi_amini, eraman, cfe-commits Differential Revision:

[PATCH] D37943: [docs] add Windows examples to ThinLTO.rst

2017-09-15 Thread Bob Haarman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313425: [docs] add Windows examples to ThinLTO.rst (authored by inglorion). Changed prior to commit: https://reviews.llvm.org/D37943?vs=115522=115524#toc Repository: rL LLVM

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-09-15 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:477 Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); - assert((LangOpts.ShortWChar || - llvm::TargetLibraryInfoImpl::getTargetWCharSize(Target.getTriple()) ==

[PATCH] D37943: [docs] add Windows examples to ThinLTO.rst

2017-09-15 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu accepted this revision. ruiu added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D37943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37943: [docs] add Windows examples to ThinLTO.rst

2017-09-15 Thread Bob Haarman via Phabricator via cfe-commits
inglorion created this revision. Herald added subscribers: eraman, mehdi_amini. https://reviews.llvm.org/D37943 Files: clang/docs/ThinLTO.rst Index: clang/docs/ThinLTO.rst === --- clang/docs/ThinLTO.rst +++

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: include/clang/Basic/SanitizerSpecialCaseList.h:33 + + bool inSection(SanitizerMask Mask, StringRef Prefix, StringRef Query, + StringRef Category = StringRef()) const; Please add a comment on the

[PATCH] D37042: Teach clang to tolerate the 'p = nullptr + n' idiom used by glibc

2017-09-15 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D37042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37861: preserving #pragma clang assume_nonnull in preprocessed output

2017-09-15 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Frontend/PrintPreprocessedOutput.cpp:566 + MoveToLine(Loc); + OS << "#pragma " << "clang assume_nonnull end"; + setEmittedDirectiveOnThisLine(); Extra "<<"? Comment at:

[PATCH] D32051: [Preprocessor] Improve MSVC comma-elision before an empty expansion.

2017-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane abandoned this revision. erichkeane added a comment. This has likely gone stale, and my employer has decided to tell customers to modify their code. https://reviews.llvm.org/D32051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37892: [X86] Use native shuffle vector for the perm2f128 intrinsics

2017-09-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313418: [X86] Use native shuffle vector for the perm2f128 intrinsics (authored by ctopper). Changed prior to commit: https://reviews.llvm.org/D37892?vs=115427=115518#toc Repository: rL LLVM

r313418 - [X86] Use native shuffle vector for the perm2f128 intrinsics

2017-09-15 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri Sep 15 16:00:59 2017 New Revision: 313418 URL: http://llvm.org/viewvc/llvm-project?rev=313418=rev Log: [X86] Use native shuffle vector for the perm2f128 intrinsics This patch replaces the perm2f128 intrinsics with native shuffle vectors. This uses a pretty simple

[PATCH] D37941: [X86] Move even more of our CPU to feature mapping switch to use fallthroughs

2017-09-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. This arranges more of the Intel and AMD CPUs into fallthrough positions based on their features. We may be able to merge this new AMD set with the BTVER or BDVER sets but I didn't look that closely. https://reviews.llvm.org/D37941 Files:

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I'm not particularly familiar with OpenMP internals. Could you elaborate on why libdevice would not be needed with -c for the OpenMP case? Is that because it would only apply to the host compilation and that nothing will be compiled for the openmp targets? Does openmp allow

[PATCH] D37938: [X86] Remove unnecessary extra encodings from the CPU name enum in clang

2017-09-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. For a lot of older CPUs we have a 1:1 mapping between CPU name and enum name. But many of them are effectively aliases of each other and as a result are always repeated together at every usage This patch removes most of the duplication. It also uses

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-09-15 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 115510. compnerd added a comment. Try to clarify the logic for APCS ABI. Repository: rL LLVM https://reviews.llvm.org/D37891 Files: include/clang/Basic/DiagnosticFrontendKinds.td include/clang/Basic/LangOptions.def

[PATCH] D32049: [Preprocessor] Implement empty vs omitted __VA_ARGS__ string-expansion MSVC Extension

2017-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I don't know? I don't have a really good way of repro'ing that. Do you have any ability to grab me a preprocessed reproducer of that one? Godbolt doesn't have Windows headers for this. https://reviews.llvm.org/D32049

[PATCH] D32049: [Preprocessor] Implement empty vs omitted __VA_ARGS__ string-expansion MSVC Extension

2017-09-15 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Would this help with https://bugs.llvm.org/show_bug.cgi?id=32021 ? https://reviews.llvm.org/D32049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32050: [Preprocessor] Implement MSVC extension to expand arguments to ##

2017-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane abandoned this revision. erichkeane added a comment. This has likely gone stale, and my employer has decided to tell customers to modify their code. https://reviews.llvm.org/D32050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r313407 - Resubmit "[lit] Force site configs to run before source-tree configs"

2017-09-15 Thread Zachary Turner via cfe-commits
Author: zturner Date: Fri Sep 15 15:10:46 2017 New Revision: 313407 URL: http://llvm.org/viewvc/llvm-project?rev=313407=rev Log: Resubmit "[lit] Force site configs to run before source-tree configs" This is a resubmission of r313270. It broke standalone builds of compiler-rt because we were not

r313407 - Resubmit "[lit] Force site configs to run before source-tree configs"

2017-09-15 Thread Zachary Turner via cfe-commits
Author: zturner Date: Fri Sep 15 15:10:46 2017 New Revision: 313407 URL: http://llvm.org/viewvc/llvm-project?rev=313407=rev Log: Resubmit "[lit] Force site configs to run before source-tree configs" This is a resubmission of r313270. It broke standalone builds of compiler-rt because we were not

[PATCH] D32049: [Preprocessor] Implement empty vs omitted __VA_ARGS__ string-expansion MSVC Extension

2017-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane abandoned this revision. erichkeane added a comment. This has likely gone stale, and my employer has decided to tell customers to modify their code. https://reviews.llvm.org/D32049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32052: [Preprocessor] Dont omit comma after __VA_ARGS__ in MSVC mode if it is an argument to a macro function that takes only a single parameter.

2017-09-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane abandoned this revision. erichkeane added a comment. This has likely gone stale, and my employer has decided to tell customers to modify their code. https://reviews.llvm.org/D32052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r313402 - Remove __builtin_wasm_rethrow builtin

2017-09-15 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Fri Sep 15 15:01:22 2017 New Revision: 313402 URL: http://llvm.org/viewvc/llvm-project?rev=313402=rev Log: Remove __builtin_wasm_rethrow builtin Summary: Remove `__builtin_wasm_rethrow` builtin. I thought it was required to implement `__cxa_rethrow` function in libcxxabi,

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 115509. vlad.tsyrklevich added a comment. Run clang-format. https://reviews.llvm.org/D37925 Files: include/clang/Basic/SanitizerBlacklist.h include/clang/Basic/SanitizerSpecialCaseList.h lib/AST/Decl.cpp lib/Basic/CMakeLists.txt

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115502. gtbercea added a comment. Fix diff. Repository: rL LLVM https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c

[PATCH] D37132: [clang-format] Add support for C++17 structured bindings.

2017-09-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. Thanks for this change. Could you take a look of https://reviews.llvm.org/D35743 too? This outputs a space before and after "&" or "&&", like this "auto & [...", "auto && [..." Could we remove one of the space to a format like the following? "auto& [...", "auto&&

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115500. gtbercea added a comment. Add test. https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c

[PATCH] D37912: [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115497. gtbercea added a comment. Fix tests. https://reviews.llvm.org/D37912 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/openmp-offload-gpu.c Index: test/Driver/openmp-offload-gpu.c

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-09-15 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:2659 + + const bool IsAPCSABI = + IsARM && (IsGNUEnvironment || IsNetBSD || rnk wrote: > This target detection logic is insanely complicated, and I'm not convinced > it's simpler

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-09-15 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:62 +std::pair Process() const { + assert(C != Criteria::None && "invalid criteria"); + JonasToth wrote: > You acces `Critera` always scoped. I

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-09-15 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 115482. lebedev.ri marked 13 inline comments as done. lebedev.ri added a comment. Address most of the @JonasToth's review notes. Repository: rL LLVM https://reviews.llvm.org/D36836 Files: clang-tidy/readability/CMakeLists.txt

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Now we just need a test case to make sure this works as intended. https://reviews.llvm.org/D37914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115481. gtbercea added a comment. Fix condition. https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp === ---

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added a comment. Not included in this change: - Updating the sanitizer documentation to use section headers. It's worth doing for the CFI documentation to let people know they can break down blacklist entries by CFI mode, but is it worth pushing users to specify '[address]',

r313392 - [X86] Disable _mm512_maskz_set1_epi64 intrinsic on 32-bit targets to prevent a backend isel failure.

2017-09-15 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri Sep 15 13:27:59 2017 New Revision: 313392 URL: http://llvm.org/viewvc/llvm-project?rev=313392=rev Log: [X86] Disable _mm512_maskz_set1_epi64 intrinsic on 32-bit targets to prevent a backend isel failure. The __builtin_ia32_pbroadcastq512_mem_mask we were previously

[PATCH] D37925: Allow specifying sanitizers in blacklists

2017-09-15 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich created this revision. Herald added a subscriber: mgorny. This is the follow-up patch to https://reviews.llvm.org/D37924. This change refactors clang to use the the newly added section headers in SpecialCaseList to specify which sanitizers blacklists entries should apply to,

r313389 - This patch fixes https://bugs.llvm.org/show_bug.cgi?id=32352 LLVM code change is as per https://reviews.llvm.org/D33514

2017-09-15 Thread Vivek Pandya via cfe-commits
Author: vivekvpandya Date: Fri Sep 15 13:09:55 2017 New Revision: 313389 URL: http://llvm.org/viewvc/llvm-project?rev=313389=rev Log: This patch fixes https://bugs.llvm.org/show_bug.cgi?id=32352 LLVM code change is as per https://reviews.llvm.org/D33514 Modified:

r313386 - [Sema] Error out early for tags defined inside an enumeration.

2017-09-15 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Fri Sep 15 12:51:42 2017 New Revision: 313386 URL: http://llvm.org/viewvc/llvm-project?rev=313386=rev Log: [Sema] Error out early for tags defined inside an enumeration. This fixes PR28903 by avoiding access check for inner enum constant. We are performing access check

[PATCH] D37089: [Sema] Error out early for tags defined inside an enumeration.

2017-09-15 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. vsapsai marked an inline comment as done. Closed by commit rL313386: [Sema] Error out early for tags defined inside an enumeration. (authored by vsapsai). Changed prior to commit:

r313385 - [Analyzer] Check function name size before indexing.

2017-09-15 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Sep 15 12:51:26 2017 New Revision: 313385 URL: http://llvm.org/viewvc/llvm-project?rev=313385=rev Log: [Analyzer] Check function name size before indexing. https://reviews.llvm.org/D37908 Modified:

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

2017-09-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added a comment. In https://reviews.llvm.org/D37822#872291, @Anastasia wrote: > Could you please explain a bit more why the alignment have to be put > explicitly in the struct? I am just not very convinced this is general enough. The captured

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-09-15 Thread William Enright via Phabricator via cfe-commits
Nebiroth updated this revision to Diff 115462. Nebiroth marked an inline comment as done. Nebiroth added a comment. Fixed a few comments. Rebased on latest clangd version. https://reviews.llvm.org/D37150 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h

[PATCH] D37668: [X86][intrinsics] lower _mm[256|512]_mask[z]_set1_epi[8|16|32|64] intrinsic to IR

2017-09-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I'm going to go ahead and remove __builtin_ia32_pbroadcastq512_mem_mask from clang and change _mm512_maskz_set1_epi64 to be disabled in 32-bit mode. I want to nominate this for 5.0.1 because using it in 32-bit mode causes the compile to throw a cannot select

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-09-15 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:27 + // Here are all the possible reasons: + enum Criteria : unsigned char { +None = 0, JonasToth wrote: > i think clarifying which language constructs

[PATCH] D37568: [AMDGPU] Allow flexible register names in inline asm constraints

2017-09-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: lib/Basic/Targets/AMDGPU.h:194 +Info.setAllowsRegister(); +Name = S.data() - 1; +return true; arsenm wrote: > I'm not sure I understand these data() - 1s. The caller

[PATCH] D37912: [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.

2017-09-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In https://reviews.llvm.org/D37912#872318, @gtbercea wrote: > In https://reviews.llvm.org/D37912#872294, @tra wrote: > > > Shouldn't this temp .cubin file go into the temporary directory, as opposed > > to the same directory as the input file? > > > That is indeed the

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115447. gtbercea added a comment. Fix parantheses. https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp === ---

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 115444. gtbercea added a comment. Contract check. https://reviews.llvm.org/D37914 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp === ---

[libcxx] r313377 - [libc++] Account for Microsoft CRT const overloads

2017-09-15 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Fri Sep 15 11:49:34 2017 New Revision: 313377 URL: http://llvm.org/viewvc/llvm-project?rev=313377=rev Log: [libc++] Account for Microsoft CRT const overloads Microsoft's CRT already provides the const overloads, and it defines the `_CRT_CONST_CORRECT_OVERLOADS` macro to

[PATCH] D37912: [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. In https://reviews.llvm.org/D37912#872294, @tra wrote: > Shouldn't this temp .cubin file go into the temporary directory, as opposed > to the same directory as the input file? That is indeed the intention. The filename already contains the "/tmp/" I just make sure

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:505-508 +if ((DeviceOffloadingKind == Action::OFK_OpenMP && + DriverArgs.hasArg(options::OPT_S)) || +(DeviceOffloadingKind == Action::OFK_OpenMP && +

[PATCH] D37914: [OpenMP] Don't throw cudalib not found error if only front-end is required.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. If we only use the compiler front-end, do not throw an error about the cuda device library not being found. This allows the front-end to be run on systems where no Cuda installation is found. Repository: rL LLVM https://reviews.llvm.org/D37914 Files:

[PATCH] D37912: [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.

2017-09-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Shouldn't this temp .cubin file go into the temporary directory, as opposed to the same directory as the input file? Repository: rL LLVM https://reviews.llvm.org/D37912 ___ cfe-commits mailing list

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

2017-09-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Could you please explain a bit more why the alignment have to be put explicitly in the struct? I am just not very convinced this is general enough. Comment at: lib/CodeGen/CGBlocks.cpp:314 assert(elementTypes.empty()); -

[PATCH] D37913: [OpenMP] Enable the existing nocudalib flag for OpenMP offloading toolchain.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. Enable the -nocudalib flag for the OpenMP device offloading toolchain as well. Currently it can only be used for the CUDA toolchain. Repository: rL LLVM https://reviews.llvm.org/D37913 Files: lib/Driver/ToolChains/Cuda.cpp Index:

[PATCH] D37912: [OpenMP] Bugfix: output file name drops the absolute path where full path is needed.

2017-09-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. When composing the output file name, the path to the file is being dropped. The full path is required. Repository: rL LLVM https://reviews.llvm.org/D37912 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-09-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:7251 +if (const auto *rhproto = dyn_cast(rhptee)) + rhptee = S.removeNoEscapeFromFunctionProto(lhproto, rhproto); + rjmccall wrote: > ahatanak wrote: > > rjmccall wrote: > > > I think the

[PATCH] D37892: [X86] Use native shuffle vector for the perm2f128 intrinsics

2017-09-15 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. LGTM - please can you update the avx-intrinsics-fast-isel.ll/avxs-intrinsics-fast-isel.ll cases to match the *-builtins.c as well (either now or if/when you add the intrinsics to

[PATCH] D37568: [AMDGPU] Allow flexible register names in inline asm constraints

2017-09-15 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: lib/Basic/Targets/AMDGPU.h:124 + /// {sn}, {s[n]} + /// {S} , wheere S is a special register name + {v[n:m]} Typo wheere Comment at: lib/Basic/Targets/AMDGPU.h:194 +Info.setAllowsRegister();

r313369 - [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Sep 15 10:30:53 2017 New Revision: 313369 URL: http://llvm.org/viewvc/llvm-project?rev=313369=rev Log: [CUDA] Work around a new quirk in CUDA9 headers. In CUDA-9 some of device-side math functions that we need are conditionally defined within '#if _GLIBCXX_MATH_H'. We need

[PATCH] D37906: [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313369: [CUDA] Work around a new quirk in CUDA9 headers. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D37906?vs=115415=115422#toc Repository: rL LLVM

Re: [PATCH] D37302: [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL

2017-09-15 Thread enh via cfe-commits
It's supposed to tell you whether the target arch supports it. So it's definitely something the compiler knows better than the C library, which is why I didn't just work around this myself  Clang may not be correct right now, but if that's true, (a) it's already lying to us through the other

[PATCH] D37302: [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL

2017-09-15 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added a comment. In https://reviews.llvm.org/D37302#871794, @joerg wrote: > So what about targets that don't support subnormals? I'm moderately sure ARM > falls into this category given the right phase of the moon. Clang defines `__FLT_HAS_DENORM__` and friends unconditionally, so I

[PATCH] D37906: [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. > BTW, this change essentially augments the job that the "#undef GNUC" above > used to do in older CUDA versions. CUDA9 replaced GNUC with _GLIBCXX_MATH_H > in CUDA-9 in some places. Ah,

[PATCH] D37906: [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I don't think we really care why they do it for nvcc. My understanding is that nvcc needs to avoid name clashes between their implementation of functions and the ones that come from the host headers and that's why they have to tread really carefully around host includes.

[PATCH] D35743: [clang-format] Handle Structured binding declaration in C++17

2017-09-15 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. ping. https://reviews.llvm.org/D35743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-09-15 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:477 Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); - assert((LangOpts.ShortWChar || - llvm::TargetLibraryInfoImpl::getTargetWCharSize(Target.getTriple()) ==

[PATCH] D37906: [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. This is a bit of a Chesterton's Fence -- do we know why they're doing this? I guess it's probably going to be OK because our overriding semantics will make it OK, and our test-suite tests (should) exercise all of math.h. But I'm still a little worried about it.

[PATCH] D37906: [CUDA] Work around a new quirk in CUDA9 headers.

2017-09-15 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. Herald added a subscriber: sanjoy. In CUDA-9 some of device-side math functions that we need are conditionally defined within '#if _GLIBCXX_MATH_H'. We need to temporarily undo the guard around inclusion of math_functions.hpp https://reviews.llvm.org/D37906 Files:

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-09-15 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. We could leave the defaults there as they stand, and only have the new flags alter the default. However, it seems that just paying the cost of adjusting the tests once isn't too bad. To me, it seems that having one instance of the horrible logic for determining the

[PATCH] D37891: Driver: hoist the `wchar_t` handling to the driver

2017-09-15 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I do remember recommending this approach over IRC, but I thought we concluded that we should leave all the defaults in lib/Basic/Targets/ and make the -cc1 -fwchar-type= and -f[no-]signed-wchar overrides that affected all targets equally. That would avoid the need for

r313364 - Fix the __interface inheritence rules to work better with IUnknown and IDispatch

2017-09-15 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri Sep 15 09:03:35 2017 New Revision: 313364 URL: http://llvm.org/viewvc/llvm-project?rev=313364=rev Log: Fix the __interface inheritence rules to work better with IUnknown and IDispatch __interface objects in MSVC are permitted to inherit from __interface types, and

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-09-15 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I did read through it now. In general, the code is sound with my understanding of the complexity metric and there is a almost one to one wording to the document, which is nice. Since we chatted in IRC directly, i would give a short summary to avoid forgetting what we

[PATCH] D37905: [libclang, bindings]: add spelling location

2017-09-15 Thread Masud Rahman via Phabricator via cfe-commits
frutiger added a comment. **Please note**: - this change means that versions of `libclang` built prior to the introduction of `clang_getExpansionLocation` will not work. - this change alters the behavior of `clang_getSpellingLocation` to return the spelling location I would appreciate advice

[PATCH] D37905: [libclang, bindings]: add spelling location

2017-09-15 Thread Masud Rahman via Phabricator via cfe-commits
frutiger created this revision. o) Enhance 'CursorLocation' with four additional properties that can retrieve spelling location information. o) Update the implementation to use 'clang_getExpansionLocation' instead of the deprecated 'clang_getInstantiationLocation', which has been present

[PATCH] D37904: [clang-format] Fix FixNamespaceComments when BraceWrapping AfterNamespace is true.

2017-09-15 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. Herald added a subscriber: klimek. NamespaceEndCommentsFixer did not fix namespace comments when the brace opening the namespace was not on the same line as the "namespace" keyword. It occurs in Allman, GNU and Linux styles and whenever

[PATCH] D37903: Fix assume-filename handling in clang-format.el

2017-09-15 Thread Micah Werbitt via Phabricator via cfe-commits
werbitt created this revision. When 'buffer-file-name' is nil 'call-process-region' returned a segmentation fault error. This was a problem when using clang-format-buffer on an orgmode source code editing buffer. I fixed this problem by excluding the '-assume-filename' argument when

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-09-15 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Looking up to the Visitor, i will do this next. Comment at: clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:27 + // Here are all the possible reasons: + enum Criteria : unsigned char { +None = 0, i think clarifying

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-09-15 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk added a comment. @alexfh, would you mind taking a look at the changes that have been introduced in the new patch? The main improvements are: - The checker has been shifted to the module `readability`. - It is checked, whether implicit type conversion is possible from the argument to

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: sbenza, JonasToth. aaron.ballman added a comment. Adding a few reviewers to hopefully help Roman get some feedback. Repository: rL LLVM https://reviews.llvm.org/D36836 ___ cfe-commits mailing list

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-09-15 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Any further reviews? What are the criteria to accept this patch? Who or how many people should accept this? https://reviews.llvm.org/D34512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37299: [Modules] Add ability to specify module name to module file mapping in a file

2017-09-15 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. https://reviews.llvm.org/D37299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37846: [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets

2017-09-15 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313355: [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets (authored by alexfh). Changed prior to commit: https://reviews.llvm.org/D37846?vs=115369=115395#toc Repository:

[clang-tools-extra] r313355 - [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets

2017-09-15 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Sep 15 04:28:28 2017 New Revision: 313355 URL: http://llvm.org/viewvc/llvm-project?rev=313355=rev Log: [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets Summary: Bug: https://bugs.llvm.org/show_bug.cgi?id=34449 **Problem:** Clang-tidy check

[PATCH] D37845: [clang-format] New flag - BraceWrapping.AfterExternBlock

2017-09-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313354: [clang-format] New flag - BraceWrapping.AfterExternBlock (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D37845?vs=115240=115394#toc Repository: rL LLVM

[PATCH] D37897: [StaticAnalyzer] Fix ProgramState for static variables that are not written

2017-09-15 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I have some comments and questions but maybe you do not want to address those until Devin, NoQ, or Anna approved the general directions. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:107 +/** Recursively check if variable is changed in code. */

r313354 - [clang-format] New flag - BraceWrapping.AfterExternBlock

2017-09-15 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Fri Sep 15 04:23:50 2017 New Revision: 313354 URL: http://llvm.org/viewvc/llvm-project?rev=313354=rev Log: [clang-format] New flag - BraceWrapping.AfterExternBlock Summary: Bug: https://bugs.llvm.org/show_bug.cgi?id=34016 - **"extern C part"** **Problem:** Due to the

[PATCH] D37846: [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets

2017-09-15 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. Thank you! https://reviews.llvm.org/D37846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37846: [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets

2017-09-15 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. I'll commit the patch for you. https://reviews.llvm.org/D37846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37897: [StaticAnalyzer] Fix ProgramState for static variables that are not written

2017-09-15 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. In https://reviews.llvm.org/D37897#871858, @xazax.hun wrote: > Out of curiosity, does the false positive disappear after making the static > variables const? Yes that fixes the false positive Repository: rL LLVM https://reviews.llvm.org/D37897

[PATCH] D37897: [StaticAnalyzer] Fix ProgramState for static variables that are not written

2017-09-15 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Out of curiosity, does the false positive disappear after making the static variables const? Repository: rL LLVM https://reviews.llvm.org/D37897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D37897: [StaticAnalyzer] Fix ProgramState for static variables that are not written

2017-09-15 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 115385. danielmarjamaki added a comment. Minor cleanups. Changed names. Updated comments. Repository: rL LLVM https://reviews.llvm.org/D37897 Files: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h

[PATCH] D37892: [X86] Use native shuffle vector for the perm2f128 intrinsics

2017-09-15 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. Also, there currently isn't any testing of the zero vector case. https://reviews.llvm.org/D37892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37897: [StaticAnalyzer] Fix ProgramState for static variables that are not written

2017-09-15 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki created this revision. I saw a false positive where the analyzer made wrong conclusions about a static variable. Static variables that are not written have known values (initialized values). This is the (simplified) code that motivated me to create this patch: static char

  1   2   >