https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/146970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,181 @@
+//===--- AvoidFundamentalIntegerTypesCheck.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/vbvictor requested changes to this pull request.
For me, It's 100% portability check, but you could postpone changes until
others share opinions.
Matchers needs some rework.
https://github.com/llvm/llvm-project/pull/146970
___
cfe-
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/139430
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/147074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -130,6 +155,10 @@ static const llvm::StringSet<> TypeTraits = {
"result_of",
"invoke_result",
"type_identity",
+"compare_three_way_result",
+"common_comparison_category",
vbvictor wrote:
We usually don't care if there would be a warning
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/147074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/146418
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/147142
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor created
https://github.com/llvm/llvm-project/pull/147142
Added function to filter out options that come from
`ClangTidyOptions::getDefaults()`, but does not have a corresponding check
enabled in the configuration.
Fixes https://github.com/llvm/llvm-project/issues/1
@@ -0,0 +1,108 @@
+//===--- UseConcisePreprocessorDirectivesCheck.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,108 @@
+//===--- UseConcisePreprocessorDirectivesCheck.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,138 @@
+// RUN: %check_clang_tidy -std=c++98 -check-suffixes=,CXX %s
readability-use-concise-preprocessor-directives %t
+// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX %s
readability-use-concise-preprocessor-directives %t
+// RUN: %check_clang_tidy -std=c++
@@ -0,0 +1,138 @@
+// RUN: %check_clang_tidy -std=c++98 -check-suffixes=,CXX %s
readability-use-concise-preprocessor-directives %t
+// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX %s
readability-use-concise-preprocessor-directives %t
+// RUN: %check_clang_tidy -std=c++
@@ -0,0 +1,40 @@
+//===--- UseConcisePreprocessorDirectivesCheck.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,138 @@
+// RUN: %check_clang_tidy -std=c++98 -check-suffixes=,CXX %s
readability-use-concise-preprocessor-directives %t
+// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX %s
readability-use-concise-preprocessor-directives %t
+// RUN: %check_clang_tidy -std=c++
@@ -0,0 +1,40 @@
+//===--- UseConcisePreprocessorDirectivesCheck.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
vbvictor wrote:
I believe all PiotrZSL's comments are correctly resolved, and we could merge it
next week if there would be no more reviews.
One nit from me: since we don't match template functions, we could add
`Limitations` section in check docs to avoid potential confusion and
false-negativ
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/147042
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
> IMO this should just go into LLVM 20, it's a trivial fix.
I don't oppose, then just note that we don't have much time till 20th final
release.
https://github.com/llvm/llvm-project/pull/147048
___
cfe-commits mailing list
cfe-commi
@@ -130,6 +149,12 @@ static const llvm::StringSet<> TypeTraits = {
"result_of",
"invoke_result",
"type_identity",
+"tuple_element",
vbvictor wrote:
Please remove other recursive traits as well, `variant_alternative` is also one
of them.
https
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/147074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/147074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/147012
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -130,6 +155,10 @@ static const llvm::StringSet<> TypeTraits = {
"result_of",
"invoke_result",
"type_identity",
+"compare_three_way_result",
+"common_comparison_category",
vbvictor wrote:
This also has variadic templates
https://github.c
@@ -38,3 +38,10 @@ Options
#define IS_SIGNED(T) std::is_signed::value
Defaults to `false`.
+
+Limitations
+---
+
+Does not currently diagnose uses of ``std::chrono::is_clock``,
+``std::chrono::treat_as_floating_point``, ``std::tuple_element``,
+or ``std::variant
https://github.com/vbvictor requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/147074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -503,6 +503,21 @@ getCheckNames(const ClangTidyOptions &Options,
return Factory.getCheckNames();
}
+void filterCheckOptions(ClangTidyOptions &Options,
+const std::vector &EnabledChecks) {
+ StringSet<> EnabledChecksSet(llvm::from_range, EnabledChe
@@ -0,0 +1,108 @@
+//===--- UseConcisePreprocessorDirectivesCheck.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/vbvictor edited
https://github.com/llvm/llvm-project/pull/146830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/143292
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor approved this pull request.
LGTM, we'd wait a couple of days before merge in case someone else wants to
review it too.
https://github.com/llvm/llvm-project/pull/147074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/146970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,104 @@
+// RUN: %check_clang_tidy %s
portability-avoid-platform-specific-fundamental-types %t --
-config="{CheckOptions: [{key:
portability-avoid-platform-specific-fundamental-types.WarnOnInts, value:
false}, {key:
portability-avoid-platform-specific-fundamental-ty
@@ -0,0 +1,52 @@
+//==-- AvoidPlatformSpecificFundamentalTypesCheck.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,260 @@
+//===--- AvoidPlatformSpecificFundamentalTypesCheck.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/vbvictor commented:
Please remove unnecessary comments that tell the same as code itself, speaking
mostly about `registerMatchers`.
https://github.com/llvm/llvm-project/pull/146970
___
cfe-commits mailing list
cfe-commits@lists.llvm
@@ -0,0 +1,43 @@
+//===--- AvoidPlatformSpecificFundamentalTypesCheck.h - clang-tidy ---*-
C++
+//-*-===//
vbvictor wrote:
Please format this as one-line
https://github.com/llvm/llvm-project/pull/146970
___
cfe-co
@@ -0,0 +1,69 @@
+// RUN: %check_clang_tidy %s
portability-avoid-platform-specific-fundamental-types %t --
-config="{CheckOptions: [{key:
portability-avoid-platform-specific-fundamental-types.WarnOnInts, value:
false}, {key:
portability-avoid-platform-specific-fundamental-typ
@@ -0,0 +1,43 @@
+//===--- AvoidPlatformSpecificFundamentalTypesCheck.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-Ide
@@ -0,0 +1,260 @@
+//===--- AvoidPlatformSpecificFundamentalTypesCheck.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,260 @@
+//===--- AvoidPlatformSpecificFundamentalTypesCheck.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,121 @@
+//===--- AvoidPlatformSpecificFundamentalTypesCheck.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-Ide
@@ -0,0 +1,147 @@
+// RUN: %check_clang_tidy %s
portability-avoid-platform-specific-fundamental-types %t --
-config="{CheckOptions: [{key:
portability-avoid-platform-specific-fundamental-types.WarnOnChars, value:
false}, {key:
portability-avoid-platform-specific-fundamental-t
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/147060
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/146970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,111 @@
+//===--- UseConcisePreprocessorDirectivesCheck.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/vbvictor edited
https://github.com/llvm/llvm-project/pull/146830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
I like `IgnoreAliasing`. That is what user most likely understand with ease.
`SugaredTypes` is more clang developer-ish indeed.
https://github.com/llvm/llvm-project/pull/147060
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
@@ -0,0 +1,40 @@
+//===--- UseConcisePreprocessorDirectivesCheck.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,52 @@
+//==-- AvoidPlatformSpecificFundamentalTypesCheck.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
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/146970
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/127394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
I'm +1 on the `modernize-use-constexpr`.
https://github.com/llvm/llvm-project/pull/146553
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,946 @@
+//===--- UseConstexprCheck.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
@@ -19,6 +19,7 @@ set_target_properties(genconfusable PROPERTIES FOLDER "Clang
Tools Extra/Sourceg
add_clang_library(clangTidyMiscModule STATIC
ConstCorrectnessCheck.cpp
+ UseConstexprCheck.cpp
vbvictor wrote:
Please fix ordering
https://github.com/llvm/
@@ -0,0 +1,946 @@
+//===--- UseConstexprCheck.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,946 @@
+//===--- UseConstexprCheck.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
@@ -43,6 +44,7 @@ class MiscModule : public ClangTidyModule {
"misc-confusable-identifiers");
CheckFactories.registerCheck(
"misc-const-correctness");
+CheckFactories.registerCheck("misc-use-constexpr");
vbvictor wrote:
ditto
https://g
@@ -0,0 +1,946 @@
+//===--- UseConstexprCheck.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,946 @@
+//===--- UseConstexprCheck.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
@@ -270,6 +270,10 @@ Changes in existing checks
excluding variables with ``thread_local`` storage class specifier from being
matched.
+- Added :doc:`modernize-use-constexpr
vbvictor wrote:
This should be placed under "New checks" section
https://github.c
@@ -270,6 +270,10 @@ Changes in existing checks
excluding variables with ``thread_local`` storage class specifier from being
matched.
+- Added :doc:`modernize-use-constexpr
vbvictor wrote:
Also, synced with first sentence in docs.
https://github.com/llvm
vbvictor wrote:
"Checking for the ability to merge automatically..." was for the past 6 hours,
could you please rebase on fresh main again, maybe some conflicts cause it.
https://github.com/llvm/llvm-project/pull/127394
___
cfe-commits mailing list
cf
https://github.com/vbvictor approved this pull request.
LGTM, can merge it after CI pass
https://github.com/llvm/llvm-project/pull/138755
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/138757
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor approved this pull request.
https://github.com/llvm/llvm-project/pull/138757
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/144274
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/138755
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
Please fix merge conflicts that occurred after merge of `std::forward` PR
https://github.com/llvm/llvm-project/pull/138757
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
https://github.com/vbvictor approved this pull request.
LGTM, but I'd like to wait for a second reviewer for some time to double-check
if some tests are missing
https://github.com/llvm/llvm-project/pull/144213
___
cfe-commits mailing list
cfe-commits@
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/139430
>From 08ae4bb4acbd52db438a9defa80ab9568c9e00d8 Mon Sep 17 00:00:00 2001
From: Baranov Victor
Date: Sun, 11 May 2025 05:22:55 +0300
Subject: [PATCH] [clang-tidy] fix false positives with type aliases in
pro-bou
@@ -2122,8 +2122,21 @@ SVal
RegionStoreManager::getBindingForField(RegionBindingsConstRef B,
if (const std::optional &V = B.getDirectBinding(R))
return *V;
- // If the containing record was initialized, try to get its constant value.
+ // UnnamedBitField is always Und
@@ -253,6 +253,9 @@ class FindUninitializedField {
const RecordDecl *RD = RT->getDecl()->getDefinition();
assert(RD && "Referred record has no definition");
for (const auto *I : RD->fields()) {
+if (I->isUnnamedBitField()) {
+ continue;
+
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/142839
>From 06824612e08a578dab8a0c23957624b3f5ac Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Wed, 4 Jun 2025 22:29:51 +0300
Subject: [PATCH 1/2] [clang-tidy] Add new check
`llvm-prefer-static-over-anonym
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/142839
>From 06824612e08a578dab8a0c23957624b3f5ac Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Wed, 4 Jun 2025 22:29:51 +0300
Subject: [PATCH 1/3] [clang-tidy] Add new check
`llvm-prefer-static-over-anonym
@@ -0,0 +1,134 @@
+//===--- MoveSharedPointerContentsCheck.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/vbvictor edited
https://github.com/llvm/llvm-project/pull/67467
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor approved this pull request.
LGTM, but please wait some time for EugeneZelenko to leave a review.
https://github.com/llvm/llvm-project/pull/148622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/148622
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/126434
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/144274
>From dfb2abd2c2711c87a22e8f8c93aa82f2621518cb Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Sun, 15 Jun 2025 22:20:54 +0300
Subject: [PATCH 1/3] [Clang] Fix '-Wformat-overflow' FP when floats had
field-
vbvictor wrote:
Ping
https://github.com/llvm/llvm-project/pull/141304
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=?utf-8?q?Bj=C3=B6rn?= Svensson ,
=?utf-8?q?Bj=C3=B6rn?= Svensson
Message-ID:
In-Reply-To:
https://github.com/vbvictor approved this pull request.
https://github.com/llvm/llvm-project/pull/135391
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
=?utf-8?q?Björn?= Svensson ,
=?utf-8?q?Björn?= Svensson
Message-ID:
In-Reply-To:
https://github.com/vbvictor closed
https://github.com/llvm/llvm-project/pull/135391
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
vbvictor wrote:
I restarted the job, there is already an issue for such fail
https://github.com/llvm/llvm-project/issues/145703
https://github.com/llvm/llvm-project/pull/145066
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
@@ -0,0 +1,19 @@
+// RUN: %check_clang_tidy %s cppcoreguidelines-pro-bounds-pointer-arithmetic %t
vbvictor wrote:
I think it's better to write this test in the existing main test file than to
create new test files for specific issues. After N months/years, it wi
https://github.com/vbvictor approved this pull request.
LGTM with nit.
Please rebase on fresh main and I think we can merge it, unless @carlosgalvezp
has something against.
https://github.com/llvm/llvm-project/pull/127394
___
cfe-commits mailing list
vbvictor wrote:
> I have the issue where I want to test the custom_move and I need check to
> pass only for -check-suffix=,MOVEFUNCTION and fail for everything else, since
> it still expects ::std::move. I am not sure how to write this.
You can create a separate file `missing-std-forward-custo
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/127394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
vbvictor wrote:
Could you use `-enable-check-profile` and get a benchmark for standalone
`clang-tidy` before and after the patch?
https://clang.llvm.org/extra/clang-tidy/Contributing.html#on-checks-profiling
https://github.com/llvm/llvm-project/pull/148757
_
@@ -332,19 +376,42 @@ void UseEmplaceCheck::check(const
MatchFinder::MatchResult &Result) {
}();
assert(Call && "No call matched");
- assert((CtorCall || MakeCall) && "No push_back parameter matched");
+ assert((CtorCall || MakeCall || AggInitCall) &&
+ "No push
@@ -332,19 +376,42 @@ void UseEmplaceCheck::check(const
MatchFinder::MatchResult &Result) {
}();
assert(Call && "No call matched");
- assert((CtorCall || MakeCall) && "No push_back parameter matched");
+ assert((CtorCall || MakeCall || AggInitCall) &&
+ "No push
@@ -1,4 +1,12 @@
-// RUN: %check_clang_tidy %s modernize-use-emplace %t -- \
+// RUN: %check_clang_tidy %s -std=c++11 modernize-use-emplace %t -- \
+// RUN: -config="{CheckOptions: \
+// RUN: {modernize-use-emplace.ContainersWithPushBack: \
+// RUN:':
@@ -1,4 +1,12 @@
-// RUN: %check_clang_tidy %s modernize-use-emplace %t -- \
+// RUN: %check_clang_tidy %s -std=c++11 modernize-use-emplace %t -- \
vbvictor wrote:
```suggestion
// RUN: %check_clang_tidy %s -std=c++11,c++14,c++17 modernize-use-emplace %t --
\
``
@@ -1434,3 +1436,33 @@ void testWithPointerTypes() {
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: unnecessary temporary object
created while calling emplace
// CHECK-FIXES: sp->emplace();
}
+
+namespace GH1225740 {
vbvictor wrote:
nit: After N years this
@@ -1434,3 +1436,33 @@ void testWithPointerTypes() {
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: unnecessary temporary object
created while calling emplace
// CHECK-FIXES: sp->emplace();
}
+
+namespace GH1225740 {
+
+void CXX20testBracedInitTemporaries(){
+
+ std::vector
@@ -1434,3 +1436,33 @@ void testWithPointerTypes() {
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: unnecessary temporary object
created while calling emplace
// CHECK-FIXES: sp->emplace();
}
+
+namespace GH1225740 {
+
+void CXX20testBracedInitTemporaries(){
@@ -1434,3 +1436,33 @@ void testWithPointerTypes() {
// CHECK-MESSAGES: :[[@LINE-1]]:15: warning: unnecessary temporary object
created while calling emplace
// CHECK-FIXES: sp->emplace();
}
+
+namespace GH1225740 {
+
+void CXX20testBracedInitTemporaries(){
+
--
@@ -332,19 +376,42 @@ void UseEmplaceCheck::check(const
MatchFinder::MatchResult &Result) {
}();
assert(Call && "No call matched");
- assert((CtorCall || MakeCall) && "No push_back parameter matched");
+ assert((CtorCall || MakeCall || AggInitCall) &&
+ "No push
1001 - 1100 of 1316 matches
Mail list logo