[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

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

[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

[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

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=rev Log: Set dso_local when clearing dllimport. Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp cfe/trunk/test/CodeGenCXX/dllimport.cpp Modified:

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

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

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

[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=140287#toc

[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 ) override; +private: void memAllocFuncFix(StringRef Name, Please insert empty line above.

[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

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

[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

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=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 and

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

[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

[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

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

[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

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

[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

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

[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 ) { Please make it static. Same for other functions.

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

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=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:

[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

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

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

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=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://2530

[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

[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

[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

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

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=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:

[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

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=rev Log: [analyzer] Better pretty-printing of regions in exploded graph Differential Revision: https://reviews.llvm.org/D45010 Modified:

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

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

[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

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

[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

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

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

[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] 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 ) { + const auto *FuncExpr =

[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=rev Log: [clangd] Fix repeated word typo. NFC Modified: clang-tools-extra/trunk/clangd/JSONExpr.cpp clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp Modified:

[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

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

[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

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

[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

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

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

[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] 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 <<(std::ostream &, const CompletionItem &); I think raw_ostream should work fine here, it's what we've done elsewhere. Is there a

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

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

[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

[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

[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

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

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

[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

[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

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

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

[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=140203#toc Repository: rC Clang

[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

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

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

[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

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

[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

[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

[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

[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

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=rev Log: Hoist MethodVFTableLocation out of MicrosoftVTableContext, NFC This allows forward declaring it so that we can add it to MicrosoftMangleContext::mangleVirtualMemPtrThunk

[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

[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

  1   2   >