[clang-tools-extra] r347671 - [clang-tidy] Ignore bool -> single bit bitfield conversion in readability-implicit-bool-conversion

2018-11-27 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Nov 27 08:23:39 2018 New Revision: 347671 URL: http://llvm.org/viewvc/llvm-project?rev=347671&view=rev Log: [clang-tidy] Ignore bool -> single bit bitfield conversion in readability-implicit-bool-conversion Summary: There is no ambiguity / information loss in th

[clang-tools-extra] r353092 - [clang-tidy] Handle unions with existing default-member-init

2019-02-04 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Feb 4 13:09:31 2019 New Revision: 353092 URL: http://llvm.org/viewvc/llvm-project?rev=353092&view=rev Log: [clang-tidy] Handle unions with existing default-member-init Summary: clang-tidy's modernize-use-default-member-init was crashing for unions with an existi

[clang-tools-extra] r353554 - [clang-tidy] Don't use assignment for value-initialized enums

2019-02-08 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Fri Feb 8 11:44:42 2019 New Revision: 353554 URL: http://llvm.org/viewvc/llvm-project?rev=353554&view=rev Log: [clang-tidy] Don't use assignment for value-initialized enums Summary: The modernize-use-default-member-init check crashes when trying to create an assignm

Re: r310983 - PR19668, PR23034: Fix handling of move constructors and deleted copy

2017-09-19 Thread Malcolm Parsons via cfe-commits
On 16 August 2017 at 02:49, Richard Smith via cfe-commits wrote: > + /// \brief \c true if a defaulted destructor for this class would be > deleted. > + bool defaultedDestructorIsDeleted() const { > +return !data().DefaultedDestructorIsDeleted; > + } Is the ! intentional? -- Malcolm Pa

r329914 - Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-04-12 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Apr 12 07:48:48 2018 New Revision: 329914 URL: http://llvm.org/viewvc/llvm-project?rev=329914&view=rev Log: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency Summary: This patch adds two new diagnostics, which are off by default: *

Re: r330068 - [Serialization] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-04-14 Thread Malcolm Parsons via cfe-commits
On Sat, 14 Apr 2018, 04:22 Richard Trieu via cfe-commits, < cfe-commits@lists.llvm.org> wrote: > I was tracking down a similar issue to the lldb issue before noticing the > change was reverted. The bad change that lead to it is: > > // Load pending declaration chains. > -for (unsigned I

Re: r330068 - [Serialization] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2018-04-14 Thread Malcolm Parsons via cfe-commits
On Sat, 14 Apr 2018, 14:16 Kim Gräsman, wrote: > That would be a nice outcome of all the "run-tools-on-llvm" changes if any > problems were filed as bugs on the tools. We have a number of them filed on > iwyu, and they make for nice, concrete bugs to troubleshoot even if we > don't always know ho

r330112 - Clean carriage returns from lib/ and include/. NFC.

2018-04-16 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Apr 16 01:31:08 2018 New Revision: 330112 URL: http://llvm.org/viewvc/llvm-project?rev=330112&view=rev Log: Clean carriage returns from lib/ and include/. NFC. Summary: Clean carriage returns from lib/ and include/. NFC. (I have to make this change locally in ord

r331361 - [analyzer] Fix filename in cross-file HTML report

2018-05-02 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed May 2 07:26:12 2018 New Revision: 331361 URL: http://llvm.org/viewvc/llvm-project?rev=331361&view=rev Log: [analyzer] Fix filename in cross-file HTML report Summary: The filename is currently taken from the start of the path, while the line and column are taken

Re: r337152 - [Sema] Reword warning for constant captures that are not required

2018-07-17 Thread Malcolm Parsons via cfe-commits
On Mon, 16 Jul 2018 at 10:57, Benjamin Kramer via cfe-commits wrote: > - auto explicit_by_value_unused_sizeof = [i] { return sizeof(i); }; // > expected-warning{{lambda capture 'i' is not required to be captured for this > use}} > + auto explicit_by_value_unused_sizeof = [i] { return sizeof(i)

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

2016-09-19 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 71802. malcolm.parsons added a comment. Handle delegating and base class constructors https://reviews.llvm.org/D24339 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/Redundan

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

