5chmidti wrote:
> Do I understand correctly that this is a partial fix for
> [clangd/clangd#1254](https://github.com/clangd/clangd/issues/1254) in that it
> addresses the issue with overloaded operators in particular, but it still
> leaves in place the limitation that a **single** expression s
https://github.com/5chmidti updated
https://github.com/llvm/llvm-project/pull/81640
>From 0fc20dcd188510cebce43da06619729ed20884c1 Mon Sep 17 00:00:00 2001
From: Julian Schmidt
Date: Tue, 13 Feb 2024 18:59:16 +0100
Subject: [PATCH 1/3] [clangd] fix extract-to-function for overloaded operators
https://github.com/5chmidti closed
https://github.com/llvm/llvm-project/pull/107657
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -279,7 +281,7 @@ void UseAfterMoveFinder::getDeclRefs(
if (DeclRef && BlockMap->blockContainingStmt(DeclRef) == Block) {
// Ignore uses of a standard smart pointer that don't dereference the
// pointer.
- if (Operator || !isStandardSmartP
https://github.com/5chmidti closed
https://github.com/llvm/llvm-project/pull/113833
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,47 @@
+//===--- 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
5chmidti wrote:
Please add tests where templates and macros are involved
https://github.com/llvm/llvm-project/pull/113144
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
@@ -0,0 +1,165 @@
+//===--- 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
@@ -0,0 +1,165 @@
+//===--- 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
@@ -0,0 +1,165 @@
+//===--- 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
@@ -0,0 +1,165 @@
+//===--- 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
@@ -0,0 +1,165 @@
+//===--- 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
@@ -0,0 +1,26 @@
+set(LLVM_LINK_COMPONENTS
+FrontendOpenMP
+Support
+)
+
+add_clang_library(clangTidyQtModule
5chmidti wrote:
Please add `STATIC` at the end of this line. This was changed just a few days
ago to be explicit
https://github.com/llvm/llvm-p
@@ -0,0 +1,165 @@
+//===--- 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
@@ -0,0 +1,165 @@
+//===--- 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
@@ -0,0 +1,47 @@
+//===--- 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
@@ -0,0 +1,165 @@
+//===--- 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
@@ -0,0 +1,165 @@
+//===--- 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
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
https://github.com/5chmidti requested changes to this pull request.
This will be very nice to get in
https://github.com/llvm/llvm-project/pull/113144
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
5chmidti wrote:
> I do plan to work on improvements
Great
> would like to get this baseline checker in for now as a "scope of work" for
> this PR
Yep, what I meant as well
> I don't mind documenting the improvement step
> Do you have suggestions on where to document improvements?
As sugges
@@ -0,0 +1,62 @@
+//===--- 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: Apa
@@ -0,0 +1,62 @@
+//===--- 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: Apa
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/113639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,35 @@
+//===--- IncorrectEnableSharedFromThisCheck.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 commented:
After these, this should be good to go in my opinion.
---
For updating the PR branch:
The whole branch gets squashed when merged anyway. A merge reduces the chance
for pushing already existing commits that changed during rebase, causing other
people to
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/102299
___
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.
Either way is fine with me.
https://github.com/llvm/llvm-project/pull/113688
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -298,6 +300,11 @@ void
ImplicitBoolConversionCheck::registerMatchers(MatchFinder *Finder) {
hasCastKind(CK_FloatingToBoolean),
hasCastKind(CK_PointerToBoolean),
hasCastKind(CK_MemberPointerToBoolean)
@@ -0,0 +1,85 @@
+//===- NondeterministicPointerIterationOrderCheck.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,85 @@
+//===- NondeterministicPointerIterationOrderCheck.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,37 @@
+//=== NondeterministicPointerIterationOrderCheck.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 approved this pull request.
> I'm happy to document future changes beyond this check, but would like to
> keep this PR's scope limited to just porting the original CSA based check to
> a tidy check as much as possible.
+1
---
> Also, I've not yet completed a full
@@ -0,0 +1,35 @@
+.. title:: clang-tidy - bugprone-nondeterministic-pointer-iteration-order
+
+bugprone-nondeterministic-pointer-iteration-order
+=
+
+Finds nondeterministic usages of pointers in unordered containers.
+
+One canonica
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/110471
___
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/89392
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
5chmidti wrote:
Fixed by
https://github.com/llvm/llvm-project/commit/c7bfc41860a6abe5c92dc5afb47348b0c9e69963
https://github.com/llvm/llvm-project/pull/89392
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
https://github.com/5chmidti created
https://github.com/llvm/llvm-project/pull/113833
Add some checks for `nullptr` and change some `dyn_cast` to
`dyn_cast_if_present` to avoid crashes.
Fixes #55408
>From 99090f44fdfe049d7e01e469787ebb0039b965c4 Mon Sep 17 00:00:00 2001
From: Julian Schmidt
D
https://github.com/5chmidti updated
https://github.com/llvm/llvm-project/pull/113833
>From 99090f44fdfe049d7e01e469787ebb0039b965c4 Mon Sep 17 00:00:00 2001
From: Julian Schmidt
Date: Sun, 27 Oct 2024 20:47:21 +0100
Subject: [PATCH 1/2] [clang-tidy] fix crash in
altera-id-dependent-backward-br
5chmidti wrote:
There is a minimal repro in #111436 available
https://github.com/llvm/llvm-project/pull/66810
___
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/113837
Previously, the implementation used the printed type, which contains the
macro arguments expanded (also deleting comments). Instead, this
check can be more surgical and keep the actual written type as is,
keepin
https://github.com/5chmidti edited
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 commented:
> next time I shouldn't rebase and just wait to fix the conflict on merge
PRs that are quite outdated should, and those that have conflicts must be
updated before the PR is merged. You can either rebase with upstream changes,
or merge with upstream. Which
@@ -0,0 +1,35 @@
+//===--- IncorrectEnableSharedFromThisCheck.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,62 @@
+//===--- 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: Apa
https://github.com/5chmidti approved this pull request.
LGTM
---
I filed #115540 because I noticed how the `hasAncestor` matcher in the `unless`
part means that we are excluding quite some cases. (unrelated to this PRI)
https://github.com/llvm/llvm-project/pull/115302
https://github.com/5chmidti approved this pull request.
https://github.com/llvm/llvm-project/pull/112496
___
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/81640
>From 1796e5d2c44bae890c13b2af3fc7e4ec36e716dd Mon Sep 17 00:00:00 2001
From: Julian Schmidt
Date: Tue, 13 Feb 2024 18:59:16 +0100
Subject: [PATCH 1/3] [clangd] fix extract-to-function for overloaded operators
https://github.com/5chmidti commented:
CC @HighCommander4 @kadircet
Technically, Sam told me last EuroLLVM that he had some refactor of the
`SelectionTree` that would resolve issues like this in the general case, but as
it is unclear that those changes will get in someday/in the 'near' future
@@ -104,9 +104,12 @@ bool isRootStmt(const Node *N) {
// Root statement cannot be partially selected.
if (N->Selected == SelectionTree::Partial)
return false;
- // Only DeclStmt can be an unselected RootStmt since VarDecls claim the
entire
- // selection range in sel
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/81640
___
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/81640
>From 1796e5d2c44bae890c13b2af3fc7e4ec36e716dd Mon Sep 17 00:00:00 2001
From: Julian Schmidt
Date: Tue, 13 Feb 2024 18:59:16 +0100
Subject: [PATCH 1/3] [clangd] fix extract-to-function for overloaded operators
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/114715
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -102,6 +102,209 @@ void BranchCloneCheck::registerMatchers(MatchFinder
*Finder) {
this);
Finder->addMatcher(switchStmt().bind("switch"), this);
Finder->addMatcher(conditionalOperator().bind("condOp"), this);
+
Finder->addMatcher(ifStmt(hasDescendant(ifStmt())).b
@@ -866,19 +866,16 @@ void
RedundantExpressionCheck::registerMatchers(MatchFinder *Finder) {
// Binary with equivalent operands, like (X != 2 && X != 2).
Finder->addMatcher(
traverse(TK_AsIs,
- binaryOperator(
- anyOf(isComparisonOpera
@@ -1,4 +1,5 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core.IdenticalExpr -w
-verify %s
+// RUN: clang-tidy %s -checks="-*,misc-redundant-expression" -- 2>&1 |
FileCheck %s --check-prefix=IDENTEXPR
+// RUN: clang-tidy %s -checks="-*,bugprone-branch-clone" -- 2>
@@ -1238,6 +1235,59 @@ void RedundantExpressionCheck::check(const
MatchFinder::MatchResult &Result) {
if (const auto *BinOp = Result.Nodes.getNodeAs("binary")) {
// If the expression's constants are macros, check whether they are
// intentional.
+
+//
+// Spe
@@ -102,6 +102,209 @@ void BranchCloneCheck::registerMatchers(MatchFinder
*Finder) {
this);
Finder->addMatcher(switchStmt().bind("switch"), this);
Finder->addMatcher(conditionalOperator().bind("condOp"), this);
+
Finder->addMatcher(ifStmt(hasDescendant(ifStmt())).b
@@ -32,9 +32,28 @@ If this is the intended behavior, then there is no reason to
use a conditional
statement; otherwise the issue can be solved by fixing the branch that is
handled incorrectly.
-The check also detects repeated branches in longer ``if/else if/else`` chains
+The
5chmidti wrote:
Thanks for changing these to be more understandable w.r.t. what has changed.
Could you please do a follow-up PR that splits this file, so we have the diff
that shows no capabilities were lost in this PR/commit, and then have the tests
be where
@@ -32,9 +32,28 @@ If this is the intended behavior, then there is no reason to
use a conditional
statement; otherwise the issue can be solved by fixing the branch that is
handled incorrectly.
-The check also detects repeated branches in longer ``if/else if/else`` chains
+The
https://github.com/5chmidti commented:
> some guidance on if the additional "scaffolded" case should be kept in place
> (to maintain clear differences from the original to new file in the git
> diff), or split the file now or maybe in a future separate commit so the
> differences are clear.
I
@@ -814,6 +814,12 @@ Improvements
Moved checkers
^^
+- The checker ``alpha.core.IdenticalExpr`` was removed because it was
+ duplicated in the clang-tidy checkers ``misc-redundant-expression`` and
5chmidti wrote:
nit
https://github.com/llvm/llvm
@@ -269,6 +472,23 @@ void BranchCloneCheck::check(const
MatchFinder::MatchResult &Result) {
return;
}
+ if (const auto *IS = Result.Nodes.getNodeAs("ifWithDescendantIf")) {
+const Stmt *Then = IS->getThen();
+if (const CompoundStmt *CS = dyn_cast(Then)) {
+
https://github.com/5chmidti approved this pull request.
LGTM in regard to my details.
There are some emails that have their `@` escaped. Was that intended?
https://github.com/llvm/llvm-project/pull/114544
___
cfe-commits mailing list
cfe-commits@lists
https://github.com/5chmidti approved this pull request.
LGTM, thanks
https://github.com/llvm/llvm-project/pull/114255
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin,
=?utf-8?q?Félix-Antoine?= Constantin,
=?utf-8?q?Félix-Antoine?= Constantin
Message-ID:
In-Reply-To:
5chmidti wrote:
> > +- some people may want to control this behavior and keep the explicit cast
> > for enums, WDYT?
>
> I can see why some people might wa
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/81640
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,192 @@
+//===--- 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
@@ -123,10 +123,16 @@ New checks
Gives warnings for tagged unions, where the number of tags is
different from the number of data members inside the union.
+- New :doc:`modernize-use-integer-sign-comparison
+ ` check.
+
+ Replace comparisons between signed and unsigned in
@@ -0,0 +1,192 @@
+//===--- 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
https://github.com/5chmidti updated
https://github.com/llvm/llvm-project/pull/113833
>From 99090f44fdfe049d7e01e469787ebb0039b965c4 Mon Sep 17 00:00:00 2001
From: Julian Schmidt
Date: Sun, 27 Oct 2024 20:47:21 +0100
Subject: [PATCH 1/3] [clang-tidy] fix crash in
altera-id-dependent-backward-br
@@ -0,0 +1,165 @@
+//===--- 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
@@ -0,0 +1,165 @@
+//===--- 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
@@ -0,0 +1,192 @@
+//===--- 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
@@ -84,6 +84,7 @@ Name prefixDescription
``performance-`` Checks that target performance-related issues.
``portability-`` Checks that target portability-related issues that don't
relate to any particular coding style.
+``qt-``
@@ -136,6 +142,16 @@ New check aliases
:doc:`bugprone-sizeof-expression
` was added.
+- New alias :doc:`qt-integer-sign-comparison
+ ` to
+ :doc:`modernize-use-integer-sign-comparison
+ ` check.
+ If C++17 is supported, the fix-it replaces integers comparisons to
+ ``
@@ -0,0 +1,46 @@
+//===--- QtTidyModule.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,165 @@
+//===--- 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
@@ -0,0 +1,192 @@
+//===--- 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
@@ -0,0 +1,64 @@
+.. title:: clang-tidy - qt-integer-sign-comparison
+
+qt-integer-sign-comparison
+=
+
+The qt-integer-sign-comparison check is an alias, please see
+:doc:`modernize-use-integer-sign-comparison
<../modernize/use-integer-sign-comparison
@@ -0,0 +1,165 @@
+//===--- 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
@@ -0,0 +1,43 @@
+.. title:: clang-tidy - modernize-use-integer-sign-comparison
+
+modernize-use-integer-sign-comparison
+=
+
+Replace comparisons between signed and unsigned integers with their safe
+``std::cmp_*`` alternative.
+
+Examples of f
@@ -0,0 +1,46 @@
+//===--- QtTidyModule.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 closed
https://github.com/llvm/llvm-project/pull/112091
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,82 @@
+//===--- UndefinedSprintfOverlapCheck.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 approved this pull request.
https://github.com/llvm/llvm-project/pull/115275
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,82 @@
+//===--- UndefinedSprintfOverlapCheck.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
@@ -175,7 +175,8 @@ Changes in existing checks
- Improved :doc:`bugprone-sizeof-expression
` check to find suspicious
usages of ``sizeof()``, ``alignof()``, and ``offsetof()`` when adding or
- subtracting from a pointer directly or when used to scale a numeric value.
+ su
@@ -0,0 +1,82 @@
+//===--- UndefinedSprintfOverlapCheck.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 edited
https://github.com/llvm/llvm-project/pull/114244
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,36 @@
+//===--- UndefinedSprintfOverlapCheck.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,82 @@
+//===--- UndefinedSprintfOverlapCheck.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,23 @@
+.. title:: clang-tidy - bugprone-undefined-sprintf-overlap
+
+bugprone-undefined-sprintf-overlap
+==
+
+Warns if any arguments to the ``sprintf`` family of functions overlap with the
+first argument.
5chmidti wrote
https://github.com/5chmidti requested changes to this pull request.
There are some false-negatives that exist for this check:
E.g.,
```c++
// from tests
char bufss[10][10][10];
sprintf(bufss[0][1], "%s", bufss[0][1]);
```
or `*( *(bufss + 0) + 1)`. Though these can border on requiring, e
@@ -0,0 +1,82 @@
+//===--- UndefinedSprintfOverlapCheck.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,82 @@
+//===--- UndefinedSprintfOverlapCheck.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,82 @@
+//===--- UndefinedSprintfOverlapCheck.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 updated
https://github.com/llvm/llvm-project/pull/81640
>From 04687eb4fcc3cc424580c0a0df8044a8b17286f8 Mon Sep 17 00:00:00 2001
From: Julian Schmidt
Date: Tue, 13 Feb 2024 18:59:16 +0100
Subject: [PATCH 1/4] [clangd] fix extract-to-function for overloaded operators
@@ -190,6 +190,14 @@ F (extracted();)
}]]
)cpp";
EXPECT_EQ(apply(CompoundFailInput), "unavailable");
+
+ ExtraArgs.push_back("-std=c++14");
+ // FIXME: Expressions are currently not extracted
+ EXPECT_EQ(apply(R"cpp(
+void sink(int);
+
901 - 1000 of 1291 matches
Mail list logo