5chmidti wrote:
> > Actually, the cxxRecordDecl might not be in a macro, but the special member
> > functions are.
>
> The checker doc states:
> `The check finds classes where some but not all of the special member
> functions are defined.`
> I think we only need to ignore if the whole class e
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/143554
___
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 minus comments
https://github.com/llvm/llvm-project/pull/143554
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -45,11 +53,12 @@ SpecialMemberFunctionsCheck::getCheckTraversalKind() const {
}
void SpecialMemberFunctionsCheck::registerMatchers(MatchFinder *Finder) {
- auto IsNotImplicitOrDeleted = anyOf(unless(isImplicit()), isDeleted());
+ const auto IsNotImplicitOrDeleted = anyOf(
https://github.com/5chmidti deleted
https://github.com/llvm/llvm-project/pull/143550
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -50,3 +50,12 @@ Modern C++ needs ``goto`` only to jump out of nested loops.
some_operation();
All other uses of ``goto`` are diagnosed in `C++`.
+
+
+Options
+---
+
+.. option:: IgnoreMacros
+
+ If set to `true`, the check will not warn if ``goto`` statement is plac
5chmidti wrote:
Actually, the cxxRecordDecl might not be in a macro, but the special member
functions are.
E.g.:
``` ` ` cpp
#define DEF_COPY(name) \
name(const name&) = default; \
name& operator=(const name&) = default;
` ` `
https://github.com/llvm/llvm-project/pull/143550
__
@@ -1,27 +1,34 @@
// RUN: %check_clang_tidy %s cppcoreguidelines-avoid-goto %t
+// RUN: %check_clang_tidy -check-suffix=MACRO %s cppcoreguidelines-avoid-goto
%t -- -config="{CheckOptions: { cppcoreguidelines-avoid-goto.IgnoreMacros: true
}}"
5chmidti wrote:
Yo
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/143550
___
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'm +- on the default
Let's see if others have a stronger opinion on the default
---
Not directly part of this, but:
I'd prefer to see a warning for expansions of macros defined inside the code
base, but not from macros defined
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
@@ -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.
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,76 @@
+//===--- ExplicitMoveConstructorCheck.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,76 @@
+//===--- ExplicitMoveConstructorCheck.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,76 @@
+//===--- ExplicitMoveConstructorCheck.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/5chmidti commented:
Generalizing this check to enforce either static or anonymous namespaces would
be great, then it would not be specific to LLVM and projects using a similar
style. So something like misc-static-or-anonymous-namespace.
WDYT?
https://github.com/llvm/llvm-pro
5chmidti wrote:
It would be better to combine these files with a check suffix and two RUN lines
so that you can check tru-negatives for the options as well. Depending on the
options the matches should be a strict superset for cars or member functions,
e.g. a
@@ -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
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
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
@@ -181,42 +160,105 @@ void ConfusableIdentifierCheck::check(
if (!ND)
return;
- IdentifierInfo *NDII = ND->getIdentifier();
+ addDeclToCheck(ND, cast(ND->getDeclContext()
+->getNonTransparentContext()));
+
+ // Associate template p
@@ -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@
@@ -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
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
@@ -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,
+
@@ -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
@@ -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(
+
@@ -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 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
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,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 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
@@ -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
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
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.
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
@@ -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.
LGTM
https://github.com/llvm/llvm-project/pull/121783
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -40,11 +40,30 @@ void
UncheckedOptionalAccessCheck::registerMatchers(MatchFinder *Finder) {
this);
}
+void UncheckedOptionalAccessCheck::onStartOfTranslationUnit() {
+ // Reset the flag for each TU.
+ is_test_tu_ = false;
+}
+
void UncheckedOptionalAccessCheck::ch
@@ -40,11 +40,30 @@ void
UncheckedOptionalAccessCheck::registerMatchers(MatchFinder *Finder) {
this);
}
+void UncheckedOptionalAccessCheck::onStartOfTranslationUnit() {
+ // Reset the flag for each TU.
+ is_test_tu_ = false;
+}
+
void UncheckedOptionalAccessCheck::ch
https://github.com/5chmidti commented:
Sorry for the delay.
I think, that we can probably all agree that the best solution would be to have
the model support the macros, e.g., by recognizing the patterns that are behind
these macros. However, that is currently not something that people can fin
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
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/121316
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,134 @@
+//===--- SmartptrResetAmbiguousCallCheck.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,34 @@
+.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call
+
+bugprone-smartptr-reset-ambiguous-call
+==
+
+Finds potentially erroneous calls to ``reset`` method on
+smart pointers when the pointee type also has a ``reset``
@@ -0,0 +1,34 @@
+//===--- SmartptrResetAmbiguousCallCheck.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
@@ -144,6 +145,8 @@ class BugproneModule : public ClangTidyModule {
"bugprone-inaccurate-erase");
CheckFactories.registerCheck(
"bugprone-incorrect-enable-if");
+CheckFactories.registerCheck(
+"bugprone-smartptr-reset-ambiguous-call");
--
@@ -0,0 +1,34 @@
+.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call
+
+bugprone-smartptr-reset-ambiguous-call
+==
+
+Finds potentially erroneous calls to ``reset`` method on
+smart pointers when the pointee type also has a ``reset``
@@ -0,0 +1,34 @@
+.. title:: clang-tidy - bugprone-smartptr-reset-ambiguous-call
+
+bugprone-smartptr-reset-ambiguous-call
+==
+
+Finds potentially erroneous calls to ``reset`` method on
+smart pointers when the pointee type also has a ``reset``
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/121291
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,134 @@
+//===--- SmartptrResetAmbiguousCallCheck.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.
I think that this check is one that we don't want to emit fixes for, at least
not in the main diagnostic, but maybe as a fixit attached to a note. Sort of
like:
```
warning: ...
note: (be more explicit and) use '= nullptr'
```
https://github.com/5chmidti approved this pull request.
Looks good from my side.
---
> Perhaps we can just land this as is for now and introduce the escape hatch if
> we get feedback indicating it's needed?
I think that is totally fine. If this comes up, we can also immediately
backport the
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/120701
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7711,6 +7711,16 @@ AST_MATCHER_P(DecayedType, hasDecayedType,
internal::Matcher,
return InnerType.matches(Node.getDecayedType(), Finder, Builder);
}
+/// Matches dependent name type
5chmidti wrote:
nit: `a dependent name type` (+1 in release notes)
ht
@@ -218,6 +218,7 @@ RegistryMaps::RegistryMaps() {
REGISTER_MATCHER(cxxTryStmt);
REGISTER_MATCHER(cxxUnresolvedConstructExpr);
REGISTER_MATCHER(decayedType);
+ REGISTER_MATCHER(dependentNameType);
5chmidti wrote:
Please sort this in alphabetically
http
5chmidti wrote:
> Good point, maybe we can use more smart way to do warning: only warn the
> global option is set but local option is not.
>
> Have some redundant options is not the aim for this deprecation things, we
> only want to avoid user suddenly find the behaviors of lots of check are
https://github.com/5chmidti approved this pull request.
LGTM, thanks
https://github.com/llvm/llvm-project/pull/120245
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -164,6 +164,33 @@ void UseRangesCheck::registerMatchers(MatchFinder *Finder)
{
static void removeFunctionArgs(DiagnosticBuilder &Diag, const CallExpr &Call,
ArrayRef Indexes,
const ASTContext &Ctx) {
+ auto GetC
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.
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
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/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:
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
@@ -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 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
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
@@ -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
@@ -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
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
@@ -287,72 +292,83 @@ void
ImplicitBoolConversionCheck::registerMatchers(MatchFinder *Finder) {
auto BoolXor =
binaryOperator(hasOperatorName("^"), hasLHS(ImplicitCastFromBool),
hasRHS(ImplicitCastFromBool));
- auto ComparisonInCall = allOf(
-
@@ -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
@@ -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
@@ -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
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/119974
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
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
@@ -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
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
@@ -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 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
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
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
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
@@ -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
1 - 100 of 1241 matches
Mail list logo