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

2018-03-29 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak accepted this revision. jolesiak added a comment. This revision is now accepted and ready to land. Well spotted. Repository: rC Clang https://reviews.llvm.org/D44994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-29 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. @dblaikie, Thanks for your feedback and questions. I will address them. Currently I am looking with more detail the tracking of the 'used' and 'referenced' bits. Repository: rC Clang https://reviews.llvm.org/D44826 ___

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

2018-03-29 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 added a comment. In https://reviews.llvm.org/D44559#1049472, @rjmccall wrote: > You are welcome to start a thread on cfe-dev to gather support for changing > the design of -Wconversion to always warn about the potential for overflow in > sub-int multiplication. Maybe the stupid question

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-29 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak added inline comments. Comment at: unittests/Format/FormatTestObjC.cpp:527 + // Make sure selectors with 0, 1, or more arguments are not indented + // when IndentWrappedFunctionNames is false. + verifyFormat("- (a)\n" I kno

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

2018-03-29 Thread Teodor Petrov via Phabricator via cfe-commits
obfuscated updated this revision to Diff 140191. obfuscated marked an inline comment as done. obfuscated added a comment. Fixed tests. Fixed description. https://reviews.llvm.org/D44765 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp lib/Fo

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-29 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak added inline comments. Comment at: unittests/Format/FormatTestObjC.cpp:527 + // Make sure selectors with 0, 1, or more arguments are not indented + // when IndentWrappedFunctionNames is false. + verifyFormat("- (a)\n" joles

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-29 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak added inline comments. Comment at: unittests/Format/FormatTestObjC.cpp:527 + // Make sure selectors with 0, 1, or more arguments are not indented + // when IndentWrappedFunctionNames is false. + verifyFormat("- (a)\n" joles

[PATCH] D44381: [mips] Prevent PIC to be set to level 2

2018-03-29 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added inline comments. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:983 + return std::make_tuple(llvm::Reloc::Static, 0U, false); +// It's never PIC level 2 for mips. +IsPICLevelTwo = false; Can you reformulate this comment to say that MI

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

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

[PATCH] D41808: Rename clang link from clang-X.Y to clang-X

2018-03-29 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 140202. sylvestre.ledru edited the summary of this revision. sylvestre.ledru added a comment. Add to the release notes Repository: rC Clang https://reviews.llvm.org/D41808 Files: CMakeLists.txt docs/ReleaseNotes.rst Index: docs/ReleaseNotes

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

2018-03-29 Thread Peter Smith via Phabricator via cfe-commits
peter.smith accepted this revision. peter.smith added a comment. This revision is now accepted and ready to land. Given that this is important for compiling the Linux kernel with clang I think that it is worth improving compatibility with GCC. LGTM. Repository: rC Clang https://reviews.llvm.

r328769 - Rename clang link from clang-X.Y to clang-X

2018-03-29 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Thu Mar 29 03:05:46 2018 New Revision: 328769 URL: http://llvm.org/viewvc/llvm-project?rev=328769&view=rev Log: Rename clang link from clang-X.Y to clang-X Summary: As we are only doing X.0.Z releases (not using the minor version), there is no need to keep -X.Y in the ver

[PATCH] D41808: Rename clang link from clang-X.Y to clang-X

2018-03-29 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328769: Rename clang link from clang-X.Y to clang-X (authored by sylvestre, committed by ). Changed prior to commit: https://reviews.llvm.org/D41808?vs=140202&id=140203#toc Repository: rC Clang http

[PATCH] D44970: [XRay][clang] Add flag to choose instrumentation bundles

2018-03-29 Thread Martin Pelikán via Phabricator via cfe-commits
pelikan added a comment. I would probably add more tests for the different configurations, but I suspect more diffs are coming after this. Comment at: clang/include/clang/Driver/Options.td:1112 + Group, Flags<[CC1Option]>, + HelpText<"Select which bundle of XRay instrumentat

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