2016-09-22 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 72181. malcolm.parsons added a comment. Don't remove init of const members. Do remove calls to constructors that introduce cleanups. https://reviews.llvm.org/D24339 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityT

Re: [PATCH] D24848: [clang-tidy] fix false-positive for cppcoreguidelines-pro-type-member-init with in-class initializers

2016-09-26 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp:372 @@ +371,3 @@ + +struct Bug30487 +{ There's already this test: ``` struct NegativeInClassInitialized { int F = 0; NegativeInClassInitialized

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

2016-09-26 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 72476. malcolm.parsons added a comment. Expand code comment https://reviews.llvm.org/D24652 Files: clang-tidy/readability/AvoidConstParamsInDecls.cpp test/clang-tidy/readability-avoid-const-params-in-decls.cpp Index: test/clang-tidy/readability

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

2016-09-26 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/AvoidConstParamsInDecls.cpp:39 @@ -38,2 +38,3 @@ // generate a non-definition FunctionDecl too. Ignore those. - unless(cxxMethodDecl(ofClass(cxxRecordDecl(isLambda()

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

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

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

2016-09-26 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. I don't have commit access, so please commit this and https://reviews.llvm.org/D24652 for me. Thanks. https://reviews.llvm.org/D2 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

Re: [PATCH] D24887: [clang-tidy] cert-err58-cpp should not apply to function scope objects

2016-09-26 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. I don't have commit access, so please commit it for me. Thanks. https://reviews.llvm.org/D24887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24965: [clang-tidy] Fix cppcoreguidelines-pro-type-member-init false negatives

2016-09-27 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: alexfh, aaron.ballman, omtcyfz. malcolm.parsons added subscribers: cfe-commits, mgehre. Herald added a subscriber: nemanjai. Handle classes with default constructors that are defaulted or are not present in the AST. Classes wi

Re: [PATCH] D24886: Add [[clang::suppress(rule, ...)]] attribute

2016-09-27 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a subscriber: malcolm.parsons. malcolm.parsons added a comment. In https://reviews.llvm.org/D24886#554130, @mgehre wrote: > 2. Also, I suspect we will want this attribute to also be written on types I > was thinking about a case were that was useful, and didn't find any. Wh

Re: [PATCH] D24848: [clang-tidy] fix false-positive for cppcoreguidelines-pro-type-member-init with in-class initializers

2016-09-27 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D24848#554145, @mgehre wrote: > Rename the struct that was introduced in the test. Note that I need to keep > the function Bug30487, > because that is where the false-positive warning was emitted. https://reviews.llvm.org/D24965 wil

Re: [PATCH] D22725: [clang-tidy] Add check 'modernize-use-algorithm'

2016-09-28 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a subscriber: malcolm.parsons. malcolm.parsons added a comment. This check looks like it implements some of CppCoreGuidelines Bounds.4 https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#bounds4-dont-use-standard-library-functions-and-types-that-are-

Re: [PATCH] D22910: Add support for CXXOperatorCallExpr in Expr::HasSideEffects

2016-09-28 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a subscriber: malcolm.parsons. Comment at: lib/AST/Expr.cpp:2868 @@ +2867,3 @@ +// When looking for potential side-effects, we assume that these +// operators: assignment, increement and decrement are intended +// to have a side-effect and other o

Re: [PATCH] D24848: [clang-tidy] fix false-positive for cppcoreguidelines-pro-type-member-init with in-class initializers

2016-09-28 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D24848#555636, @mgehre wrote: > Are you okay with me committing this as it currently is? Yes. https://reviews.llvm.org/D24848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

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

2016-09-28 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a subscriber: malcolm.parsons. Comment at: clang-tidy/cppcoreguidelines/OneNamePerDeclarationCheck.cpp:30 @@ +29,3 @@ + Finder->addMatcher( + declStmt(declCountIsGreaterThan(1)).bind("multipleNameDeclaration"), + this); Can declCou

[PATCH] [Updated, 96 lines] D24965: [clang-tidy] Fix cppcoreguidelines-pro-type-member-init false negatives

2016-09-30 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 73019. malcolm.parsons added a comment. Rebase https://reviews.llvm.org/D24965 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h clang-tidy/utils/TypeTraits.cpp test/clang-ti

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

2016-10-03 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 73260. malcolm.parsons added a comment. Herald added a subscriber: modocache. Don't warn for trivially default constructable members https://reviews.llvm.org/D24339 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityT

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

2016-10-03 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. > 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-declaration] The guideline says "Flag no

