https://github.com/PiotrZSL approved this pull request.
https://github.com/llvm/llvm-project/pull/78320
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL closed
https://github.com/llvm/llvm-project/pull/72037
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL closed
https://github.com/llvm/llvm-project/pull/76365
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL approved this pull request.
Just few style issues. For me from functional point of view this check looks
fine and even in this limited state could be delivered.
Personaly:
- I would like to see more code moved into AST matchers
- Support for if/else
- Support for cod
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/77816
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,137 @@
+//===--- UseStdMinMaxCheck.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
@@ -0,0 +1,137 @@
+//===--- UseStdMinMaxCheck.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
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - readability-use-std-min-max
+
+readability-use-std-min-max
+===
+
+Replaces certain conditional statements with equivalent ``std::min`` or
+``std::max`` expressions. Note: This may impact
+performance in critical co
@@ -0,0 +1,137 @@
+//===--- UseStdMinMaxCheck.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
@@ -0,0 +1,137 @@
+//===--- UseStdMinMaxCheck.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
@@ -0,0 +1,137 @@
+//===--- UseStdMinMaxCheck.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
@@ -0,0 +1,137 @@
+//===--- UseStdMinMaxCheck.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
@@ -0,0 +1,137 @@
+//===--- UseStdMinMaxCheck.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
@@ -0,0 +1,137 @@
+//===--- UseStdMinMaxCheck.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
PiotrZSL wrote:
@PiotrZSL I would say: fell free to merge it. It's not that it would break too
much. In worst case we got around ~1 month to fix it on a branch (if someone
would complain).
https://github.com/llvm/llvm-project/pull/78320
___
cfe-commi
PiotrZSL wrote:
@5chmidti I would say: fell free to merge it. It's not that it would break too
much. In worst case we got around ~1 month to fix it on a branch (if someone
would complain).
https://github.com/llvm/llvm-project/pull/78320
___
cfe-commi
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/77816
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL approved this pull request.
https://github.com/llvm/llvm-project/pull/77816
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,29 @@
+.. title:: clang-tidy - readability-use-std-min-max
+
+readability-use-std-min-max
+===
+
+Replaces certain conditional statements with equivalent ``std::min`` or
+``std::max`` expressions. Note: This may impact
PiotrZSL w
@@ -0,0 +1,29 @@
+.. title:: clang-tidy - readability-use-std-min-max
+
+readability-use-std-min-max
+===
+
+Replaces certain conditional statements with equivalent ``std::min`` or
+``std::max`` expressions. Note: This may impact
PiotrZSL w
@@ -0,0 +1,41 @@
+//===--- UseStdMinMaxCheck.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
@@ -241,6 +241,12 @@ New checks
Detects C++ code where a reference variable is used to extend the lifetime
of a temporary object that has just been constructed.
+- New :doc:`readability-use-std-min-max
+ ` check.
+
+ Replaces certain conditional statements with equivalen
@@ -0,0 +1,130 @@
+//===--- UseStdMinMaxCheck.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
@@ -18,6 +18,45 @@ namespace clang::tidy::readability {
static const llvm::StringRef AlgorithmHeader("");
+static bool MinCondition(const BinaryOperator::Opcode &Op,const Expr
*CondLhs,const Expr *CondRhs,const Expr *AssignLhs,const Expr *AssignRhs,const
ASTContext &Context
@@ -18,6 +18,45 @@ namespace clang::tidy::readability {
static const llvm::StringRef AlgorithmHeader("");
+static bool MinCondition(const BinaryOperator::Opcode &Op,const Expr
*CondLhs,const Expr *CondRhs,const Expr *AssignLhs,const Expr *AssignRhs,const
ASTContext &Context
@@ -0,0 +1,151 @@
+//===--- UseStdMinMaxCheck.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
@@ -0,0 +1,151 @@
+//===--- UseStdMinMaxCheck.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
@@ -0,0 +1,151 @@
+//===--- UseStdMinMaxCheck.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
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/77816
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL approved this pull request.
Except reported nits, looks fine.
https://github.com/llvm/llvm-project/pull/77816
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
@@ -0,0 +1,151 @@
+//===--- UseStdMinMaxCheck.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
@@ -0,0 +1,151 @@
+//===--- UseStdMinMaxCheck.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
@@ -0,0 +1,151 @@
+//===--- UseStdMinMaxCheck.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
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/72050
>From 09bc9ecebe2e9d49a690c9864aa09d5b8c4403e4 Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 12 Nov 2023 11:31:21 +
Subject: [PATCH 1/3] [clang-tidy] Fixes to
readability-implicit-bool-conversion
-
https://github.com/PiotrZSL requested changes to this pull request.
There are still some functional bugs. I would say safer would be to postpone
this check to Clang-tidy 19.
https://github.com/llvm/llvm-project/pull/77816
___
cfe-commits mailing list
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/77816
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,151 @@
+//===--- UseStdMinMaxCheck.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
Author: Piotr Zegar
Date: 2024-01-23T07:09:24Z
New Revision: 150a58bed08f9f83ae4157a033ef1c67c210bbc4
URL:
https://github.com/llvm/llvm-project/commit/150a58bed08f9f83ae4157a033ef1c67c210bbc4
DIFF:
https://github.com/llvm/llvm-project/commit/150a58bed08f9f83ae4157a033ef1c67c210bbc4.diff
LOG: [
@@ -147,10 +161,52 @@ void OwningMemoryCheck::registerMatchers(MatchFinder
*Finder) {
// Matching on functions, that return an owner/resource, but don't declare
// their return type as owner.
Finder->addMatcher(
- functionDecl(hasDescendant(returnStmt(hasReturnValue
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/77246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/77246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -147,10 +161,52 @@ void OwningMemoryCheck::registerMatchers(MatchFinder
*Finder) {
// Matching on functions, that return an owner/resource, but don't declare
// their return type as owner.
Finder->addMatcher(
- functionDecl(hasDescendant(returnStmt(hasReturnValue
@@ -147,10 +161,52 @@ void OwningMemoryCheck::registerMatchers(MatchFinder
*Finder) {
// Matching on functions, that return an owner/resource, but don't declare
// their return type as owner.
Finder->addMatcher(
- functionDecl(hasDescendant(returnStmt(hasReturnValue
https://github.com/PiotrZSL updated
https://github.com/llvm/llvm-project/pull/77246
>From b2e230f90f97c0fb3385ab05d0217371b72b9a88 Mon Sep 17 00:00:00 2001
From: Piotr Zegar
Date: Sun, 7 Jan 2024 18:52:05 +
Subject: [PATCH 1/2] [clang-tidy] Add support for lambdas in
cppcoreguidelines-owni
PiotrZSL wrote:
There is already --export_fixes that can be used in +- same way.
Maybe better would be to change --export_fixes to take filename or directory
(ends with / or exist as directory), and in that case it could save to
directory or merge to single file.
https://github.com/llvm/llvm-p
@@ -384,14 +386,26 @@ def main():
clang_tidy_binary = find_binary(args.clang_tidy_binary, "clang-tidy",
build_path)
-tmpdir = None
if args.fix:
clang_apply_replacements_binary = find_binary(
args.clang_apply_replacements_binary, "clang-appl
@@ -384,14 +386,26 @@ def main():
clang_tidy_binary = find_binary(args.clang_tidy_binary, "clang-tidy",
build_path)
-tmpdir = None
if args.fix:
clang_apply_replacements_binary = find_binary(
args.clang_apply_replacements_binary, "clang-appl
https://github.com/PiotrZSL commented:
Release notes will be needed, in clang-tools-extra/docs/ReleaseNotes.rst.
Additionally probably similar change should be done to clang-tidy-diff.py
https://github.com/llvm/llvm-project/pull/69453
___
cfe-commits m
@@ -0,0 +1,46 @@
+//===--- CastingThroughVoidCheck.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
@@ -0,0 +1,46 @@
+//===--- CastingThroughVoidCheck.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
@@ -0,0 +1,46 @@
+//===--- CastingThroughVoidCheck.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
@@ -0,0 +1,46 @@
+//===--- CastingThroughVoidCheck.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
@@ -0,0 +1,46 @@
+//===--- CastingThroughVoidCheck.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
@@ -0,0 +1,46 @@
+//===--- CastingThroughVoidCheck.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
@@ -0,0 +1,46 @@
+//===--- CastingThroughVoidCheck.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
@@ -0,0 +1,37 @@
+//===--- CastingThroughVoidCheck.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
@@ -0,0 +1,37 @@
+//===--- CastingThroughVoidCheck.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
@@ -125,6 +125,12 @@ Improvements to clang-tidy
New checks
^^
+- New :doc:`bugprone-casting-through-void
+ ` check.
+
+ Detects usage of ``static_cast`` pointer to the other pointer throght
PiotrZSL wrote:
Not only static_cast, need some generic des
@@ -82,6 +82,7 @@ Clang-Tidy Checks
:doc:`bugprone-bad-signal-to-kill-thread
`,
:doc:`bugprone-bool-pointer-implicit-conversion
`, "Yes"
:doc:`bugprone-branch-clone `,
+ :doc:`bugprone-casting-through-void `, "Yes"
PiotrZSL wrote:
Remove "Yes", ch
@@ -0,0 +1,18 @@
+// RUN: %check_clang_tidy %s bugprone-casting-through-void %t
+
+using T = void*;
+
+void test() {
+ int i = 100;
+ double d = 100;
+
+ static_cast(static_cast(&d));
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not cast double * to int *
through void * [
https://github.com/PiotrZSL commented:
Good start, I will look more closely into documentation once I finish work.
https://github.com/llvm/llvm-project/pull/69465
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
@@ -327,14 +345,14 @@ def main():
if yaml and args.export_fixes:
PiotrZSL wrote:
if combine_fixes:
https://github.com/llvm/llvm-project/pull/69453
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
https://github.com/PiotrZSL approved this pull request.
LGTM.
Would be good to test if both scripts are working before merge.
https://github.com/llvm/llvm-project/pull/69453
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org
@@ -0,0 +1,11 @@
+.. title:: clang-tidy - bugprone-casting-through-void
+
+bugprone-casting-through-void
+=
+
+A check detects usage of ``static_cast`` pointer to the other pointer throght
PiotrZSL wrote:
```Detects unsafe or redundant
@@ -0,0 +1,11 @@
+.. title:: clang-tidy - bugprone-casting-through-void
+
+bugprone-casting-through-void
+=
+
+A check detects usage of ``static_cast`` pointer to the other pointer throght
+``static_cast`` to ``void *`` in C++ code.
+
+Use of these cast
@@ -0,0 +1,11 @@
+.. title:: clang-tidy - bugprone-casting-through-void
+
+bugprone-casting-through-void
+=
+
+A check detects usage of ``static_cast`` pointer to the other pointer throght
+``static_cast`` to ``void *`` in C++ code.
+
+Use of these cast
Author: Piotr Zegar
Date: 2023-10-18T16:26:08Z
New Revision: 598712315b0e55e860d8c82e6e212df20b4d3ff4
URL:
https://github.com/llvm/llvm-project/commit/598712315b0e55e860d8c82e6e212df20b4d3ff4
DIFF:
https://github.com/llvm/llvm-project/commit/598712315b0e55e860d8c82e6e212df20b4d3ff4.diff
LOG: [
Author: Piotr Zegar
Date: 2023-10-18T16:30:18Z
New Revision: 1891d21312cf45f070532bd3709eecf6a0e4f54e
URL:
https://github.com/llvm/llvm-project/commit/1891d21312cf45f070532bd3709eecf6a0e4f54e
DIFF:
https://github.com/llvm/llvm-project/commit/1891d21312cf45f070532bd3709eecf6a0e4f54e.diff
LOG: [
@@ -0,0 +1,50 @@
+//===--- CastingThroughVoidCheck.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
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - bugprone-casting-through-void
+
+bugprone-casting-through-void
+=
+
+A check detects unsafe or redundant two-step casting operations involving
``void*``.
+
+Two-step type conversions via void* are discouraged f
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - bugprone-casting-through-void
+
+bugprone-casting-through-void
+=
+
+A check detects unsafe or redundant two-step casting operations involving
``void*``.
PiotrZSL wrote:
do not start with A ch
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - bugprone-casting-through-void
+
+bugprone-casting-through-void
+=
+
+A check detects unsafe or redundant two-step casting operations involving
``void*``.
+
+Two-step type conversions via void* are discouraged f
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - bugprone-casting-through-void
+
+bugprone-casting-through-void
+=
+
+A check detects unsafe or redundant two-step casting operations involving
``void*``.
+
+Two-step type conversions via void* are discouraged f
@@ -0,0 +1,96 @@
+// RUN: %check_clang_tidy %s bugprone-casting-through-void %t
+
+using V = void*;
+using CV = const void*;
+
+int i = 100;
+double d = 100;
+const int ci = 100;
+const double cd = 100;
+
+void normal_test() {
+ static_cast(static_cast(&d));
+ // CHECK-MESSAGES:
@@ -0,0 +1,96 @@
+// RUN: %check_clang_tidy %s bugprone-casting-through-void %t
+
+using V = void*;
+using CV = const void*;
+
+int i = 100;
+double d = 100;
+const int ci = 100;
+const double cd = 100;
+
+void normal_test() {
+ static_cast(static_cast(&d));
+ // CHECK-MESSAGES:
@@ -0,0 +1,96 @@
+// RUN: %check_clang_tidy %s bugprone-casting-through-void %t
+
+using V = void*;
+using CV = const void*;
+
+int i = 100;
+double d = 100;
+const int ci = 100;
+const double cd = 100;
+
+void normal_test() {
+ static_cast(static_cast(&d));
+ // CHECK-MESSAGES:
@@ -0,0 +1,96 @@
+// RUN: %check_clang_tidy %s bugprone-casting-through-void %t
+
+using V = void*;
+using CV = const void*;
+
+int i = 100;
+double d = 100;
+const int ci = 100;
+const double cd = 100;
+
+void normal_test() {
+ static_cast(static_cast(&d));
+ // CHECK-MESSAGES:
@@ -0,0 +1,50 @@
+//===--- CastingThroughVoidCheck.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
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - bugprone-casting-through-void
+
+bugprone-casting-through-void
+=
+
+A check detects unsafe or redundant two-step casting operations involving
``void*``.
+
+Two-step type conversions via void* are discouraged f
@@ -2732,6 +2732,16 @@ extern const internal::VariadicDynCastAllOfMatcher castExpr;
extern const internal::VariadicDynCastAllOfMatcher
cxxFunctionalCastExpr;
+/// Matches a builtin bit cast expression.
+///
+/// Example: Matches __builtin_bit_cast(double, i) in
+/// \code
@@ -0,0 +1,50 @@
+//===--- CastingThroughVoidCheck.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
Author: Piotr Zegar
Date: 2023-10-18T17:34:40Z
New Revision: fea55db23372e24e764627c81dd7cf565dcf54c2
URL:
https://github.com/llvm/llvm-project/commit/fea55db23372e24e764627c81dd7cf565dcf54c2
DIFF:
https://github.com/llvm/llvm-project/commit/fea55db23372e24e764627c81dd7cf565dcf54c2.diff
LOG: [
https://github.com/PiotrZSL created
https://github.com/llvm/llvm-project/pull/69501
Improved cppcoreguidelines-pro-type-const-cast check to ignore casts to const
type (controlled by option) and casts in implicitly invoked code.
Fixes #69319
>From ada6ee07f310ce482ef0cb0339b25db6e31d8c13 Mon
https://github.com/PiotrZSL created
https://github.com/llvm/llvm-project/pull/69514
Ignore functions and constructors that are maked deleted or defaulted in
cppcoreguidelines-rvalue-reference-param-not-moved check.
Fixes #69412
>From 1b32a05c1de0b22749e6f4c2754ade8f7544acce Mon Sep 17 00:00:
https://github.com/PiotrZSL created
https://github.com/llvm/llvm-project/pull/69529
Add StrictMode option that controls behavior whatever
warnings are emitted for casts on non-polymorphic types.
Fixes: #69414
>From 641a1daf6cd969a697c3cb4f0f7e168ca9187fe9 Mon Sep 17 00:00:00 2001
From: Piotr Z
@@ -0,0 +1,46 @@
+//===--- CastingThroughVoidCheck.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
https://github.com/PiotrZSL approved this pull request.
LGTM.
About `static_cast(reinterpret_cast(&i));`:
- I'm working now on a check for redundant casts, it will detect this one, so
no need to do it in this check.
You may consider adding support for double and more pointers, but that's not s
https://github.com/PiotrZSL closed
https://github.com/llvm/llvm-project/pull/69453
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
PiotrZSL wrote:
> Any particular reason for the `+-`? Maybe it can be resolved?
I'm just not too familiar with this check.
But current change looks fine, and could be merged.
https://github.com/llvm/llvm-project/pull/69207
___
cfe-commits mailing list
@@ -297,6 +297,10 @@ Changes in existing checks
` check to
ignore false-positive for ``if constexpr`` in lambda expression.
+- Improved :doc:`readability-const-params-in-decls
+ ` place the hint check
under
PiotrZSL wrote:
`Improved xyz check to place .
@@ -297,6 +297,10 @@ Changes in existing checks
` check to
ignore false-positive for ``if constexpr`` in lambda expression.
+- Improved :doc:`readability-const-params-in-decls
+ ` place the hint check
under
PiotrZSL wrote:
Or it can be just Improved xyz
https://github.com/PiotrZSL approved this pull request.
https://github.com/llvm/llvm-project/pull/69103
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -285,6 +285,10 @@ Changes in existing checks
` check to fix function pointer and
forward declared ``typedef`` correctly.
+- Improved :doc:`modernize-use-using
PiotrZSL wrote:
merge with previous entry for this check.
https://github.com/llvm/llvm-proje
@@ -325,6 +329,7 @@ Changes in existing checks
identify calls to static member functions with out-of-class inline
definitions.
+
PiotrZSL wrote:
remove added empty line
https://github.com/llvm/llvm-project/pull/69102
_
@@ -28,6 +28,15 @@ After:
using R_t = struct { int a; };
using R_p = R_t*;
+The checker ignores `typedef` within `extern "C" { ... }` blocks.
+
+.. code-block:: c++
+
+ extern "C" {
+
PiotrZSL wrote:
remove empty line
https://github.com/llvm/llvm-projec
@@ -28,6 +28,15 @@ After:
using R_t = struct { int a; };
using R_p = R_t*;
+The checker ignores `typedef` within `extern "C" { ... }` blocks.
PiotrZSL wrote:
Maybe this should be put into configuration option ? To give an option to
preserve current behav
https://github.com/PiotrZSL approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/69700
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
PiotrZSL wrote:
> Is there any way to trigger the failing tests within this PR?
No, in worst case we can revert faulty change.
https://github.com/llvm/llvm-project/pull/69700
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
PiotrZSL wrote:
Lets push this, if it wont help then we can revert oryginal change.
https://github.com/llvm/llvm-project/pull/69700
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/PiotrZSL closed
https://github.com/llvm/llvm-project/pull/69700
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
901 - 1000 of 2500 matches
Mail list logo