2018-03-29 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-doc/BitcodeWriter.h:129 // Check that the static size is large-enough. assert(Record.capacity() > BitCodeConstants::RecordSize); } lebedev.ri wrote: > juliehockett wrote: > > lebedev.ri wrote: > > >

[PATCH] D45002: [test] Conservatively re-enable a FreeBSD/XRay test

2018-03-29 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. Looks ok to me except I would change a bit the title maybe. Repository: rC Clang https://reviews.llvm.org/D45002 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D45004: [clang-format] New style option IndentWrappedObjCMethodNames

2018-03-29 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Do we have a public style guide that explicitly says to do this? That's a requirement for new style options as per https://clang.llvm.org/docs/ClangFormatStyleOptions.html#adding-additional-style-options. Also, are we sure that somebody wants the other behavior? Does tha

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

2018-03-29 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:899 if (!State.Stack.back().ObjCSelectorNameFound) { + unsigned MinIndent = + (Style.IndentWrappedFunctionNames I think I'd now find this slightly easier to read as:

r328776 - [Hexagon] Aid bit-reverse load intrinsics lowering with bitcode

2018-03-29 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Thu Mar 29 06:54:31 2018 New Revision: 328776 URL: http://llvm.org/viewvc/llvm-project?rev=328776&view=rev Log: [Hexagon] Aid bit-reverse load intrinsics lowering with bitcode The conversion of operatios to bitcode helps to eliminate an additional store in certain cases. We

[libcxx] r328782 - Creating release candidate rc2 from release_502 branch

2018-03-29 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Thu Mar 29 07:03:58 2018 New Revision: 328782 URL: http://llvm.org/viewvc/llvm-project?rev=328782&view=rev Log: Creating release candidate rc2 from release_502 branch Added: libcxx/tags/RELEASE_502/rc2/ (props changed) - copied from r328781, libcxx/branches/rele

[libcxxabi] r328783 - Creating release candidate rc2 from release_502 branch

2018-03-29 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Thu Mar 29 07:04:02 2018 New Revision: 328783 URL: http://llvm.org/viewvc/llvm-project?rev=328783&view=rev Log: Creating release candidate rc2 from release_502 branch Added: libcxxabi/tags/RELEASE_502/rc2/ - copied from r328782, libcxxabi/branches/release_50/ ___

[libunwind] r328789 - Creating release candidate rc2 from release_502 branch

2018-03-29 Thread Tom Stellard via cfe-commits
Author: tstellar Date: Thu Mar 29 07:04:30 2018 New Revision: 328789 URL: http://llvm.org/viewvc/llvm-project?rev=328789&view=rev Log: Creating release candidate rc2 from release_502 branch Added: libunwind/tags/RELEASE_502/rc2/ (props changed) - copied from r328788, libunwind/branche

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

2018-03-29 Thread Tomasz Krupa via Phabricator via cfe-commits
tkrupa marked 3 inline comments as done. tkrupa added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:7897 + Value *MaxVec = CGF.Builder.CreateVectorSplat(NumElements, Max); + Value *ExtMaxVec = Signed ? CGF.Builder.CreateSExt(MaxVec, ExtType) +

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

2018-03-29 Thread Tomasz Krupa via Phabricator via cfe-commits
tkrupa updated this revision to Diff 140244. Repository: rC Clang https://reviews.llvm.org/D44786 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/avx2-builtins.c test/CodeGen/avx512bw-builtins.c test/CodeGen/avx512vlbw-builtins.c test/CodeGen/sse2-builtins.c Index: test/CodeGen/sse2-b

r328791 - Fix typo

2018-03-29 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Thu Mar 29 07:31:59 2018 New Revision: 328791 URL: http://llvm.org/viewvc/llvm-project?rev=328791&view=rev Log: Fix typo Modified: cfe/trunk/include/clang/Basic/AttrDocs.td cfe/trunk/test/CodeGenCXX/catch-undef-behavior.cpp Modified: cfe/trunk/include/clang/Basic/Att

[PATCH] D45044: [clangd] Mark "Source Hover" as implemented in the docs

2018-03-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, MaskRay, ioeric, ilya-biryukov, klimek. Signed-off-by: Marc-Andre Laperle Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45044 Files: docs/clangd.rst Index: docs/clangd.rst

[PATCH] D45044: [clangd] Mark "Source Hover" as implemented in the docs

2018-03-29 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. Yay! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 140251. benhamilton marked 2 inline comments as done. benhamilton added a comment. @djasper comments Repository: rC Clang https://reviews.llvm.org/D44994 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestObjC.cpp Index: unit

[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 added a comment. Thanks, applied your suggested change. Comment at: lib/Format/ContinuationIndenter.cpp:899 if (!State.Stack.back().ObjCSelectorNameFound) { + unsigned MinIndent = + (Style.IndentWrappedFunctionNames djasper wrote:

[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 140252. benhamilton added a comment. One more tidy-up Repository: rC Clang https://reviews.llvm.org/D44994 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp ===

[clang-tools-extra] r328792 - [clangd] Mark "Source Hover" as implemented in the docs

2018-03-29 Thread Marc-Andre Laperle via cfe-commits
Author: malaperle Date: Thu Mar 29 07:49:21 2018 New Revision: 328792 URL: http://llvm.org/viewvc/llvm-project?rev=328792&view=rev Log: [clangd] Mark "Source Hover" as implemented in the docs Summary: Signed-off-by: Marc-Andre Laperle Reviewers: simark Reviewed By: simark Subscribers: klimek,

[PATCH] D45044: [clangd] Mark "Source Hover" as implemented in the docs

2018-03-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328792: [clangd] Mark "Source Hover" as implemented in the docs (authored by malaperle, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D45044 Fil

r328793 - Disable emitting static extern C aliases for amdgcn target for CUDA

2018-03-29 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Mar 29 07:50:00 2018 New Revision: 328793 URL: http://llvm.org/viewvc/llvm-project?rev=328793&view=rev Log: Disable emitting static extern C aliases for amdgcn target for CUDA Patch by Greg Rodgers. Revised and lit test added by Yaxun Liu. Differential Revision: https://

[PATCH] D44987: Disable emitting static extern C aliases for amdgcn target for CUDA

2018-03-29 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328793: Disable emitting static extern C aliases for amdgcn target for CUDA (authored by yaxunl, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.or

r328795 - Set calling convention for CUDA kernel

2018-03-29 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Mar 29 08:02:08 2018 New Revision: 328795 URL: http://llvm.org/viewvc/llvm-project?rev=328795&view=rev Log: Set calling convention for CUDA kernel This patch sets target specific calling convention for CUDA kernels in IR. Patch by Greg Rodgers. Revised and lit test added

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-29 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328795: Set calling convention for CUDA kernel (authored by yaxunl, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D44747?vs=140131&id=140256#

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-29 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328795: Set calling convention for CUDA kernel (authored by yaxunl, committed by ). Repository: rL LLVM https://reviews.llvm.org/D44747 Files: include/clang/Basic/Specifiers.h lib/AST/ItaniumMangl

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-29 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 140259. benhamilton added a comment. @jolesiak Repository: rC Clang https://reviews.llvm.org/D44996 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-03-29 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked 3 inline comments as done. benhamilton added inline comments. Comment at: unittests/Format/FormatTestObjC.cpp:527 + // Make sure selectors with 0, 1, or more arguments are not indented + // when IndentWrappedFunctionNames is false. + verifyFormat("- (aaa

[PATCH] D45004: [clang-format] New style option IndentWrappedObjCMethodNames

2018-03-29 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked an inline comment as done. benhamilton added inline comments. Comment at: include/clang/Format/Format.h:1154-1163 + /// \brief The style of indenting long function or method names wrapped + /// onto the next line. + enum IndentWrappedMethodStyle { +/// A

[PATCH] D45004: [clang-format] New style option IndentWrappedObjCMethodNames

2018-03-29 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked an inline comment as done. benhamilton added a comment. > Do we have a public style guide that explicitly says to do this? Good question! This was the result of internal discussion with the Google Objective-C style guide maintainers based on analysis of ObjC code at Google. I

[PATCH] D44985: Remove initializer for CUDA shared varirable

2018-03-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. 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: > > > > > What exactly are you trying to express here? Are you just trying to make

[PATCH] D45004: [clang-format] New style option IndentWrappedObjCMethodNames

2018-03-29 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Well, I disagree. It says: "If you break after the return type of a function declaration or definition, do not indent." Repository: rC Clang https://reviews.llvm.org/D45004 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D45004: [clang-format] New style option IndentWrappedObjCMethodNames

2018-03-29 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. > Well, I disagree. It says: "If you break after the return type of a function > declaration or definition, do not indent." Great, thanks for clarifying! Repository: rC Clang https://reviews.llvm.org/D45004 ___ cfe-

[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 created this revision. Charusso added reviewers: alexfh, aaron.ballman, xazax.hun. Charusso added a project: clang-tools-extra. Herald added subscribers: cfe-commits, rnkovacs, mgorny. New checker called bugprone-not-null-terminated-result. This check can be used to find function calls w

[PATCH] D45002: [test] Fix an XRay test on FreeBSD

2018-03-29 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. Since I do not have commit permissions hopefully @dberris will come by or kamil if he s less busy. Repository: rC Clang https://reviews.llvm.org/D45002 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

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

2018-03-29 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ok, tried llvm stage2 build, and it failed as expected, in code that intentionally does self-assignment: https://github.com/llvm-mirror/llvm/blob/1aa8147054e7ba8f2b7ea25daaed804662b4c6b2/unittests/ADT/DenseMapTest.cpp#L249-L250 [2/311 1.1/sec] Building CXX object u

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2018-03-29 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. ping https://reviews.llvm.org/D39053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r328797 - [test] Fix an XRay test on FreeBSD

2018-03-29 Thread Zhihao Yuan via cfe-commits
Author: lichray Date: Thu Mar 29 08:50:44 2018 New Revision: 328797 URL: http://llvm.org/viewvc/llvm-project?rev=328797&view=rev Log: [test] Fix an XRay test on FreeBSD Summary: Fixing clang-test on FreeBSD as a follow-up of https://reviews.llvm.org/D43378 to handle the revert happened in r32574

[PATCH] D45002: [test] Fix an XRay test on FreeBSD

2018-03-29 Thread Zhihao Yuan via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC328797: [test] Fix an XRay test on FreeBSD (authored by lichray, committed by ). Changed prior to commit: https://revie

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

2018-03-29 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:904 + : State.Stack.back().Indent); if (NextNonComment->LongestObjCSelectorName == 0) +return MinIndent; benhamilton wrote: > djasper wrote: > > Does this

[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) { sammccall wrote: > why this change? > this has also been moved fr

[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 140265. MaskRay edited the summary of this revision. MaskRay added a comment. Address comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44720 Files: clangd/FuzzyMatch.cpp clangd/FuzzyMatch.h Index: clangd/FuzzyMatch.h ===

[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 140268. MaskRay added a comment. Add comment // Find the optimal prefix of Word to match Pattern. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44720 Files: clangd/FuzzyMatch.cpp clangd/FuzzyMatch.h Index: clangd/FuzzyMatch.h =

[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: > > > this looks like

[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

[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] 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] 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] 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] 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] 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] 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

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] 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

[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

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] 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

[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] 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] 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] 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 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] 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 ===

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] 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

[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] 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] 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] 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 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 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] 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] 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] 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 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] 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 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] 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 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] 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] 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] 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] 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] 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] 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] 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 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] 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 =

  1   2   >