[PATCH] D24965: [clang-tidy] Fix cppcoreguidelines-pro-type-member-init false negatives

2016-10-04 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 73452. malcolm.parsons added a comment. Don't match template instantiations. Add assert message. Update macro comment. Add tests for templates and macros. https://reviews.llvm.org/D24965 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.c

[PATCH] D24965: [clang-tidy] Fix cppcoreguidelines-pro-type-member-init false negatives

2016-10-04 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 73474. malcolm.parsons added a comment. Pass records by reference. Change test to trigger diagnostic for non-template type https://reviews.llvm.org/D24965 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp clang-tidy/cppcoreguideline

[PATCH] D24965: [clang-tidy] Fix cppcoreguidelines-pro-type-member-init false negatives

2016-10-04 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D24965#560785, @aaron.ballman wrote: > LGTM, thank you! I don't have commit access, so please commit this for me. Thanks. https://reviews.llvm.org/D24965 ___ cfe-commits mailing list cf

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

2016-10-04 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. > aaron.ballman wrote in readability-redundant-member-init.cpp:162 > Missing a test for `union` member initializers. Also, a test that multiple > inheritance doesn't cause a fixit malfunction would be nice. Note that all the fixits malfunction until https:

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

2016-10-04 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 73479. malcolm.parsons added a comment. Add test for initializing a union member. Add test for multiple inheritance. https://reviews.llvm.org/D24339 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp

[PATCH] D25238: [clang-tidy] Ignore empty members and bases in cppcoreguidelines-pro-type-member-init

2016-10-04 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, alexfh, mgehre. malcolm.parsons added a subscriber: cfe-commits. Herald added a subscriber: nemanjai. Empty/incomplete variables/members/bases don't need to be initialized https://reviews.llvm.org/D25238 File

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

2016-10-06 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: angelgarcia, aaron.ballman, klimek. malcolm.parsons added subscribers: cfe-commits, Eugene.Zelenko. Extend modernize-use-auto to cases when variable is assigned with cast. e.g. Type *Ptr1 = dynamic_cast(Ptr2); https://revie

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

2016-10-06 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 73780. malcolm.parsons added a comment. Add functional casts to tests and doc. https://reviews.llvm.org/D25316 Files: clang-tidy/modernize/UseAutoCheck.cpp clang-tidy/modernize/UseAutoCheck.h docs/clang-tidy/checks/modernize-use-auto.rst tes

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

2016-10-06 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D25316#563654, @Eugene.Zelenko wrote: > I think will be good idea to handle LLVM casts and getAs<> methods too. There > are plenty of them in LLVM/Clang/etc code used for variable initialization. Yes. I plan to do that, but maybe in

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

2016-10-06 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 73831. malcolm.parsons added a comment. Mention in release notes. https://reviews.llvm.org/D25316 Files: clang-tidy/modernize/UseAutoCheck.cpp clang-tidy/modernize/UseAutoCheck.h docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tidy/

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

2016-10-07 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D25316#563930, @Prazek wrote: > Please add tests with > > long long p = static_cast(4); > > > and the same with const at beginning. I remember I had problems with this > last time (Type->SourceRange was returning only source range

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

2016-10-07 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added a reviewer: Prazek. malcolm.parsons added a subscriber: cfe-commits. clang-tidy's modernize-use-auto check uses the SourceRange of a TypeLoc when replacing the type with auto. This was producing the wrong result for multi-token builtin t

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

2016-10-07 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 73918. malcolm.parsons added a comment. Add more tests. https://reviews.llvm.org/D25316 Files: clang-tidy/modernize/UseAutoCheck.cpp clang-tidy/modernize/UseAutoCheck.h docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tidy/modernize-

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

