Re: [PATCH] D13440: [clang-tidy] Python script for easy check rename

2015-10-07 Thread Piotr Zegar via cfe-commits
ClockMan marked 5 inline comments as done. Comment at: clang-tidy/rename_check.py:53 @@ +52,3 @@ + return newFileName + +def getListOfFiles(clang_tidy_path): Not sure what you mean... Repository: rL LLVM http://reviews.llvm.org/D13440

Re: [PATCH] D13440: [clang-tidy] Python script for easy check rename

2015-10-07 Thread Piotr Zegar via cfe-commits
ClockMan updated this revision to Diff 36801. ClockMan added a comment. Corrected review issues. Repository: rL LLVM http://reviews.llvm.org/D13440 Files: clang-tidy/rename_check.py Index: clang-tidy/rename_check.py === ---

Re: [PATCH] D13440: [clang-tidy] Python script for easy check rename

2015-10-10 Thread Piotr Zegar via cfe-commits
ClockMan added a comment. No, I don't have commits rights Repository: rL LLVM http://reviews.llvm.org/D13440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D13444: [clang-tidy] Clocky module and multiple check from my repository

2015-10-06 Thread Piotr Zegar via cfe-commits
Splinting a patch into separate check it's not a problem. I have organized commits in that way. About a 'author' in name, organization is also a author, so clocky is a 'one man organization' :D. It's much more simple, I have no benefits in 'anonymous' contribution, in that case I would rather go

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= @@ -3,22 +3,37 @@ modernize-use-equals-delete === -This check marks unimplemented private special member functions with ``= delete``. -To

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= PiotrZSL wrote: Other interesting thing is that currently this check is limited just to LangOpts.CPlusPlus, when it should be to LangOpts.CPlusPlus11. And in such case documentation

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= PiotrZSL wrote: Do we want to sync comment above check class in code with first sentence in documentation ? https://github.com/llvm/llvm-project/pull/65231

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Piotr Zegar via cfe-commits
@@ -3,22 +3,34 @@ modernize-use-equals-delete === +Prior to C++11, the only way to "delete" a given function was to make it +``private`` and without definition, to generate a compiler error (calling +private function) or a linker error (undefined

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?Gálvez?= https://github.com/PiotrZSL commented: Maybe: ``` Identifies unimplemented private special member functions, recommends using '= delete' for them, and suggests relocating such deleted functions from the private to the public section. Before the introduction of

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?G=C3=A1lvez?= @@ -3,22 +3,34 @@ modernize-use-equals-delete === +Prior to C++11, the only way to "delete" a given function was to make it PiotrZSL wrote: Begining of the description should say what check does, not a

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/65231 ___

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/65231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= @@ -3,22 +3,37 @@ modernize-use-equals-delete === -This check marks unimplemented private special member functions with ``= delete``. -To

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/65231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] readability-identifier-naming - fix StructCase and UnionCase in C (PR #65202)

2023-09-03 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/65202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 208fa9a - [clang-tidy] Ignore used special-members in modernize-use-equals-delete

2023-09-03 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-09-03T17:05:31Z New Revision: 208fa9acc0ffe5a460bcd504229c24a8d3f87180 URL: https://github.com/llvm/llvm-project/commit/208fa9acc0ffe5a460bcd504229c24a8d3f87180 DIFF: https://github.com/llvm/llvm-project/commit/208fa9acc0ffe5a460bcd504229c24a8d3f87180.diff LOG:

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-03 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= @@ -13,22 +13,9 @@ namespace clang::tidy::modernize { -/// Mark unimplemented private special member functions with '= delete'. -///

[clang-tools-extra] c2bee1e - [clang-tidy][NFC] Unwind if-else-if-... in UnusedUsingDeclsCheck

2023-09-03 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-09-03T06:24:56Z New Revision: c2bee1ed26a3355d164c92f1eb70ebf88804560d URL: https://github.com/llvm/llvm-project/commit/c2bee1ed26a3355d164c92f1eb70ebf88804560d DIFF: https://github.com/llvm/llvm-project/commit/c2bee1ed26a3355d164c92f1eb70ebf88804560d.diff LOG:

[clang-tools-extra] [clang-tidy][misc-include-cleaner]Avoid to insert same include header multiple times (PR #65431)

2023-09-05 Thread Piotr Zegar via cfe-commits
@@ -209,14 +212,16 @@ void IncludeCleanerCheck::check(const MatchFinder::MatchResult ) { // main file. if (auto Replacement = HeaderIncludes.insert(llvm::StringRef{Spelling}.trim("\"<>"), PiotrZSL wrote: insert -> emplace

[clang-tools-extra] [clang-tidy][misc-include-cleaner]Avoid to insert same include header multiple times (PR #65431)

2023-09-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/65431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][modernize-use-using]fix function pointer typedef correctly (PR #65558)

2023-09-06 Thread Piotr Zegar via cfe-commits
@@ -314,3 +314,10 @@ typedef struct { struct { int a; struct { struct { int b; } c; int d; } e; } f; typedef struct { struct { int a; } b; union { int c; float d; struct { int e; }; }; struct { double f; } g; } PR50990_siblings; // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use

[clang-tools-extra] [clang-tidy][modernize-use-using]fix function pointer typedef correctly (PR #65558)

2023-09-06 Thread Piotr Zegar via cfe-commits
@@ -246,6 +246,9 @@ Changes in existing checks ` check to accurately generate fixes for reordering arguments. +- Improved :doc:`modernize-use-using` PiotrZSL wrote: put space before <, juts for visibility.

[clang-tools-extra] [clang-tidy] Exclude bitwise operators in bugprone-non-zero-enum-to-bool-conversion (PR #65498)

2023-09-06 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > explicit bit usage will not case false positive without this patch. Should we > consider case of operator overloading? Yes, thats a side effect due to implicit casting enums to integers. I added tests because those were missing, then I implemented version with

[clang-tools-extra] [clang-tidy][modernize-use-using]fix function pointer typedef correctly (PR #65558)

2023-09-06 Thread Piotr Zegar via cfe-commits
@@ -314,3 +314,10 @@ typedef struct { struct { int a; struct { struct { int b; } c; int d; } e; } f; typedef struct { struct { int a; } b; union { int c; float d; struct { int e; }; }; struct { double f; } g; } PR50990_siblings; // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use

[clang-tools-extra] 01c1156 - [clang-tidy] Add IgnoreTypes option to modernize-use-nullptr

2023-09-10 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-09-10T12:22:53Z New Revision: 01c11569fc67b2a00403f64695fff6d2b4e78fe5 URL: https://github.com/llvm/llvm-project/commit/01c11569fc67b2a00403f64695fff6d2b4e78fe5 DIFF: https://github.com/llvm/llvm-project/commit/01c11569fc67b2a00403f64695fff6d2b4e78fe5.diff LOG:

[clang-tools-extra] [clang-tidy] Avoid checking magic numbers if _BitInt (PR #65888)

2023-09-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, not perfect, as we going to ignore big ints, but still better than crashing for now. https://github.com/llvm/llvm-project/pull/65888 ___ cfe-commits mailing list

[clang-tools-extra] f2e5000 - [clang-tidy] Fix DanglingHandleCheck to work in C++17 and later mode

2023-09-10 Thread Piotr Zegar via cfe-commits
Author: Ignat Loskutov Date: 2023-09-10T12:52:47Z New Revision: f2e5000937235aa35a9ee4423045b265c2c79e85 URL: https://github.com/llvm/llvm-project/commit/f2e5000937235aa35a9ee4423045b265c2c79e85 DIFF: https://github.com/llvm/llvm-project/commit/f2e5000937235aa35a9ee4423045b265c2c79e85.diff

[clang-tools-extra] [clang-tidy] Exclude bitwise operators in bugprone-non-zero-enum-to-bool-conversion (PR #65498)

2023-09-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/65498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][modernize-use-using]fix function pointer typedef correctly (PR #65558)

2023-09-07 Thread Piotr Zegar via cfe-commits
@@ -314,3 +314,10 @@ typedef struct { struct { int a; struct { struct { int b; } c; int d; } e; } f; typedef struct { struct { int a; } b; union { int c; float d; struct { int e; }; }; struct { double f; } g; } PR50990_siblings; // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use

[clang-tools-extra] [clang-tidy][modernize-use-using]fix function pointer typedef correctly (PR #65558)

2023-09-07 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/65558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][modernize-use-using]fix function pointer typedef correctly (PR #65558)

2023-09-07 Thread Piotr Zegar via cfe-commits
@@ -314,3 +314,10 @@ typedef struct { struct { int a; struct { struct { int b; } c; int d; } e; } f; typedef struct { struct { int a; } b; union { int c; float d; struct { int e; }; }; struct { double f; } g; } PR50990_siblings; // CHECK-MESSAGES: :[[@LINE-1]]:1: warning: use

[clang-tools-extra] [clang-tidy][modernize-use-using]fix function pointer typedef correctly (PR #65558)

2023-09-07 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, This is weird issues because it always happen when two typedefs are one after other. I would personally thing more that LastReplacementEnd is to big, not too small. But if tests check this properly, then I'm fine with it.

[clang] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-15 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > Could I land it now? Yes https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-15 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: If anyone see any other alternative implementations or see some potential issues, then any comments are welcome. https://github.com/llvm/llvm-project/pull/66553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-15 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-15 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/66553 Driver mode passed as an extra argument (command line or config) were not utilized for removing invalid arguments in stripPositionalArgs function, and even if passed as config driver mode were not used for

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/66553 >From d67dbfb1e926e90b2f4a067c86732bd41783791d Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Fri, 15 Sep 2023 21:39:17 + Subject: [PATCH] [clang-tidy] Fix handling --driver-mode= Driver mode passed as

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] ff8b4c8 - [clang-tidy][NFC] Minor cleanup in ClangTidyMain.cpp

2023-09-16 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-09-16T06:17:57Z New Revision: ff8b4c8b2c9cce0e70e6e05ca9f0d4399d670236 URL: https://github.com/llvm/llvm-project/commit/ff8b4c8b2c9cce0e70e6e05ca9f0d4399d670236 DIFF: https://github.com/llvm/llvm-project/commit/ff8b4c8b2c9cce0e70e6e05ca9f0d4399d670236.diff LOG:

[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2023-09-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/66553 >From d67dbfb1e926e90b2f4a067c86732bd41783791d Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Fri, 15 Sep 2023 21:39:17 + Subject: [PATCH 1/2] [clang-tidy] Fix handling --driver-mode= Driver mode passed

[clang-tools-extra] [clang-tidy] add misc-math-constant check (PR #66583)

2023-09-16 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: In general scope of the check is fine, but specially as it's limited to C++20 and way how its written would be good to rename it into modernize-use-std-numbers. https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing

[clang-tools-extra] [clang-tidy] add modernize-math-constant check (PR #66583)

2023-09-16 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > Sure thing. I don't have a strong feeling about the category. I'ts not only about category but also name, check suggests std::numbers, then better name it modernize-use-std-numbers, reason for that is simple. Before C++20 we may want to have a check for example

[clang-tools-extra] [clang-tidy] add modernize-math-constant check (PR #66583)

2023-09-16 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Simply better to reduce scope of check name to avoid overlap, unless check would support pre-c++20, then it could be fine. https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Improve bugprone-unused-return-value check (PR #66573)

2023-09-16 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/66573 Improve diagnostic message to be more straight forward, fix handling of casting to non-void and add new option AllowCastToVoid to control casting to void behavior. Closes #66570 >From

[clang-tools-extra] efebb4e - [clang-tidy] readability-container-size-empty handle std::string length()

2023-08-31 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-31T19:56:07Z New Revision: efebb4e0fabe91b70eaf58c049e516e50c726893 URL: https://github.com/llvm/llvm-project/commit/efebb4e0fabe91b70eaf58c049e516e50c726893 DIFF: https://github.com/llvm/llvm-project/commit/efebb4e0fabe91b70eaf58c049e516e50c726893.diff LOG:

[clang-tools-extra] 4294bca - [clang-tidy] Add exit code support to clang-tidy-diff.py

2023-08-31 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-31T19:58:15Z New Revision: 4294bca5e4f6e6e8cfdbd9fbe8751c5e5415fd47 URL: https://github.com/llvm/llvm-project/commit/4294bca5e4f6e6e8cfdbd9fbe8751c5e5415fd47 DIFF: https://github.com/llvm/llvm-project/commit/4294bca5e4f6e6e8cfdbd9fbe8751c5e5415fd47.diff LOG:

[clang-tools-extra] a199d8f - [clang-tidy][NFC] Improve compilation time of IntegralLiteralExpressionMatcher

2023-08-31 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-31T19:22:17Z New Revision: a199d8fac027c226577ffb0c47b014015980dbb5 URL: https://github.com/llvm/llvm-project/commit/a199d8fac027c226577ffb0c47b014015980dbb5 DIFF: https://github.com/llvm/llvm-project/commit/a199d8fac027c226577ffb0c47b014015980dbb5.diff LOG:

[clang-tools-extra] 26f230f - [clang-tidy][NFC] Fix llvm-else-after-return findings

2023-08-30 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-30T17:41:41Z New Revision: 26f230fe5214614b912b6e1800e1526d625181ac URL: https://github.com/llvm/llvm-project/commit/26f230fe5214614b912b6e1800e1526d625181ac DIFF: https://github.com/llvm/llvm-project/commit/26f230fe5214614b912b6e1800e1526d625181ac.diff LOG:

[clang-tools-extra] c6fa07c - [clang-tidy][NFC][DOC] Update links to HICPP standard

2023-08-30 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-30T18:02:34Z New Revision: c6fa07ca966eb8902465adbe2c6c1e41a108881c URL: https://github.com/llvm/llvm-project/commit/c6fa07ca966eb8902465adbe2c6c1e41a108881c DIFF: https://github.com/llvm/llvm-project/commit/c6fa07ca966eb8902465adbe2c6c1e41a108881c.diff LOG:

[clang-tools-extra] Adding an initial version of the "Initialized Class Members" checker. (PR #65189)

2023-09-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL labeled https://github.com/llvm/llvm-project/pull/65189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Adding an initial version of the "Initialized Class Members" checker. (PR #65189)

2023-09-01 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: " Checks that class members are initialized in constructors (implicitly or explicitly). Reports constructors or classes where class members are not initialized." This is exacly what cppcoreguidelines-pro-type-member-init is doing. And provide same warnings: ``` 10:7: warning:

[clang-tools-extra] Adding an initial version of the "Initialized Class Members" checker. (PR #65189)

2023-09-01 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,105 @@ +//===--- CppInitClassMembersCheck.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] Adding an initial version of the "Initialized Class Members" checker. (PR #65189)

2023-09-01 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,105 @@ +//===--- CppInitClassMembersCheck.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] Adding an initial version of the "Initialized Class Members" checker. (PR #65189)

2023-09-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Do not re-implement thigns that are already covered by other check (cppcoreguidelines-pro-type-member-init). I don't see curently any point for this check. If there are some small difrences bettwen this check and

[clang-tools-extra] [clang-tidy] Adding an initial version of the "Initialized Class Members" checker. (PR #65189)

2023-09-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/65189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Adding an initial version of the "Initialized Class Members" checker. (PR #65189)

2023-09-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL review_requested https://github.com/llvm/llvm-project/pull/65189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Not bad, just basic nits. https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,89 @@ +//===--- ComparePointerToMemberVirtualFunctionCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,89 @@ +//===--- ComparePointerToMemberVirtualFunctionCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,89 @@ +//===--- ComparePointerToMemberVirtualFunctionCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,89 @@ +//===--- ComparePointerToMemberVirtualFunctionCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,89 @@ +//===--- ComparePointerToMemberVirtualFunctionCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,29 @@ +//===--- ComparePointerToMemberVirtualFunctionCheck.h - clang-tidy *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,29 @@ +//===--- ComparePointerToMemberVirtualFunctionCheck.h - clang-tidy *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

2023-09-12 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,39 @@ +//===--- MoveSmartPointerContentsCheck.h - clang-tidy ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

2023-09-12 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - performance-move-smart-pointer-contents + +performance-move-smart-pointer-contents +=== + +Given a smart pointer containing a movable type, such as a +`std::unique_ptr`, it's possible to move the

[clang-tools-extra] [clang-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

2023-09-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. I don't see problem described by this check as an performance issue. For example: ``` std::unique_ptr> ptr; std::vector local = std::move(*ptr); ``` No performance issue here, simply value may need to be moved, do not expect

[clang-tools-extra] [clang-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

2023-09-12 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,80 @@ +//===--- MoveSmartPointerContentsCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] Fix bug in modernize-use-emplace (PR #66169)

2023-09-13 Thread Piotr Zegar via cfe-commits
@@ -247,6 +247,10 @@ Changes in existing checks ` to support for-loops with iterators initialized by free functions like ``begin``, ``end``, or ``size``. +- Improved :doc:`modernize-use-emplace + ` to not replace aggregates that + ``emplace_back`` cannot construct with

[clang-tools-extra] [clang-tidy] Fix bug in modernize-use-emplace (PR #66169)

2023-09-13 Thread Piotr Zegar via cfe-commits
@@ -1332,6 +1337,17 @@ void testBracedInitTemporaries() { v3.push_back(NonTrivialWithCtor{{}}); v3.push_back({{0}}); v3.push_back({{}}); + + std::vector v4; + + // These should not be noticed or fixed; after the correction, the code won't + // compile. +

[clang-tools-extra] [clang-tidy] Fix bug in modernize-use-emplace (PR #66169)

2023-09-13 Thread Piotr Zegar via cfe-commits
@@ -207,11 +211,13 @@ void UseEmplaceCheck::registerMatchers(MatchFinder *Finder) { auto HasConstructExpr = has(ignoringImplicit(SoughtConstructExpr)); // allow for T{} to be replaced, even if no CTOR is declared - auto HasConstructInitListExpr = has(initListExpr(anyOf(

[clang-tools-extra] [clang-tidy] Fix bug in modernize-use-emplace (PR #66169)

2023-09-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Overall LGTM, check comments, and verify if check shouldn't be made more strict. https://github.com/llvm/llvm-project/pull/66169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Fix bug in modernize-use-emplace (PR #66169)

2023-09-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,44 @@ +.. title:: clang-tidy - bugprone-compare-pointer-to-member-virtual-function + +bugprone-compare-pointer-to-member-virtual-function +=== + +Detects unspecified behavior about equality comparison between pointer to

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Few more nits, consider improving documentation & diagnostic message. https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,105 @@ +//===--- ComparePointerToMemberVirtualFunctionCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,44 @@ +.. title:: clang-tidy - bugprone-compare-pointer-to-member-virtual-function + +bugprone-compare-pointer-to-member-virtual-function +=== + +Detects unspecified behavior about equality comparison between pointer to

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,105 @@ +//===--- ComparePointerToMemberVirtualFunctionCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,105 @@ +//===--- ComparePointerToMemberVirtualFunctionCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] Add performance-move-smart-pointer-contents check. (PR #66139)

2023-09-13 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Other common example from me: ``` struct SomeHeavyClass {}; std::unique_ptr build(); void sendMsg() { auto msgContent = build(); Message msg; msg.content = std::move(*msgContent); send(msg); } ``` And next one: ``` struct Info { virtual const std::string&

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Piotr Zegar via cfe-commits
@@ -61,6 +61,6 @@ only advisable to employ ``nullptr`` for comparisons. Limitations --- -The check will not analyze values stored in a variable. For variable, the check -will analyze all virtual methods in the same ``class`` or ``struct`` and diagnose -when assigning

[clang-tools-extra] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL resolved https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] The first PR our of many PRs for the "Initialized Class Members" check. (PR #65189)

2023-09-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. To be honest you still didn't clarify how this check is different from an exist ones. Entire section "Regarding the checker specifications (especially as they compare the cppcoreguidelines-pro-type-member-init):" says only

[clang-tools-extra] [clang-tidy] The first PR our of many PRs for the "Initialized Class Members" check. (PR #65189)

2023-09-08 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,32 @@ +.. title:: clang-tidy - google-cpp-init-class-members + +google-cpp-init-class-members += + +Checks that class members are initialized in constructors (implicitly or +explicitly). Reports constructors or classes where class members

[clang-tools-extra] [clang-tidy] The first PR our of many PRs for the "Initialized Class Members" check. (PR #65189)

2023-09-08 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,105 @@ +//===--- CppInitClassMembersCheck.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] Exclude bitwise operators in bugprone-non-zero-enum-to-bool-conversion (PR #65498)

2023-09-07 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/65498: >From 79b61b63896a203793bdb0af62c8bee4f676a5c1 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 6 Sep 2023 16:41:22 + Subject: [PATCH 1/2] [clang-tidy] Exclude bitwise operators in

[clang] [clang-tidy]add new check `bugprone-compare-pointer-to-member-virtual-function` (PR #66055)

2023-09-15 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: I run this check on two bigger projects, didn't found anything (I was expecting it wont). So at least in case of false-positives it looks fine. https://github.com/llvm/llvm-project/pull/66055 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy][NFC][doc] Improve documentation for modernize-use-equals… (PR #65231)

2023-09-04 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= , Carlos =?utf-8?q?G=C3=A1lvez?= https://github.com/PiotrZSL approved this pull request. No more comments from me.

[clang-tools-extra] [clang-tidy] readability-identifier-naming - fix StructCase and UnionCase in C (PR #65202)

2023-09-02 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL opened https://github.com/llvm/llvm-project/pull/65202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] readability-identifier-naming - fix StructCase and UnionCase in C (PR #65202)

2023-09-02 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL labeled https://github.com/llvm/llvm-project/pull/65202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] readability-identifier-naming - fix StructCase and UnionCase in C (PR #65202)

2023-09-02 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL review_requested https://github.com/llvm/llvm-project/pull/65202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] readability-identifier-naming - fix StructCase and UnionCase in C (PR #65202)

2023-09-02 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL review_requested https://github.com/llvm/llvm-project/pull/65202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] readability-identifier-naming - fix StructCase and UnionCase in C (PR #65202)

2023-09-02 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL review_requested https://github.com/llvm/llvm-project/pull/65202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 93f9f63 - [clang-tidy][NFC] Update documentation for fuchsia-statically-constructed-objects

2023-09-06 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-09-06T18:06:59Z New Revision: 93f9f63b2d3e04ec4abd79fb8119a685d9f750c6 URL: https://github.com/llvm/llvm-project/commit/93f9f63b2d3e04ec4abd79fb8119a685d9f750c6 DIFF: https://github.com/llvm/llvm-project/commit/93f9f63b2d3e04ec4abd79fb8119a685d9f750c6.diff LOG:

  1   2   3   4   5   6   7   8   9   10   >