[clang] [clang][modules] Remove the workaround for the lambda issue. (PR #142547)

2025-06-02 Thread Chuanqi Xu via cfe-commits
@@ -1702,36 +1702,7 @@ static NamedDecl* getLambdaCallOperatorHelper(const CXXRecordDecl &RD) { assert(allLookupResultsAreTheSame(Calls) && "More than one lambda call operator!"); - - // FIXME: If we have multiple call operators, we might be in a situation - // w

[clang] [llvm] [LoongArch][BF16] Add support for the __bf16 type (PR #142548)

2025-06-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-loongarch Author: None (Ami-zhang) Changes The LoongArch psABI recently added __bf16 type support. Now we can enable this new type in clang. Currently, bf16 operations are automatically supported by promoting to float. This patch adds bf16 sup

[clang] [llvm] [LoongArch][BF16] Add support for the __bf16 type (PR #142548)

2025-06-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Ami-zhang) Changes The LoongArch psABI recently added __bf16 type support. Now we can enable this new type in clang. Currently, bf16 operations are automatically supported by promoting to float. This patch adds bf16 support by ensu

[clang] clang: Fix wrong C++ marker in tablegen file (PR #142534)

2025-06-02 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/142534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,250 @@ +// RUN: cp %s %t +// RUN: %clang_cc1 -x c++ -Wunused-lambda-capture -Wno-unused-value -std=c++1z -fixit %t +// RUN: grep -v CHECK %t | FileCheck %s + + +#define MACRO_CAPTURE(...) __VA_ARGS__ +int main() { +int a = 0, b = 0, c = 0; +auto F0 = [a, &b]()

[clang] clang: Fix wrong C++ marker in tablegen file (PR #142534)

2025-06-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matt Arsenault (arsenm) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/142534.diff 1 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsBase.td (+1-1) ``diff diff --git a/clang/include/clang/Bas

[clang] clang: Fix wrong C++ marker in tablegen file (PR #142534)

2025-06-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: * **#142534** https://app.graphite.dev/github/pr/llvm/llvm-project/142534?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14253

[clang] clang: Fix wrong C++ marker in tablegen file (PR #142534)

2025-06-02 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/142534 None >From ef0db5d83400a2d43a8706cbfb7374a91d68f72f Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 2 Jun 2025 16:58:10 +0200 Subject: [PATCH] clang: Fix wrong C++ marker in tablegen file --- clang/in

[clang] [NFC][CodeGen] Exctact SanitizerHandler into own header (PR #142527)

2025-06-02 Thread Thurston Dang via cfe-commits
https://github.com/thurstond approved this pull request. https://github.com/llvm/llvm-project/pull/142527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/141997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][CodeGen] Extract SanitizerHandler into own header (PR #142527)

2025-06-02 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/142527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2622e6b - [NFC][CodeGen] Extract SanitizerHandler into own header (#142527)

2025-06-02 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-06-02T22:47:08-07:00 New Revision: 2622e6bfa076c60d4556c066245895e2766a7285 URL: https://github.com/llvm/llvm-project/commit/2622e6bfa076c60d4556c066245895e2766a7285 DIFF: https://github.com/llvm/llvm-project/commit/2622e6bfa076c60d4556c066245895e2766a7285.diff L

[clang] [NFC][CodeGen] Extract SanitizerHandler into own header (PR #142527)

2025-06-02 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/142527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/141148 >From 0db205bb8f6925dd725885395f58a688000c7b8b Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 22 May 2025 02:38:26 -0700 Subject: [PATCH 1/4] [clang] Correct FixIt ranges for unused capture warnings Fixes

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread Oliver Hunt via cfe-commits
@@ -2164,15 +2164,29 @@ ExprResult Sema::BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, bool IsLast = (I + 1) == LSI->NumExplicitCaptures; SourceRange FixItRange; if (CaptureRange.isValid()) { +auto GetTrailingEndLocat

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/141148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/141148 >From 0db205bb8f6925dd725885395f58a688000c7b8b Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 22 May 2025 02:38:26 -0700 Subject: [PATCH 1/3] [clang] Correct FixIt ranges for unused capture warnings Fixes

[clang] [NFC][CodeGen] Exctact SanitizerHandler into own header (PR #142527)

2025-06-02 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/142527 >From b0bed4bdd6e1ee86d31a1f45824c731673a6f20e Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 2 Jun 2025 21:54:00 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [NFC][CodeGen] Exctact SanitizerHandler into own header (PR #142527)

2025-06-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vitaly Buka (vitalybuka) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/142527.diff 1 Files Affected: - (modified) clang/lib/CodeGen/CodeGenFunction.h (+1-34) ``diff diff --git a/clang/lib/CodeGen/CodeGenFu

[clang] [NFC][CodeGen] Exctact SanitizerHandler into own header (PR #142527)

2025-06-02 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/142527 None >From b0bed4bdd6e1ee86d31a1f45824c731673a6f20e Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 2 Jun 2025 21:54:00 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/141148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread Oliver Hunt via cfe-commits
@@ -972,6 +972,12 @@ class Sema final : public SemaBase { /// Calls \c Lexer::getLocForEndOfToken() SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset = 0); + /// Calls \c Lexer::findNextToken() to find the next token, and if the + /// locations of bo

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/141148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/141148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread Oliver Hunt via cfe-commits
@@ -84,6 +84,21 @@ SourceLocation Sema::getLocForEndOfToken(SourceLocation Loc, unsigned Offset) { return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts); } +SourceRange Sema::getRangeForNextToken(SourceLocation Loc, + bool

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread via cfe-commits
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 HEAD~1 HEAD --extensions cpp,h -- clang/test/FixIt/fixit-unused-lambda-capture-traili

[clang] [clang] Correct FixIt ranges for unused capture warnings (PR #141148)

2025-06-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/141148 >From 0db205bb8f6925dd725885395f58a688000c7b8b Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 22 May 2025 02:38:26 -0700 Subject: [PATCH 1/2] [clang] Correct FixIt ranges for unused capture warnings Fixes

[clang-tools-extra] [clang-doc] add a JSON generator (PR #142483)

2025-06-02 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/142483 >From cf68952c0cf4dfeda65c78c6d2326426bbf2d693 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Mon, 2 Jun 2025 12:53:36 -0700 Subject: [PATCH] [clang-doc] add a JSON generator --- clang-tools-extra/clang-doc/

[clang] [llvm] [RISCV] Add SiFive X390 processor definition (PR #142517)

2025-06-02 Thread Sam Elliott via cfe-commits
lenary wrote: I'm happy with this in that the test coverage looks adequate to me. I cannot really verify that the list of extensions are correct, but they look reasonable enough. https://github.com/llvm/llvm-project/pull/142517 ___ cfe-commits mailin

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Vitaly Buka via cfe-commits
@@ -2756,10 +2758,23 @@ CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); CGF->IsSanitizerScope = true; + + assert(!this->ApplyTrapDI); +} + +CodeGenFunction::SanitizerScope::SanitizerScope( +CodeGen

[clang] [clang] Fixed Constant Evaluation don't Call Destructor (PR #140278)

2025-06-02 Thread via cfe-commits
Mr-Anyone wrote: documentation fail seems to be fixed by #142387 https://github.com/llvm/llvm-project/pull/140278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Fix docs-clang-html. (PR #142387)

2025-06-02 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: I wonder whether it would be better to modify `.github/workflows/docs.yml` together. It seems that modification of some transitively included td files doesn't trigger CI for documentation. https://github.com/llvm/llvm-project/pull/142387 _

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Erich Keane via cfe-commits
@@ -1922,6 +1924,7 @@ static std::optional StdNameToTypeTrait(StringRef Name) { return llvm::StringSwitch>(Name) .Case("is_trivially_relocatable", TypeTrait::UTT_IsCppTriviallyRelocatable) + .Case("is_trivially_copyable", TypeTrait::UTT_IsTriviallyCopy

[clang-tools-extra] [clang-tidy] Added check 'bugprone-function-visibility-change' (PR #140086)

2025-06-02 Thread Congcong Cai via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -0,0 +1,136 @@ +//===--- FunctionVisibilityChangeCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM

[clang-tools-extra] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-02 Thread via cfe-commits
@@ -0,0 +1,40 @@ +.. title:: clang-tidy - performance-bool-bitwise-operation + +performance-bool-bitwise-operation +== + +Finds potentially inefficient use of bitwise operators such as ``&``, EugeneZelenko wrote: Please synchroniz

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
@@ -1922,6 +1924,7 @@ static std::optional StdNameToTypeTrait(StringRef Name) { return llvm::StringSwitch>(Name) .Case("is_trivially_relocatable", TypeTrait::UTT_IsCppTriviallyRelocatable) + .Case("is_trivially_copyable", TypeTrait::UTT_IsTriviallyCopy

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/142341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why a is trivial copyable evaluated to false. (PR #142341)

2025-06-02 Thread Erich Keane via cfe-commits
@@ -1922,6 +1924,7 @@ static std::optional StdNameToTypeTrait(StringRef Name) { return llvm::StringSwitch>(Name) .Case("is_trivially_relocatable", TypeTrait::UTT_IsCppTriviallyRelocatable) + .Case("is_trivially_copyable", TypeTrait::UTT_IsTriviallyCopy

[clang-tools-extra] [clang-doc] [test] Generalize error message patterns (PR #142373)

2025-06-02 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 commented: Looks fine. But I see your point regarding portability, I'll think how we can modify this. https://github.com/llvm/llvm-project/pull/142373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Thurston Dang via cfe-commits
thurstond wrote: > How is this going to be useful? We should make some effort to try to > determine where the overhead comes from. I don't like that the specific > array_bounds inline function is going away _even though we have a specific > codepath for it_. I've now changed the annotations t

[clang] Introduce intra-procedural lifetime analysis in Clang (PR #142313)

2025-06-02 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/142313 >From 136238f2c94c6f7f90f4dd55d8e095e56f96f80b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Mon, 2 Jun 2025 17:53:14 + Subject: [PATCH] Introduce Intra-procedural lifetime analysis in Clang --- .../cl

[clang] [AArch64] Add missing Neon Types (PR #126945)

2025-06-02 Thread David Green via cfe-commits
https://github.com/davemgreen closed https://github.com/llvm/llvm-project/pull/126945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce Intra-procedural lifetime analysis in Clang (PR #142313)

2025-06-02 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/142313 >From 7b929ee264356c66f415f9e039819a89b1dac06b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Mon, 2 Jun 2025 17:53:14 + Subject: [PATCH] Introduce Intra-procedural lifetime analysis in Clang --- .../cl

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Florian Mayer via cfe-commits
@@ -2756,10 +2758,23 @@ CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); CGF->IsSanitizerScope = true; + + assert(!this->ApplyTrapDI); +} + +CodeGenFunction::SanitizerScope::SanitizerScope( +CodeGen

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Thurston Dang via cfe-commits
@@ -2755,9 +2757,18 @@ CodeGenFunction::CGCapturedStmtInfo::~CGCapturedStmtInfo() { } CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); + assert(!ApplyTrapDI); thurstond wrote: Removed h

[clang] [clang] Don't evaluate the initializer of constexpr-unknown parameters. (PR #142498)

2025-06-02 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. I was literally just writing this PR and saw you just submitted this one, thank you! LGTM https://github.com/llvm/llvm-project/pull/142498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Thurston Dang via cfe-commits
thurstond wrote: > @thurstond So there is a significant overlap here with what my GSoC student > (@anthonyhatran) is working on right now (CC @MiB137). The project was > proposed > [here](https://llvm.org/OpenProjects.html#clang-improve-trapping-ubsan-2025). > > During @anthonyhatran 's GSoC

[clang] [llvm] [NFC][RootSignature] Move RootSignature util functions (PR #142491)

2025-06-02 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/142491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PAC] Add __builtin_get_vtable_pointer (PR #139790)

2025-06-02 Thread Oliver Hunt via cfe-commits
@@ -1825,6 +1825,37 @@ static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *Call) { return Call; } +static ExprResult GetVTablePointer(Sema &S, CallExpr *Call) { + if (S.checkArgCount(Call, 1)) +return ExprError(); + ExprResult ThisArg = S.DefaultFuncti

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Vitaly Buka via cfe-commits
@@ -1134,18 +1136,32 @@ void ScalarExprEmitter::EmitIntegerTruncationCheck(Value *Src, QualType SrcType, (!SrcSigned && DstSigned)) return; - CodeGenFunction::SanitizerScope SanScope(&CGF); - std::pair> - Check = - EmitIntegerTruncationCheckHelper(

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-06-02 Thread Nikolas Klauser via cfe-commits
@@ -3990,6 +3990,13 @@ def LocksExcluded : InheritableAttr { let Documentation = [Undocumented]; } +def ReentrantCapability : InheritableAttr { + let Spellings = [Clang<"reentrant_capability">]; + let Subjects = SubjectList<[Record, TypedefName]>; + let Documentation = [U

[clang] [CIR] Defer definitions of global variables until they are used. (PR #142496)

2025-06-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/142496 >From 8186d4dbe40634308689050a124f6cbf6311a67f Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 23 May 2025 17:11:41 -0700 Subject: [PATCH 1/2] [CIR] Defer definitions of global variables until they are

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Dan Liew via cfe-commits
delcypher wrote: @thurstond So there is a significant overlap here with what my GSoC student (@anthonyhatran) is working on right now (CC @MiB137). The project was proposed [here](https://llvm.org/OpenProjects.html#clang-improve-trapping-ubsan-2025). During @anthonyhatran 's GSoC project he wi

[clang] [Frontend][PCH]-Add support for ignoring PCH options (-ignore-pch). (PR #142409)

2025-06-02 Thread Matheus Izvekov via cfe-commits
@@ -31,6 +31,16 @@ option: $ clang -cc1 -include-pch test.h.pch test.c -o test.s +To ignore PCH options using ``clang -cc1``, use the option `-ignore-pch`: mizvekov wrote: Ah okay, my bad for confusing those two options. Still, emit-pch isn't documented o

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Thurston Dang via cfe-commits
@@ -2755,9 +2757,18 @@ CodeGenFunction::CGCapturedStmtInfo::~CGCapturedStmtInfo() { } CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); + assert(!ApplyTrapDI); CGF->IsSanitizerScope = true; } +CodeGe

[clang] 43c2234 - [Sanitizer][Ignorelist] Expanding =sanitize to global. (#142456)

2025-06-02 Thread via cfe-commits
Author: Qinkun Bao Date: 2025-06-02T17:47:12-04:00 New Revision: 43c223424957a43a3cb778980b595a1cfd3ae1a6 URL: https://github.com/llvm/llvm-project/commit/43c223424957a43a3cb778980b595a1cfd3ae1a6 DIFF: https://github.com/llvm/llvm-project/commit/43c223424957a43a3cb778980b595a1cfd3ae1a6.diff LO

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/142393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Vitaly Buka via cfe-commits
@@ -2755,9 +2757,18 @@ CodeGenFunction::CGCapturedStmtInfo::~CGCapturedStmtInfo() { } CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); + assert(!ApplyTrapDI); CGF->IsSanitizerScope = true; } +CodeGe

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Vitaly Buka via cfe-commits
@@ -2755,9 +2757,18 @@ CodeGenFunction::CGCapturedStmtInfo::~CGCapturedStmtInfo() { } CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); + assert(!ApplyTrapDI); vitalybuka wrote: ```sugges

[clang] [CIR] Defer definitions of global variables until they are used. (PR #142496)

2025-06-02 Thread Andy Kaylor via cfe-commits
@@ -63,6 +63,20 @@ bool CIRGenerator::HandleTopLevelDecl(DeclGroupRef group) { return true; } +void CIRGenerator::HandleTranslationUnit(ASTContext &astContext) { + // Release the Builder when there is no error. + if (!diags.hasErrorOccurred() && cgm) +cgm->release(); +

[clang] [clang] Rename diag notes that assumed precompiled dependencies are pch's, NFCI (PR #142161)

2025-06-02 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/142161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 883130e - [clang] Rename diag notes that assumed precompiled dependencies are pch's, NFCI (#142161)

2025-06-02 Thread via cfe-commits
Author: Cyndy Ishida Date: 2025-06-02T15:59:16-07:00 New Revision: 883130e33325282cfd31b68f5db52891442c20b7 URL: https://github.com/llvm/llvm-project/commit/883130e33325282cfd31b68f5db52891442c20b7 DIFF: https://github.com/llvm/llvm-project/commit/883130e33325282cfd31b68f5db52891442c20b7.diff

[clang] [clang] Rename diag notes that assumed precompiled dependencies are pch's, NFCI (PR #142161)

2025-06-02 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: Seems like we're ok with "precompiled file" in terms of a generalization of both precompiled headers & module files, when it's applicable, in diagnostic messages. I am going to merge this and handle aligning the rest of the diagnostics in a follow-up pr. https://github.com/

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Thurston Dang via cfe-commits
@@ -2756,10 +2758,23 @@ CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); CGF->IsSanitizerScope = true; + + assert(!this->ApplyTrapDI); +} + +CodeGenFunction::SanitizerScope::SanitizerScope( +CodeGen

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: This looks good, but I would like to wait for https://github.com/llvm/llvm-project/pull/138156 to be merged first. https://github.com/llvm/llvm-project/pull/142393 ___ cfe-commits mailing list cfe-commits@lists

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Andy Kaylor via cfe-commits
@@ -1069,4 +1069,19 @@ void foo17() { // OGCG: %[[VEC_A:.*]] = alloca <2 x double>, align 16 // OGCG: %[[TMP:.*]] = load <2 x double>, ptr %[[VEC_A]], align 16 -// OGCG: %[[RES:.*]]= fptoui <2 x double> %[[TMP]] to <2 x i16> \ No newline at end of file +// OGCG: %[[RES:.*]]= f

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Vitaly Buka via cfe-commits
@@ -2756,10 +2758,23 @@ CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); CGF->IsSanitizerScope = true; + + assert(!this->ApplyTrapDI); +} + +CodeGenFunction::SanitizerScope::SanitizerScope( +CodeGen

[clang] [clang] Don't evaluate the initializer of constexpr-unknown parameters. (PR #142498)

2025-06-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes If we see a parameter of reference type that isn't part of the frame, don't try to evaluate its default argument. Just treat it as a constexpr-unknown value. Fixes #141114. Fixes #141858. --- Full di

[clang] [clang] Don't evaluate the initializer of constexpr-unknown parameters. (PR #142498)

2025-06-02 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/142498 If we see a parameter of reference type that isn't part of the frame, don't try to evaluate its default argument. Just treat it as a constexpr-unknown value. Fixes #141114. Fixes #141858. >From 08d64f59

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Vitaly Buka via cfe-commits
@@ -2756,10 +2758,23 @@ CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); CGF->IsSanitizerScope = true; + + assert(!this->ApplyTrapDI); +} + +CodeGenFunction::SanitizerScope::SanitizerScope( +CodeGen

[clang] [CIR] Defer definitions of global variables until they are used. (PR #142496)

2025-06-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/142496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Defer definitions of global variables until they are used. (PR #142496)

2025-06-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I did a quick look, and this seems reasonable. https://github.com/llvm/llvm-project/pull/142496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [CIR] Defer definitions of global variables until they are used. (PR #142496)

2025-06-02 Thread Erich Keane via cfe-commits
@@ -63,6 +63,20 @@ bool CIRGenerator::HandleTopLevelDecl(DeclGroupRef group) { return true; } +void CIRGenerator::HandleTranslationUnit(ASTContext &astContext) { + // Release the Builder when there is no error. + if (!diags.hasErrorOccurred() && cgm) +cgm->release(); +

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Thurston Dang via cfe-commits
@@ -4734,7 +4770,16 @@ Value *ScalarExprEmitter::EmitShl(const BinOpInfo &Ops) { RHS = ConstrainShiftValue(Ops.LHS, RHS, "shl.mask"); else if ((SanitizeBase || SanitizeExponent) && isa(Ops.LHS->getType())) { -CodeGenFunction::SanitizerScope SanScope(&CGF);

[clang] [Doc] Fix a typo in SanitizerSpecialCaseList.rst (PR #142494)

2025-06-02 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao created https://github.com/llvm/llvm-project/pull/142494 None >From 32bb142819fa2295546166ad9e6639204cd03884 Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Mon, 2 Jun 2025 22:20:20 + Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. Thanks https://github.com/llvm/llvm-project/pull/141997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Defer definitions of global variables until they are used. (PR #142496)

2025-06-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This change adds support for deferring global variable definitions until first use whenever it is possible to do so. Although deferring function definitions uses much of the same implementation, function d

[clang] [CIR] Defer definitions of global variables until they are used. (PR #142496)

2025-06-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This change adds support for deferring global variable definitions until first use whenever it is possible to do so. Although deferring function definitions uses much of the same implementation, function

[clang] [CIR] Defer definitions of global variables until they are used. (PR #142496)

2025-06-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/142496 This change adds support for deferring global variable definitions until first use whenever it is possible to do so. Although deferring function definitions uses much of the same implementation, function def

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Thurston Dang via cfe-commits
@@ -2756,10 +2758,23 @@ CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); CGF->IsSanitizerScope = true; + + assert(!this->ApplyTrapDI); +} + +CodeGenFunction::SanitizerScope::SanitizerScope( +CodeGen

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Thurston Dang via cfe-commits
@@ -4204,7 +4238,9 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF, PtrTy->getPointerAddressSpace())) return Ptr; // The inbounds GEP of null is valid iff the index is zero. -CodeGenFunction::SanitizerScope SanScope(&CGF);

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Thurston Dang via cfe-commits
@@ -2756,10 +2758,23 @@ CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); CGF->IsSanitizerScope = true; + + assert(!this->ApplyTrapDI); thurstond wrote: Fixed in https://github.com/llv

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Thurston Dang via cfe-commits
@@ -597,8 +597,15 @@ class CodeGenFunction : public CodeGenTypeCache { class SanitizerScope { CodeGenFunction *CGF; +// ApplyDebugLocation is undeclared: CGDebugInfo.h is not #included in this thurstond wrote: Fixed in https://github.com/llvm/llvm-

[clang] [Doc] Fix a typo in SanitizerSpecialCaseList.rst (PR #142494)

2025-06-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qinkun Bao (qinkunbao) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/142494.diff 1 Files Affected: - (modified) clang/docs/SanitizerSpecialCaseList.rst (+1-1) ``diff diff --git a/clang/docs/SanitizerSpecia

[clang] [clang][Sema] Fix and reapply 'Declare builtins used in #pragma intrinsic #138205' (PR #142019)

2025-06-02 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/142019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix and reapply 'Declare builtins used in #pragma intrinsic #138205' (PR #142019)

2025-06-02 Thread Nick Sarnie via cfe-commits
sarnex wrote: Sure, this was an interesting one. I thought I was losing my mind until I actually got into the debugger and saw the problem. https://github.com/llvm/llvm-project/pull/142019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Thurston Dang via cfe-commits
https://github.com/thurstond edited https://github.com/llvm/llvm-project/pull/141997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/142393 >From 030af8ea55d123d4b32d6a935c6288ea76973897 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 2 Jun 2025 15:11:17 +0200 Subject: [PATCH 1/3] [CIR] Upstream TernaryOp for VectorType --- clang/inclu

[clang] [Sanitizer][Ignorelist] Expanding =sanitize to global. (PR #142456)

2025-06-02 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/142456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sanitizer][Ignorelist] Expanding =sanitize to global. (PR #142456)

2025-06-02 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao closed https://github.com/llvm/llvm-project/pull/142456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 071e55b - [CIR][NFS] Remove unnecessary constraints asserts in VecCmpOp (#142473)

2025-06-02 Thread via cfe-commits
Author: Amr Hesham Date: 2025-06-03T00:22:44+02:00 New Revision: 071e55baf1ab16264021c9c52ecd4f88c325e988 URL: https://github.com/llvm/llvm-project/commit/071e55baf1ab16264021c9c52ecd4f88c325e988 DIFF: https://github.com/llvm/llvm-project/commit/071e55baf1ab16264021c9c52ecd4f88c325e988.diff LO

[clang] [CIR][NFS] Remove unnecessary constraints asserts in VecCmpOp (PR #142473)

2025-06-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/142473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Florian Mayer via cfe-commits
@@ -4734,7 +4770,16 @@ Value *ScalarExprEmitter::EmitShl(const BinOpInfo &Ops) { RHS = ConstrainShiftValue(Ops.LHS, RHS, "shl.mask"); else if ((SanitizeBase || SanitizeExponent) && isa(Ops.LHS->getType())) { -CodeGenFunction::SanitizerScope SanScope(&CGF);

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Florian Mayer via cfe-commits
@@ -597,8 +597,15 @@ class CodeGenFunction : public CodeGenTypeCache { class SanitizerScope { CodeGenFunction *CGF; +// ApplyDebugLocation is undeclared: CGDebugInfo.h is not #included in this fmayer wrote: Just forward declare it. https://github.

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Florian Mayer via cfe-commits
@@ -2756,10 +2758,23 @@ CodeGenFunction::SanitizerScope::SanitizerScope(CodeGenFunction *CGF) : CGF(CGF) { assert(!CGF->IsSanitizerScope); CGF->IsSanitizerScope = true; + + assert(!this->ApplyTrapDI); fmayer wrote: Why `this`? I would order this with

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Florian Mayer via cfe-commits
@@ -4204,7 +4238,9 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF, PtrTy->getPointerAddressSpace())) return Ptr; // The inbounds GEP of null is valid iff the index is zero. -CodeGenFunction::SanitizerScope SanScope(&CGF);

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-02 Thread Florian Mayer via cfe-commits
https://github.com/fmayer requested changes to this pull request. https://github.com/llvm/llvm-project/pull/141997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sanitizer][Ignorelist] Expanding =sanitize to mainfile. (PR #142472)

2025-06-02 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao edited https://github.com/llvm/llvm-project/pull/142472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][RootSignature] Move RootSignature util functions (PR #142491)

2025-06-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Finn Plummer (inbelic) Changes `HLSLRootSignature.h` was originally created to hold the struct definitions of an `llvm::hlsl::rootsig::RootElement` and some helper functions for it. However, there many u

[clang] [Sanitizer][Ignorelist] Expanding =sanitize to mainfile. (PR #142472)

2025-06-02 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao closed https://github.com/llvm/llvm-project/pull/142472 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   >