[clang] [clang-tools-extra] [clang-tidy] Improve performance of misc-const-correctness (PR #72705)

2024-01-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/72705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Improve performance of misc-const-correctness (PR #72705)

2024-01-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/72705 >From 1f9b443a92446ae36825152535706037ef2e87b4 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 15 Nov 2023 16:52:00 + Subject: [PATCH 1/2] [clang-tidy] Improve performance of misc-const-correctness

[clang] [clang-tools-extra] [clang-tidy] Improve performance of misc-const-correctness (PR #72705)

2023-12-11 Thread Congcong Cai via cfe-commits
@@ -15,6 +15,76 @@ namespace clang { using namespace ast_matchers; +static bool canResolveToExprImpl(const Expr *Node, const Expr *Target) { HerrCai0907 wrote: This function is hard to understand because it used matcher style naming but logic operator style

[clang] [clang-tools-extra] [clang-tidy] Improve performance of misc-const-correctness (PR #72705)

2023-12-11 Thread Congcong Cai via cfe-commits
@@ -15,6 +15,76 @@ namespace clang { using namespace ast_matchers; +static bool canResolveToExprImpl(const Expr *Node, const Expr *Target) { + + const auto IgnoreDerivedToBase = [](const Expr *E, auto Matcher) { +if (Matcher(E)) + return true; +if (const auto

[clang] [clang-tools-extra] [clang-tidy] Improve performance of misc-const-correctness (PR #72705)

2023-11-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Replaced certain AST matchers in ExprMutationAnalyzer with a more direct utilization of AST classes. The primary bottleneck was identified in the