[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -163,6 +163,12 @@ New checks Flags coroutines that suspend while a lock guard is in scope at the suspension point. +- New :doc:`misc-coroutine-hostile-raii + ` check. + + Detects when objects of certain hostile RAII types persists across suspension points in a corout

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL deleted https://github.com/llvm/llvm-project/pull/68738 ___ 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 check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/68738 ___ 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 check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Except few nits mainly in documentation, this looks fine for me. https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,49 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +Detects when objects of certain hostile RAII types persists across suspension points in a coroutine. +Such hostile types include scoped-lockable types and

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,49 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +Detects when objects of certain hostile RAII types persists across suspension points in a coroutine. +Such hostile types include scoped-lockable types and

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -241,6 +241,7 @@ Clang-Tidy Checks :doc:`llvmlibc-restrict-system-libc-headers `, "Yes" :doc:`misc-confusable-identifiers `, :doc:`misc-const-correctness `, "Yes" + :doc:`misc-coroutine-hostile-raii `_, "No" PiotrZSL wrote: Remove "No", for chec

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -163,6 +163,12 @@ New checks Flags coroutines that suspend while a lock guard is in scope at the suspension point. +- New :doc:`misc-coroutine-hostile-raii + ` check. + + Detects when objects of certain hostile RAII types persists across suspension points in a corout

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,96 @@ +//===--- CoroutineHostileRAII.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: Apa

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: And run clang-format/git-clang-format on this https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix #41439: Update the documentation with the correct information. (PR #69377)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -10,7 +10,12 @@ Guide: https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_Definitions -All parameters should be named, with identical names in the declaration and -implementation. +A parameter name may be omitted only if the parameter is not used

[clang-tools-extra] Fix #41439: Update the documentation with the correct information. (PR #69377)

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

[clang-tools-extra] Fix #41439: Update the documentation with the correct information. (PR #69377)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -10,7 +10,12 @@ Guide: https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_Definitions -All parameters should be named, with identical names in the declaration and -implementation. +A parameter name may be omitted only if the parameter is not used

[clang-tools-extra] Fix #41439: Update the documentation with the correct information. (PR #69377)

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

[clang-tools-extra] 87d0aed - [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-07-29 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-29T10:39:17Z New Revision: 87d0aedaa285cfca92aef67367ce55c476cf444e URL: https://github.com/llvm/llvm-project/commit/87d0aedaa285cfca92aef67367ce55c476cf444e DIFF: https://github.com/llvm/llvm-project/commit/87d0aedaa285cfca92aef67367ce55c476cf444e.diff LOG: [

[clang-tools-extra] f27f22b - [clang-tidy] Added bugprone-inc-dec-in-conditions check

2023-07-30 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-30T13:19:51Z New Revision: f27f22b34516dcb744077710c19d475367e3ef03 URL: https://github.com/llvm/llvm-project/commit/f27f22b34516dcb744077710c19d475367e3ef03 DIFF: https://github.com/llvm/llvm-project/commit/f27f22b34516dcb744077710c19d475367e3ef03.diff LOG: [

[clang-tools-extra] 893d53d - [clang-tidy] Implement modernize-use-constraints

2023-07-30 Thread Piotr Zegar via cfe-commits
Author: Chris Cotter Date: 2023-07-30T20:43:18Z New Revision: 893d53d11c0116718ecc816263f12d51c4612e1d URL: https://github.com/llvm/llvm-project/commit/893d53d11c0116718ecc816263f12d51c4612e1d DIFF: https://github.com/llvm/llvm-project/commit/893d53d11c0116718ecc816263f12d51c4612e1d.diff LOG:

[clang-tools-extra] 575900d - [clang-tidy] Add bugprone-optional-value-conversion check

2023-07-30 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-31T06:22:39Z New Revision: 575900d0d98aafce9d534b6c1917861311f3cfaa URL: https://github.com/llvm/llvm-project/commit/575900d0d98aafce9d534b6c1917861311f3cfaa DIFF: https://github.com/llvm/llvm-project/commit/575900d0d98aafce9d534b6c1917861311f3cfaa.diff LOG: [

[clang-tools-extra] 166372e - [clang-tidy] Fix inline namespaces in llvm-namespace-comment

2023-08-05 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-05T16:47:48Z New Revision: 166372e0bd2db5de459fc9d4be7ea9873ce983f4 URL: https://github.com/llvm/llvm-project/commit/166372e0bd2db5de459fc9d4be7ea9873ce983f4 DIFF: https://github.com/llvm/llvm-project/commit/166372e0bd2db5de459fc9d4be7ea9873ce983f4.diff LOG: [

[clang-tools-extra] ee2b765 - [clang-tidy][NFC] Update documentation for hicpp-avoid-goto

2023-08-05 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-05T16:47:49Z New Revision: ee2b765cdd5ba28055fde25487139f2f1f7c6fb2 URL: https://github.com/llvm/llvm-project/commit/ee2b765cdd5ba28055fde25487139f2f1f7c6fb2 DIFF: https://github.com/llvm/llvm-project/commit/ee2b765cdd5ba28055fde25487139f2f1f7c6fb2.diff LOG: [

[clang-tools-extra] 3e2ed57 - [clang-tidy] Exclude class/struct scope variables from cppcoreguidelines-avoid-non-const-global-variables

2023-08-05 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-05T16:47:49Z New Revision: 3e2ed5701b7e0a5f5b2f0d248fe82f78e0e07267 URL: https://github.com/llvm/llvm-project/commit/3e2ed5701b7e0a5f5b2f0d248fe82f78e0e07267 DIFF: https://github.com/llvm/llvm-project/commit/3e2ed5701b7e0a5f5b2f0d248fe82f78e0e07267.diff LOG: [

[clang-tools-extra] 6a1f8ef - [clang-tidy] Support begin/end free functions in modernize-loop-convert

2023-08-05 Thread Piotr Zegar via cfe-commits
Author: Chris Cotter Date: 2023-08-05T20:55:48Z New Revision: 6a1f8ef8a7aaefea80ef0bc7c6c462a96215b50e URL: https://github.com/llvm/llvm-project/commit/6a1f8ef8a7aaefea80ef0bc7c6c462a96215b50e DIFF: https://github.com/llvm/llvm-project/commit/6a1f8ef8a7aaefea80ef0bc7c6c462a96215b50e.diff LOG:

[clang-tools-extra] 3d80103 - [clang-tidy][NFC] Fix link in documentation

2023-08-05 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-06T05:16:22Z New Revision: 3d8010363895bd063a2d33172a07985b4c9b97ee URL: https://github.com/llvm/llvm-project/commit/3d8010363895bd063a2d33172a07985b4c9b97ee DIFF: https://github.com/llvm/llvm-project/commit/3d8010363895bd063a2d33172a07985b4c9b97ee.diff LOG: [

[clang-tools-extra] b3700c3 - [clang-tidy] Re-add cppcoreguidelines-macro-to-enum alias

2023-08-06 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-06T08:09:57Z New Revision: b3700c34aa712fb4034fb2c31b0767993b1a6b7f URL: https://github.com/llvm/llvm-project/commit/b3700c34aa712fb4034fb2c31b0767993b1a6b7f DIFF: https://github.com/llvm/llvm-project/commit/b3700c34aa712fb4034fb2c31b0767993b1a6b7f.diff LOG: [

[clang-tools-extra] 2111577 - [clang-tidy] Fixed false-negative in readability-identifier-naming

2023-08-06 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-06T09:22:31Z New Revision: 2111577d4dfc1d48b4e2221f84597fa4f54b8cfd URL: https://github.com/llvm/llvm-project/commit/2111577d4dfc1d48b4e2221f84597fa4f54b8cfd DIFF: https://github.com/llvm/llvm-project/commit/2111577d4dfc1d48b4e2221f84597fa4f54b8cfd.diff LOG: [

[clang-tools-extra] 2553e24 - [clang-tidy] Fix false-positives in performanc-noexcept-swap

2023-08-06 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-06T09:23:21Z New Revision: 2553e2403a33824bea7ca280c9328b0b0acf2836 URL: https://github.com/llvm/llvm-project/commit/2553e2403a33824bea7ca280c9328b0b0acf2836 DIFF: https://github.com/llvm/llvm-project/commit/2553e2403a33824bea7ca280c9328b0b0acf2836.diff LOG: [

[clang-tools-extra] 16f6f19 - [clang-tidy][NFC] Update release notes

2023-08-06 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-06T09:36:20Z New Revision: 16f6f1938be6dc582bbfb976603b4e5adfa2302a URL: https://github.com/llvm/llvm-project/commit/16f6f1938be6dc582bbfb976603b4e5adfa2302a DIFF: https://github.com/llvm/llvm-project/commit/16f6f1938be6dc582bbfb976603b4e5adfa2302a.diff LOG: [

[clang-tools-extra] 7a4b12e - [clang-tidy] Exclude delegate constructors in cppcoreguidelines-prefer-member-initializer

2023-08-06 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-07T06:08:39Z New Revision: 7a4b12e39b84d6991be2431e296916353f04b0de URL: https://github.com/llvm/llvm-project/commit/7a4b12e39b84d6991be2431e296916353f04b0de DIFF: https://github.com/llvm/llvm-project/commit/7a4b12e39b84d6991be2431e296916353f04b0de.diff LOG: [

[clang-tools-extra] 1af159e - [clang-tidy][NFC] Update tests to CheckOptions using new syntax

2023-08-07 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-07T19:32:27Z New Revision: 1af159e98c23a293c103e1f548866488126ed6f6 URL: https://github.com/llvm/llvm-project/commit/1af159e98c23a293c103e1f548866488126ed6f6 DIFF: https://github.com/llvm/llvm-project/commit/1af159e98c23a293c103e1f548866488126ed6f6.diff LOG: [

[clang-tools-extra] 7899d2a - [clang-tidy][NFC] Remove trailing whitespaces from ProTypeVarargCheck

2023-08-08 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-08T08:56:41Z New Revision: 7899d2aa666359adc6b1d3a66e36f07c2130eb6c URL: https://github.com/llvm/llvm-project/commit/7899d2aa666359adc6b1d3a66e36f07c2130eb6c DIFF: https://github.com/llvm/llvm-project/commit/7899d2aa666359adc6b1d3a66e36f07c2130eb6c.diff LOG: [

[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 bugprone-non-zero-e

[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: Ap

[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 are

[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 "the

[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 cfe-commits@lists.llvm.org

[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] 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 LOG

[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]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: Apa

[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: Apa

[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: Apa

[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: Apa

[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: Apa

[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: A

[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: A

[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 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 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: Apa

[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: Apa

[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 th

[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 content

[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 a

[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 https://lis

[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] 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. + v4.push_back(

[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]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: Ap

[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: Ap

[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: Ap

[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 m

[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 m

[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 https://lists.llvm.org/cgi-bin/mailman/

[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& get

[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]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] [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 cfe-commits@li

[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
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 depe

[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
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 https://lists.llvm

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

2023-09-15 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-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 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 an

[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] [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 b1ab97c39754126d66ed40fc6

[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 a

[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 l

[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 -prefer-math-c

[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 https://

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > Where would that be? `clang-tools-extra/docs/ReleaseNotes.rst`? I can't find > what the current release notes look like for head. Yes, it's deployed here: https://clang.llvm.org/extra/ReleaseNotes.html https://github.com/llvm/llvm-project/pull/66504

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
@@ -300,6 +300,11 @@ Changes in existing checks ` check to identify calls to static member functions with out-of-class inline definitions. +- Updated :doc:`llvmlibc-implementation-in-namespace PiotrZSL wrote: Put changes in alphabetical order. use 'Impr

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
@@ -30,15 +32,18 @@ void ImplementationInNamespaceCheck::check( return; if (const auto *NS = dyn_cast(MatchedDecl)) { -if (NS->getName() != RequiredNamespace) { - diag(NS->getLocation(), "'%0' needs to be the outermost namespace") - << RequiredNamespace

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

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

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
@@ -30,15 +32,18 @@ void ImplementationInNamespaceCheck::check( return; if (const auto *NS = dyn_cast(MatchedDecl)) { -if (NS->getName() != RequiredNamespace) { - diag(NS->getLocation(), "'%0' needs to be the outermost namespace") - << RequiredNamespace

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
@@ -3,18 +3,18 @@ #define MACRO_A "defining macros outside namespace is valid" class ClassB; -// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration must be declared within the '__llvm_libc' namespace +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration must be declared

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
@@ -3,18 +3,18 @@ #define MACRO_A "defining macros outside namespace is valid" class ClassB; -// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration must be declared within the '__llvm_libc' namespace +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: declaration must be declared

[clang-tools-extra] 8fdbc87 - [clang-tidy] Improve documentation for modernize-use-std-print check

2023-07-01 Thread Piotr Zegar via cfe-commits
Author: Mike Crowe Date: 2023-07-01T08:40:21Z New Revision: 8fdbc8712c5b65617331b3de43bedd302e9cdbc1 URL: https://github.com/llvm/llvm-project/commit/8fdbc8712c5b65617331b3de43bedd302e9cdbc1 DIFF: https://github.com/llvm/llvm-project/commit/8fdbc8712c5b65617331b3de43bedd302e9cdbc1.diff LOG: [c

[clang-tools-extra] c1dc914 - [clang-tidy] Correct sizeof/alignas handling in misc-redundant-expression

2023-07-01 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-01T16:20:38Z New Revision: c1dc914a8ca240650d7411d25c75ad7e2a5974e9 URL: https://github.com/llvm/llvm-project/commit/c1dc914a8ca240650d7411d25c75ad7e2a5974e9 DIFF: https://github.com/llvm/llvm-project/commit/c1dc914a8ca240650d7411d25c75ad7e2a5974e9.diff LOG: [

[clang-tools-extra] 2806cf4 - [clang-tidy] Fix width/precision argument order in modernize-use-std-print

2023-07-03 Thread Piotr Zegar via cfe-commits
Author: Mike Crowe Date: 2023-07-03T16:39:04Z New Revision: 2806cf4b5430ad6d4d5aa2d501aea1de67272876 URL: https://github.com/llvm/llvm-project/commit/2806cf4b5430ad6d4d5aa2d501aea1de67272876 DIFF: https://github.com/llvm/llvm-project/commit/2806cf4b5430ad6d4d5aa2d501aea1de67272876.diff LOG: [c

[clang-tools-extra] ce2d44b - [clang-tidy] Accessing checks not done for aliases of `std::array`

2023-07-03 Thread Piotr Zegar via cfe-commits
Author: Jorge Pinto Sousa Date: 2023-07-03T16:43:08Z New Revision: ce2d44b0ab6da147931e9711e01d44a672ec3854 URL: https://github.com/llvm/llvm-project/commit/ce2d44b0ab6da147931e9711e01d44a672ec3854 DIFF: https://github.com/llvm/llvm-project/commit/ce2d44b0ab6da147931e9711e01d44a672ec3854.diff

[clang-tools-extra] 2ce765e - [clang-tidy] Don't split \r\n in modernize-use-std-print check

2023-07-11 Thread Piotr Zegar via cfe-commits
Author: Mike Crowe Date: 2023-07-11T19:22:31Z New Revision: 2ce765eb2f4feb7555d1416842c542743990b004 URL: https://github.com/llvm/llvm-project/commit/2ce765eb2f4feb7555d1416842c542743990b004 DIFF: https://github.com/llvm/llvm-project/commit/2ce765eb2f4feb7555d1416842c542743990b004.diff LOG: [c

[clang-tools-extra] b389a62 - [clang-tidy] Make MatchesAnyListedNameMatcher cope with unnamed Decl

2023-07-11 Thread Piotr Zegar via cfe-commits
Author: Mike Crowe Date: 2023-07-11T19:22:32Z New Revision: b389a62518ad54ae5a183efa43f8408571b2b8cb URL: https://github.com/llvm/llvm-project/commit/b389a62518ad54ae5a183efa43f8408571b2b8cb DIFF: https://github.com/llvm/llvm-project/commit/b389a62518ad54ae5a183efa43f8408571b2b8cb.diff LOG: [c

[clang-tools-extra] cc4f865 - [clang-tidy] Improve build-in type handling in bugprone-swapped-arguments

2023-07-16 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-16T18:29:29Z New Revision: cc4f86562127f29560abb54d0c11f277b3373a2a URL: https://github.com/llvm/llvm-project/commit/cc4f86562127f29560abb54d0c11f277b3373a2a DIFF: https://github.com/llvm/llvm-project/commit/cc4f86562127f29560abb54d0c11f277b3373a2a.diff LOG: [

[clang-tools-extra] feaf70b - [clang-tidy][NFC] Fix syntax in release notes

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

[clang-tools-extra] 2724507 - [clang-tidy] Model noexcept more properly in bugprone-exception-escape

2023-07-17 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-07-17T15:59:34Z New Revision: 27245077643ae8b94a0511ee1c3a39d6f4ca8076 URL: https://github.com/llvm/llvm-project/commit/27245077643ae8b94a0511ee1c3a39d6f4ca8076 DIFF: https://github.com/llvm/llvm-project/commit/27245077643ae8b94a0511ee1c3a39d6f4ca8076.diff LOG: [

[clang-tools-extra] 0e2c5cd - [clang-tidy] Improve cppcoreguidelines-avoid-reference-coroutine-parameters check

2023-08-24 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-08-24T21:49:28Z New Revision: 0e2c5cda3cc713cac2cae651554fc070788760a6 URL: https://github.com/llvm/llvm-project/commit/0e2c5cda3cc713cac2cae651554fc070788760a6 DIFF: https://github.com/llvm/llvm-project/commit/0e2c5cda3cc713cac2cae651554fc070788760a6.diff LOG: [

<    8   9   10   11   12   13   14   15   16   17   >