2016-10-08 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74022. malcolm.parsons added a comment. Rework handling of references https://reviews.llvm.org/D25316 Files: clang-tidy/modernize/UseAutoCheck.cpp clang-tidy/modernize/UseAutoCheck.h docs/clang-tidy/checks/modernize-use-auto.rst test/clang-t

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

2016-10-08 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D25363#565371, @Prazek wrote: > Thanks for the patch! I think some unit test should be added. Are there any existing unit tests for TypeLoc that I can add to? > Do you also handle cases like > > unsigned long long Yes - see tests

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

2016-10-08 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D25316#565378, @Prazek wrote: > Awesome to see this patch. After this one will make it to upstream, it will > be much easier for me to do same with template functions. I was trying to match such functions: varDecl(hasType(type().b

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

2016-10-08 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74047. malcolm.parsons added a comment. Replace TSWLoc with TSWRange https://reviews.llvm.org/D25363 Files: include/clang/AST/TypeLoc.h include/clang/Sema/DeclSpec.h lib/Sema/DeclSpec.cpp lib/Sema/SemaType.cpp Index: lib/Sema/SemaType.cpp =

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

2016-10-08 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. I've tested this with clang-query using `match typeLoc()` and a lot of permutations of int, short, long, unsigned, and const. https://reviews.llvm.org/D25363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

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

2016-10-09 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D25316#565567, @Prazek wrote: > functionDecl(hasName(LEXICAL_CAST_NAME), I was trying to avoid specifying the name of the function so that it works for any templated function/member function that returns its first template type

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

2016-10-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74117. malcolm.parsons added a comment. Ensure SourceRange is initialized https://reviews.llvm.org/D25363 Files: include/clang/AST/TypeLoc.h include/clang/Sema/DeclSpec.h lib/Sema/DeclSpec.cpp lib/Sema/SemaType.cpp Index: lib/Sema/SemaType.

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

2016-10-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74124. malcolm.parsons added a comment. Add unit tests 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/SourceLocationTest.cpp Index

[PATCH] D25238: [clang-tidy] Ignore empty members and bases in cppcoreguidelines-pro-type-member-init

2016-10-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74125. malcolm.parsons added a comment. Mark comment as FIXME. https://reviews.llvm.org/D25238 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp test/clang-tidy/cppcoreguidelines-pro-type-member-init.cpp Index: test/clang-tidy/cpp

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

2016-10-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:346 -const auto *NewExpr = cast(V->getInit()->IgnoreParenImpCasts()); -// Ensure that every VarDecl has a CXXNewExpr initializer. -if (!NewExpr) +const auto *Expr = cast(V-

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

2016-10-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74131. malcolm.parsons added a comment. Only insert whitespace when removing stars https://reviews.llvm.org/D25406 Files: clang-tidy/modernize/UseAutoCheck.cpp clang-tidy/modernize/UseAutoCheck.h test/clang-tidy/modernize-use-auto-new-remove-s

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

2016-10-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:378 + Lexer::getLocForEndOfToken(Range.getEnd(), 0, SM, Context->getLangOpts()); + bool Whitespace = isWhitespace(*FullSourceLoc(Next, SM).getCharacterData()); + aaron

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

2016-10-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74134. malcolm.parsons added a comment. Fix ast matcher Add test Fix parameter case Inline lambdas Doc fixes https://reviews.llvm.org/D25316 Files: clang-tidy/modernize/UseAutoCheck.cpp clang-tidy/modernize/UseAutoCheck.h docs/clang-tidy/check

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

2016-10-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons marked 15 inline comments as done. malcolm.parsons added inline comments. Comment at: test/clang-tidy/modernize-use-auto-cast.cpp:14 + long l = 1; + int i1 = static_cast(l); + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use auto when initializing with a cast t

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

2016-10-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74162. malcolm.parsons added a comment. Use std::function https://reviews.llvm.org/D25316 Files: clang-tidy/modernize/UseAutoCheck.cpp clang-tidy/modernize/UseAutoCheck.h docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tidy/moderniz

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

