HighCommander4 wrote:
> So I just tested this code on our codebase, the AST part is working, but the
> background indexer is still not showing (all) the references, at least the
> first `make_unique` I tested only worked with the AST. [...]
> It works on my 2 cpp file setup, so some more compl
https://github.com/irishrover updated
https://github.com/llvm/llvm-project/pull/172170
>From 02e40493c9f9bd8f77bdfb0fee7afd7ba3d26a1b Mon Sep 17 00:00:00 2001
From: Zinovy Nis
Date: Sat, 13 Dec 2025 13:47:01 +0300
Subject: [PATCH 1/7] [clang-tidy] Add a new check 'modernize-use-string-view'
Lo
https://github.com/irishrover updated
https://github.com/llvm/llvm-project/pull/172170
>From 02e40493c9f9bd8f77bdfb0fee7afd7ba3d26a1b Mon Sep 17 00:00:00 2001
From: Zinovy Nis
Date: Sat, 13 Dec 2025 13:47:01 +0300
Subject: [PATCH 1/6] [clang-tidy] Add a new check 'modernize-use-string-view'
Lo
https://github.com/irishrover updated
https://github.com/llvm/llvm-project/pull/172170
>From 02e40493c9f9bd8f77bdfb0fee7afd7ba3d26a1b Mon Sep 17 00:00:00 2001
From: Zinovy Nis
Date: Sat, 13 Dec 2025 13:47:01 +0300
Subject: [PATCH 1/5] [clang-tidy] Add a new check 'modernize-use-string-view'
Lo
ojhunt wrote:
Does anyone need to hit the merge button on this?
https://github.com/llvm/llvm-project/pull/172504
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -133,6 +133,82 @@ const Expr *Expr::skipRValueSubobjectAdjustments(
return E;
}
+static StringLiteral *CloneStringLiteral(const StringLiteral *SL,
+ ASTContext &C) {
+ SourceLocation *SLocs = new (C) SourceLocation[SL->getNumConcat
@@ -1023,6 +1023,10 @@ class Expr : public ValueStmt {
return skipRValueSubobjectAdjustments(CommaLHSs, Adjustments);
}
+ /// If the expression is a (possibly parenthesized) string literal
+ /// then make a copy of it.
+ Expr *CloneIfIAmAStringLiteral(ASTContext &Ctx)
https://github.com/irishrover updated
https://github.com/llvm/llvm-project/pull/172170
>From 02e40493c9f9bd8f77bdfb0fee7afd7ba3d26a1b Mon Sep 17 00:00:00 2001
From: Zinovy Nis
Date: Sat, 13 Dec 2025 13:47:01 +0300
Subject: [PATCH 1/4] [clang-tidy] Add a new check 'modernize-use-string-view'
Lo
https://github.com/ojhunt approved this pull request.
oh this is fantastic, and it fixes the formatting of the errors.
Looks good to me.
https://github.com/llvm/llvm-project/pull/172557
___
cfe-commits mailing list
[email protected]
https://l
irishrover wrote:
> ```diff
> getArcana
> ```
Thanks. Looks like overloaded functions? So let's ignore overloaded functions
as I do for virtual/override?
https://github.com/llvm/llvm-project/pull/172170
___
cfe-commits mailing list
cfe-commits@lists.
@@ -0,0 +1,68 @@
+.. title:: clang-tidy - modernize-use-string-view
+
+modernize-use-string-view
+
+
+Looks for functions returning ``std::[w|u8|u16|u32]string`` and suggests to
+change it to ``std::[...]string_view`` for performance reasons if
https://github.com/SonareMradul updated
https://github.com/llvm/llvm-project/pull/173159
>From c44ca1e6ac8f2fa11abf44de0d9ad7afabaddaab Mon Sep 17 00:00:00 2001
From: "[email protected]"
Date: Sat, 20 Dec 2025 17:31:59 +
Subject: [PATCH 1/3] [clang-tidy] Add fix-it for C-style cast of
https://github.com/irishrover updated
https://github.com/llvm/llvm-project/pull/172170
>From 02e40493c9f9bd8f77bdfb0fee7afd7ba3d26a1b Mon Sep 17 00:00:00 2001
From: Zinovy Nis
Date: Sat, 13 Dec 2025 13:47:01 +0300
Subject: [PATCH 1/3] [clang-tidy] Add a new check 'modernize-use-string-view'
Lo
https://github.com/irishrover updated
https://github.com/llvm/llvm-project/pull/172170
>From 02e40493c9f9bd8f77bdfb0fee7afd7ba3d26a1b Mon Sep 17 00:00:00 2001
From: Zinovy Nis
Date: Sat, 13 Dec 2025 13:47:01 +0300
Subject: [PATCH 1/2] [clang-tidy] Add a new check 'modernize-use-string-view'
Lo
https://github.com/irishrover edited
https://github.com/llvm/llvm-project/pull/172170
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -17693,6 +17693,44 @@ void Sema::DiagnoseStaticAssertDetails(const Expr *E) {
}
}
+template
+static bool EvaluateAsNullTerminatedCharBuffer(
+Sema &SemaRef, Expr *Message, ResultType &Result, ASTContext &Ctx,
+Sema::StringEvaluationContext EvalContext, bool Error
@@ -294,13 +294,15 @@ bool Context::evaluateStrlen(State &Parent, const Expr
*E, uint64_t &Result) {
if (!FieldDesc->isPrimitiveArray())
return false;
-if (Ptr.isDummy() || Ptr.isUnknownSizeArray())
+if (Ptr.isDummy() || Ptr.isUnknownSizeArray() || Ptr.isPas
ojhunt wrote:
> LLVM Buildbot has detected a new failure on builder `sanitizer-windows`
> running on `sanitizer-windows` while building `clang` at step 7
> "test-build-unified-tree-check-compiler-rt".
>
> Full details are available at:
> https://lab.llvm.org/buildbot/#/builders/107/builds/162
MythreyaK wrote:
As far as I can tell, the failure does not seem related :thinking:. @ojhunt,
please let me know if I'm wrong!
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
[email protected]
https://lists.llvm
@@ -517,6 +517,10 @@ Changes in existing checks
- Improved :doc:`misc-header-include-cycle
` check performance.
+- Improved :doc:`misc-include-cleaner
EugeneZelenko wrote:
> I think the section is missing in the current documentation.. Do you mean
> "[clan
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `sanitizer-windows` running
on `sanitizer-windows` while building `clang` at step 7
"test-build-unified-tree-check-compiler-rt".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/107/builds/16228
Here i
@@ -294,13 +294,15 @@ bool Context::evaluateStrlen(State &Parent, const Expr
*E, uint64_t &Result) {
if (!FieldDesc->isPrimitiveArray())
return false;
-if (Ptr.isDummy() || Ptr.isUnknownSizeArray())
+if (Ptr.isDummy() || Ptr.isUnknownSizeArray() || Ptr.isPas
@@ -517,6 +517,10 @@ Changes in existing checks
- Improved :doc:`misc-header-include-cycle
` check performance.
+- Improved :doc:`misc-include-cleaner
zeyi2 wrote:
I think the section is missing in the current documentation.. Do you mean
"[clang-include-fi
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `reverse-iteration` running
on `hexagon-build-03` while building `clang` at step 6 "check_all".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/110/builds/6915
Here is the relevant piece of the build l
https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Mythreya Kuricheti
Date: 2025-12-21T05:33:00Z
New Revision: 4fec70204fe99ce9dcb9eb34fbfb1b57f45d910f
URL:
https://github.com/llvm/llvm-project/commit/4fec70204fe99ce9dcb9eb34fbfb1b57f45d910f
DIFF:
https://github.com/llvm/llvm-project/commit/4fec70204fe99ce9dcb9eb34fbfb1b57f45d910f.diff
https://github.com/MythreyaK edited
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -294,13 +294,15 @@ bool Context::evaluateStrlen(State &Parent, const Expr
*E, uint64_t &Result) {
if (!FieldDesc->isPrimitiveArray())
return false;
-if (Ptr.isDummy() || Ptr.isUnknownSizeArray())
+if (Ptr.isDummy() || Ptr.isUnknownSizeArray() || Ptr.isPas
https://github.com/ojhunt auto_merge_enabled
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ojhunt wrote:
Oh actually, you'll need to edit your description because that's what GitHub
will use as the commit message :D
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
[email protected]
https://lists.llvm.or
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt approved this pull request.
Looks good! Thanks, if you update it to main I'll push the merge button :D
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
[email protected]
https://lists.llvm
https://github.com/Priyanshu3820 updated
https://github.com/llvm/llvm-project/pull/173143
>From 0dd977df6b2fda837c32044c199a13a32c232b6f Mon Sep 17 00:00:00 2001
From: Priyanshu Kumar <[email protected]>
Date: Sat, 20 Dec 2025 08:25:59 +
Subject: [PATCH 1/8] Implement handling for conv
https://github.com/MythreyaK updated
https://github.com/llvm/llvm-project/pull/173136
>From 4b5b1dcd3cfd26b0192905f8679ec29967e36f27 Mon Sep 17 00:00:00 2001
From: Mythreya
Date: Thu, 18 Dec 2025 23:21:50 -0800
Subject: [PATCH 1/6] [clang] Add FixItHint for designated init order
---
clang/lib
@@ -3101,9 +3162,11 @@ InitListChecker::CheckDesignatedInitializer(const
InitializedEntity &Entity,
unsigned OldIndex = StructuredIndex - 1;
if (StructuredList && OldIndex <= StructuredList->getNumInits()) {
if (Expr *PrevInit = StructuredList->getIni
https://github.com/ojhunt requested changes to this pull request.
Just that one minor change as I hadn't considered our style choice around
Diags, sorry about that :D
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
cfe-co
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SonareMradul edited
https://github.com/llvm/llvm-project/pull/173159
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SonareMradul edited
https://github.com/llvm/llvm-project/pull/173159
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/MythreyaK updated
https://github.com/llvm/llvm-project/pull/173136
>From 4b5b1dcd3cfd26b0192905f8679ec29967e36f27 Mon Sep 17 00:00:00 2001
From: Mythreya
Date: Thu, 18 Dec 2025 23:21:50 -0800
Subject: [PATCH 1/6] [clang] Add FixItHint for designated init order
---
clang/lib
@@ -16412,28 +16438,53 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body, bool IsInstantiation,
FD->getAttr();
if (FD->isDefaulted()) {
Diag(SKEPAttr->getLocation(), diag::err_sycl_entry_point_invalid)
- << SKEPAttr << /*defaulted function
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/171996
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt requested changes to this pull request.
I'm not super familiar with the bounds safety code, but this code looks ok to
me, but the "is this field in a union" check seems suspicious to me, so if we
can add some variations on the test below?
https://github.com/llvm/llvm-
@@ -207,10 +217,17 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr
*E, bool CountInBytes,
return true;
}
+ // Reject if both FD and CountFD are in the same union - they share storage.
+ if (FD->getParent() == CountFD->getParent() && FD->getParent()->isUnio
https://github.com/localspook updated
https://github.com/llvm/llvm-project/pull/157319
>From e28e9e234b6165b49884cf254e1fb4efe44fe756 Mon Sep 17 00:00:00 2001
From: Victor Chernyakin
Date: Sat, 6 Sep 2025 17:35:36 -0700
Subject: [PATCH 1/5] [clang-tidy] make `misc-const-correctness` work with
https://github.com/Priyanshu3820 updated
https://github.com/llvm/llvm-project/pull/173143
>From 0dd977df6b2fda837c32044c199a13a32c232b6f Mon Sep 17 00:00:00 2001
From: Priyanshu Kumar <[email protected]>
Date: Sat, 20 Dec 2025 08:25:59 +
Subject: [PATCH 1/7] Implement handling for conv
@@ -3092,6 +3094,65 @@ InitListChecker::CheckDesignatedInitializer(const
InitializedEntity &Entity,
PrevField = *FI;
}
+ const auto GenerateDesignatedInitReorderingFixit =
+ [&](SemaBase::SemaDiagnosticBuilder &Diags) {
+struct ReorderI
https://github.com/zeyi2 closed https://github.com/llvm/llvm-project/pull/172521
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: mitchell
Date: 2025-12-21T11:56:18+08:00
New Revision: 14b9478b328e4d8b91feef3b5a0b3b4152182b34
URL:
https://github.com/llvm/llvm-project/commit/14b9478b328e4d8b91feef3b5a0b3b4152182b34
DIFF:
https://github.com/llvm/llvm-project/commit/14b9478b328e4d8b91feef3b5a0b3b4152182b34.diff
LOG:
https://github.com/tahonermann closed
https://github.com/llvm/llvm-project/pull/173122
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Tom Honermann
Date: 2025-12-20T22:36:05-05:00
New Revision: b5fd7572ed3ccca94118e3bcf244b1ab08f336c5
URL:
https://github.com/llvm/llvm-project/commit/b5fd7572ed3ccca94118e3bcf244b1ab08f336c5
DIFF:
https://github.com/llvm/llvm-project/commit/b5fd7572ed3ccca94118e3bcf244b1ab08f336c5.diff
shiltian wrote:
The most recent push included a large number of test case updates from `global
ptr null` to `global ptr zeroinitializer`.
https://github.com/llvm/llvm-project/pull/17
___
cfe-commits mailing list
[email protected]
https://
https://github.com/MythreyaK edited
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3092,6 +3094,65 @@ InitListChecker::CheckDesignatedInitializer(const
InitializedEntity &Entity,
PrevField = *FI;
}
+ const auto GenerateDesignatedInitReorderingFixit =
+ [&](SemaBase::SemaDiagnosticBuilder &Diags) {
+struct ReorderI
https://github.com/MythreyaK updated
https://github.com/llvm/llvm-project/pull/173136
>From 4b5b1dcd3cfd26b0192905f8679ec29967e36f27 Mon Sep 17 00:00:00 2001
From: Mythreya
Date: Thu, 18 Dec 2025 23:21:50 -0800
Subject: [PATCH 1/6] [clang] Add FixItHint for designated init order
---
clang/lib
https://github.com/MythreyaK updated
https://github.com/llvm/llvm-project/pull/173136
>From 4b5b1dcd3cfd26b0192905f8679ec29967e36f27 Mon Sep 17 00:00:00 2001
From: Mythreya
Date: Thu, 18 Dec 2025 23:21:50 -0800
Subject: [PATCH 1/6] [clang] Add FixItHint for designated init order
---
clang/lib
@@ -3092,6 +3094,65 @@ InitListChecker::CheckDesignatedInitializer(const
InitializedEntity &Entity,
PrevField = *FI;
}
+ const auto GenerateDesignatedInitReorderingFixit =
+ [&](SemaBase::SemaDiagnosticBuilder &Diags) {
+struct ReorderI
https://github.com/HendrikHuebner closed
https://github.com/llvm/llvm-project/pull/169424
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Hendrik Hübner
Date: 2025-12-21T01:57:18+01:00
New Revision: da98be133e2f15cceb2c3982119490f6cd304eff
URL:
https://github.com/llvm/llvm-project/commit/da98be133e2f15cceb2c3982119490f6cd304eff
DIFF:
https://github.com/llvm/llvm-project/commit/da98be133e2f15cceb2c3982119490f6cd304eff.diff
@@ -141,6 +141,23 @@ class ScalarExprEmitter : public
StmtVisitor {
}
mlir::Value VisitConstantExpr(ConstantExpr *e) {
+// A constant expression of type 'void' generates no code and produces no
+// value.
+if (e->getType()->isVoidType()) {
ojh
@@ -1161,7 +1167,7 @@ static bool hasUnsafePrintfStringArg(const CallExpr
&Node, ASTContext &Ctx,
// It is a fprintf:
const Expr *UnsafeArg;
-if (hasUnsafeFormatOrSArg(&Node, UnsafeArg, 1, Ctx, false)) {
+if (hasUnsafeFormatOrSArg(Ctx, &Node, UnsafeArg, 1)) {
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/173096
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -886,9 +888,9 @@ static bool hasUnsafeFormatOrSArg(const CallExpr *Call,
const Expr *&UnsafeArg,
analyze_printf::PrintfConversionSpecifier::sArg)
return true; // continue parsing
- unsigned ArgIdx = FS.getPositionalArgIndex() + FmtArgIdx;
+ unsi
@@ -255,3 +255,27 @@ void dontCrashForInvalidFormatString() {
snprintf((char*)0, 0, "%");
snprintf((char*)0, 0, "\0");
}
+
+
+// Also warn about unsafe printf/scanf-like functions:
+void myprintf(const char *F, ...) __attribute__((__format__ (__printf__, 1,
2)));
-
@@ -825,9 +825,11 @@ struct LibcFunNamePrefixSuffixParser {
//
// `UnsafeArg` is the output argument that will be set only if this function
// returns true.
-static bool hasUnsafeFormatOrSArg(const CallExpr *Call, const Expr *&UnsafeArg,
- const
https://github.com/ojhunt requested changes to this pull request.
These are all just style nits, and a request for some additional tests
https://github.com/llvm/llvm-project/pull/173096
___
cfe-commits mailing list
[email protected]
https://li
@@ -1175,7 +1181,7 @@ static bool hasUnsafePrintfStringArg(const CallExpr
&Node, ASTContext &Ctx,
if (auto *II = FD->getIdentifier())
isKprintf = II->getName() == "kprintf";
-if (hasUnsafeFormatOrSArg(&Node, UnsafeArg, 0, Ctx, isKprintf)) {
+if (hasUnsafeFor
@@ -3101,9 +3162,10 @@ InitListChecker::CheckDesignatedInitializer(const
InitializedEntity &Entity,
unsigned OldIndex = StructuredIndex - 1;
if (StructuredList && OldIndex <= StructuredList->getNumInits()) {
if (Expr *PrevInit = StructuredList->getIni
@@ -3092,6 +3094,65 @@ InitListChecker::CheckDesignatedInitializer(const
InitializedEntity &Entity,
PrevField = *FI;
}
+ const auto GenerateDesignatedInitReorderingFixit =
+ [&](SemaBase::SemaDiagnosticBuilder &Diags) {
+struct ReorderI
https://github.com/ojhunt edited
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ojhunt requested changes to this pull request.
This looks good to me, it just needs some style fixups
https://github.com/llvm/llvm-project/pull/173136
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi
@@ -3092,6 +3094,65 @@ InitListChecker::CheckDesignatedInitializer(const
InitializedEntity &Entity,
PrevField = *FI;
}
+ const auto GenerateDesignatedInitReorderingFixit =
+ [&](SemaBase::SemaDiagnosticBuilder &Diags) {
+struct ReorderI
@@ -294,13 +294,15 @@ bool Context::evaluateStrlen(State &Parent, const Expr
*E, uint64_t &Result) {
if (!FieldDesc->isPrimitiveArray())
return false;
-if (Ptr.isDummy() || Ptr.isUnknownSizeArray())
+if (Ptr.isDummy() || Ptr.isUnknownSizeArray() || Ptr.isPas
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/172170
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,68 @@
+.. title:: clang-tidy - modernize-use-string-view
+
+modernize-use-string-view
+
+
+Looks for functions returning ``std::[w|u8|u16|u32]string`` and suggests to
+change it to ``std::[...]string_view`` for performance reasons if
@@ -0,0 +1,68 @@
+.. title:: clang-tidy - modernize-use-string-view
+
+modernize-use-string-view
+
+
+Looks for functions returning ``std::[w|u8|u16|u32]string`` and suggests to
+change it to ``std::[...]string_view`` for performance reasons if
@@ -0,0 +1,84 @@
+//===--===//
+//
+// 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: Apac
@@ -0,0 +1,339 @@
+// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-string-view %t
-- -- -isystem %clang_tidy_headers
vbvictor wrote:
Please use this file for c++17-or-later and create new file
`use-string-view-cxx20.cpp` to test c++20-or-later
h
@@ -0,0 +1,84 @@
+//===--===//
+//
+// 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: Apac
@@ -0,0 +1,84 @@
+//===--===//
+//
+// 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: Apac
@@ -0,0 +1,68 @@
+.. title:: clang-tidy - modernize-use-string-view
+
+modernize-use-string-view
+
+
+Looks for functions returning ``std::[w|u8|u16|u32]string`` and suggests to
+change it to ``std::[...]string_view`` for performance reasons if
@@ -0,0 +1,68 @@
+.. title:: clang-tidy - modernize-use-string-view
+
+modernize-use-string-view
+
+
+Looks for functions returning ``std::[w|u8|u16|u32]string`` and suggests to
+change it to ``std::[...]string_view`` for performance reasons if
@@ -0,0 +1,68 @@
+.. title:: clang-tidy - modernize-use-string-view
+
+modernize-use-string-view
+
+
+Looks for functions returning ``std::[w|u8|u16|u32]string`` and suggests to
+change it to ``std::[...]string_view`` for performance reasons if
@@ -0,0 +1,68 @@
+.. title:: clang-tidy - modernize-use-string-view
+
+modernize-use-string-view
+
vbvictor wrote:
```suggestion
modernize-use-string-view
=
```
https://github.com/llvm/llvm-project/pull
@@ -0,0 +1,84 @@
+//===--===//
+//
+// 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: Apac
@@ -0,0 +1,339 @@
+// RUN: %check_clang_tidy -std=c++20-or-later %s modernize-use-string-view %t
-- -- -isystem %clang_tidy_headers
+
+#include
+
+namespace std {
+namespace literals {
+namespace string_literals {
+ string operator""s(const char *, size_t);
+}
+namespace string
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/172170
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor commented:
Looks good, thanks for your work; however, I think we should add some options
to tweak behavior before we can land it.
One major drawback is this pattern:
```diff
template std::string getArcana(const T &N) {
return dump([&](TextNodeDumper &D) { D
https://github.com/Sirraide commented:
I feel like that’s reasonable; I’m not too familiar w/ the code completion part
of Clang so I’ll leave it to someone else to approve this, but it should
probably come w/ a release note
https://github.com/llvm/llvm-project/pull/166447
_
https://github.com/HazardyKnusperkeks updated
https://github.com/llvm/llvm-project/pull/166447
From 6a2ee288527869b2b36ce2d74e2c96059c1bc628 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?=
Date: Tue, 4 Nov 2025 22:25:53 +0100
Subject: [PATCH] [CodeCompletion] Consider head
https://github.com/HazardyKnusperkeks updated
https://github.com/llvm/llvm-project/pull/166447
From af71442e3763a2ea12bee17913a849b305260c95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?=
Date: Tue, 4 Nov 2025 22:25:53 +0100
Subject: [PATCH] [CodeCompletion] Consider head
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff origin/main HEAD --extensions cpp --
clang/lib/Sema/SemaCodeComplete.cpp
clang/test/
https://github.com/HazardyKnusperkeks updated
https://github.com/llvm/llvm-project/pull/166447
From 6ab23a49cc9918c3513b731818f1f5190e280ef7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?=
Date: Tue, 4 Nov 2025 22:25:53 +0100
Subject: [PATCH] [CodeCompletion] Consider head
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/171564
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Farzon Lotfi
Date: 2025-12-20T17:21:04-05:00
New Revision: 21571cf30616cb12111d3f725348c27262d89753
URL:
https://github.com/llvm/llvm-project/commit/21571cf30616cb12111d3f725348c27262d89753
DIFF:
https://github.com/llvm/llvm-project/commit/21571cf30616cb12111d3f725348c27262d89753.diff
Author: Farzon Lotfi
Date: 2025-12-20T17:20:32-05:00
New Revision: cb56a910f8bc90cb7df700fa702b75a0a2c550f8
URL:
https://github.com/llvm/llvm-project/commit/cb56a910f8bc90cb7df700fa702b75a0a2c550f8
DIFF:
https://github.com/llvm/llvm-project/commit/cb56a910f8bc90cb7df700fa702b75a0a2c550f8.diff
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/172384
___
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HendrikHuebner updated
https://github.com/llvm/llvm-project/pull/169424
From 9efce61e32ea9407efdaf011cdfb565e61a6fa24 Mon Sep 17 00:00:00 2001
From: hhuebner
Date: Tue, 25 Nov 2025 00:26:58 +0100
Subject: [PATCH 1/4] [CIR] Move FP math intrinsics to separate function and
add
https://github.com/HendrikHuebner updated
https://github.com/llvm/llvm-project/pull/169424
From 9efce61e32ea9407efdaf011cdfb565e61a6fa24 Mon Sep 17 00:00:00 2001
From: hhuebner
Date: Tue, 25 Nov 2025 00:26:58 +0100
Subject: [PATCH 1/3] [CIR] Move FP math intrinsics to separate function and
add
https://github.com/HendrikHuebner updated
https://github.com/llvm/llvm-project/pull/169424
From 9efce61e32ea9407efdaf011cdfb565e61a6fa24 Mon Sep 17 00:00:00 2001
From: hhuebner
Date: Tue, 25 Nov 2025 00:26:58 +0100
Subject: [PATCH 1/2] [CIR] Move FP math intrinsics to separate function and
add
1 - 100 of 192 matches
Mail list logo