[PATCH] D25768: [Format] Cleanup after replacing constructor body with = default

2016-10-20 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284732: [Format] Cleanup after replacing constructor body with = default (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D25768?vs=75138&id=75299#toc Repository: rL L

[clang-tools-extra] r284735 - [clang-tidy] Simplify modernize-use-default

2016-10-20 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Oct 20 10:31:34 2016 New Revision: 284735 URL: http://llvm.org/viewvc/llvm-project?rev=284735&view=rev Log: [clang-tidy] Simplify modernize-use-default Summary: clang-tidy now cleans up after replacements, so leave colon and comma removal to that. Reviewers: ang

[PATCH] D25769: [clang-tidy] Simplify modernize-use-default

2016-10-20 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284735: [clang-tidy] Simplify modernize-use-default (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D25769?vs=75140&id=75307#toc Repository: rL LLVM https://reviews.

[clang-tools-extra] r284737 - Use auto in for loop

2016-10-20 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Oct 20 10:40:34 2016 New Revision: 284737 URL: http://llvm.org/viewvc/llvm-project?rev=284737&view=rev Log: Use auto in for loop Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseDefaultCheck.cpp Modified: clang-tools-extra/trunk/clang-tidy/modernize

[clang-tools-extra] r284742 - [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-20 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Oct 20 11:08:03 2016 New Revision: 284742 URL: http://llvm.org/viewvc/llvm-project?rev=284742&view=rev Log: [clang-tidy] Add check 'readability-redundant-member-init' Summary: The check emits a warning if a member-initializer calls the member's default construct

[PATCH] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-20 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284742: [clang-tidy] Add check 'readability-redundant-member-init' (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D24339?vs=74769&id=75311#toc Repository: rL LLVM h

[PATCH] D25363: [Sema] Store a SourceRange for multi-token builtin types

2016-10-21 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: include/clang/AST/TypeLoc.h:533 +} else { + BuiltinRange.setBegin(std::min(Range.getBegin(), BuiltinRange.getBegin())); + BuiltinRange.setEnd(std::max(Range.getEnd(), BuiltinRange.getEnd())); aaron

[PATCH] D25363: [Sema] Store a SourceRange for multi-token builtin types

2016-10-21 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284885: [Sema] Store a SourceRange for multi-token builtin types (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D25363?vs=74975&id=75485#toc Repository: rL LLVM htt

r284885 - [Sema] Store a SourceRange for multi-token builtin types

2016-10-21 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Fri Oct 21 16:13:56 2016 New Revision: 284885 URL: http://llvm.org/viewvc/llvm-project?rev=284885&view=rev Log: [Sema] Store a SourceRange for multi-token builtin types Summary: clang-tidy's modernize-use-auto check uses the SourceRange of a TypeLoc when replacing th

[PATCH] D25898: [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset()

2016-10-22 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: alexfh, aaron.ballman. malcolm.parsons added a subscriber: cfe-commits. Avoid naked new in unique_ptr.reset() by using make_unique Fixes http://llvm.org/PR27383 https://reviews.llvm.org/D25898 Files: clang-tidy/modernize

[PATCH] D25898: [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset()

2016-10-23 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 75541. malcolm.parsons added a comment. Correct operator signature. Remove unused parameter. Rename method. Reformat. https://reviews.llvm.org/D25898 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp clang-tidy/modernize/MakeSmartPtrCheck.h do

[PATCH] D25898: [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset()

2016-10-23 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: test/clang-tidy/modernize-make-shared.cpp:122 + Pderived = std::shared_ptr(new Derived()); + // CHECK-MESSAGES: :[[@LINE-1]]:14: warning: use std::make_shared instead + // CHECK-FIXES: Pderived = std::make_shared(); --

[PATCH] D25925: [clang-tidy] Update cert-err58-cpp to match its new generalised form.

2016-10-24 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added a reviewer: aaron.ballman. malcolm.parsons added a subscriber: cfe-commits. Aaron modified cert-err58-cpp to include all exceptions thrown before main() Update the check to match. https://reviews.llvm.org/D25925 Files: clang-tidy/ce

[PATCH] D25363: [Sema] Store a SourceRange for multi-token builtin types

2016-10-26 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: include/clang/AST/TypeLoc.h:533 +} else { + BuiltinRange.setBegin(std::min(Range.getBegin(), BuiltinRange.getBegin())); + BuiltinRange.setEnd(std::max(Range.getEnd(), BuiltinRange.getEnd())); aaron

[PATCH] D25992: [RecursiveASTVisitor] Visit the implicit expression of a CXXDefaultArgExpr

2016-10-26 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: klimek, jdennett, alexfh. malcolm.parsons added a subscriber: cfe-commits. The matcher varDecl(hasDescendant( callExpr(hasDeclaration(functionDecl(unless(isNoThrow())) didn't match calls from default arguments because

r285239 - [RecursiveASTVisitor] Visit the implicit expression of a CXXDefaultArgExpr

2016-10-26 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Oct 26 15:39:54 2016 New Revision: 285239 URL: http://llvm.org/viewvc/llvm-project?rev=285239&view=rev Log: [RecursiveASTVisitor] Visit the implicit expression of a CXXDefaultArgExpr Summary: The matcher varDecl(hasDescendant( callExpr(hasDeclaration(function

[PATCH] D25992: [RecursiveASTVisitor] Visit the implicit expression of a CXXDefaultArgExpr

2016-10-26 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285239: [RecursiveASTVisitor] Visit the implicit expression of a CXXDefaultArgExpr (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D25992?vs=75899&id=75944#toc Reposito

[PATCH] D25898: [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset()

2016-10-26 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 75947. malcolm.parsons added a comment. Remove braces. Use Twine. https://reviews.llvm.org/D25898 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp clang-tidy/modernize/MakeSmartPtrCheck.h docs/ReleaseNotes.rst docs/clang-tidy/checks/moderni

[PATCH] D25925: [clang-tidy] Update cert-err58-cpp to match its new generalised form.

2016-10-26 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 75951. malcolm.parsons added a comment. Add more tests. https://reviews.llvm.org/D25925 Files: clang-tidy/cert/StaticObjectExceptionCheck.cpp docs/clang-tidy/checks/cert-err58-cpp.rst test/clang-tidy/cert-static-object-exception.cpp Index: te

[PATCH] D25925: [clang-tidy] Update cert-err58-cpp to match its new generalised form.

2016-10-27 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 75997. malcolm.parsons added a comment. Add tests for operator new with FIXME comment. https://reviews.llvm.org/D25925 Files: clang-tidy/cert/StaticObjectExceptionCheck.cpp docs/clang-tidy/checks/cert-err58-cpp.rst test/clang-tidy/cert-static-

[PATCH] D26032: [ASTMatcher] Add operatorNew matcher for cxxNewExpr

2016-10-27 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, klimek. malcolm.parsons added a subscriber: cfe-commits. https://reviews.llvm.org/D26032 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h lib/ASTMatchers/Dynamic/Registry.c

[PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.

2016-10-29 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. The modernize-pass-by-value check does the same thing: test/clang-tidy/misc-move-constructor-init.cpp:98:12: warning: pass by value and use std::move [modernize-pass-by-value] Positive(Movable M) : M_(M) {} ^ std::m

[PATCH] D26118: [clang-tidy] Change readability-redundant-member-init to get base type from constructor

2016-10-29 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, Eugene.Zelenko. malcolm.parsons added a subscriber: cfe-commits. Fixes PR30835 https://reviews.llvm.org/D26118 Files: clang-tidy/readability/RedundantMemberInitCheck.cpp Index: clang-tidy/readability/Redu

[PATCH] D26119: [clang-tidy] Handle bitfields in cppcoreguidelines-pro-type-member-init

2016-10-29 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. Herald added a subscriber: nemanjai. Unnamed bitfields cannot be initialized. Bitfields cannot be in-class initialized. https://reviews.llvm.org/D26119

[PATCH] D25316: [clang-tidy] Enhance modernize-use-auto to casts

2016-10-29 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. ping. https://reviews.llvm.org/D25316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26032: [ASTMatcher] Add operatorNew matcher for cxxNewExpr

2016-10-29 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76316. malcolm.parsons added a comment. Extend hasDeclaration instead. https://reviews.llvm.org/D26032 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h include/clang/ASTMatchers/ASTMatchersInternal.h unittests

[PATCH] D25925: [clang-tidy] Update cert-err58-cpp to match its new generalised form.

2016-10-29 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76318. malcolm.parsons added a comment. Check calls to operator new. https://reviews.llvm.org/D25925 Files: clang-tidy/cert/StaticObjectExceptionCheck.cpp docs/clang-tidy/checks/cert-err58-cpp.rst test/clang-tidy/cert-static-object-exception.c

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

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, alexfh, klimek. malcolm.parsons added subscribers: cfe-commits, danielmarjamaki. Herald added a subscriber: mgorny. Fixes PR27872 https://reviews.llvm.org/D26138 Files: clang-tidy/modernize/CMakeLists.txt

[PATCH] D25316: [clang-tidy] Enhance modernize-use-auto to casts

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76404. malcolm.parsons added a comment. Change doc to say "C-style casts". https://reviews.llvm.org/D25316 Files: clang-tidy/modernize/UseAutoCheck.cpp clang-tidy/modernize/UseAutoCheck.h docs/ReleaseNotes.rst docs/clang-tidy/checks/moderniz

[clang-tools-extra] r285579 - [clang-tidy] Enhance modernize-use-auto to casts

2016-10-31 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Oct 31 09:43:37 2016 New Revision: 285579 URL: http://llvm.org/viewvc/llvm-project?rev=285579&view=rev Log: [clang-tidy] Enhance modernize-use-auto to casts Summary: Extend modernize-use-auto to cases when a variable is assigned with a cast. e.g. Type *Ptr1 = dy

[clang-tools-extra] r285581 - Fix link to check

2016-10-31 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Oct 31 09:48:49 2016 New Revision: 285581 URL: http://llvm.org/viewvc/llvm-project?rev=285581&view=rev Log: Fix link to check Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst URL: http://llvm.or

[PATCH] D25316: [clang-tidy] Enhance modernize-use-auto to casts

2016-10-31 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285579: [clang-tidy] Enhance modernize-use-auto to casts (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D25316?vs=76404&id=76405#toc Repository: rL LLVM https://rev

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

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76410. malcolm.parsons added a comment. Add to release notes. https://reviews.llvm.org/D26138 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseDeleteCheck.cpp clang-tidy/moderniz

[clang-tools-extra] r285583 - Add -frtti for Windows buildbot.

2016-10-31 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Oct 31 10:15:00 2016 New Revision: 285583 URL: http://llvm.org/viewvc/llvm-project?rev=285583&view=rev Log: Add -frtti for Windows buildbot. Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-use-auto-cast-remove-stars.cpp clang-tools-extra/trun

[PATCH] D25898: [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset()

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76418. malcolm.parsons added a comment. Rebase. https://reviews.llvm.org/D25898 Files: clang-tidy/modernize/MakeSmartPtrCheck.cpp clang-tidy/modernize/MakeSmartPtrCheck.h docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-make-shared.rst

[clang-tools-extra] r285589 - [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset()

2016-10-31 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Oct 31 10:48:01 2016 New Revision: 285589 URL: http://llvm.org/viewvc/llvm-project?rev=285589&view=rev Log: [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset() Summary: Avoid naked new in unique_ptr.reset() by using make_unique Fixes http://l

[PATCH] D25898: [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset()

2016-10-31 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285589: [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset() (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D25898?vs=76418&id=76419#toc Repository:

[PATCH] D25659: [clang-tidy] Avoid running aliased checks twice

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. ping. https://reviews.llvm.org/D25659 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D26138#583561, @alexfh wrote: > "Use delete" makes me think of the `delete` operator. I'd suggest one of > these names: I chose modernize-use-delete as there's already modernize-use-default. "Use default" makes me think of the `defau

[PATCH] D25406: Fix doubled whitespace in modernize-use-auto fixit

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. ping @alexfh. https://reviews.llvm.org/D25406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76431. malcolm.parsons added a comment. Rename to modernize-use-equals-delete. Add comment. https://reviews.llvm.org/D26138 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseEqualsD

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

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76433. malcolm.parsons added a comment. Sort headers and CMakeLists.txt. https://reviews.llvm.org/D26138 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseEqualsDeleteCheck.cpp cl

[PATCH] D25316: [clang-tidy] Enhance modernize-use-auto to casts

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:404 +[](const Expr *Expr) { return Expr->getType(); }, +"use auto when initializing with new to avoid " +"duplicating the type name");

[clang-tools-extra] r285601 - Add modernize-use-auto tests for casts inside macros

2016-10-31 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Oct 31 12:17:45 2016 New Revision: 285601 URL: http://llvm.org/viewvc/llvm-project?rev=285601&view=rev Log: Add modernize-use-auto tests for casts inside macros Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-use-auto-cast-remove-stars.cpp cl

[PATCH] D25316: [clang-tidy] Enhance modernize-use-auto to casts

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D25316#583651, @aaron.ballman wrote: > Does this check properly work in the presence of macros? Those are sometimes > more common in casting operations, so a few explicit tests would be good > (those tests could be follow-on work if i

[PATCH] D25316: [clang-tidy] Enhance modernize-use-auto to casts

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:404 +[](const Expr *Expr) { return Expr->getType(); }, +"use auto when initializing with new to avoid " +"duplicating the type name");

r285644 - [ASTMatcher] Add CXXNewExpr support to hasDeclaration

2016-10-31 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Oct 31 17:04:07 2016 New Revision: 285644 URL: http://llvm.org/viewvc/llvm-project?rev=285644&view=rev Log: [ASTMatcher] Add CXXNewExpr support to hasDeclaration Reviewers: sbenza, lukasza, aaron.ballman, klimek Subscribers: lukasza, sbenza, cfe-commits Differe

[PATCH] D26032: [ASTMatcher] Add CXXNewExpr support to hasDeclaration

2016-10-31 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285644: [ASTMatcher] Add CXXNewExpr support to hasDeclaration (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26032?vs=76316&id=76490#toc Repository: rL LLVM https:

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

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseEqualsDeleteCheck.cpp:29 +cxxMethodDecl( +anyOf(isCopyAssignmentOperator(), isMoveAssignmentOperator())), +cxxDestructorDecl())); aaron.ballman wrot

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

2016-10-31 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76493. malcolm.parsons added a comment. Fix comment. Rename variable. Use global. https://reviews.llvm.org/D26138 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseEqualsDeleteCheck

[clang-tools-extra] r285653 - [clang-tidy] Update cert-err58-cpp to match its new generalised form.

2016-10-31 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Oct 31 17:47:04 2016 New Revision: 285653 URL: http://llvm.org/viewvc/llvm-project?rev=285653&view=rev Log: [clang-tidy] Update cert-err58-cpp to match its new generalised form. Summary: Aaron modified cert-err58-cpp to include all exceptions thrown before main()

[PATCH] D25925: [clang-tidy] Update cert-err58-cpp to match its new generalised form.

2016-10-31 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285653: [clang-tidy] Update cert-err58-cpp to match its new generalised form. (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D25925?vs=76318&id=76494#toc Repository:

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

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76529. malcolm.parsons added a comment. Rename modernize-use-default to modernize-use-equals-default https://reviews.llvm.org/D26138 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/U

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

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseEqualsDeleteCheck.cpp:29 +cxxMethodDecl( +anyOf(isCopyAssignmentOperator(), isMoveAssignmentOperator())), +cxxDestructorDecl())); aaron.ballman wrot

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

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76557. malcolm.parsons added a comment. Reword diagnostic. https://reviews.llvm.org/D26138 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseDefaultCheck.cpp clang-tidy/modernize/

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

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76558. malcolm.parsons added a comment. Add FIXME comment. https://reviews.llvm.org/D26138 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseDefaultCheck.cpp clang-tidy/modernize/

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

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76561. malcolm.parsons added a comment. Add quick hack to make methods public. Cleanup around replacements should be enhanced with rules to remove empty private/protected/public sections. private: public: -> public: public: private: -> private: https

[PATCH] D26205: [clang-query] Fix Clang-tidy readability-redundant-string-cstr warnings

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: pcc, dblaikie. malcolm.parsons added a subscriber: cfe-commits. https://reviews.llvm.org/D26205 Files: clang-query/tool/ClangQuery.cpp Index: clang-query/tool/ClangQuery.cpp ===

[PATCH] D26206: Fix Clang-tidy readability-redundant-string-cstr warnings

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, mehdi_amini, dblaikie. malcolm.parsons added a subscriber: cfe-commits. https://reviews.llvm.org/D26206 Files: lib/ARCMigrate/FileRemapper.cpp lib/CodeGen/CGObjCGNU.cpp lib/CodeGen/TargetInfo.cpp lib/Dr

[PATCH] D26205: [clang-query] Fix Clang-tidy readability-redundant-string-cstr warnings

2016-11-01 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285731: [clang-query] Fix Clang-tidy readability-redundant-string-cstr warnings (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26205?vs=76597&id=76622#toc Repository:

[clang-tools-extra] r285731 - [clang-query] Fix Clang-tidy readability-redundant-string-cstr warnings

2016-11-01 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Nov 1 15:07:05 2016 New Revision: 285731 URL: http://llvm.org/viewvc/llvm-project?rev=285731&view=rev Log: [clang-query] Fix Clang-tidy readability-redundant-string-cstr warnings Reviewers: pcc, dblaikie Subscribers: cfe-commits Differential Revision: https://

[PATCH] D25659: [clang-tidy] Avoid running aliased checks twice

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D25659#584986, @aaron.ballman wrote: > (1) I think that the aliases and the originals should be listed with > -list-checks, because these are names under which the checks may be run (and > sometimes the name may even imply different s

[PATCH] D26118: [clang-tidy] Change readability-redundant-member-init to get base type from constructor

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:57 "initializer for base class %0 is redundant") - << Init->getTypeSourceInfo()->getType() + << Construct->getType() << FixItHint::Creat

[clang-tools-extra] r285752 - [clang-tidy] Handle bitfields in cppcoreguidelines-pro-type-member-init

2016-11-01 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Nov 1 16:26:53 2016 New Revision: 285752 URL: http://llvm.org/viewvc/llvm-project?rev=285752&view=rev Log: [clang-tidy] Handle bitfields in cppcoreguidelines-pro-type-member-init Summary: Unnamed bitfields cannot be initialized. Bitfields cannot be in-class init

[PATCH] D26119: [clang-tidy] Handle bitfields in cppcoreguidelines-pro-type-member-init

2016-11-01 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285752: [clang-tidy] Handle bitfields in cppcoreguidelines-pro-type-member-init (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26119?vs=76313&id=76635#toc Repository:

[PATCH] D25659: [clang-tidy] Avoid running aliased checks twice

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D25659#585234, @aaron.ballman wrote: > In https://reviews.llvm.org/D25659#585154, @malcolm.parsons wrote: > > > In https://reviews.llvm.org/D25659#584986, @aaron.ballman wrote: > > > > > (1) I think that the aliases and the originals sh

[PATCH] D12839: Extend MoveConstructorInitCheck to also flag constructor arguments passed by value and can be moved assigned to fields.

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D12839#585256, @aaron.ballman wrote: > This overlap is unfortunate. misc-move-constructor-init is for move > constructor initializer lists which accidentally initialize a member or base > through a copy constructor rather than a move

[PATCH] D26206: Fix Clang-tidy readability-redundant-string-cstr warnings

2016-11-01 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76642. malcolm.parsons added a comment. clang-format https://reviews.llvm.org/D26206 Files: lib/ARCMigrate/FileRemapper.cpp lib/CodeGen/CGObjCGNU.cpp lib/CodeGen/TargetInfo.cpp lib/Driver/Driver.cpp lib/Driver/Job.cpp lib/Driver/Tools.cp

r285799 - Fix Clang-tidy readability-redundant-string-cstr warnings

2016-11-02 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Nov 2 05:39:27 2016 New Revision: 285799 URL: http://llvm.org/viewvc/llvm-project?rev=285799&view=rev Log: Fix Clang-tidy readability-redundant-string-cstr warnings Reviewers: aaron.ballman, mehdi_amini, dblaikie Subscribers: cfe-commits Differential Revision:

[PATCH] D26218: [clang-tidy] Ignore notes along with a warning when processing NOLINT

2016-11-02 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:312 DiagnosticsEngine::Level DiagLevel, const Diagnostic &Info) { + static bool ShouldIgnoreNotes = false; + if (ShouldIgnoreNotes && DiagLevel == DiagnosticsEngine::Note) ---

[PATCH] D26206: Fix Clang-tidy readability-redundant-string-cstr warnings

2016-11-02 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285799: Fix Clang-tidy readability-redundant-string-cstr warnings (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26206?vs=76642&id=76685#toc Repository: rL LLVM ht

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

2016-11-02 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76729. malcolm.parsons added a comment. Take out renaming of modernize-use-default. https://reviews.llvm.org/D26138 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseEqualsDeleteChe

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

2016-11-02 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseEqualsDeleteCheck.cpp:58 + << FixItHint::CreateInsertion(StartLoc, "public: ") + << FixItHint::CreateInsertion(AfterLoc, " private:"); +} aaron.ballman wrote: > I am on the fence

[PATCH] D26118: [clang-tidy] Change readability-redundant-member-init to get base type from constructor

2016-11-02 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:57 "initializer for base class %0 is redundant") - << Init->getTypeSourceInfo()->getType() + << Construct->getType() << FixItHint::Creat

[PATCH] D26218: [clang-tidy] Ignore notes along with a warning when processing NOLINT

2016-11-02 Thread Malcolm Parsons via cfe-commits
malcolm.parsons accepted this revision. malcolm.parsons added a comment. This revision is now accepted and ready to land. LGTM, with typo below fixed. Comment at: test/clang-tidy/nolint.cpp:36 +} +// CHECK-NOT: header.h:{{.*}} warning: The left operand of '>' is a garbage valu

[clang-tools-extra] r285861 - [clang-tidy] Suppress notes for warnings that were ignored

2016-11-02 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Nov 2 16:14:22 2016 New Revision: 285861 URL: http://llvm.org/viewvc/llvm-project?rev=285861&view=rev Log: [clang-tidy] Suppress notes for warnings that were ignored Fixes PR30565. Patch by Nikita Kakuev Added: clang-tools-extra/trunk/test/clang-tidy/Input

[PATCH] D26218: [clang-tidy] Ignore notes along with a warning when processing NOLINT

2016-11-02 Thread Malcolm Parsons via cfe-commits
malcolm.parsons closed this revision. malcolm.parsons added a comment. Committed as r285861. Thanks! https://reviews.llvm.org/D26218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26118: [clang-tidy] Change readability-redundant-member-init to get base type from constructor

2016-11-02 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76797. malcolm.parsons added a comment. Add test. https://reviews.llvm.org/D26118 Files: clang-tidy/readability/RedundantMemberInitCheck.cpp test/clang-tidy/readability-redundant-member-init.cpp Index: test/clang-tidy/readability-redundant-mem

[PATCH] D25439: Fixed column shift when formatting line containing bit shift operators

2016-11-03 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. Do you have commit access? https://reviews.llvm.org/D25439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26276: Remove redundant calls to std::string::data()

2016-11-03 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, mehdi_amini, dblaikie. malcolm.parsons added a subscriber: cfe-commits. Herald added a subscriber: klimek. https://reviews.llvm.org/D26276 Files: lib/Parse/ParseObjc.cpp lib/Tooling/Core/Replacement.cpp I

[PATCH] D26279: [clang-tidy] Handle data() in readability-redundant-string-cstr

2016-11-03 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: etienneb, alexfh, aaron.ballman. malcolm.parsons added a subscriber: cfe-commits. std::string::data() and std::string::c_str() are equivalent. Enhance the readability-redundant-string-cstr check to also handle calls to data().

r285899 - Remove redundant calls to std::string::data()

2016-11-03 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 3 07:25:51 2016 New Revision: 285899 URL: http://llvm.org/viewvc/llvm-project?rev=285899&view=rev Log: Remove redundant calls to std::string::data() Reviewers: aaron.ballman, mehdi_amini, dblaikie Subscribers: klimek, cfe-commits Differential Revision: htt

[PATCH] D26276: Remove redundant calls to std::string::data()

2016-11-03 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285899: Remove redundant calls to std::string::data() (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26276?vs=76835&id=76846#toc Repository: rL LLVM https://review

[PATCH] D26279: [clang-tidy] Handle data() in readability-redundant-string-cstr

2016-11-03 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D26279#586641, @aaron.ballman wrote: > I like the idea, but would point out that `data()` and `c_str()` had > different semantics once upon a time. I'm aware of this, but it doesn't affect whether the call is redundant. https://rev

[PATCH] D26279: [clang-tidy] Handle data() in readability-redundant-string-cstr

2016-11-03 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76848. malcolm.parsons added a comment. Add to release notes. Add to documentation of check. https://reviews.llvm.org/D26279 Files: clang-tidy/readability/RedundantStringCStrCheck.cpp docs/ReleaseNotes.rst docs/clang-tidy/checks/readability-re

[clang-tools-extra] r285901 - [clang-tidy] Handle data() in readability-redundant-string-cstr

2016-11-03 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 3 07:56:48 2016 New Revision: 285901 URL: http://llvm.org/viewvc/llvm-project?rev=285901&view=rev Log: [clang-tidy] Handle data() in readability-redundant-string-cstr Summary: std::string::data() and std::string::c_str() are equivalent. Enhance the readabili

[PATCH] D26279: [clang-tidy] Handle data() in readability-redundant-string-cstr

2016-11-03 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285901: [clang-tidy] Handle data() in readability-redundant-string-cstr (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26279?vs=76848&id=76851#toc Repository: rL LL

[PATCH] D26166: [Sema] Don't issue analysis-based warnings when a fatal error has occurred

2016-11-03 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: cfe/trunk/lib/Sema/SemaTemplateInstantiate.cpp:213 + // Don't allow further instantiation if a fatal error and an uncompilable + // error have occcured. Any diagnostics we might have raised will not be + // visible, and we do

r285934 - Fixed column shift when formatting line containing bit shift operators

2016-11-03 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 3 11:57:30 2016 New Revision: 285934 URL: http://llvm.org/viewvc/llvm-project?rev=285934&view=rev Log: Fixed column shift when formatting line containing bit shift operators Summary: During clang-format source lexing >> and << operators are split and treated

[PATCH] D25439: Fixed column shift when formatting line containing bit shift operators

2016-11-03 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285934: Fixed column shift when formatting line containing bit shift operators (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D25439?vs=75635&id=76869#toc Repository:

[clang-tools-extra] r285999 - [clang-tidy] Fixed readability-else-after-return for cascade statements

2016-11-04 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Fri Nov 4 11:32:14 2016 New Revision: 285999 URL: http://llvm.org/viewvc/llvm-project?rev=285999&view=rev Log: [clang-tidy] Fixed readability-else-after-return for cascade statements Summary: Fix generated by this check changed program semantics in the case where 'i

[PATCH] D26125: [clang-tidy] Fixed readability-else-after-return for cascade statements

2016-11-04 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285999: [clang-tidy] Fixed readability-else-after-return for cascade statements (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26125?vs=76604&id=76924#toc Repository:

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

2016-11-05 Thread Malcolm Parsons via cfe-commits
malcolm.parsons planned changes to this revision. malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseEqualsDeleteCheck.cpp:58 + << FixItHint::CreateInsertion(StartLoc, "public: ") + << FixItHint::CreateInsertion(AfterLoc, " private:"); +} ---

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

2016-11-05 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 76971. malcolm.parsons added a comment. Check for non-public deleted methods. Remove imperfect FixItHint. Add FIXME comments. https://reviews.llvm.org/D26138 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp

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

2016-11-08 Thread Malcolm Parsons via cfe-commits
On 8 November 2016 at 08:28, Alexander Kornienko via cfe-commits wrote: > [clang-tidy] clang-analyzer-alpha* checks are not registered, so there's no > need to disable them Oh, I was using clang-analyzer-alpha.cplusplus.VirtualCall. Should clang-tidy have an option to enable experimental checks

[PATCH] D25659: [clang-tidy] Avoid running aliased checks twice

2016-11-08 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D25659#588663, @alexfh wrote: > In https://reviews.llvm.org/D25659#588658, @alexfh wrote: > > > I think, silently choosing one of the checks may be confusing and > > counter-intuitive. Should we just warn in case we see the same check

[PATCH] D26118: [clang-tidy] Change readability-redundant-member-init to get base type from constructor

2016-11-08 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:57 "initializer for base class %0 is redundant") - << Init->getTypeSourceInfo()->getType() + << Construct->getType() << FixItHint::Creat

[PATCH] D25659: [clang-tidy] Avoid running aliased checks twice

2016-11-08 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D25659#588658, @alexfh wrote: > I think, silently choosing one of the checks may be confusing and > counter-intuitive. Should we just warn in case we see the same check enabled > by multiple aliases? A warning is useful if the check

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

2016-11-08 Thread Malcolm Parsons via cfe-commits
On 8 November 2016 at 16:59, Alexander Kornienko wrote: > On Nov 8, 2016 2:11 AM, "Malcolm Parsons" wrote: >> Oh, I was using clang-analyzer-alpha.cplusplus.VirtualCall. >> >> Should clang-tidy have an option to enable experimental checks? > > I'd instead ask Static Analyzer folks if they can gra

[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 added a comment. In https://reviews.llvm.org/D26418#590383, @nkakuev wrote: > The warning is caused by a third-party code, but header filter won't help you > to suppress it since it now relates to your sources. The header filter suppresses the warning location, but the note loc

<    1   2   3   4   >