2016-10-10 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74163. malcolm.parsons added a comment. Really mention in release notes. https://reviews.llvm.org/D25316 Files: clang-tidy/modernize/UseAutoCheck.cpp clang-tidy/modernize/UseAutoCheck.h docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-

[clang-tools-extra] r283865 - Fix typo in documentation

2016-10-11 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Oct 11 04:42:13 2016 New Revision: 283865 URL: http://llvm.org/viewvc/llvm-project?rev=283865&view=rev Log: Fix typo in documentation Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-runtime-references.rst Modified: clang-tools-extra/trunk/do

[clang-tools-extra] r283869 - [clang-tidy] modernize-use-default default constructor bugfix

2016-10-11 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Oct 11 05:47:06 2016 New Revision: 283869 URL: http://llvm.org/viewvc/llvm-project?rev=283869&view=rev Log: [clang-tidy] modernize-use-default default constructor bugfix Summary: Only member initializers that are written should prevent using '= default' on a defa

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

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

[clang-tools-extra] r283873 - [clang-tidy] readability-avoid-const-params-in-decls template instantiation bugfix

2016-10-11 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Oct 11 07:02:16 2016 New Revision: 283873 URL: http://llvm.org/viewvc/llvm-project?rev=283873&view=rev Log: [clang-tidy] readability-avoid-const-params-in-decls template instantiation bugfix Summary: Bugfix for 30398. Don't warn for template instantiations Rev

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

