r328857 - [Modules] Improve fixit for framework private module maps

2018-03-29 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Thu Mar 29 22:17:58 2018 New Revision: 328857 URL: http://llvm.org/viewvc/llvm-project?rev=328857&view=rev Log: [Modules] Improve fixit for framework private module maps The wrong source range was being provided in some case, fix that to get a better fixit. rdar://problem/385

[PATCH] D45058: [X86] Disable SGX for Skylake Server

2018-03-29 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 Repository: rC Clang https://reviews.llvm.org/D45058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D44764: [clangd] Use operator<< to prevent printers issues in Gtest

2018-03-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/Protocol.h:673 json::Expr toJSON(const CompletionItem &); +std::ostream &operator<<(std::ostream &, const CompletionItem &); sammccall wrote: > I think raw_ostream should work fine here, it's what we've done

[PATCH] D44764: [clangd] Use operator<< to prevent printers issues in Gtest

2018-03-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 140382. malaperle marked an inline comment as done. malaperle added a comment. Use raw_ostream instead. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44764 Files: clangd/Protocol.cpp clangd/Protocol.h unittests/clangd/CodeCompleteT

RE: r328837 - [analyzer] Fix target triple for autorelease-write-checker test

2018-03-29 Thread via cfe-commits
I've added "UNSUPPORTED: system-windows" in r328853. Hopefully that should disable it on Windows until you can get a chance to figure out the problem. Douglas Yung > -Original Message- > From: ekarpen...@apple.com [mailto:ekarpen...@apple.com] > Sent: Thursday, March 29, 2018 18:22 > To:

r328853 - Adding UNSUPPORTED: system-windows at George's request until the problem can be debugged.

2018-03-29 Thread Douglas Yung via cfe-commits
Author: dyung Date: Thu Mar 29 18:29:07 2018 New Revision: 328853 URL: http://llvm.org/viewvc/llvm-project?rev=328853&view=rev Log: Adding UNSUPPORTED: system-windows at George's request until the problem can be debugged. Modified: cfe/trunk/test/Analysis/autoreleasewritechecker_test.m Mod

RE: r328837 - [analyzer] Fix target triple for autorelease-write-checker test

2018-03-29 Thread via cfe-commits
Hi George, This test is still failing on a bot (http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/16152): FAIL: Clang :: Analysis/autoreleasewritechecker_test.m (2908 of 39213) TEST 'Clang :: Analysis/autoreleasewritechecker_test.m' F

[PATCH] D45013: Generate warning when over-aligned new call is required but not supported.

2018-03-29 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Does it make sense to have a warning for `__libcpp_deallocate` and `get_temporary_buffer` too? Not sure about deallocate as you have allocated memory already and allocation has a warning. So for deallocation a warning can be too noisy. But for `get_temporary_buffer` the

[PATCH] D45071: [analyzer] Track null or undef values through pointer arithmetic.

2018-03-29 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, eraman. Pointer arithmetic on null or undefined pointers results in null or undefined pointers. This is obvious for undefined pointers; for n

[PATCH] D45060: Allow target to handle required features for TARGET_BUILTINs.

2018-03-29 Thread Artem Belevich via Phabricator via cfe-commits
tra marked an inline comment as done. tra added inline comments. Comment at: clang/include/clang/Basic/TargetInfo.h:933 + /// FeatureMap. Targets may override this to provide custom handling of + /// required features. + virtual Optional jlebar wrote: > It's n

[PATCH] D45060: Allow target to handle required features for TARGET_BUILTINs.

2018-03-29 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 140371. tra added a comment. Updated description of hasRequiredFeature. Set FirstMissing if target returns 'false' so diags still work. https://reviews.llvm.org/D45060 Files: clang/include/clang/Basic/TargetInfo.h clang/lib/CodeGen/CodeGenFunction.cpp Ind

[PATCH] D45068: [NVPTX, CUDA] Added support for m8n32k16 and m32n8k16 variants of wmma instructions.

2018-03-29 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 140363. tra added a comment. Updated comments. https://reviews.llvm.org/D45068 Files: clang/include/clang/Basic/BuiltinsNVPTX.def clang/lib/CodeGen/CGBuiltin.cpp clang/lib/Driver/ToolChains/Cuda.cpp clang/test/CodeGen/builtins-nvptx-sm_70.cu llvm/incl

