https://github.com/5chmidti updated
https://github.com/llvm/llvm-project/pull/120027
>From 35a1cecb08d1827fb45c2e6bb06983ed363ca769 Mon Sep 17 00:00:00 2001
From: Julian Schmidt
Date: Mon, 16 Dec 2024 01:18:06 +0100
Subject: [PATCH] [ASTMatchers] fix `isStaticStorageClass` not matching
definit
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/120027
___
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/120027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti updated
https://github.com/llvm/llvm-project/pull/120027
>From 07dd31ddd40cdb792d33fc3394f6356de029a137 Mon Sep 17 00:00:00 2001
From: Julian Schmidt
Date: Mon, 16 Dec 2024 01:28:42 +0100
Subject: [PATCH] [ASTMatchers] fix `isStaticStorageClass` not matching
definit
https://github.com/5chmidti commented:
> Not sure how many more tests I should add, since this uses the same code
> paths as free functions.
I think the amount of tests you've added are enough
> This is the 5th instance of the `isStatic` matcher in clang-tidy.
Good point, thanks. I've checked
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/119974
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti ready_for_review
https://github.com/llvm/llvm-project/pull/120027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -104,14 +104,16 @@ AST_MATCHER_FUNCTION_P(StatementMatcher,
hasArgument(0, hasType(ReceiverType);
}
+AST_MATCHER(CXXMethodDecl, isStatic) { return Node.isStatic(); }
+
AST_MATCHER_FUNCTION(StatementMatcher, isConstRefReturningFunctionCal
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/119974
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
5chmidti wrote:
The move to bugprone makes sense to me.
However, I'm not sure that conversions of integers to signed integers should be
ignored-by-default since C++20. It may be well-defined behavior w.r.t. the
resulting value, but the pattern is still prone to bugs. You will get a
well-defi
5chmidti wrote:
Ping
https://github.com/llvm/llvm-project/pull/113837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
5chmidti wrote:
Another solution would be to explicitly document the definition is not matching
with `isStaticStorageClass`, and we add `hasCanonicalDecl`. That solution would
do less behind the scenes at the cost of potentially tripping poeple up (though
documenting this for `isStaticStorageC
5chmidti wrote:
> whether `bugprone-no-escape` would want to see these changes or not.
The `bugprone-no-escape` check seems to be a bit limited because it only works
with `dispatch_async` and `dispatch_after` (from Apple, it seems). It could
probably be expanded to include some more async cons
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/119543
___
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.
Thanks
https://github.com/llvm/llvm-project/pull/119948
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
5chmidti wrote:
@HerrCai0907 Could you retroactively add a release note? While this hopefully
doesn't exist in anyone's config, but if someone were to look, they'd see why
this was done.
https://github.com/llvm/llvm-project/pull/119948
___
cfe-commi
https://github.com/5chmidti approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/120768
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,39 @@
+//===--- StringViewSubstrCheck.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:
@@ -0,0 +1,39 @@
+//===--- StringViewSubstrCheck.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:
@@ -0,0 +1,201 @@
+//===--- StringViewSubstrCheck.cpp - 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: Ap
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/120055
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,201 @@
+//===--- StringViewSubstrCheck.cpp - 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: Ap
https://github.com/5chmidti commented:
The detected issues together with the fixes can currently produce code that
can't compile. For example:
```diff
void f(std::string_view sv);
void g(std::string_view sv) {
- const auto copy = sv = sv.substr(0, sv.length() - 3);
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/118209
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -319,10 +319,9 @@ Changes in existing checks
diagnostic.
- Improved :doc:`readability-implicit-bool-conversion
- ` check
- by adding the option `UseUpperCaseLiteralSuffix` to select the
- case of the literal suffix in fixes and fixing false positive for implicit
- con
@@ -287,72 +292,83 @@ void
ImplicitBoolConversionCheck::registerMatchers(MatchFinder *Finder) {
auto BoolXor =
binaryOperator(hasOperatorName("^"), hasLHS(ImplicitCastFromBool),
hasRHS(ImplicitCastFromBool));
- auto ComparisonInCall = allOf(
-
5chmidti wrote:
You have added `-check-suffix` options to each of your `RUN` lines, but none of
your `CHECK-MESSAGES` are actually using it. E.g.,:
```C++
// CHECK-MESSAGES-TO-BOOL-FALSE
```
Although, instead of using the suffixes to say `FALSE`, you could sw
@@ -1,10 +1,93 @@
.. title:: clang-tidy - bugprone-narrowing-conversions
-.. meta::
- :http-equiv=refresh: 5;URL=../cppcoreguidelines/narrowing-conversions.html
bugprone-narrowing-conversions
==
-The bugprone-narrowing-conversions check is an a
5chmidti wrote:
Please change the header guard to use `bugprone` as the 'path' instead of
`cppcoreguidelines`
https://github.com/llvm/llvm-project/pull/120245
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
h
@@ -411,7 +411,7 @@ Check aliases
.. csv-table::
:header: "Name", "Redirect", "Offers fixes"
- :doc:`bugprone-narrowing-conversions `,
:doc:`cppcoreguidelines-narrowing-conversions
`,
+ :doc:`cppcoreguidelines-narrowing-conversions
`, :doc:`bugprone-narrowing-convers
https://github.com/5chmidti commented:
No release note is fine for this patch, as this fixes a problem that is
invisible when using clang-tidy, but visible with clangd. The general case for
clangd is fixed in #118569. Otherwise, I don't think this would be a release
note for clang-tidy, but fo
@@ -173,21 +174,21 @@ static void removeFunctionArgs(DiagnosticBuilder &Diag,
const CallExpr &Call,
for (unsigned Index : Sorted) {
const Expr *Arg = Call.getArg(Index);
if (Commas[Index]) {
- if (Index >= Commas.size()) {
-Diag << FixItHint::CreateRemov
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/118568
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -28,6 +28,7 @@
#include "llvm/ADT/Twine.h"
#include "llvm/Support/raw_ostream.h"
#include
+#include
5chmidti wrote:
Please remove this include
https://github.com/llvm/llvm-project/pull/118568
___
cfe-commits ma
5chmidti wrote:
The file-names should follow the naming convention of the other tests:
`checkers/misc/redundant-expression.cpp` (applies to both).
@HerrCai0907 @PiotrZSL IMO merging these tests with the existing ones would
result in too-large files, so the files would probably be named somet
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/119974
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -33,6 +33,13 @@ compilation options on the command line after ``--``:
$ clang-tidy test.cpp -- -Imy_project/include -DMY_DEFINES ...
+If there are too many options to specify on the command line, you can store
them
+in a parameter file, and use :program:`clang-tidy` wit
https://github.com/5chmidti commented:
As this is not using `llvm::cl`, it is not automatically documented in
`--help`. Maybe some sort of comment inside `ClangTidyHelp` would help with the
discoverability from the CLI.
https://github.com/llvm/llvm-project/pull/120547
_
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/120547
___
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.
Thanks.
LGTM from my side, but give it a few days in case the others want to review as
well
https://github.com/llvm/llvm-project/pull/119543
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/118074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,97 @@
+//===--- UseSpanFirstLastCheck.cpp - 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/5chmidti commented:
You could try to implement the check with `TK_TraverseUnlessSpelledInSource` if
you'd like, which would only add two more matchers via `addMatcher`, and the
traversal kind function (https://godbolt.org/z/GrfMTxeGa). IMO, this can be
done in a follow-up by
@@ -0,0 +1,97 @@
+//===--- UseSpanFirstLastCheck.cpp - 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/5chmidti edited
https://github.com/llvm/llvm-project/pull/113144
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,41 @@
+//===--- UseIntegerSignComparisonCheck.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/5chmidti requested changes to this pull request.
The check will currently not flag the use of literals like so:
```c++
void foo(unsigned short *uArray){
uArray[0] <= 10;
}
```
https://godbolt.org/z/a6W9xGcMY
because they do not contain an implicit cast. Only one of the tw
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/113144
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,34 @@
+.. title:: clang-tidy - modernize-use-integer-sign-comparison
+
+modernize-use-integer-sign-comparison
+=
+
+Replace comparisons between signed and unsigned integers with their safe
+C++20 ``std::cmp_*`` alternative, if availab
@@ -0,0 +1,182 @@
+//===--- UseIntegerSignComparisonCheck.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
@@ -265,4 +255,63 @@ void test(std::string s, std::string_view sv, sub_string
ss, sub_sub_string sss,
s.compare(0, 1, "ab") == 0;
s.rfind(suffix, 1) == s.size() - suffix.size();
+
+ #define STR(x) std::string(x)
+ 0 == STR(s).find("a");
+
+ #define STRING s
+ if (0 ==
@@ -171,10 +182,26 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder
*Finder) {
hasRHS(lengthExprForStringNode("needle")
.bind("expr"),
this);
+
+ // Case 6: X.substr(0, LEN(Y)) [!=]= Y -> ends_with.
@@ -183,40 +210,47 @@ void UseStartsEndsWithCheck::check(const
MatchFinder::MatchResult &Result) {
const auto *EndsWithFunction =
Result.Nodes.getNodeAs("ends_with_fun");
assert(bool(StartsWithFunction) != bool(EndsWithFunction));
+
const CXXMethodDecl *Replacemen
@@ -240,6 +240,9 @@ void UseStartsEndsWithCheck::check(const
MatchFinder::MatchResult &Result) {
ReplacementFunction->getName());
// Replace arguments and everything after the function call.
+ if (FindExpr->getNumArgs() == 0) {
+r
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/117165
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti commented:
The matching-on-members part looks good, but I don't know about adding the
`ShowFullyQualifiedNames` option
https://github.com/llvm/llvm-project/pull/117165
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -43,7 +43,10 @@ class UnsafeFunctionsCheck : public ClangTidyCheck {
private:
const std::vector CustomFunctions;
- // If true, the default set of functions are reported.
+ /// If true, the fully qualified name of custom functions will be shown in a
+ /// note tag.
+ c
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/118985
___
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/118074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,96 @@
+//===--- UseSpanFirstLastCheck.cpp - 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,96 @@
+//===--- UseSpanFirstLastCheck.cpp - 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/5chmidti commented:
> wasting effort would not be the problem (it never is; learning is the goal) -
> right now i just dont understand the difference, and therefore dont see the
> benefit, as far as i see it would introduce more complicated code to still
> handle templates.
5chmidti wrote:
Please also add an `ASSERT_FALSE` (or just `ASSERT_TRUE(!opt.has_value())`)
with a dereference after, to show that there are false-negatives
https://github.com/llvm/llvm-project/pull/115051
___
cfe-co
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/115051
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -27,19 +29,44 @@ class UncheckedOptionalAccessCheck : public ClangTidyCheck {
UncheckedOptionalAccessCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
ModelOptions{
-Options.getLocalOrGlobal("IgnoreSmartPointerDeref
@@ -27,19 +29,44 @@ class UncheckedOptionalAccessCheck : public ClangTidyCheck {
UncheckedOptionalAccessCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
ModelOptions{
-Options.getLocalOrGlobal("IgnoreSmartPointerDeref
https://github.com/5chmidti commented:
> option that is off by default. For all other users the behavior is unchanged,
> but we can opt in on our side.
> Can we add the option to use in the meantime, while I work on the macro
> handling in parallel?
That sounds okay to me, even though the opti
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/115051
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,96 @@
+//===--- UseSpanFirstLastCheck.cpp - 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
@@ -139,6 +150,12 @@ Options
function, and an optional reason, separated by comma. For more information,
see :ref:`Custom functions`.
+.. option:: ShowFullyQualifiedNames
+
+When `true`, the fully qualified name of all functions matched by the
custom
+function
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/117165
___
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/121406
___
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
https://github.com/llvm/llvm-project/pull/121406
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -337,33 +337,34 @@ FileOptionsBaseProvider::FileOptionsBaseProvider(
void FileOptionsBaseProvider::addRawFileOptions(
llvm::StringRef AbsolutePath, std::vector &CurOptions) {
auto CurSize = CurOptions.size();
-
// Look for a suitable configuration file in all parent
@@ -654,6 +716,83 @@
ExprMutationAnalyzer::Analyzer::findFunctionArgMutation(const Expr *Exp) {
return nullptr;
}
+const Stmt *
+ExprMutationAnalyzer::Analyzer::findPointeeValueMutation(const Expr *Exp) {
+ const auto Matches = match(
+ stmt(forEachDescendant(
+
@@ -654,6 +716,83 @@
ExprMutationAnalyzer::Analyzer::findFunctionArgMutation(const Expr *Exp) {
return nullptr;
}
+const Stmt *
+ExprMutationAnalyzer::Analyzer::findPointeeValueMutation(const Expr *Exp) {
+ const auto Matches = match(
+ stmt(forEachDescendant(
+
@@ -112,6 +115,57 @@ AST_MATCHER_P(Stmt, canResolveToExpr, const Stmt *, Inner)
{
return canExprResolveTo(Exp, Target);
}
+// use class member to store data can reduce stack usage to avoid stack
overflow
+// when recursive call.
+class ExprPointeeResolve {
+ const Expr *T
@@ -112,6 +115,57 @@ AST_MATCHER_P(Stmt, canResolveToExpr, const Stmt *, Inner)
{
return canExprResolveTo(Exp, Target);
}
+// use class member to store data can reduce stack usage to avoid stack
overflow
+// when recursive call.
+class ExprPointeeResolve {
+ const Expr *T
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/118593
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -654,6 +716,83 @@
ExprMutationAnalyzer::Analyzer::findFunctionArgMutation(const Expr *Exp) {
return nullptr;
}
+const Stmt *
+ExprMutationAnalyzer::Analyzer::findPointeeValueMutation(const Expr *Exp) {
+ const auto Matches = match(
+ stmt(forEachDescendant(
+
@@ -654,6 +716,83 @@
ExprMutationAnalyzer::Analyzer::findFunctionArgMutation(const Expr *Exp) {
return nullptr;
}
+const Stmt *
+ExprMutationAnalyzer::Analyzer::findPointeeValueMutation(const Expr *Exp) {
+ const auto Matches = match(
+ stmt(forEachDescendant(
+
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/118593
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1609,4 +1610,349 @@ TEST(ExprMutationAnalyzerTest, ReproduceFailureMinimal)
{
match(withEnclosingCompound(declRefTo("x")), AST11->getASTContext());
EXPECT_FALSE(isMutated(Results11, AST11.get()));
}
+
+static bool isPointeeMutated(const SmallVectorImpl &Results,
+
https://github.com/5chmidti commented:
Looks good in general, could you add a small description to the pr?
https://github.com/llvm/llvm-project/pull/118593
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
@@ -0,0 +1,217 @@
+//===--- StringViewSubstrCheck.cpp - 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: Ap
https://github.com/5chmidti commented:
You can move even more into the matchers. Here is a mock-up of what I mean
(untested):
```
m cxxMemberCallExpr(
anyOf(
cxxMemberCallExpr(
argumentCountIs(1)
# is substr, and bind arg 1
),
cxxMemberCallExpr(
argumentCoun
@@ -0,0 +1,217 @@
+//===--- StringViewSubstrCheck.cpp - 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: Ap
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/120055
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
5chmidti wrote:
> but now templates seem to be skipped completely
Template instantiations are skipped, not their definition. The matchers no
longer work, because the types you are working with are no longer necessarily
concrete types, but instead they can be dependent. And so can be expression
https://github.com/5chmidti closed
https://github.com/llvm/llvm-project/pull/113837
___
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/122141
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -181,42 +160,105 @@ void ConfusableIdentifierCheck::check(
if (!ND)
return;
- IdentifierInfo *NDII = ND->getIdentifier();
+ addDeclToCheck(ND, cast(ND->getDeclContext()
+->getNonTransparentContext()));
+
+ // Associate template p
https://github.com/5chmidti approved this pull request.
LGTM. Thanks for the quite big performance improvement, and sorry this took a
bit until it was reviewed.
https://github.com/llvm/llvm-project/pull/130369
___
cfe-commits mailing list
cfe-commits@
@@ -181,42 +160,105 @@ void ConfusableIdentifierCheck::check(
if (!ND)
return;
- IdentifierInfo *NDII = ND->getIdentifier();
+ addDeclToCheck(ND, cast(ND->getDeclContext()
+->getNonTransparentContext()));
+
+ // Associate template p
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/130369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
5chmidti wrote:
> > but this check could check the signatures themselves to be in the expected
> > form
>
> So warning for signatures like `foo(foo&) = default`?
Looking at this again, maybe this shouldn't not that route. Other checks
already capture some of those problems.
What @PiotrZSL me
@@ -0,0 +1,32 @@
+.. title:: clang-tidy - performance-explicit-move-constructor
+
+performance-explicit-move-constructor
+=
+
+Warns when a class defines an explicit move constructor, which may cause
+the copy constructor to get called instead.
https://github.com/5chmidti approved this pull request.
Alright, that makes sense to me. LGTM minus open comments
https://github.com/llvm/llvm-project/pull/142839
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/142839
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,73 @@
+.. title:: clang-tidy - llvm-prefer-static-over-anonymous-namespace
+
+llvm-prefer-static-over-anonymous-namespace
+===
+
+Finds function and variable declarations inside anonymous namespace and
+suggests replacing them wit
1201 - 1300 of 1368 matches
Mail list logo