2016-10-11 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL283873: [clang-tidy] readability-avoid-const-params-in-decls template instantiation… (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D24652?vs=72476&id=74242#toc Reposi

[PATCH] D25238: [clang-tidy] Ignore empty members and bases in cppcoreguidelines-pro-type-member-init

2016-10-11 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL283886: [clang-tidy] Ignore empty members and bases in cppcoreguidelines-pro-type… (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D25238?vs=74125&id=74256#toc Reposito

[clang-tools-extra] r283886 - [clang-tidy] Ignore empty members and bases in cppcoreguidelines-pro-type-member-init

2016-10-11 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Oct 11 09:49:24 2016 New Revision: 283886 URL: http://llvm.org/viewvc/llvm-project?rev=283886&view=rev Log: [clang-tidy] Ignore empty members and bases in cppcoreguidelines-pro-type-member-init Summary: Empty/incomplete variables/members/bases don't need to be i

[PATCH] D24888: [clang-tidy] Use [[clang::suppress]] with cppcoreguidelines-pro-type-reinterpret-cast

2016-10-11 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp:25 - Finder->addMatcher(cxxReinterpretCastExpr().bind("cast"), this); + std::vector Rules{"type", "type.1", "cppcoreguidelines-pro-type-reinterpret-cast"}; + Fin

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

2016-10-11 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:378 + Lexer::getLocForEndOfToken(Range.getEnd(), 0, SM, Context->getLangOpts()); + bool Whitespace = isWhitespace(*FullSourceLoc(Next, SM).getCharacterData()); + aaron

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

2016-10-12 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseAutoCheck.cpp:378 + Lexer::getLocForEndOfToken(Range.getEnd(), 0, SM, Context->getLangOpts()); + bool Whitespace = isWhitespace(*FullSourceLoc(Next, SM).getCharacterData()); + aaron

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

2016-10-13 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74476. malcolm.parsons added a comment. Combine matchers https://reviews.llvm.org/D25316 Files: clang-tidy/modernize/UseAutoCheck.cpp clang-tidy/modernize/UseAutoCheck.h docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-use-auto.rst t

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

2016-10-13 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] D24339: [clang-tidy] Add check 'readability-redundant-member-init'

2016-10-15 Thread Malcolm Parsons via cfe-commits
malcolm.parsons updated this revision to Diff 74769. malcolm.parsons added a comment. Use ignoringImplicit https://reviews.llvm.org/D24339 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/RedundantMemberInitCheck.cpp cl

[PATCH] D25642: [clang-tidy] Use ignoreImplicit in cert-err58-cpp check

2016-10-15 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. Fix a false negative in cert-err58-cpp check when calling a constructor creates objects that require cleanup. https://reviews.llvm.org/D25642 Files: clang-t

[clang-tools-extra] r284332 - [clang-tidy] Use ignoreImplicit in cert-err58-cpp check

2016-10-16 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Sun Oct 16 04:47:10 2016 New Revision: 284332 URL: http://llvm.org/viewvc/llvm-project?rev=284332&view=rev Log: [clang-tidy] Use ignoreImplicit in cert-err58-cpp check Summary: Fix a false negative in cert-err58-cpp check when calling a constructor creates objects th

[PATCH] D25642: [clang-tidy] Use ignoreImplicit in cert-err58-cpp check

2016-10-16 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284332: [clang-tidy] Use ignoreImplicit in cert-err58-cpp check (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D25642?vs=74770&id=74787#toc Repository: rL LLVM http

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

2016-10-16 Thread Malcolm Parsons via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added reviewers: aaron.ballman, klimek, alexfh. malcolm.parsons added a subscriber: cfe-commits. Herald added a subscriber: nemanjai. It is easy to configure clang-tidy with both aliased and original checks enabled. This causes the check to b

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

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

[clang-tools-extra] r319174 - [clang-tidy] Ignore ExprWithCleanups when looking for else-after-throw

2017-11-28 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Nov 28 06:57:47 2017 New Revision: 319174 URL: http://llvm.org/viewvc/llvm-project?rev=319174&view=rev Log: [clang-tidy] Ignore ExprWithCleanups when looking for else-after-throw Summary: The readability-else-after-return check was not warning about an else after

r320396 - [Sema] Fix crash in unused-lambda-capture warning for VLAs

2017-12-11 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Mon Dec 11 10:00:36 2017 New Revision: 320396 URL: http://llvm.org/viewvc/llvm-project?rev=320396&view=rev Log: [Sema] Fix crash in unused-lambda-capture warning for VLAs Summary: Clang was crashing when diagnosing an unused-lambda-capture for a VLA because From.getV

[clang-tools-extra] [clang-apply-replacements] Apply format only if --format is specified (PR #70801)

2023-11-23 Thread Malcolm Parsons via cfe-commits
pepsiman wrote: `createReplacementsForHeaders()` is applying a cleanup without checking the `Cleanup` flag. But clang-apply-replacements always sets `Cleanup` to `true` anyway. The change looks good to me, but it might be working around a bug elsewhere. https://github.com/llvm/llvm-project/pull

[clang-tools-extra] r309668 - [clang-tidy] Handle anonymous structs/unions in member init checks.

2017-08-01 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Aug 1 02:54:05 2017 New Revision: 309668 URL: http://llvm.org/viewvc/llvm-project?rev=309668&view=rev Log: [clang-tidy] Handle anonymous structs/unions in member init checks. Use getAnyMember() instead of getMember() to avoid crash on anonymous structs/unions. D

r309667 - [ASTMatchers] Allow forField to match indirect fields.

2017-08-01 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Aug 1 02:53:55 2017 New Revision: 309667 URL: http://llvm.org/viewvc/llvm-project?rev=309667&view=rev Log: [ASTMatchers] Allow forField to match indirect fields. This is needed for PR32966. Reviewed by alexfh. Modified: cfe/trunk/include/clang/ASTMatchers/

[clang-tools-extra] 45924eb - [clang-tidy] Ignore implicit casts in modernize-use-default-member-init

2020-01-14 Thread Malcolm Parsons via cfe-commits
Author: Malcolm Parsons Date: 2020-01-14T10:05:12Z New Revision: 45924eb4671692b3fa9fd52fe39c81ec0647a848 URL: https://github.com/llvm/llvm-project/commit/45924eb4671692b3fa9fd52fe39c81ec0647a848 DIFF: https://github.com/llvm/llvm-project/commit/45924eb4671692b3fa9fd52fe39c81ec0647a848.diff LO

[clang-tools-extra] 9738c75 - [clang-tidy] Match InitListExpr in modernize-use-default-member-init

2020-01-14 Thread Malcolm Parsons via cfe-commits
Author: Malcolm Parsons Date: 2020-01-14T15:19:37Z New Revision: 9738c757bd9bc2fdca935f2b4e356f1d5e5f3682 URL: https://github.com/llvm/llvm-project/commit/9738c757bd9bc2fdca935f2b4e356f1d5e5f3682 DIFF: https://github.com/llvm/llvm-project/commit/9738c757bd9bc2fdca935f2b4e356f1d5e5f3682.diff LO

[clang-tools-extra] 35f2c3a - [clang-tidy] cppcoreguidelines-pro-type-member-init: suppress warning for default member funcs

2020-12-20 Thread Malcolm Parsons via cfe-commits
Author: Chris Warner Date: 2020-12-20T11:22:41Z New Revision: 35f2c3a8b41fd3b6ef88d013a7c3ed9478b765e4 URL: https://github.com/llvm/llvm-project/commit/35f2c3a8b41fd3b6ef88d013a7c3ed9478b765e4 DIFF: https://github.com/llvm/llvm-project/commit/35f2c3a8b41fd3b6ef88d013a7c3ed9478b765e4.diff LOG:

[clang-tools-extra] 5389a05 - [docs] Fix documentation for bugprone-dangling-handle

2021-05-12 Thread Malcolm Parsons via cfe-commits
Author: Malcolm Parsons Date: 2021-05-12T17:20:15+01:00 New Revision: 5389a05836e74e3acab6dbda7e80ea43e3bc6304 URL: https://github.com/llvm/llvm-project/commit/5389a05836e74e3acab6dbda7e80ea43e3bc6304 DIFF: https://github.com/llvm/llvm-project/commit/5389a05836e74e3acab6dbda7e80ea43e3bc6304.dif

[clang-tools-extra] r329813 - [clang-apply-replacements] Convert tooling::Replacements to tooling::AtomicChange for conflict resolving of changes, code cleanup, and code formatting.

2018-04-11 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Apr 11 07:39:17 2018 New Revision: 329813 URL: http://llvm.org/viewvc/llvm-project?rev=329813&view=rev Log: [clang-apply-replacements] Convert tooling::Replacements to tooling::AtomicChange for conflict resolving of changes, code cleanup, and code formatting. S

r318827 - [Docs] Update list of languages clang-format can format

2017-11-22 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Nov 22 02:47:35 2017 New Revision: 318827 URL: http://llvm.org/viewvc/llvm-project?rev=318827&view=rev Log: [Docs] Update list of languages clang-format can format Modified: cfe/trunk/docs/ClangFormat.rst Modified: cfe/trunk/docs/ClangFormat.rst URL: http:/

[clang-tools-extra] r289797 - [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-15 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Dec 15 04:19:56 2016 New Revision: 289797 URL: http://llvm.org/viewvc/llvm-project?rev=289797&view=rev Log: [clang-tidy] Enhance modernize-use-auto to templated function casts Summary: Use auto when declaring variables that are initialized by calling a templated

[clang-tools-extra] r290051 - [clang-tidy] Remove duplicated check from move-constructor-init

2016-12-17 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Sat Dec 17 14:23:14 2016 New Revision: 290051 URL: http://llvm.org/viewvc/llvm-project?rev=290051&view=rev Log: [clang-tidy] Remove duplicated check from move-constructor-init Summary: An addition to the move-constructor-init check was duplicating the modernize-pass-

[clang-tools-extra] r290202 - [clang-tidy] Add modernize-use-default-member-init check

2016-12-20 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Dec 20 15:26:07 2016 New Revision: 290202 URL: http://llvm.org/viewvc/llvm-project?rev=290202&view=rev Log: [clang-tidy] Add modernize-use-default-member-init check Summary: Fixes PR18858 Reviewers: alexfh, hokein, aaron.ballman Subscribers: JDevlieghere, Eugen

Re: [clang-tools-extra] r290202 - [clang-tidy] Add modernize-use-default-member-init check

2016-12-20 Thread Malcolm Parsons via cfe-commits
On 20 December 2016 at 22:32, Aaron Ballman wrote: > On Tue, Dec 20, 2016 at 4:26 PM, Malcolm Parsons via cfe-commits > wrote: >> Author: malcolm.parsons >> Date: Tue Dec 20 15:26:07 2016 >> New Revision: 290202 >> >> URL: http://llvm.org/viewvc/llvm-project?r

[clang-tools-extra] r290210 - Comment out char16_t and char32_t tests

2016-12-20 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Dec 20 16:57:21 2016 New Revision: 290210 URL: http://llvm.org/viewvc/llvm-project?rev=290210&view=rev Log: Comment out char16_t and char32_t tests Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-use-default-member-init-assignment.cpp clang-

r290491 - [ASTMatchers] Fix doc for hasBitWidth

2016-12-24 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Sat Dec 24 07:22:26 2016 New Revision: 290491 URL: http://llvm.org/viewvc/llvm-project?rev=290491&view=rev Log: [ASTMatchers] Fix doc for hasBitWidth Modified: cfe/trunk/docs/LibASTMatchersReference.html cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Modi

r290492 - [ASTMatchers] Add hasInClassInitializer traversal matcher for FieldDecl.

2016-12-24 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Sat Dec 24 07:35:14 2016 New Revision: 290492 URL: http://llvm.org/viewvc/llvm-project?rev=290492&view=rev Log: [ASTMatchers] Add hasInClassInitializer traversal matcher for FieldDecl. Summary: I needed to know whether a FieldDecl had an in-class initializer for D264

[clang-tools-extra] r290493 - [clang-tidy] Remove local hasInClassInitializer matcher. NFC

2016-12-24 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Sat Dec 24 08:30:29 2016 New Revision: 290493 URL: http://llvm.org/viewvc/llvm-project?rev=290493&view=rev Log: [clang-tidy] Remove local hasInClassInitializer matcher. NFC Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp Modi

[clang-tools-extra] r290630 - [clang-tidy] Replace dead link in modernize-pass-by-value doc

2016-12-27 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Dec 27 16:01:37 2016 New Revision: 290630 URL: http://llvm.org/viewvc/llvm-project?rev=290630&view=rev Log: [clang-tidy] Replace dead link in modernize-pass-by-value doc Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/modernize-pass-by-value.rst Mod

[clang-tools-extra] r290633 - [clang-tidy] Make 2 checks register matchers for C++ only.

2016-12-27 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Dec 27 16:14:40 2016 New Revision: 290633 URL: http://llvm.org/viewvc/llvm-project?rev=290633&view=rev Log: [clang-tidy] Make 2 checks register matchers for C++ only. Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseEqualsDeleteCheck.cpp clang-to

[clang-tools-extra] r290883 - [clang-tidy] Handle constructors in performance-unnecessary-value-param

2017-01-03 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Jan 3 06:10:44 2017 New Revision: 290883 URL: http://llvm.org/viewvc/llvm-project?rev=290883&view=rev Log: [clang-tidy] Handle constructors in performance-unnecessary-value-param Summary: modernize-pass-by-value doesn't warn about value parameters that cannot be

[clang-tools-extra] r290972 - [clang-tidy] Ignore default arguments in modernize-default-member-init

2017-01-04 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Jan 4 11:33:55 2017 New Revision: 290972 URL: http://llvm.org/viewvc/llvm-project?rev=290972&view=rev Log: [clang-tidy] Ignore default arguments in modernize-default-member-init Summary: Default member initializers cannot refer to constructor parameters, but mo

r291667 - Remove repeated word in comment (NFC)

2017-01-11 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed Jan 11 05:23:22 2017 New Revision: 291667 URL: http://llvm.org/viewvc/llvm-project?rev=291667&view=rev Log: Remove repeated word in comment (NFC) Modified: cfe/trunk/lib/Parse/ParseExprCXX.cpp Modified: cfe/trunk/lib/Parse/ParseExprCXX.cpp URL: http://llvm.

Re: [PATCH] D23343: [clang-tidy] modernize-make-{smart_ptr} private ctor bugfix

2016-08-17 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added a subscriber: malcolm.parsons. Comment at: clang-tidy/modernize/MakeSmartPtrCheck.cpp:32-33 @@ -31,1 +31,4 @@ + // Calling make_smart_ptr from within a member function of a type with a + // private or protected constructor would be ill-formed. + auto Can

  1   2   3   4   >