https://github.com/tbaederr created
https://github.com/llvm/llvm-project/pull/145302
None
>From 33eadba2a8d300be67cab69540537589400f7b96 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Mon, 23 Jun 2025 12:00:20 +0200
Subject: [PATCH] [clang][bytecode] Fix assignInteger() wit
@@ -985,6 +985,20 @@ auto buildTransferMatchSwitch() {
isOptionalMemberCallWithNameMatcher(hasName("isNull")),
transferOptionalIsNullCall)
+ // NullableValue::makeValue, NullableValue::makeValueInplace
+ // Only NullableValue has these methods, bu
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/145260
>From 96f1c3bbbf7c07bf9d11bb907e3a35e196d181aa Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 23 Jun 2025 12:31:39 +0800
Subject: [PATCH] [Clang] Back out the source location workaround for
CXXConstruct
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/145302.diff
2 Files Affected:
- (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+17-6)
- (modified) clang/test/AST/ByteCode/builtin-functions
Author: Chuanqi Xu
Date: 2025-06-23T14:39:08+08:00
New Revision: fccc6ee7021811a27ab1303d19407f703853ab92
URL:
https://github.com/llvm/llvm-project/commit/fccc6ee7021811a27ab1303d19407f703853ab92
DIFF:
https://github.com/llvm/llvm-project/commit/fccc6ee7021811a27ab1303d19407f703853ab92.diff
LO
https://github.com/anthonyhatran updated
https://github.com/llvm/llvm-project/pull/143758
>From 0cf31b41838d449835296d4ec290209bd5aae1e6 Mon Sep 17 00:00:00 2001
From: Anthony Tran
Date: Wed, 11 Jun 2025 10:11:09 -0700
Subject: [PATCH 1/2] Added Trap messages in debug info
---
clang/lib/CodeG
@@ -7384,7 +7384,40 @@ class MappableExprsHandler {
// dimension.
uint64_t DimSize = 1;
-bool IsNonContiguous = CombinedInfo.NonContigInfo.IsNonContiguous;
+// Detects non-contiguous updates due to strided accesses.
+// Sets the 'IsNonContiguous' flag so th
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (Ami-zhang)
Changes
This patch makes determining alignment and width of BitInt to be target ABI
specific and makes it consistent with [Procedure Call Standard for the
LoongArch™ Architecture] for LoongArch target
(https://github.com/
tru wrote:
Sorry for the delay. I have addressed both your comments now @benlangmuir -
reworked it to use Lexer::getEscapedNewLineSize() and removed the assertline. I
also expanded the test coverage.
https://github.com/llvm/llvm-project/pull/139504
_
https://github.com/mizvekov requested changes to this pull request.
The fix doesn't look quite right. It's not correct to say that canonicalization
changes the declaration name. We don't canonicalize declarations after all.
It's just that a canonical template parameter type doesn't refer to a
https://github.com/cristianassaiante updated
https://github.com/llvm/llvm-project/pull/145059
>From ab6063493744ef5a1ee92fd249bf8d86b7299fad Mon Sep 17 00:00:00 2001
From: Cristian Assaiante
Date: Fri, 20 Jun 2025 16:56:23 +0200
Subject: [PATCH 1/3] Adding -opt-disable and a test for it
---
c
@@ -820,16 +820,23 @@ AArch64TargetInfo::getTargetBuiltins() const {
std::optional>
AArch64TargetInfo::getVScaleRange(const LangOptions &LangOpts,
- bool IsArmStreamingFunction,
+ ArmStreamingKind IsArmStreaming
@@ -82,6 +82,15 @@ class SemaARM : public SemaBase {
void handleInterruptSaveFPAttr(Decl *D, const ParsedAttr &AL);
void CheckSMEFunctionDefAttributes(const FunctionDecl *FD);
+
+ /// Return true if the given types are an SVE builtin and a VectorType that
+ /// is a fixe
@@ -820,16 +820,23 @@ AArch64TargetInfo::getTargetBuiltins() const {
std::optional>
AArch64TargetInfo::getVScaleRange(const LangOptions &LangOpts,
- bool IsArmStreamingFunction,
+ ArmStreamingKind IsArmStreaming
@@ -1666,30 +1666,43 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args,
}
// Handle -msve_vector_bits=
- if (Arg *A = Args.getLastArg(options::OPT_msve_vector_bits_EQ)) {
+ auto HandleVectorBits = [&](Arg *A, bool Streaming) {
StringRef Val = A->getValue();
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/145260
>From f642a6d25a2bd3f12e6629f93152edc784bddbaa Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 23 Jun 2025 12:31:39 +0800
Subject: [PATCH] [Clang] Back out the source location workaround for
CXXConstruct
https://github.com/jmmartinez edited
https://github.com/llvm/llvm-project/pull/143507
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dingxiangfei2009 updated
https://github.com/llvm/llvm-project/pull/143424
>From cbfed6b195083d07330694ae497f59f4007e6a1f Mon Sep 17 00:00:00 2001
From: Xiangfei Ding
Date: Mon, 9 Jun 2025 13:57:18 +
Subject: [PATCH 1/2] [clang-c] introduce queries on GCC-style inline asse
https://github.com/miguelcsx updated
https://github.com/llvm/llvm-project/pull/145200
From 883345d337df982a87c55b11b3374cf661b7b49e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20C=C3=A1rdenas?=
Date: Sun, 22 Jun 2025 03:32:24 +0200
Subject: [PATCH 1/3] [clang][nvlink-wrapper] Add support fo
https://github.com/segoon created
https://github.com/llvm/llvm-project/pull/145307
None
>From 546567ee93c1c0c0de5e34a1ec4d7c2ccfd081c8 Mon Sep 17 00:00:00 2001
From: Vasily Kulikov
Date: Mon, 12 May 2025 20:36:43 +0300
Subject: [PATCH 1/2] clang-tidy: add bugprone-taxi-async-use-after-free
--
llvmbot wrote:
@llvm/pr-subscribers-clang-tools-extra
Author: Vasiliy Kulikov (segoon)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/145307.diff
8 Files Affected:
- (modified) clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp (+3)
- (modified) clang-tool
https://github.com/Keenuts approved this pull request.
https://github.com/llvm/llvm-project/pull/144934
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1033,12 +1033,15 @@ void SemaHLSL::handleRootSignatureAttr(Decl *D, const
ParsedAttr &AL) {
void SemaHLSL::handleNumThreadsAttr(Decl *D, const ParsedAttr &AL) {
llvm::VersionTuple SMVersion =
getASTContext().getTargetInfo().getTriple().getOSVersion();
+ bool IsDXI
https://github.com/zyn0217 ready_for_review
https://github.com/llvm/llvm-project/pull/145260
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/cristianassaiante updated
https://github.com/llvm/llvm-project/pull/145059
>From ab6063493744ef5a1ee92fd249bf8d86b7299fad Mon Sep 17 00:00:00 2001
From: Cristian Assaiante
Date: Fri, 20 Jun 2025 16:56:23 +0200
Subject: [PATCH 1/2] Adding -opt-disable and a test for it
---
c
https://github.com/DavidTruby updated
https://github.com/llvm/llvm-project/pull/144710
>From 2c278271277823b3544d991365e58f97dd4b7031 Mon Sep 17 00:00:00 2001
From: David Truby
Date: Wed, 18 Jun 2025 10:17:05 +0100
Subject: [PATCH 1/2] [flang][AArch64] Always compiler-rt to flang linking
after
https://github.com/zyn0217 updated
https://github.com/llvm/llvm-project/pull/145260
>From 504c05c3a076ecafb4f11ce0703caddfac6e06d1 Mon Sep 17 00:00:00 2001
From: Younan Zhang
Date: Mon, 23 Jun 2025 12:31:39 +0800
Subject: [PATCH] [Clang] Back out the source location workaround for
CXXConstruct
https://github.com/tru updated https://github.com/llvm/llvm-project/pull/139504
>From 859723743a51bc75d855b4ee924ea5cf86e26183 Mon Sep 17 00:00:00 2001
From: Tobias Hieta
Date: Mon, 5 May 2025 11:40:17 +0200
Subject: [PATCH 1/4] [clang][scandeps] Improve handling of rawstrings.
The current pars
ilya-biryukov wrote:
> It's just that a canonical template parameter type doesn't refer to a
> particular template parameter declaration.
The particular statement is that Clang canonicalizes `decltype(func())` to
`decltype(func())`. If we don't
change that, we end up with spurious false posi
https://github.com/tru updated https://github.com/llvm/llvm-project/pull/139504
>From 859723743a51bc75d855b4ee924ea5cf86e26183 Mon Sep 17 00:00:00 2001
From: Tobias Hieta
Date: Mon, 5 May 2025 11:40:17 +0200
Subject: [PATCH 1/3] [clang][scandeps] Improve handling of rawstrings.
The current pars
https://github.com/tru updated https://github.com/llvm/llvm-project/pull/139504
>From 859723743a51bc75d855b4ee924ea5cf86e26183 Mon Sep 17 00:00:00 2001
From: Tobias Hieta
Date: Mon, 5 May 2025 11:40:17 +0200
Subject: [PATCH 1/5] [clang][scandeps] Improve handling of rawstrings.
The current pars
https://github.com/zyn0217 converted_to_draft
https://github.com/llvm/llvm-project/pull/145260
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Ami-zhang created
https://github.com/llvm/llvm-project/pull/145297
This patch makes determining alignment and width of BitInt to be target ABI
specific and makes it consistent with [Procedure Call Standard for the
LoongArch™ Architecture] for LoongArch target
(https://github
philnik777 wrote:
I feel like this is a solution that can grow out of hand very easily. IMO the
better solution would be to have `-Wmissing-noreturn` place a `[[noreturn]]`
into the AST to avoid incorrect follow-up diagnostics.
https://github.com/llvm/llvm-project/pull/145166
_
@@ -0,0 +1,198 @@
+//===--- BoolBitwiseOperationCheck.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/vbvictor deleted
https://github.com/llvm/llvm-project/pull/142324
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/142324
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request.
Please wait for @owenca .
https://github.com/llvm/llvm-project/pull/145243
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
https://github.com/DeinAlptraum updated
https://github.com/llvm/llvm-project/pull/144873
>From 704d36bdd22efd4645feaf8988e918ccfdf641a5 Mon Sep 17 00:00:00 2001
From: Rainer Orth
Date: Thu, 5 Jun 2025 13:40:26 +0200
Subject: [PATCH 1/3] [clang][python][test] Move python binding tests to lit
fr
@@ -2434,6 +2434,31 @@ VarDecl *VarDecl::getInitializingDeclaration() {
return Def;
}
+bool VarDecl::hasInitWithSideEffects() const {
+ if (!hasInit())
+return false;
+
+ // Check if we can get the initializer without deserializing
+ const Expr *E = nullptr;
+ if (au
@@ -0,0 +1,198 @@
+//===--- BoolBitwiseOperationCheck.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,198 @@
+//===--- BoolBitwiseOperationCheck.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/vbvictor approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/142324
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
hassnaaHamdi wrote:
Some of the open issues related to devirtualization, the WPD pass doesn't get
any GVs out of them, as a result it doesn't work. For such issues, I think WPD
can't help them by any chance. Maybe it's a Clang problem.
https://github.com/llvm/llvm-project/pull/145031
_
melver wrote:
Gentle ping.
https://github.com/llvm/llvm-project/pull/141599
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
melver wrote:
Gentle ping.
https://github.com/llvm/llvm-project/pull/142955
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
Changes
This was broken before because we ended up using a constructor that was
disabled via assert(false). Use ShiftAP() if either LHS or RHS is allocated.
---
Full diff: https://github.com/llvm/llvm-project/pull/1
https://github.com/segoon updated
https://github.com/llvm/llvm-project/pull/145307
>From 546567ee93c1c0c0de5e34a1ec4d7c2ccfd081c8 Mon Sep 17 00:00:00 2001
From: Vasily Kulikov
Date: Mon, 12 May 2025 20:36:43 +0300
Subject: [PATCH 1/3] clang-tidy: add bugprone-taxi-async-use-after-free
---
...
https://github.com/vikramRH created
https://github.com/llvm/llvm-project/pull/145272
This attempts to fix https://github.com/llvm/llvm-project/issues/26078. However
I have couple of fundamental questions with the 7.1.5 consexpr note
"[ Note: An explicit specialization can differ from the templa
frederick-vs-ja wrote:
If we choose to be consistent with the standard wording, we might need to say
"[...] templates for which neither explicit specialization nor partial
specialization should be declared [...]", which is quite verbose.
The crux seems to be that it's not clear in the standard
vbvictor wrote:
Is this unfinished work? I'd suggest to covert this to draft.
https://github.com/llvm/llvm-project/pull/145307
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/yronglin edited
https://github.com/llvm/llvm-project/pull/107168
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wangpc-pp edited
https://github.com/llvm/llvm-project/pull/145267
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rampitec closed
https://github.com/llvm/llvm-project/pull/145152
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Timm Baeder
Date: 2025-06-23T10:14:33+02:00
New Revision: 1c78d8d9d7bcb4b20910047ad7db35f177a17c8c
URL:
https://github.com/llvm/llvm-project/commit/1c78d8d9d7bcb4b20910047ad7db35f177a17c8c
DIFF:
https://github.com/llvm/llvm-project/commit/1c78d8d9d7bcb4b20910047ad7db35f177a17c8c.diff
L
@@ -130,6 +140,14 @@ void SizeofExpressionCheck::registerMatchers(MatchFinder
*Finder) {
this);
}
+ if (WarnOnSizeOfInLoopTermination) {
+Finder->addMatcher(LoopExpr(hasDescendant(binaryOperator(
ziqingluo-90 wrote:
Since `hasDe
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Ziqing Luo (ziqingluo-90)
Changes
Support safe construction of `std::span` from `begin` and `end` calls on
hardened containers or views or `std::initializer_list`s.
For example, the following code is safe:
```
void create(std::initializer
llvmbot wrote:
@llvm/pr-subscribers-clang-analysis
Author: Ziqing Luo (ziqingluo-90)
Changes
Support safe construction of `std::span` from `begin` and `end` calls on
hardened containers or views or `std::initializer_list`s.
For example, the following code is safe:
```
void create(std::in
@@ -828,7 +828,23 @@ void ODRHash::AddDecl(const Decl *D) {
return;
}
- AddDeclarationName(ND->getDeclName());
+ // For template parameters, use depth+index instead of name, because type
+ // canonicalization can change the name of the template parameter.
+ if (auto
@@ -5164,6 +5164,29 @@ namespace A {
A::X x;
#endif
+namespace TemplateDecltypeOperator {
+
+#if defined(FIRST) || defined(SECOND)
+template
+T6 func();
+#endif
+
+#if defined(SECOND)
+template
+using UnrelatedAlias = decltype(func())();
+#endif
+
+#if defined(FIRST) || defi
@@ -922,8 +922,8 @@ template <> struct MDNodeKeyImpl {
MDString *LinkageName;
Metadata *File;
unsigned Line;
- Metadata *Type;
unsigned ScopeLine;
+ Metadata *Type;
OCHyams wrote:
Yep, 136 -> 128 bytes (144 -> 136 with the new bool). I don't think i
https://github.com/ilya-biryukov requested changes to this pull request.
Thanks, I believe we've seen some related breakages in the past and had to
workaround the module structure because of this. It would definitely save some
cycles for us in the future!
My only request is to keep this change
https://github.com/HighCommander4 edited
https://github.com/llvm/llvm-project/pull/140959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 requested changes to this pull request.
Thanks for adding some unit tests, and sorry I didn't get a chance to look at
this sooner.
Unfortunately, it looks like the patch needs a bit more work, as I'm seeing it
crash on incomplete code, for example:
```c++
#if
@@ -220,6 +220,24 @@ getFoldingRanges(const std::string &Code, bool
LineFoldingOnly) {
auto EndPosition = [&](const Token &T) {
return offsetToPosition(Code, EndOffset(T));
};
+
+ // Preprocessor directives
+ auto PPRanges = pairDirectiveRanges(DirectiveStructure, Or
@@ -220,6 +220,24 @@ getFoldingRanges(const std::string &Code, bool
LineFoldingOnly) {
auto EndPosition = [&](const Token &T) {
return offsetToPosition(Code, EndOffset(T));
};
+
+ // Preprocessor directives
HighCommander4 wrote:
A couple of minor poi
https://github.com/Sirraide approved this pull request.
https://github.com/llvm/llvm-project/pull/145207
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tbaederr closed
https://github.com/llvm/llvm-project/pull/145302
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Timm Baeder
Date: 2025-06-23T14:43:11+02:00
New Revision: 23ba0fdbfc2a240ca5ddcc7f71c7383437c00aaa
URL:
https://github.com/llvm/llvm-project/commit/23ba0fdbfc2a240ca5ddcc7f71c7383437c00aaa
DIFF:
https://github.com/llvm/llvm-project/commit/23ba0fdbfc2a240ca5ddcc7f71c7383437c00aaa.diff
L
https://github.com/Sirraide edited
https://github.com/llvm/llvm-project/pull/145187
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1853,18 +1852,11 @@ class StringLiteral final
public:
/// This is the "fully general" constructor that allows representation of
- /// strings formed from multiple concatenated tokens.
+ /// strings formed from multiple concatenated tokens. This same constructor
+ ///
https://github.com/Sirraide approved this pull request.
Nice cleanup, thanks!
https://github.com/llvm/llvm-project/pull/145187
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jurahul updated
https://github.com/llvm/llvm-project/pull/145187
>From 0579404d5df9dd7cf8380ed8b90355e3ef8391f0 Mon Sep 17 00:00:00 2001
From: Rahul Joshi
Date: Sat, 21 Jun 2025 13:32:25 -0700
Subject: [PATCH 1/2] [NFC][Clang][AST] Use `llvm::copy` instead of `memcpy` in
Str
https://github.com/Sirraide approved this pull request.
https://github.com/llvm/llvm-project/pull/145192
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor edited
https://github.com/llvm/llvm-project/pull/142324
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vbvictor updated
https://github.com/llvm/llvm-project/pull/126434
>From 516a831127d98d4b1a38a09d7d13f4f04a3a80ae Mon Sep 17 00:00:00 2001
From: Victor Baranov
Date: Mon, 3 Mar 2025 09:25:03 +0300
Subject: [PATCH 01/13] [clang-tidy] add scoped-lock-check
---
.../clang-tidy/m
OCHyams wrote:
> LGTM, I think this raises a few questions about whether we're going to
> support non-key-instructions code forever more. AFAIUI the premise is that
> the debugging behaviour is worse if you've got groupless instructions in a
> key-instructions program?
Worse is an understatem
https://github.com/jmorse edited
https://github.com/llvm/llvm-project/pull/144107
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -922,8 +922,8 @@ template <> struct MDNodeKeyImpl {
MDString *LinkageName;
Metadata *File;
unsigned Line;
- Metadata *Type;
unsigned ScopeLine;
+ Metadata *Type;
jmorse wrote:
This is space packing rather than being related to a functional change
https://github.com/jmorse approved this pull request.
LGTM, I think this raises a few questions about whether we're going to support
non-key-instructions code forever more. AFAIUI the premise is that the
debugging behaviour is worse if you've got groupless instructions in a
key-instructions pr
https://github.com/Keenuts approved this pull request.
https://github.com/llvm/llvm-project/pull/145334
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,6 @@
+.. title:: clang-tidy - bugprone-taxi-async-use-after-free
+
+bugprone-taxi-async-use-after-free
+==
+
+FIXME: Describe what patterns does the check detect and why. Give examples.
EugeneZelenko wrote:
Missing docum
@@ -85,6 +85,92 @@ enum VariableTypeDescriptorKind : uint16_t {
//Miscellaneous Helper Methods
//======//
+static llvm::StringRef GetTrapMessageForHandler(SanitizerHandler ID) {
+ swit
@@ -0,0 +1,58 @@
+//===--- TaxiAsyncUseAfterFreeCheck.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,58 @@
+//===--- TaxiAsyncUseAfterFreeCheck.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,58 @@
+//===--- TaxiAsyncUseAfterFreeCheck.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
@@ -85,6 +85,92 @@ enum VariableTypeDescriptorKind : uint16_t {
//Miscellaneous Helper Methods
//======//
+static llvm::StringRef GetTrapMessageForHandler(SanitizerHandler ID) {
+ swit
@@ -4059,8 +4154,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
auto Call = TrapBB->begin();
assert(isa(Call) && "Expected call in trap BB");
-Call->applyMergedLocation(Call->getDebugLoc(),
- Builder.getCurrentDebugLoca
@@ -85,6 +85,92 @@ enum VariableTypeDescriptorKind : uint16_t {
//Miscellaneous Helper Methods
//======//
+static llvm::StringRef GetTrapMessageForHandler(SanitizerHandler ID) {
---
@@ -85,6 +85,92 @@ enum VariableTypeDescriptorKind : uint16_t {
//Miscellaneous Helper Methods
//======//
+static llvm::StringRef GetTrapMessageForHandler(SanitizerHandler ID) {
+ swit
@@ -4059,8 +4154,16 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
auto Call = TrapBB->begin();
assert(isa(Call) && "Expected call in trap BB");
-Call->applyMergedLocation(Call->getDebugLoc(),
- Builder.getCurrentDebugLoca
@@ -4051,6 +4137,15 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID];
+ llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation();
+ llvm::StringRef Category = "UBSan Trap Reason";
d
@@ -4051,6 +4144,14 @@ void CodeGenFunction::EmitTrapCheck(llvm::Value *Checked,
llvm::BasicBlock *&TrapBB = TrapBBs[CheckHandlerID];
+ llvm::DILocation *TrapLocation = Builder.getCurrentDebugLocation();
+ llvm::StringRef Category = GetTrapMessageForHandler(CheckHandlerID
https://github.com/delcypher edited
https://github.com/llvm/llvm-project/pull/143758
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,10 @@
+// RUN: %clang -O0 -g -debug-info-kind=standalone -dwarf-version=5
-fsanitize=undefined \
+// RUN: -fsanitize-trap=undefined -emit-llvm -S -c %s -o - | FileCheck %s
+
+int add_overflow(int a, int b) {
+ return a + b;
+}
+
+// CHECK: call void @llvm.ubsantrap(i8
https://github.com/delcypher requested changes to this pull request.
Thanks for working on this. We're off to a good start. Once we have your test
cases in a good shape we should look at the failing tests to figure out why
they broke so we can fix them or adjust your implementation.
https://gi
@@ -124,6 +124,11 @@ New checks
pointer and store it as class members without handle the copy and move
constructors and the assignments.
+- New :doc:`bugprone-taxi-async-use-after-free
+ ` check.
+
+ Use-after-free for engine::Async.
EugeneZelenko wrote:
@@ -1904,7 +1904,8 @@ CGDebugInfo::createInlinedSubprogram(StringRef FuncName,
/*ScopeLine=*/0,
/*Flags=*/llvm::DINode::FlagArtificial,
/*SPFlags=*/llvm::DISubprogram::SPFlagDefinition,
-/*TParams=*/nullptr, /*ThrownTypes=*/nullptr, /*Annotations
https://github.com/carlosgalvezp approved this pull request.
LGTM, don't have strong opinions on the default.
https://github.com/llvm/llvm-project/pull/143550
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/145260
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 379 matches
Mail list logo