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
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 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
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 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 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 created
https://github.com/llvm/llvm-project/pull/120027
```c++
static void foo();
void foo() {}
struct A {
static void bar();
};
void A::bar() {}
```
Both definitions refer to their previous declaration, but were not
considered `static`, because the matcher did
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
@@ -26,7 +26,7 @@ class InconsistentDeclarationParameterNameCheck : public
ClangTidyCheck {
ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
IgnoreMacros(Options.getLocalOrGlobal("IgnoreMacros", true)),
-
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.
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
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
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
@@ -0,0 +1,104 @@
+//===--- 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: Ap
@@ -0,0 +1,104 @@
+//===--- 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: Ap
@@ -0,0 +1,104 @@
+//===--- 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: Ap
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
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.
https://github.com/llvm/llvm-project/pull/119580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti commented:
Please change the `RUN` lines to use `check_clang_tidy` like so:
`// RUN: %check_clang_tidy %s bugprone-branch-clone %t`, and drop the
`BUGPRONEBRANCH` suffix in `bugprone-branch-clone.cpp`, as it is redundant
after this change, and after removing the acci
@@ -0,0 +1,772 @@
+// RUN: clang-tidy %s -checks="-*,bugprone-branch-clone" -- 2>&1 | FileCheck
%s --check-prefix=CHECK-MESSAGES-BUGPRONEBRANCH
+
+/* Only one expected warning per function allowed at the very end. */
+
+int func(void)
+{
+ return 0;
+}
+
+int func2(void)
+{
+ r
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/119371
___
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
@@ -27,19 +29,44 @@ class UncheckedOptionalAccessCheck : public ClangTidyCheck {
UncheckedOptionalAccessCheck(StringRef Name, ClangTidyContext *Context)
: ClangTidyCheck(Name, Context),
ModelOptions{
-Options.getLocalOrGlobal("IgnoreSmartPointerDeref
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 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
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 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
@@ -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
@@ -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.
1 - 100 of 1207 matches
Mail list logo