[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-09 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: include/clang/Sema/DeclSpec.h:1314 for (unsigned I = 0; I < NumParams; ++I) { -delete Params[I].DefaultArgTokens; -Params[I].DefaultArgTokens = nullptr; +Params[I].DefaultArgTokens.release();

[PATCH] D26418: [clang-tidy] Add '-suppress-checks-filter' option to suppress diagnostics from certain files

2016-11-09 Thread Malcolm Parsons via cfe-commits
malcolm.parsons resigned from this revision. malcolm.parsons removed a reviewer: malcolm.parsons. malcolm.parsons added a comment. In https://reviews.llvm.org/D26418#590476, @nkakuev wrote: > On a second thought, ignoring note locations might be a good enough solution > for me. > How should I d

[PATCH] D26453: [clang-tidy] Remove duplicated check from move-constructor-init

2016-11-09 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, alexfh, flx. malcolm.parsons added a subscriber: cfe-commits. An addition to the move-constructor-init check was duplicating the modernize-pass-by-value check. Remove the additional check and UseCERTSemantics op

[PATCH] D26453: [clang-tidy] Remove duplicated check from move-constructor-init

2016-11-09 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D26453#590636, @flx wrote: > Is the modernize-pass-by-value check configurable in a way to only trigger > when copied constructor arguments are not moved? No; good idea. https://reviews.llvm.org/D26453 __

[PATCH] D26453: [clang-tidy] Remove duplicated check from move-constructor-init

2016-11-09 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 77358. malcolm.parsons added a comment. Update comment in performance-unnecessary-value-param check. https://reviews.llvm.org/D26453 Files: clang-tidy/cert/CERTTidyModule.cpp clang-tidy/misc/MoveConstructorInitCheck.cpp clang-tidy/misc/MoveCon

[PATCH] D26453: [clang-tidy] Remove duplicated check from move-constructor-init

2016-11-09 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 77371. malcolm.parsons updated the summary for this revision. malcolm.parsons added a comment. Add ValuesOnly option to modernize-pass-by-value. https://reviews.llvm.org/D26453 Files: clang-tidy/cert/CERTTidyModule.cpp clang-tidy/misc/MoveConstr

[PATCH] D26453: [clang-tidy] Remove duplicated check from move-constructor-init

2016-11-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 77456. malcolm.parsons added a comment. Store new option. https://reviews.llvm.org/D26453 Files: clang-tidy/cert/CERTTidyModule.cpp clang-tidy/misc/MoveConstructorInitCheck.cpp clang-tidy/misc/MoveConstructorInitCheck.h clang-tidy/modernize/

Re: [clang-tools-extra] r286222 - [clang-tidy] clang-analyzer-alpha* checks are not registered, so there's no need to disable them

2016-11-10 Thread Malcolm Parsons via cfe-commits
On 9 November 2016 at 18:50, Devin Coughlin wrote: > We agree that this is a valuable checker and are committed to getting it out > of alpha. This check is in alpha because: > > a) The diagnostic experience is not very good. It reports a call path > directly in the diagnostic message (for examp

[PATCH] D23130: [Clang-tidy] Add a check for definitions in the global namespace.

2016-11-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/google/GlobalNamesCheck.cpp:96 +// main() should be in the global namespace. +if (FDecl->isMain()) + return; Should `isMSVCRTEntryPoint()` be checked too? https://reviews.llvm.org/D23130

[clang-tools-extra] r286466 - [clang-tidy] Add missing meta refresh for cert-msc30-c doc. NFC

2016-11-10 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 10 10:19:17 2016 New Revision: 286466 URL: http://llvm.org/viewvc/llvm-project?rev=286466&view=rev Log: [clang-tidy] Add missing meta refresh for cert-msc30-c doc. NFC Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/cert-msc30-c.rst Modified: cl

[clang-tools-extra] r286472 - [clang-tidy] Add modernize-use-equals-delete check

2016-11-10 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 10 10:46:59 2016 New Revision: 286472 URL: http://llvm.org/viewvc/llvm-project?rev=286472&view=rev Log: [clang-tidy] Add modernize-use-equals-delete check Summary: Fixes PR27872 Reviewers: klimek, hokein, alexfh, aaron.ballman Subscribers: Prazek, Eugene.Ze

[PATCH] D26138: [clang-tidy] Add modernize-use-equals-delete check

2016-11-10 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL286472: [clang-tidy] Add modernize-use-equals-delete check (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26138?vs=76971&id=77500#toc Repository: rL LLVM https://r

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-11-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, alexfh, angelgarcia. malcolm.parsons added a subscriber: cfe-commits. Herald added a subscriber: mgorny. https://reviews.llvm.org/D26511 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/Moder

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-11-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/ModernizeTidyModule.cpp:58 "modernize-use-bool-literals"); -CheckFactories.registerCheck("modernize-use-default"); + CheckFactories.registerCheck("modernize-use-equals-default"); CheckFa

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-11-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D26511#592665, @Prazek wrote: > It is introduced because of "modernize-use-delete" was too ambiguous because > of operator delete, so it was changed to "modernize-use-equals-delete". But > this case is not ambiguous at all, so I don't

[PATCH] D26511: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-11-11 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 77615. malcolm.parsons added a comment. Fix sorting. Mention in release notes. https://reviews.llvm.org/D26511 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseDefaultCheck.cpp c

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-11 Thread Malcolm Parsons via cfe-commits
malcolm.parsons accepted this revision. malcolm.parsons added a reviewer: malcolm.parsons. malcolm.parsons added a comment. This revision is now accepted and ready to land. Your email went in my spam folder. LGTM. Will commit later. https://reviews.llvm.org/D26435

Re: r286628 - [ASTMatchers] Fix a typo in cStyleCastExpr() docs. NFC.

2016-11-11 Thread Malcolm Parsons via cfe-commits
On 11 November 2016 at 20:29, Artem Dergachev via cfe-commits wrote: > URL: http://llvm.org/viewvc/llvm-project?rev=286628&view=rev > Log: > [ASTMatchers] Fix a typo in cStyleCastExpr() docs. NFC. > > Modified: > cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Please change docs/LibASTMatch

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-12 Thread Malcolm Parsons via cfe-commits
malcolm.parsons requested changes to this revision. malcolm.parsons added a comment. This revision now requires changes to proceed. Expected Passes: 4977 Expected Failures : 18 Unsupported Tests : 25 Unexpected Failures: 5037 Needs more work? https://reviews.llvm.org/D26435 ___

[PATCH] D26582: [clang-tidy] Handle template instantiations in modenize-use-default check

2016-11-12 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, alexfh. malcolm.parsons added a subscriber: cfe-commits. Duplicate fixes were being created for explicit template instantiations of out-of-line constructors or destructors. Fixes PR30921. https://reviews.llvm

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-13 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a subscriber: malcolm.parsons. Comment at: docs/clang-tidy/checks/misc-sizeof-expression.rst:16 @@ +15,3 @@ +A common mistake is to query the ``sizeof`` of an integer literal. This is +equivalent to query the size of it's type (probably ``int``). The intent o

<    1   2   3   4