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

2016-09-08 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. How do I add FixIt hints? They should be simple removals, but how do I decide whether to remove the following comma, preceding comma or preceding colon? Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:33 @@ +32,3 @@ + const auto

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

2016-09-09 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 70797. malcolm.parsons added a comment. Improve comments Improve doc Add tests Simplify implementation https://reviews.llvm.org/D24339 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/rea

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

2016-09-09 Thread Malcolm Parsons via cfe-commits
malcolm.parsons marked 15 inline comments as done. Comment at: clang-tidy/readability/RedundantMemberInitCheck.cpp:34 @@ +33,3 @@ + + if (Construct->getNumArgs() == 0 || + Construct->getArg(0)->isDefaultArgument()) { Other forms of initialization are not CXX

[PATCH] D24444: [clang-tidy] modernize-use-default default constructor bugfix

2016-09-11 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added a reviewer: klimek. malcolm.parsons added subscribers: cfe-commits, klimek, alexfh. Only member initializers that are written should prevent using '= default' on a default constructor. https://reviews.llvm.org/D2 Files: clang-tid

[PATCH] D24500: [clang-tidy] Bugfix for readability-redundant-control-flow check

2016-09-13 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: sbenza, aaron.ballman, alexfh. malcolm.parsons added subscribers: Eugene.Zelenko, cfe-commits, beanz. This check did not create FixItHints when the statement before the redundant control flow was not followed by a semicolon.

Re: [PATCH] D24500: [clang-tidy] Bugfix for readability-redundant-control-flow check

2016-09-14 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. I didn't report a bug for this issue, and there isn't an existing one. https://reviews.llvm.org/D24500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D24652: [clang-tidy] readability-avoid-const-params-in-decls template instantiation bugfix

2016-09-16 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: alexfh, aaron.ballman, hokein. malcolm.parsons added a subscriber: cfe-commits. Bugfix for 30398. Don't warn for template instantiations https://reviews.llvm.org/D24652 Files: clang-tidy/readability/AvoidConstParamsInDecl

Re: [PATCH] D24652: [clang-tidy] readability-avoid-const-params-in-decls template instantiation bugfix

2016-09-16 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/AvoidConstParamsInDecls.cpp:41 @@ -40,1 +40,3 @@ + unless(cxxMethodDecl(ofClass(cxxRecordDecl(anyOf( + isLambda(), ast_matchers::isTemplateInstantiation()),

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

2016-09-16 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 71622. malcolm.parsons added a comment. Herald added a subscriber: mgorny. Handle unions and templated classes. Add FixItHints (depends on https://reviews.llvm.org/D24572). https://reviews.llvm.org/D24339 Files: clang-tidy/readability/CMakeLists.t

r291771 - Tracking exception specification source locations

2017-01-12 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Jan 12 10:11:28 2017 New Revision: 291771 URL: http://llvm.org/viewvc/llvm-project?rev=291771&view=rev Log: Tracking exception specification source locations Summary: We do not currently track the source locations for exception specifications such that their sour

[clang-tools-extra] r291796 - [clang-tidy] Fix check for trivially copyable types in modernize-pass-by-value

2017-01-12 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Jan 12 13:20:35 2017 New Revision: 291796 URL: http://llvm.org/viewvc/llvm-project?rev=291796&view=rev Log: [clang-tidy] Fix check for trivially copyable types in modernize-pass-by-value Summary: rL270567 excluded trivially copyable types from being moved by mode

r291905 - [Sema] Add warning for unused lambda captures

2017-01-13 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Fri Jan 13 09:01:06 2017 New Revision: 291905 URL: http://llvm.org/viewvc/llvm-project?rev=291905&view=rev Log: [Sema] Add warning for unused lambda captures Summary: Warn when a lambda explicitly captures something that is not used in its body. The warning is part

r291939 - Remove unused lambda captures. NFC

2017-01-13 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Fri Jan 13 12:55:32 2017 New Revision: 291939 URL: http://llvm.org/viewvc/llvm-project?rev=291939&view=rev Log: Remove unused lambda captures. NFC Modified: cfe/trunk/docs/ReleaseNotes.rst cfe/trunk/lib/AST/CXXInheritance.cpp cfe/trunk/lib/AST/MicrosoftMa

[clang-tools-extra] r291940 - Remove unused lambda captures. NFC

2017-01-13 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Fri Jan 13 12:56:04 2017 New Revision: 291940 URL: http://llvm.org/viewvc/llvm-project?rev=291940&view=rev Log: Remove unused lambda captures. NFC Modified: clang-tools-extra/trunk/clang-tidy/ClangTidy.cpp Modified: clang-tools-extra/trunk/clang-tidy/ClangTidy.c

[clang-tools-extra] r291941 - Remove unused lambda captures. NFC

2017-01-13 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Fri Jan 13 13:02:50 2017 New Revision: 291941 URL: http://llvm.org/viewvc/llvm-project?rev=291941&view=rev Log: Remove unused lambda captures. NFC Modified: clang-tools-extra/trunk/unittests/clang-move/ClangMoveTests.cpp Modified: clang-tools-extra/trunk/unittes

Re: [PATCH] D28467: [Sema] Add warning for unused lambda captures

2017-01-19 Thread Malcolm Parsons via cfe-commits
On 19 January 2017 at 03:47, Aaron Ballman wrote: > It is not used in an unevaluated context -- that is a bug. It is an evaluated expression, but is it odr-used? C++14 [basic.def.odr] p3: A variable x whose name appears as a potentially-evaluated expression ex is odr-used by ex unless applying

r292477 - [docs] Tell Doxygen to expand LLVM_ALIGNAS to nothing

2017-01-19 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Jan 19 03:27:45 2017 New Revision: 292477 URL: http://llvm.org/viewvc/llvm-project?rev=292477&view=rev Log: [docs] Tell Doxygen to expand LLVM_ALIGNAS to nothing Summary: Docs for clang::Decl and clang::TemplateSpecializationType have not been generated since LLV

Re: [PATCH] D28467: [Sema] Add warning for unused lambda captures

2017-01-19 Thread Malcolm Parsons via cfe-commits
On 19 January 2017 at 12:49, Aaron Ballman wrote: > You are correct, it is not an odr use. MSVC is wrong to require the capture. Should the warning be rephrased? -- Malcolm Parsons ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

Re: [PATCH] D28467: [Sema] Add warning for unused lambda captures

2017-01-19 Thread Malcolm Parsons via cfe-commits
On 19 January 2017 at 13:16, Aaron Ballman wrote: > I wasn't thinking about that kind of odr-unuse when reviewing your > patch, so I am starting to think that perhaps it's not worth > distinguishing unevaluated contexts or not in the diagnostic. :-( If > we could do it, then great (we seem to be a

[clang-tools-extra] r292484 - [docs] Tell Doxygen to expand LLVM_ALIGNAS to nothing

2017-01-19 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Jan 19 07:38:19 2017 New Revision: 292484 URL: http://llvm.org/viewvc/llvm-project?rev=292484&view=rev Log: [docs] Tell Doxygen to expand LLVM_ALIGNAS to nothing Summary: Docs for clang::Decl and clang::TemplateSpecializationType have not been generated since LLV

r292498 - [Sema] Reword unused lambda capture warning

2017-01-19 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Jan 19 11:19:22 2017 New Revision: 292498 URL: http://llvm.org/viewvc/llvm-project?rev=292498&view=rev Log: [Sema] Reword unused lambda capture warning Summary: The warning doesn't know why the variable was looked up but not odr-used, so reword it to not claim th

r292595 - Fix documentation typo.

2017-01-20 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Fri Jan 20 03:54:26 2017 New Revision: 292595 URL: http://llvm.org/viewvc/llvm-project?rev=292595&view=rev Log: Fix documentation typo. Modified: cfe/trunk/docs/LibASTMatchersReference.html cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Modified: cfe/trun

Re: r291905 - [Sema] Add warning for unused lambda captures

2017-01-22 Thread Malcolm Parsons via cfe-commits
On 20 January 2017 at 21:32, Nico Weber wrote: > This warns about code like > > constexpr int foo = 4; > [&foo]() { use(foo); } > > That's correct, but removing &foo then makes MSVC complain about this code > like "error C3493: 'foo' cannot be implicitly captured because no default > capture m

[clang-tools-extra] r292786 - [clang-tidy] Ignore implicit functions in performance-unnecessary-value-param

2017-01-23 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Jan 23 07:18:08 2017 New Revision: 292786 URL: http://llvm.org/viewvc/llvm-project?rev=292786&view=rev Log: [clang-tidy] Ignore implicit functions in performance-unnecessary-value-param Summary: The performance-unnecessary-value-param check mangled inherited cons

[clang-tools-extra] r323208 - [clang-tidy] Handle bitfields in modernize-use-default-member-init if using C++2a

2018-01-23 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Jan 23 07:32:42 2018 New Revision: 323208 URL: http://llvm.org/viewvc/llvm-project?rev=323208&view=rev Log: [clang-tidy] Handle bitfields in modernize-use-default-member-init if using C++2a Summary: C++2a allows bitfields to have default member initializers. Add

[clang-tools-extra] r323227 - [clang-tidy] Handle bitfields in cppcoreguidelines-pro-type-member-init if using C++2a

2018-01-23 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Jan 23 09:13:57 2018 New Revision: 323227 URL: http://llvm.org/viewvc/llvm-project?rev=323227&view=rev Log: [clang-tidy] Handle bitfields in cppcoreguidelines-pro-type-member-init if using C++2a Summary: C++2a allows bitfields to have default member initializers

r323316 - Fix typos of occurred and occurrence

2018-01-24 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Jan 24 02:26:09 2018 New Revision: 323316 URL: http://llvm.org/viewvc/llvm-project?rev=323316&view=rev Log: Fix typos of occurred and occurrence Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst cfe/trunk/include/clang/Analysis/CloneDetection.h cfe

[clang-tools-extra] r295176 - [clang-tidy] Don't warn about call to unresolved operator*

2017-02-15 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Feb 15 08:01:41 2017 New Revision: 295176 URL: http://llvm.org/viewvc/llvm-project?rev=295176&view=rev Log: [clang-tidy] Don't warn about call to unresolved operator* Summary: The misc-unconventional-assign-operator check had a false positive warning when the 'op

[clang-tools-extra] r295192 - [clang-tidy] Don't delay parsing of templates in test for misc-unconventional-assign-operator

2017-02-15 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Feb 15 10:32:55 2017 New Revision: 295192 URL: http://llvm.org/viewvc/llvm-project?rev=295192&view=rev Log: [clang-tidy] Don't delay parsing of templates in test for misc-unconventional-assign-operator Modified: clang-tools-extra/trunk/test/clang-tidy/misc-

r296602 - [Sema] Improve side effect checking for unused-lambda-capture warning

2017-03-01 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Mar 1 04:23:38 2017 New Revision: 296602 URL: http://llvm.org/viewvc/llvm-project?rev=296602&view=rev Log: [Sema] Improve side effect checking for unused-lambda-capture warning Summary: Don't warn about unused lambda captures that involve copying a value of a ty

Re: [clang-tools-extra] r296867 - [clang-tidy] Fix modernize-use-emplace docs

2017-03-03 Thread Malcolm Parsons via cfe-commits
On 3 March 2017 at 12:42, Piotr Padlewski via cfe-commits wrote: > w.emplace_back(std::make_pair(21L, 37L); Unbalanced (). -- Malcolm Parsons ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D26667: Teach clang that 'sv' is a fine literal suffix

2016-11-15 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: lib/Lex/LiteralSupport.cpp:768 .Cases("il", "i", "if", true) + .Case("sv", true) .Default(false); This is in `NumericLiteralParser::isValidUDSuffix()`. If a change is needed for `"sv"`, wouldn

[PATCH] D26667: Teach clang that 'sv' is a fine literal suffix

2016-11-15 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: lib/Lex/LiteralSupport.cpp:768 .Cases("il", "i", "if", true) + .Case("sv", true) .Default(false); aaron.ballman wrote: > mclow.lists wrote: > > malcolm.parsons wrote: > > > This is in `NumericL

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

2016-11-15 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] r286990 - [clang-tidy] Change readability-redundant-member-init to get base type from constructor

2016-11-15 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Nov 15 11:49:00 2016 New Revision: 286990 URL: http://llvm.org/viewvc/llvm-project?rev=286990&view=rev Log: [clang-tidy] Change readability-redundant-member-init to get base type from constructor Summary: Fixes PR30835 Reviewers: alexfh, hokein, aaron.ballman

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

2016-11-15 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL286990: [clang-tidy] Change readability-redundant-member-init to get base type from… (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26118?vs=76797&id=78024#toc Repos

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

2016-11-15 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: test/clang-tidy/modernize-use-default.cpp:142 +// CHECK-MESSAGES: :[[@LINE-2]]:1: warning: use '= default' +// CHECK-FIXES: TempODef::~TempODef() = default; + aaron.ballman wrote: > Would it be better if the `= d

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

2016-11-15 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D26453#596254, @aaron.ballman wrote: > (This part of the check is one half modernization, one half performance, and > one half correctness, depending on which lens you view the code through.) The performance part should be handled by

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

2016-11-15 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D26435#595282, @dtarditi wrote: > What platform/OS did you build on? I build release with asserts on 64 bit Linux. My host compiler is gcc. https://reviews.llvm.org/D26435 ___ cfe-commi

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

2016-11-16 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: test/clang-tidy/modernize-use-default.cpp:142 +// CHECK-MESSAGES: :[[@LINE-2]]:1: warning: use '= default' +// CHECK-FIXES: TempODef::~TempODef() = default; + aaron.ballman wrote: > malcolm.parsons wrote: > > aar

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

2016-11-16 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287091: [clang-tidy] Handle template instantiations in modenize-use-default check (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26582?vs=77728&id=78151#toc Repositor

[clang-tools-extra] r287091 - [clang-tidy] Handle template instantiations in modenize-use-default check

2016-11-16 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Nov 16 03:51:40 2016 New Revision: 287091 URL: http://llvm.org/viewvc/llvm-project?rev=287091&view=rev Log: [clang-tidy] Handle template instantiations in modenize-use-default check Summary: Duplicate fixes were being created for explicit template instantiations

[PATCH] D26741: [clang-tidy] Changes to modernize-use-default check

2016-11-16 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. Warn about special member functions that only contain a comment. Report the location of the special member function, unless it is defined in a macro. Rep

[PATCH] D26742: [RecursiveASTVisitor] Fix post-order traversal of UnaryOperator

2016-11-16 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, klimek, teemperor, doug.gregor. malcolm.parsons added a subscriber: cfe-commits. https://reviews.llvm.org/D26742 Files: include/clang/AST/RecursiveASTVisitor.h unittests/AST/PostOrderASTVisitor.cpp Index:

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-11-16 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, Eugene.Zelenko, alexfh. malcolm.parsons added a subscriber: cfe-commits. Herald added subscribers: modocache, mgorny. Fixes PR18858 https://reviews.llvm.org/D26750 Files: clang-tidy/modernize/CMakeLists.txt

[PATCH] D26751: [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check

2016-11-16 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. Template instantiations were causing misplaced fixits. https://reviews.llvm.org/D26751 Files: clang-tidy/modernize/UseEqualsDeleteCheck.cpp test/cl

[clang-tools-extra] r287215 - [clang-tidy] Changes to modernize-use-default check

2016-11-17 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 17 03:14:04 2016 New Revision: 287215 URL: http://llvm.org/viewvc/llvm-project?rev=287215&view=rev Log: [clang-tidy] Changes to modernize-use-default check Summary: Warn about special member functions that only contain a comment. Report the location of the sp

[PATCH] D26741: [clang-tidy] Changes to modernize-use-default check

2016-11-17 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287215: [clang-tidy] Changes to modernize-use-default check (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26741?vs=78164&id=78328#toc Repository: rL LLVM https://

[PATCH] D26751: [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check

2016-11-17 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseEqualsDeleteCheck.cpp:37 unless(anyOf(hasBody(stmt()), isDefaulted(), isDeleted(), + ast_matchers::isTemplateInstantiation(), // Ensure that all met

[clang-tools-extra] r287221 - [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check

2016-11-17 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 17 05:40:02 2016 New Revision: 287221 URL: http://llvm.org/viewvc/llvm-project?rev=287221&view=rev Log: [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check Summary: Template instantiations were causing misplaced fixits. Reviewers

[PATCH] D26751: [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check

2016-11-17 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287221: [clang-tidy] Ignore template instantiations in modernize-use-equals-delete check (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26751?vs=78202&id=78344#toc Re

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-11-17 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-default-member-init.rst:7 +This check converts a default constructor's member initializers into default +member initializers. Other member initializers that match the default +member initiali

[PATCH] D26798: [docs] Remove doubled spaces

2016-11-17 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. Herald added a subscriber: nemanjai. https://reviews.llvm.org/D26798 Files: docs/ModularizeUsage.rst docs/clang-tidy/checks/cppcoreguidelines-pro-type-cstyl

[clang-tools-extra] r287226 - [docs] Remove doubled spaces

2016-11-17 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 17 08:26:45 2016 New Revision: 287226 URL: http://llvm.org/viewvc/llvm-project?rev=287226&view=rev Log: [docs] Remove doubled spaces Reviewers: aaron.ballman Subscribers: nemanjai, cfe-commits Differential Revision: https://reviews.llvm.org/D26798 Modified

[PATCH] D26798: [docs] Remove doubled spaces

2016-11-17 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287226: [docs] Remove doubled spaces (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26798?vs=78361&id=78362#toc Repository: rL LLVM https://reviews.llvm.org/D26798

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-11-17 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 78363. malcolm.parsons added a comment. Remove doubled spaces https://reviews.llvm.org/D26750 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseDefaultMemberInitCheck.cpp clang-ti

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

2016-11-17 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. https://reviews.llvm.org/D26435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

r287241 - Use unique_ptr for cached tokens for default arguments in C++.

2016-11-17 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 17 11:52:58 2016 New Revision: 287241 URL: http://llvm.org/viewvc/llvm-project?rev=287241&view=rev Log: Use unique_ptr for cached tokens for default arguments in C++. Summary: This changes pointers to cached tokens for default arguments in C++ from raw point

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

2016-11-17 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287241: Use unique_ptr for cached tokens for default arguments in C++. (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D26435?vs=78375&id=78380#toc Repository: rL LLV

r287258 - Fixes for r287241. Use placement new. Apply clang-format.

2016-11-17 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Nov 17 15:00:09 2016 New Revision: 287258 URL: http://llvm.org/viewvc/llvm-project?rev=287258&view=rev Log: Fixes for r287241. Use placement new. Apply clang-format. Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp cfe/trunk/lib/Sema/DeclSpec.cpp cfe/tr

[PATCH] D26829: [clang] Allow lexer to handle string_view literals

2016-11-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. @mclow.lists is working on this in https://reviews.llvm.org/D26667. The review comments from that apply here too. https://reviews.llvm.org/D26829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D26849: [Sema] Set range end of constructors and destructors in template instantiations

2016-11-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, rsmith. malcolm.parsons added a subscriber: cfe-commits. clang-tidy checks frequently use source ranges of functions. The source range of constructors and destructors in template instantiations is currently a si

[PATCH] D26847: Fix Internal Compiler Error compiling Clang with the latest version of MSVC

2016-11-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. This file doesn't exist in clang. Did you mean to report this to swift-clang? Repository: rL LLVM https://reviews.llvm.org/D26847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D26849: [Sema] Set range end of constructors and destructors in template instantiations

2016-11-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 78522. malcolm.parsons added a comment. Add test. https://reviews.llvm.org/D26849 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp test/Misc/ast-dump-decl.cpp Index: test/Misc/ast-dump-decl.cpp ==

[PATCH] D26829: [clang] Allow lexer to handle string_view literals

2016-11-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. Does `Sema::CheckLiteralOperatorDeclaration` need to check `StringLiteralParser::isValidUDSuffix`? https://reviews.llvm.org/D26829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-11-20 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 78663. malcolm.parsons added a comment. Use llvm_unreachable. Ignore template instantiations. https://reviews.llvm.org/D26750 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseDefau

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2016-11-22 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. What happens to diagnostics without fixes? e.g. from the readability-function-size check. Repository: rL LLVM https://reviews.llvm.org/D26137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

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

2016-11-22 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 78867. malcolm.parsons added a comment. Mention in release notes. https://reviews.llvm.org/D26453 Files: clang-tidy/cert/CERTTidyModule.cpp clang-tidy/misc/MoveConstructorInitCheck.cpp clang-tidy/misc/MoveConstructorInitCheck.h clang-tidy/mo

[PATCH] D26137: [clang-tidy] Add check name to YAML export

2016-11-22 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D26137#602591, @Alpha wrote: > This shouldn't affect diagnostics without fixes. If there is no fix, there > won't be anything to export, and the diagnostic just behaves normally. That's a shame; I need a machine readable report of al

r288025 - [Sema] Set range end of constructors and destructors in template instantiations

2016-11-28 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Nov 28 05:11:34 2016 New Revision: 288025 URL: http://llvm.org/viewvc/llvm-project?rev=288025&view=rev Log: [Sema] Set range end of constructors and destructors in template instantiations Summary: clang-tidy checks frequently use source ranges of functions. The s

Re: [PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-11-30 Thread Malcolm Parsons via cfe-commits
On 30 November 2016 at 17:18, Mads Ravn wrote: > So remove the ifStmt from the third and fourth case? I was thinking all cases. Can the first case be restricted to casts to bool? If not, keep the cast to int case with an ifStmt and add a cast to bool case. Does it matter whether the cast is impli

Re: [PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-01 Thread Malcolm Parsons via cfe-commits
On 1 December 2016 at 16:42, Mads Ravn wrote: > I have now implemented your suggestions - all but the fixit one. If I have > added bindings for str1 and str2 in ast matcher, how would I go about > creating a replacement for the entire implicitCastExpr or binaryOperator? I > can't find any example

[clang-tools-extra] r288375 - [clang-tidy] Rename modernize-use-default to modernize-use-equals-default

2016-12-01 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Dec 1 11:24:42 2016 New Revision: 288375 URL: http://llvm.org/viewvc/llvm-project?rev=288375&view=rev Log: [clang-tidy] Rename modernize-use-default to modernize-use-equals-default Reviewers: angelgarcia, aaron.ballman, alexfh Subscribers: JDevlieghere, Prazek,

[clang-tools-extra] r288384 - Add a blank line to make sphinx happy.

2016-12-01 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Dec 1 11:38:54 2016 New Revision: 288384 URL: http://llvm.org/viewvc/llvm-project?rev=288384&view=rev Log: Add a blank line to make sphinx happy. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-use-default.rst Modified: clang-tools-extra

Re: [PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-01 Thread Malcolm Parsons via cfe-commits
On 1 Dec 2016 8:37 p.m., "Mads Ravn" wrote: > I see the idea for the fixit clearly for case 3 & 4. Just erase .compare(str2) and replace 0 with str2. I have a quick question though: Given the declRefExpr().bind("str2"), how do I read the name of it in clang-tidy? Or should I just bind 0 as well an

Re: [PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-02 Thread Malcolm Parsons via cfe-commits
On 2 December 2016 at 09:50, Mads Ravn wrote: >> Comment at: test/clang-tidy/misc-string-compare.cpp:9 >> + // CHECK-MESSAGES: [[@LINE-1]]:3: warning: do not use compare to test >> equality of strings; use the string equality operator instead >> [misc-string-compare] > What do you mean by this co

Re: [PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-02 Thread Malcolm Parsons via cfe-commits
On 2 December 2016 at 10:29, Mads Ravn wrote: > alexfh suggested that fixits seemed easy to implement. I am having a few > doubts as to how I would make fixits for case 1 & 2. How important would it > be to implement fixits at this point? Add a FIXME comment if they're difficult. -- Malcolm Par

r288813 - Fix two clang-tidy misc-move-forwarding-reference warnings

2016-12-06 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Dec 6 08:49:18 2016 New Revision: 288813 URL: http://llvm.org/viewvc/llvm-project?rev=288813&view=rev Log: Fix two clang-tidy misc-move-forwarding-reference warnings Patch by Michael Sharpe. Modified: cfe/trunk/lib/AST/Type.cpp cfe/trunk/lib/CodeGen/CGB

Re: Fix some misc-move-forwarding-reference warnings

2016-12-06 Thread Malcolm Parsons via cfe-commits
On 2 December 2016 at 17:13, Michael Sharpe via cfe-commits wrote: > The attached patch fixes a couple of incorrect uses of std::move as revealed > by clang-tidy. LGTM. Committed as r288813. -- Malcolm Parsons ___ cfe-commits mailing list cfe-commits

r288923 - [RecursiveASTVisitor] Fix post-order traversal of UnaryOperator

2016-12-07 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Dec 7 11:39:04 2016 New Revision: 288923 URL: http://llvm.org/viewvc/llvm-project?rev=288923&view=rev Log: [RecursiveASTVisitor] Fix post-order traversal of UnaryOperator Reviewers: aaron.ballman, klimek, doug.gregor, teemperor, rsmith Subscribers: cfe-commits

Re: r288923 - [RecursiveASTVisitor] Fix post-order traversal of UnaryOperator

2016-12-07 Thread Malcolm Parsons via cfe-commits
On 7 December 2016 at 17:56, Richard Smith wrote: > On 7 Dec 2016 9:49 am, "Malcolm Parsons via cfe-commits" > wrote: > > Author: malcolm.parsons > Date: Wed Dec 7 11:39:04 2016 > New Revision: 288923 > > URL: http://llvm.org/viewvc/llvm-project?rev=288923&

r288976 - [RecursiveASTVisitor] Improve post-order traversal unit test

2016-12-07 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Dec 7 14:38:20 2016 New Revision: 288976 URL: http://llvm.org/viewvc/llvm-project?rev=288976&view=rev Log: [RecursiveASTVisitor] Improve post-order traversal unit test Modified: cfe/trunk/unittests/AST/PostOrderASTVisitor.cpp Modified: cfe/trunk/unittests/A

r289042 - [ASTMatcher] Add hasReplacementType matcher for SubstTemplateTypeParmType

2016-12-08 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Dec 8 05:46:22 2016 New Revision: 289042 URL: http://llvm.org/viewvc/llvm-project?rev=289042&view=rev Log: [ASTMatcher] Add hasReplacementType matcher for SubstTemplateTypeParmType Summary: Needed for https://reviews.llvm.org/D27166 Reviewers: sbenza, bkramer,

[clang-tools-extra] r289524 - [clang-tidy] Add check for redundant function pointer dereferences

2016-12-13 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Dec 13 02:04:11 2016 New Revision: 289524 URL: http://llvm.org/viewvc/llvm-project?rev=289524&view=rev Log: [clang-tidy] Add check for redundant function pointer dereferences Reviewers: alexfh, aaron.ballman, hokein Subscribers: mgorny, JDevlieghere, cfe-commits

r302440 - [AST] Fix copy&paste error in comment. NFC.

2017-05-08 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon May 8 11:43:29 2017 New Revision: 302440 URL: http://llvm.org/viewvc/llvm-project?rev=302440&view=rev Log: [AST] Fix copy&paste error in comment. NFC. Modified: cfe/trunk/include/clang/AST/Decl.h Modified: cfe/trunk/include/clang/AST/Decl.h URL: http://llv

[PATCH] D25711: [Basic] unique_ptr-ify SourceManager::MacroArgsCacheMap (NFC)

2016-10-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: cfe/trunk/lib/Basic/SourceManager.cpp:1941 +MacroArgsCache = llvm::make_unique(); +computeMacroArgsCache(*MacroArgsCache.get(), FID); + } Redundant .get() Repository: rL LLVM https://reviews.llvm.or

[PATCH] D24572: [clang-tidy] Clean up code after applying replacements.

2016-10-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. Does clang-apply-replacements need a similar change? Repository: rL LLVM https://reviews.llvm.org/D24572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

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

2016-10-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: include/clang/AST/TypeLoc.h:513 struct BuiltinLocInfo { - SourceLocation BuiltinLoc; + SourceRange BuiltinRange; }; aaron.ballman wrote: > Since this doubles the size of the type loc for builtin types, do you

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

2016-10-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: unittests/AST/SourceLocationTest.cpp:228 +} + TEST(CXXConstructorDecl, NoRetFunTypeLocRange) { aaron.ballman wrote: > Can you also add a test that the range is correct for something like `long > double` and `l

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

2016-10-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74975. malcolm.parsons added a comment. Add unit tests for long double. https://reviews.llvm.org/D25363 Files: include/clang/AST/TypeLoc.h include/clang/Sema/DeclSpec.h lib/Sema/DeclSpec.cpp lib/Sema/SemaType.cpp unittests/AST/SourceLocati

Re: [PATCH] D24572: [clang-tidy] Clean up code after applying replacements.

2016-10-18 Thread Malcolm Parsons via cfe-commits
On 18 October 2016 at 12:08, Eric Liu wrote: > clang-apply-replacements has some legacy code and needs some refactoring > in order to take advantage of the cleanup feature (because of the new > tooling::Replacements implementation). I had a plan to refactor it but > thought it was a low priority

[PATCH] D25024: [clang-tidy] Add check for detecting declarations with multiple names

2016-10-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: test/clang-tidy/cppcoreguidelines-one-name-per-declaration.cpp:8 + { +int x = 42, y = 43; +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: Do not declare multiple names per declaration [cppcoreguidelines-one-name-per-declar

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

2016-10-18 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: include/clang/AST/TypeLoc.h:513 struct BuiltinLocInfo { - SourceLocation BuiltinLoc; + SourceRange BuiltinRange; }; aaron.ballman wrote: > malcolm.parsons wrote: > > aaron.ballman wrote: > > > Since this doub

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

2016-10-19 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added a reviewer: djasper. malcolm.parsons added a subscriber: cfe-commits. Herald added a subscriber: klimek. Remove colon and commas after replacing constructor body with = default. Fix annotation of TT_CtorInitializerColon when preceded by

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

2016-10-19 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: angelgarcia, aaron.ballman, alexfh. malcolm.parsons added a subscriber: cfe-commits. clang-tidy now cleans up after replacements, so leave colon and comma removal to that. https://reviews.llvm.org/D25769 Files: clang-tidy

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

2016-10-19 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: test/clang-tidy/modernize-use-default-copy.cpp:85 + // CHECK-MESSAGES: :[[@LINE-2]]:3: warning: use '= default' + // CHECK-FIXES: /* don't delete */ = default; int Field; I don't know why cleanup removes th

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

2016-10-19 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: include/clang/AST/TypeLoc.h:513 struct BuiltinLocInfo { - SourceLocation BuiltinLoc; + SourceRange BuiltinRange; }; aaron.ballman wrote: > malcolm.parsons wrote: > > aaron.ballman wrote: > > > malcolm.parsons

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

2016-10-20 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: include/clang/AST/TypeLoc.h:513 struct BuiltinLocInfo { - SourceLocation BuiltinLoc; + SourceRange BuiltinRange; }; aaron.ballman wrote: > malcolm.parsons wrote: > > aaron.ballman wrote: > > > malcolm.parsons

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

2016-10-20 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())); I sus

r284732 - [Format] Cleanup after replacing constructor body with = default

2016-10-20 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Oct 20 09:58:45 2016 New Revision: 284732 URL: http://llvm.org/viewvc/llvm-project?rev=284732&view=rev Log: [Format] Cleanup after replacing constructor body with = default Summary: Remove colon and commas after replacing constructor body with = default. Fix anno

<    1   2   3   4   >