[PATCH] D45060: Allow target to handle required features for TARGET_BUILTINs.

2018-03-29 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Basic/TargetInfo.h:933 + /// FeatureMap. Targets may override this to provide custom handling of + /// required features. + virtual Opt

[PATCH] D45061: [NVPTX, CUDA] Use custom feature detection to handle NVPTX target builtins.

2018-03-29 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Basic/Cuda.h:55 +static inline const std::vector CudaKnownArchList() { + return {CudaArch::SM_20, CudaArch::SM_21, CudaArch::SM_30, Cud

[PATCH] D45069: [clangd] synthesize fix message when the diagnostic doesn't provide one.

2018-03-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, MaskRay, ioeric, jkorous-apple, klimek. Currently if a fix is attached directly to a diagnostic, we repeat the diagnostic message as the fix message. From eyeballing the top diagnosti

[PATCH] D45068: [NVPTX, CUDA] Added support for m8n32k16 and m32n8k16 variants of wmma instructions.

2018-03-29 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:578 + if (CudaInstallation.version() >= CudaVersion::CUDA_91) { +// CUDA-9 uses new instructions that are only avail

[PATCH] D45068: [NVPTX, CUDA] Added support for m8n32k16 and m32n8k16 variants of wmma instructions.

2018-03-29 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: jlebar. Herald added subscribers: hiraditya, sanjoy, jholewinski. The new instructions were added added for sm_70+ GPUs in CUDA-9.1. https://reviews.llvm.org/D45068 Files: clang/include/clang/Basic/BuiltinsNVPTX.def clang/lib/CodeGen/CGBuilti

r328845 - Hoist MethodVFTableLocation out of MicrosoftVTableContext, NFC

2018-03-29 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Mar 29 15:42:24 2018 New Revision: 328845 URL: http://llvm.org/viewvc/llvm-project?rev=328845&view=rev Log: Hoist MethodVFTableLocation out of MicrosoftVTableContext, NFC This allows forward declaring it so that we can add it to MicrosoftMangleContext::mangleVirtualMemPtrThu

[PATCH] D45007: [clangd] Use compile-command interpolation to provide commands for header files.

2018-03-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Sending for review in case you have an opinion about whether it's worth plumbing a flag through here, or if it's fine to just always do it. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45007 ___ cfe-com

[PATCH] D45006: [Tooling] A CompilationDatabase wrapper that infers header commands.

2018-03-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 140349. sammccall added a comment. Add tests, fix minor bugs, add lots of comments and structure. Repository: rC Clang https://reviews.llvm.org/D45006 Files: include/clang/Tooling/CompilationDatabase.h lib/Tooling/CMakeLists.txt lib/Tooling/Inter

r328837 - [analyzer] Fix target triple for autorelease-write-checker test

2018-03-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Mar 29 15:28:04 2018 New Revision: 328837 URL: http://llvm.org/viewvc/llvm-project?rev=328837&view=rev Log: [analyzer] Fix target triple for autorelease-write-checker test Modified: cfe/trunk/test/Analysis/autoreleasewritechecker_test.m Modified: cfe/trunk/

r328836 - Set dso_local on cfi_slowpath.

2018-03-29 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Thu Mar 29 15:08:01 2018 New Revision: 328836 URL: http://llvm.org/viewvc/llvm-project?rev=328836&view=rev Log: Set dso_local on cfi_slowpath. Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp cfe/trunk/test/CodeGen/cfi-icall-cross-dso.c Modified: cfe/trunk/lib/CodeGen/CGEx

r328835 - [analyzer] Better pretty-printing of regions in exploded graph

2018-03-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Mar 29 15:07:58 2018 New Revision: 328835 URL: http://llvm.org/viewvc/llvm-project?rev=328835&view=rev Log: [analyzer] Better pretty-printing of regions in exploded graph Differential Revision: https://reviews.llvm.org/D45010 Modified: cfe/trunk/lib/StaticA

[PATCH] D45054: Set dso_local on cfi_slowpath

2018-03-29 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola closed this revision. espindola added a comment. 328836 https://reviews.llvm.org/D45054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:60 +- New module `abseil` for checks related to the `Abseil `_ + library. Looks like you copied new version of file over old one. svn update and svn diff should be made

[PATCH] D44985: [CUDA] Let device-side shared variables be initialized with undef

2018-03-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:235-240 + if (Ty.getAddressSpace() != LangAS::opencl_local && + !(getLangOpts().CUDA && getLangOpts().CUDAIsDevice && +D.hasAttr())) Init = EmitNullConstant(Ty); else Init = llvm::UndefV

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

2018-03-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 140337. Charusso marked 6 inline comments as done. Charusso added a comment. Truly fixed everything according to the comments. https://reviews.llvm.org/D45050 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-

[PATCH] D45061: [NVPTX, CUDA] Use custom feature detection to handle NVPTX target builtins.

2018-03-29 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 140334. tra added a comment. Run the tests with -target-cpu sm_61 to make sure intrinsics that require sm_60 are still enabled. https://reviews.llvm.org/D45061 Files: clang/include/clang/Basic/BuiltinsNVPTX.def clang/include/clang/Basic/Cuda.h clang/lib/

[PATCH] D44985: [CUDA] Let device-side shared variables be initialized with undef

2018-03-29 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Still LGTM. https://reviews.llvm.org/D44985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44815: [AArch64]: Add support for parsing rN registers.

2018-03-29 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328829: [AArch64]: Add support for parsing rN registers. (authored by manojgupta, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D44815 Files:

r328829 - [AArch64]: Add support for parsing rN registers.

2018-03-29 Thread Manoj Gupta via cfe-commits
Author: manojgupta Date: Thu Mar 29 14:11:15 2018 New Revision: 328829 URL: http://llvm.org/viewvc/llvm-project?rev=328829&view=rev Log: [AArch64]: Add support for parsing rN registers. Summary: Allow rN registers to be simply parsed as correspoing xN registers. The "register ... asm("rN")" is an

[clang-tools-extra] r328819 - [clangd] Fix repeated word typo. NFC

2018-03-29 Thread Fangrui Song via cfe-commits
Author: maskray Date: Thu Mar 29 13:03:16 2018 New Revision: 328819 URL: http://llvm.org/viewvc/llvm-project?rev=328819&view=rev Log: [clangd] Fix repeated word typo. NFC Modified: clang-tools-extra/trunk/clangd/JSONExpr.cpp clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp Modifi

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

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:46 +/// from ' "data_name", "data", ' to just 'data' by "memmoving" it char-by-char. +bool isTrimFunc(const MatchFinder::MatchResult &Result) { + const auto *FuncExpr = Result

[PATCH] D45054: Set dso_local on cfi_slowpath

2018-03-29 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. LGTM then. This naming is confusing. https://reviews.llvm.org/D45054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D44985: [CUDA] Let device-side shared variables be initialized with undef

2018-03-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 140329. yaxunl retitled this revision from "Remove initializer for CUDA shared varirable" to "[CUDA] Let device-side shared variables be initialized with undef". yaxunl edited the summary of this revision. yaxunl added a comment. Revised by Artem's comment. I

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

2018-03-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 140330. Charusso marked 2 inline comments as done. Charusso added a comment. Fixed everything according to the comments. https://reviews.llvm.org/D45050 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/b

[PATCH] D45054: Set dso_local on cfi_slowpath

2018-03-29 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola added a comment. In https://reviews.llvm.org/D45054#1052118, @eugenis wrote: > This looks wrong. cfi_slowpath is defined in libclang_rt.cfi, which is linked > to the main executable. It is not always dso-local. On Android it is defined > in libdl.so and is never dso-local. And we do

r328827 - [analyzer] Path-insensitive checker for writes into an auto-releasing pointer

2018-03-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Mar 29 13:55:34 2018 New Revision: 328827 URL: http://llvm.org/viewvc/llvm-project?rev=328827&view=rev Log: [analyzer] Path-insensitive checker for writes into an auto-releasing pointer from the wrong auto-releasing pool, as such writes may crash. rdar://253011

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-29 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Thanks! > Will be good idea to clarify where TEMP_FAILURE_RETRY come from. Updated the CL summary and added "TEMP_FAILURE_RETRY is a macro provided by both glibc and Bionic." to ComparisonInTempFailureRetryCheck.h. Did you have anything else in mind? =

[PATCH] D45052: Mark __cfi_check as dso_local

2018-03-29 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola closed this revision. espindola added a comment. 328825 https://reviews.llvm.org/D45052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-29 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv updated this revision to Diff 140324. george.burgess.iv marked 3 inline comments as done. george.burgess.iv edited the summary of this revision. george.burgess.iv added a comment. Addressed feedback. https://reviews.llvm.org/D45059 Files: clang-tidy/bugprone/BugproneTidyModu

r328826 - [AST] Fix some Clang-tidy modernize-use-auto warnings; other minor fixes (NFC).

2018-03-29 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Thu Mar 29 13:51:59 2018 New Revision: 328826 URL: http://llvm.org/viewvc/llvm-project?rev=328826&view=rev Log: [AST] Fix some Clang-tidy modernize-use-auto warnings; other minor fixes (NFC). Modified: cfe/trunk/include/clang/AST/DeclTemplate.h cfe/trunk/includ

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-29 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:235-240 + if (Ty.getAddressSpace() != LangAS::opencl_local && + !(getLangOpts().CUDA && getLangOpts().CUDAIsDevice && +D.hasAttr())) Init = EmitNullConstant(Ty); else Init = llvm::UndefValue:

r328825 - Mark __cfi_check as dso_local.

2018-03-29 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Thu Mar 29 13:51:30 2018 New Revision: 328825 URL: http://llvm.org/viewvc/llvm-project?rev=328825&view=rev Log: Mark __cfi_check as dso_local. Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp cfe/trunk/test/CodeGen/cfi-icall-cross-dso.c Modified: cfe/trunk/lib/CodeGen/CGEx

[PATCH] D45061: [NVPTX, CUDA] Use custom feature detection to handle NVPTX target builtins.

2018-03-29 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: jlebar. Herald added subscribers: hiraditya, sanjoy, jholewinski. When NVPTX TARGET_BUILTIN specifies sm_XX or ptxYY as required feature, consider those features available if we're compiling for GPU >= sm_XX or have enabled PTX version >= ptxYY. Th

[PATCH] D45060: Allow target to handle required features for TARGET_BUILTINs.

2018-03-29 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: echristo. Herald added subscribers: jlebar, sanjoy. In some cases figuring out whether particular target builtin should be enabled is a bit more complicated than current implementation allow. This patch allows the target to override what it consider

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Will be good idea to clarify where TEMP_FAILURE_RETRY come from. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D45059: Add a clang-tidy check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/ComparisonInTempFailureRetryCheck.cpp:51 +} +} + Please add // namespace and remove one empty line below. Comment at: docs/ReleaseNotes.rst:60 +- New `bugprone-comparison-i

[PATCH] D45059: Add a clang-tidy check to catch comparisons in TEMP_FAILURE_RETRY

2018-03-29 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added reviewers: aaron.ballman, alexfh. Herald added a subscriber: mgorny. `TEMP_FAILURE_RETRY(x)` is a macro that executes `x` until `(x) != -1 || errno != EINTR`, and evaluates to the result of the last execution of `x`. I've been told

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FuzzyMatch.cpp:209 std::copy(NewWord.begin(), NewWord.begin() + WordN, Word); - if (PatN == 0) -return true; sammccall wrote: > similarly this one. > (ideally we wouldn't do the work above, it's just there

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 140310. yaxunl added a comment. Revised by John's comments. Also simplified the test by Artem's comments. https://reviews.llvm.org/D44985 Files: lib/CodeGen/CGDecl.cpp test/CodeGenCUDA/address-spaces.cu test/CodeGenCUDA/device-var-init.cu Index: test/

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 140311. MaskRay added a comment. Don't rename anything. I just want to have this revision reviewed as soon as possible Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44720 Files: clangd/FuzzyMatch.cpp clangd/FuzzyMatch.h Index: clangd

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In `buildGraph`, the nested loop for (int P = 0; P < PatN; ++P) { // Scores[P + 1][P][Miss] = Scores[P + 1][P][Match] = {AwfulScore, Miss}; for (int W = P; W < WordN; ++W) { is interpreted as: we are calculating the cell `Scores[P+1][W+1][*]`, using the ch

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FuzzyMatch.cpp:93 + for (int I = PatN; I <= WordN; I++) +Best = std::max(Best, Scores[PatN][I][Match].Score); if (isAwful(Best)) sammccall wrote: > MaskRay wrote: > > sammccall wrote: > > > MaskRay wrote:

[PATCH] D44984: [HIP] Add hip file type and codegen for kernel launching

2018-03-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. > > >> Since the header file and library seem not to affect this patch, is it OK to >> defer their changes to be part of the toolchain patch? > > I'm not sure I understand. Could you elaborate? clang -cc1 does not include `__cla

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 140306. MaskRay added a comment. nit picking Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44720 Files: clangd/FuzzyMatch.cpp clangd/FuzzyMatch.h Index: clangd/FuzzyMatch.h =

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-29 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 140304. paulsemel marked 3 inline comments as done. paulsemel added a comment. Added Aaron suggestions. Fixed a bug when having nested anonymous unions and structures. Repository: rC Clang https://reviews.llvm.org/D44093 Files: include/clang/Basic/Bu

[PATCH] D45058: [X86] Disable SGX for Skylake Server

2018-03-29 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, zvi, echristo. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D45058 Files: lib/Basic/Targets/X86.cpp Index: lib/Basic/Targets/X86.cpp ==

[PATCH] D44093: [BUILTINS] structure pretty printer

2018-03-29 Thread Paul Semel via Phabricator via cfe-commits
paulsemel marked 6 inline comments as done. paulsemel added inline comments. Comment at: test/Sema/builtin-dump-struct.c:8 + void *b; + int (*goodfunc)(const char *, ...); + int (*badfunc1)(const char *); aaron.ballman wrote: > Can you also add a test for: `in

[PATCH] D45056: [X86] Split up -march=icelake to -client & -server

2018-03-29 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, zvi, echristo. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D45056 Files: include/clang/Basic/X86Target.def lib/Basic/Targets/X86.cpp test/Driver/x86-march.c test/Frontend/x86

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. What would the design for that warning be? C promotes all arithmetic on sub-int types to int, and if that's assigned back to a variable of the original type, there's a conversion. But you seem to only want to warn about truncating the result of multiplication and not

[PATCH] D44764: [clangd] Use operator<< to prevent printers issues in Gtest

2018-03-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (Thanks for sorting this out BTW!) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44764: [clangd] Use operator<< to prevent printers issues in Gtest

2018-03-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/Protocol.h:673 json::Expr toJSON(const CompletionItem &); +std::ostream &operator<<(std::ostream &, const CompletionItem &); I think raw_ostream should work fine here, it's what we've done elsewhere. Is there

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-29 Thread Teodor Petrov via Phabricator via cfe-commits
obfuscated added inline comments. Comment at: lib/Format/FormatTokenLexer.cpp:386 String->HasUnescapedNewline = Macro->HasUnescapedNewline; + String->TMacroStringLiteral = true; krasimir wrote: > In the original code, TMacro detection was done as: > ``` > (

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FuzzyMatch.cpp:340 + A[WordN] = Miss; + for (int I = WordN, P = PatN; I > 0; I--) { +if (I == W) sammccall wrote: > MaskRay wrote: > > sammccall wrote: > > > sammccall wrote: > > > > sammccall wrote: > > > >

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FuzzyMatch.cpp:230 void FuzzyMatcher::buildGraph() { + Scores[0][0][Miss] = Scores[0][0][Match] = {0, Miss}; for (int W = 0; W < WordN; ++W) { MaskRay wrote: > sammccall wrote: > > MaskRay wrote: > > > sammcc

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 4 inline comments as done. MaskRay added inline comments. Comment at: clangd/FuzzyMatch.cpp:230 void FuzzyMatcher::buildGraph() { + Scores[0][0][Miss] = Scores[0][0][Match] = {0, Miss}; for (int W = 0; W < WordN; ++W) { sammccall wrote: > Mask

[PATCH] D45054: Set dso_local on cfi_slowpath

2018-03-29 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. This looks wrong. cfi_slowpath is defined in libclang_rt.cfi, which is linked to the main executable. It is not always dso-local. On Android it is defined in libdl.so and is never dso-local. https://reviews.llvm.org/D45054 ___

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 140297. MaskRay added a comment. missScore -> missPenalty Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44720 Files: clangd/FuzzyMatch.cpp clangd/FuzzyMatch.h Index: clangd/FuzzyMatch.h

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

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:21 + +std::string exprToStr(const Expr *Expr, + const MatchFinder::MatchResult &Result) { Please make it static. Same for other functions.

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/FuzzyMatch.cpp:96 return None; return ScoreScale * std::min(PerfectBonus * PatN, std::max(0, Best)); } MaskRay wrote: > sammccall wrote: > > MaskRay wrote: > > > I also don't understand why it clamps th

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

2018-03-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/FindSymbols.cpp:31 + + if (supportedSymbolKinds && + std::find(supportedSymbolKinds->begin(), supportedSymbolKinds->end(), MaskRay wrote: > This std::find loop adds some overhead to each candidate... In my

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

2018-03-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 140294. Charusso marked 5 inline comments as done. Charusso added a comment. Added the whole diff. https://reviews.llvm.org/D45050 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/NotNullTermina

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

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.h:30 void check(const ast_matchers::MatchFinder::MatchResult &Result) override; +private: void memAllocFuncFix(StringRef Name, Please insert empty line above.

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

2018-03-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. you should always upload the whole diff, not just the last changes. https://reviews.llvm.org/D45050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-03-29 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 140288. Charusso added a comment. Fixed the unseen diff issues, removed redundant parentheses, the class got a private part. https://reviews.llvm.org/D45050 Files: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp clang-tidy/bugprone/NotNullTermina

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

2018-03-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This is fantastic, really looking forward to using it. I'm going to need to give up on vim at this rate, or do some serious work on ycm. Most significant comments are around the new functions in SourceLocation, and whether we can keep the type-mapping restricted to th

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-29 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328807: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots. (authored by vsapsai, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-29 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328807: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots. (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D44589?vs=139981&id=140287#t

r328807 - [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-29 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Thu Mar 29 10:34:09 2018 New Revision: 328807 URL: http://llvm.org/viewvc/llvm-project?rev=328807&view=rev Log: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots. Deprecation replacement can be any text but if it looks like a name of ObjC method an

[PATCH] D45054: Set dso_local on cfi_slowpath

2018-03-29 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola created this revision. espindola added reviewers: rnk, echristo, eugenis. https://reviews.llvm.org/D45054 Files: lib/CodeGen/CGExpr.cpp test/CodeGen/cfi-icall-cross-dso.c Index: test/CodeGen/cfi-icall-cross-dso.c ===

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2018-03-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:137 + +- New `readability-unnecessary-intermediate-var + `_ check Please use alphabetic order

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2018-03-29 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon marked an inline comment as done. tbourvon added inline comments. Comment at: docs/ReleaseNotes.rst:62 - New `bugprone-throw-keyword-missing `_ check Eugene.Zelenk

[PATCH] D37014: [clang-tidy] Add a checker to remove useless intermediate variables before return statements with comparisons

2018-03-29 Thread Tristan Bourvon via Phabricator via cfe-commits
tbourvon updated this revision to Diff 140278. tbourvon marked 10 inline comments as done. tbourvon added a comment. Fixed review comments https://reviews.llvm.org/D37014 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/U

[PATCH] D45052: Mark __cfi_check as dso_local

2018-03-29 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola created this revision. espindola added reviewers: rnk, echristo. https://reviews.llvm.org/D45052 Files: lib/CodeGen/CGExpr.cpp test/CodeGen/cfi-icall-cross-dso.c Index: test/CodeGen/cfi-icall-cross-dso.c === --- test/

[PATCH] D42034: [clang-format] In tests, expected code should be format-stable

2018-03-29 Thread Mark Zeren via Phabricator via cfe-commits
mzeren-vmw updated this revision to Diff 140276. mzeren-vmw added a comment. Update other verifyFormat implementations. Repository: rC Clang https://reviews.llvm.org/D42034 Files: unittests/Format/FormatTest.cpp unittests/Format/FormatTestComments.cpp unittests/Format/FormatTestJS.cpp

[PATCH] D44723: Set dso_local when clearing dllimport

2018-03-29 Thread Rafael Avila de Espindola via Phabricator via cfe-commits
espindola closed this revision. espindola added a comment. 328801 https://reviews.llvm.org/D44723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r328801 - Set dso_local when clearing dllimport.

2018-03-29 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Thu Mar 29 09:45:18 2018 New Revision: 328801 URL: http://llvm.org/viewvc/llvm-project?rev=328801&view=rev Log: Set dso_local when clearing dllimport. Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/test/CodeGenCXX/dllimport.cpp Modified: cfe/trunk/lib/Co

[PATCH] D44786: Lowering x86 adds/addus/subs/subus intrinsics (clang)

2018-03-29 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 with that one comment. Comment at: lib/CodeGen/CGBuiltin.cpp:8288 +llvm::Type *ElementType = ResultType->getVectorElementType(); +llvm::Type *ExtElem

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-03-29 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 140275. juliehockett added a comment. Fixing assert on vector size. https://reviews.llvm.org/D43341 Files: clang-doc/BitcodeReader.cpp clang-doc/BitcodeReader.h clang-doc/BitcodeWriter.cpp clang-doc/BitcodeWriter.h clang-doc/CMakeLists.txt

r328800 - Add a dllimport test.

2018-03-29 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Thu Mar 29 09:35:52 2018 New Revision: 328800 URL: http://llvm.org/viewvc/llvm-project?rev=328800&view=rev Log: Add a dllimport test. Thanks to rnk for the suggestion. Added: cfe/trunk/test/CodeGen/flip-dllimport.c Added: cfe/trunk/test/CodeGen/flip-dllimport.c URL: ht

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

2018-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FindSymbols.cpp:31 + + if (supportedSymbolKinds && + std::find(supportedSymbolKinds->begin(), supportedSymbolKinds->end(), This std::find loop adds some overhead to each candidate... In my experience the cl

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44985#1051840, @yaxunl wrote: > In https://reviews.llvm.org/D44985#1050876, @rjmccall wrote: > > > In https://reviews.llvm.org/D44985#1050674, @yaxunl wrote: > > > > > In https://reviews.llvm.org/D44985#1050670, @rjmccall wrote: > > > > > > >

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44883#1051878, @lebedev.ri wrote: > Ok, tried llvm stage2 build, and it failed as expected, in code that > intentionally does self-assignment: Actually, this is not the sort of failure that I think should worry you. Any new warning has t

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

2018-03-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. I realized that using the draft store has limited improvement for now because not many symbol locations come from main files (.cpp, etc) and when headers are modified, the main files are not reindexed right now. So the draft store will give better location for example

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

2018-03-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 140272. malaperle added a comment. Use the DraftStore for offset -> line/col when there is a draft available. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/Clangd

[PATCH] D44994: [clang-format] Ensure wrapped ObjC selectors with 1 arg obey IndentWrappedFunctionNames

2018-03-29 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked an inline comment as done. benhamilton added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:904 + : State.Stack.back().Indent); if (NextNonComment->LongestObjCSelectorName == 0) +return MinIndent;

[PATCH] D44994: [clang-format] Ensure wrapped ObjC selectors with 1 arg obey IndentWrappedFunctionNames

2018-03-29 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 140271. benhamilton added a comment. Remove if (...) return MinIndent. Repository: rC Clang https://reviews.llvm.org/D44994 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cp

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FuzzyMatch.cpp:96 return None; return ScoreScale * std::min(PerfectBonus * PatN, std::max(0, Best)); } sammccall wrote: > MaskRay wrote: > > I also don't understand why it clamps the value to zero here. N

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

2018-03-29 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp:1 +#include "NotNullTerminatedResultCheck.h" +#include "clang/AST/ASTContext.h" Missing header blurb Comment at: clang-tidy/bugprone/NotNullTermi

  1   2   >