@@ -0,0 +1,143 @@
+//===--- 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,143 @@
+//===--- 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
@@ -224,6 +224,12 @@ New checks
Recommends the smallest possible underlying type for an ``enum`` or ``enum``
class based on the range of its enumerators.
+- New :doc:`readability-use-std-min-max
+ ` check.
+
+ Replaces certain conditional statements with equivalent ``std
@@ -336,6 +336,7 @@ Clang-Tidy Checks
:doc:`portability-restrict-system-includes
`, "Yes"
:doc:`portability-simd-intrinsics `,
:doc:`portability-std-allocator-const `,
+ :doc:`readability-use-std-min-max `, "Yes"
5chmidti wrote:
Sorting, same as th
@@ -0,0 +1,143 @@
+//===--- 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,143 @@
+//===--- 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,143 @@
+//===--- 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
5chmidti wrote:
> It currently handles this case:
>
> ```
> if (value1 < value2)
> value = value2;
> else
> value = value1;
> ```
When I add
```c++
if (value1 < value2)
value3 = value2;
else
value3 = value1;
```
(just renamed `value` to `value3`) to the tests, the check does no
https://github.com/5chmidti 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,139 @@
+//===--- 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/5chmidti requested changes to this pull request.
Sorry for making this so iterative ^^ but I think that after these everything
is good from my side.
https://github.com/llvm/llvm-project/pull/77816
___
cfe-commits mailing list
cfe-co
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - readability-use-std-min-max
+
+readability-use-std-min-max
+===
+
+Replaces certain conditionals with ``std::min`` or ``std::max`` for
readability,
+promoting use of standard library functions. Note: This may impac
@@ -0,0 +1,139 @@
+//===--- 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,139 @@
+//===--- 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,139 @@
+//===--- 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/5chmidti 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/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/78796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,139 @@
+//===--- 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,44 @@
+//===--- 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
@@ -0,0 +1,129 @@
+//===--- 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,129 @@
+//===--- 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/5chmidti approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/71650
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -18,19 +18,22 @@ namespace clang::tidy::google::readability {
void AvoidCStyleCastsCheck::registerMatchers(
ast_matchers::MatchFinder *Finder) {
+
5chmidti wrote:
Intended newline?
https://github.com/llvm/llvm-project/pull/71650
__
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/71650
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,129 @@
+//===--- 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/5chmidti 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/5chmidti commented:
@11happy, regarding the statement count:
The tests work when I add `statementCountIs(1),` right after `compoundStmt(` ->
`compoundStmt(statementCountIs(1),`. I removed the bound node, `Compound` and
the `Compoind->size() > 1` check. But the tests should st
@@ -0,0 +1,135 @@
+//===--- 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/5chmidti 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/5chmidti 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/5chmidti approved this pull request.
LGTM, but I'd prefer a second person to approve as well.
https://github.com/llvm/llvm-project/pull/71701
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
https://github.com/5chmidti requested changes to this pull request.
I have some small suggestions.
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/c
https://github.com/5chmidti edited
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
@@ -0,0 +1,147 @@
+//===--- ChainedComparisonCheck.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,147 @@
+//===--- ChainedComparisonCheck.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,147 @@
+//===--- ChainedComparisonCheck.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,147 @@
+//===--- ChainedComparisonCheck.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,147 @@
+//===--- ChainedComparisonCheck.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,147 @@
+//===--- ChainedComparisonCheck.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/5chmidti edited
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/5chmidti approved this pull request.
I think this is correct, but please wait for another approval.
https://github.com/llvm/llvm-project/pull/71683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
@@ -0,0 +1,147 @@
+//===--- ChainedComparisonCheck.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/5chmidti edited
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/5chmidti approved this pull request.
LGTM (-formatting)
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/5chmidti approved this pull request.
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
5chmidti wrote:
@PiotrZSL is this a reconfirmation of your previous approval (given the changed
tests and release note), or is this an approval for everything?
Specifically
> LGTM, but i'm not 100% sure about ExprMutationAnalyzer part (if thats a right
> place).
> Leave it open for few days, so
https://github.com/5chmidti edited
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/5chmidti closed
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/5chmidti 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
https://github.com/5chmidti commented:
I only have two nits
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
5chmidti wrote:
> I think you can't, instead of handling macro definitions, you just should
> handle places where macro is used. It's fine if someone define a macro MY_PI,
> check should flag usage of such macro, not necessarily a macro.
>
> Instead of using MacroDefined and try to find those
Danny =?utf-8?q?Mösch?= ,
Danny =?utf-8?q?Mösch?= ,
Danny =?utf-8?q?Mösch?= ,
Danny =?utf-8?q?Mösch?= ,
Danny =?utf-8?q?Mösch?= ,
Danny =?utf-8?q?Mösch?= ,
Danny =?utf-8?q?Mösch?= ,
Danny =?utf-8?q?Mösch?= ,
Danny =?utf-8?q?Mösch?= ,
Danny =?utf-8?q?Mösch?= ,
Danny =?utf-8?q?Mösch?= ,
Danny =?utf-8
@@ -616,3 +616,26 @@ class Foo {
#undef INVALID_HANDLE_VALUE
#undef RGB
}
+
+namespace GH77684 {
+struct S1 {
+// CHECK-MESSAGES: :[[@LINE+1]]:16: warning: 'M' should be initialized in a
member initializer of the constructor
[cppcoreguidelines-prefer-member-initializer]
+ S1
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/81560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/81890
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti closed
https://github.com/llvm/llvm-project/pull/75706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
5chmidti wrote:
I'm closing this because it is not a good way to solve this. IMO, a good
approach would be to let users write the diagnostic severity they want to have
for all or for specific diagnostics groups in their clangd config file (like
described above). I've opened clangd/clangd#1937
https://github.com/5chmidti commented:
This will be great to have.
It should be possible to add support for template function decls in a
follow-up. Maybe this should be documented to avoid confusion?
https://github.com/llvm/llvm-project/pull/97764
_
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/97764
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,181 @@
+//===--- UseRangesCheck.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,248 @@
+//===--- UseRangesCheck.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,248 @@
+//===--- UseRangesCheck.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,181 @@
+//===--- UseRangesCheck.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,248 @@
+//===--- UseRangesCheck.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,248 @@
+//===--- UseRangesCheck.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,248 @@
+//===--- UseRangesCheck.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,248 @@
+//===--- UseRangesCheck.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
@@ -26,6 +26,7 @@ add_clang_library(clangTidyUtils
TransformerClangTidyCheck.cpp
TypeTraits.cpp
UsingInserter.cpp
+ UseRangesCheck.cpp
5chmidti wrote:
Please fix the ordering for these two files
https://github.com/llvm/llvm-project/pull/97764
_
@@ -0,0 +1,68 @@
+//===--- UseRangesCheck.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,248 @@
+//===--- UseRangesCheck.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,181 @@
+//===--- UseRangesCheck.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,93 @@
+// RUN: %check_clang_tidy -std=c++14-or-later %s
performance-unnecessary-value-param %t
+
+struct ExpensiveToCopyType {
+ virtual ~ExpensiveToCopyType();
+};
+
+template void templateWithNonTemplatizedParameter(const
ExpensiveToCopyType S, T V) {
+ // CHECK
@@ -0,0 +1,93 @@
+// RUN: %check_clang_tidy -std=c++14-or-later %s
performance-unnecessary-value-param %t
+
+struct ExpensiveToCopyType {
+ virtual ~ExpensiveToCopyType();
+};
+
+template void templateWithNonTemplatizedParameter(const
ExpensiveToCopyType S, T V) {
+ // CHECK
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/107409
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti approved this pull request.
LGTM, just a small documentation nit
https://github.com/llvm/llvm-project/pull/107409
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
@@ -112,6 +112,10 @@ Changes in existing checks
` check to support replacing
member function calls too.
+- Improved :doc:`misc-unconventional-assign-operator
+ ` check to avoid
+ false positive for c++23 deducing this.
5chmidti wrote:
`C++23`
https://g
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/107521
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -15,26 +15,26 @@ using namespace clang::ast_matchers;
namespace clang::tidy::readability {
void ContainerContainsCheck::registerMatchers(MatchFinder *Finder) {
- const auto SupportedContainers = hasType(
- hasUnqualifiedDesugaredType(recordType(hasDeclaration(cxxRecor
https://github.com/5chmidti commented:
> I applied this modified version to llvm-project root
One PR per subproject seems to be the preferred way, judging by the responses
to some of those *all of llvm* PRs. IMO, this is a readability cleanup and
would probably be accepted.
https://github.com
https://github.com/5chmidti closed
https://github.com/llvm/llvm-project/pull/106801
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti created
https://github.com/llvm/llvm-project/pull/107641
Describe how the issue that is diagnosed by this check can be resolved.
Namely, by adding an overload for the xvalue case (`&&` parameter).
Fixes #107600
>From 714b66e135efc70aa9b5e9fce3dfe7475a4e0c6c Mon Sep
https://github.com/5chmidti created
https://github.com/llvm/llvm-project/pull/107649
Previously, whenever a replacement was generated by the analysis, a
diagnostic was generated. This became an issue when a call to
`std::min` or `std::max` consisted only of an initializer list with at
least one
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/107649
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti created
https://github.com/llvm/llvm-project/pull/107652
With the `isDefinition` matcher, the analysis and diagnostics will be
constrained to definitions only. Previously forward declarations were
diagnosed as well.
Fixes #107590
>From e4c4a9954c59ec19ecb0c368e22e6
https://github.com/5chmidti updated
https://github.com/llvm/llvm-project/pull/107652
>From e4c4a9954c59ec19ecb0c368e22e62404682370a Mon Sep 17 00:00:00 2001
From: Julian Schmidt
Date: Sat, 7 Sep 2024 00:37:57 +0200
Subject: [PATCH 1/3] [clang-tidy] only diagnose definitions in
readability-enum
https://github.com/5chmidti created
https://github.com/llvm/llvm-project/pull/107657
A `const &` parameter can also be returned via a conditional operator:
`c ? a : b`. This change adds support for diagnosing returning these parameters
with conditional operators.
>From 4c18d0963656c286a76f0af6
https://github.com/5chmidti created
https://github.com/llvm/llvm-project/pull/107850
Subscripting `Tuple`: `Tuple[str, str]` is not supported until python 3.9.
Tested with python 3.8.19, 3.9.19 and 3.12.4.
Fixes #107846
>From 36fff2ffdb29d8510c31464f6f6aad97721607c9 Mon Sep 17 00:00:00 2001
F
https://github.com/5chmidti updated
https://github.com/llvm/llvm-project/pull/107850
>From 36fff2ffdb29d8510c31464f6f6aad97721607c9 Mon Sep 17 00:00:00 2001
From: Julian Schmidt
Date: Mon, 9 Sep 2024 14:03:12 +0200
Subject: [PATCH 1/2] [clang-tidy] remove type annotations that require
python3.
https://github.com/5chmidti updated
https://github.com/llvm/llvm-project/pull/107649
>From 097a679f33bdded29fa67833b7fcd4707057cbf3 Mon Sep 17 00:00:00 2001
From: Julian Schmidt
Date: Sat, 7 Sep 2024 00:10:08 +0200
Subject: [PATCH 1/2] [clang-tidy] fix false positive in
modernize-min-max-use-i
5chmidti wrote:
You're right with both of your comments. I've changed the implementation in the
latest commit.
https://github.com/llvm/llvm-project/pull/107649
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
https://github.com/5chmidti commented:
Please modify the check's documentation of the `HandleClasses` option to
include `std::span`
(https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/docs/clang-tidy/checks/bugprone/dangling-handle.rst).
https://github.com/llvm/llvm-project/pull/
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/107850
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/107871
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,105 @@
+//===--- IncorrectEnableSharedFromThisCheck.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,105 @@
+//===--- IncorrectEnableSharedFromThisCheck.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/5chmidti commented:
> Side note, for future knowledge, what do you mean by
>
> > it is technically not in the format of the RecursiveASTVisitor and may be
> > confusing
>
> ? Is there a guide that can point out what format Visit... should have?
My bad, it actually was named
@@ -0,0 +1,105 @@
+//===--- IncorrectEnableSharedFromThisCheck.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
301 - 400 of 1291 matches
Mail list logo