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

2025-06-04 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] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-04 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] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-04 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 ] Add DLTI dialect support to module attributes (PR #142241)

2025-06-04 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/142241 >From c60cbfd510f28161c592dfdef6d3d8e10f0ce59a Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Fri, 30 May 2025 18:13:31 -0500 Subject: [PATCH 1/2] Add DLTI dialect support to module attributes an

[clang] [clang] Function type attribute to prevent CFI instrumentation (PR #135836)

2025-06-04 Thread via cfe-commits
https://github.com/PiJoules closed https://github.com/llvm/llvm-project/pull/135836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CGObjC] Sign the v-table pointer in ObjC exception RTTI. (PR #135562)

2025-06-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/135562 >From 5dc1e5fbb57f88e412e044605d8fe30a66255a35 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Sun, 13 Apr 2025 13:21:49 -0700 Subject: [PATCH 1/4] [clang][CGObjC] Sign the v-table pointer in ObjC exception RTT

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

2025-06-04 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/142315 >From 12c9d3f76360c28efc8ba07ac959af6cf45a6f10 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 1 Jun 2025 19:07:56 +0200 Subject: [PATCH 1/4] [CIR] Implement folder for VecShuffleDynamicOp --- clan

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

2025-06-04 Thread Florian Mayer via cfe-commits
https://github.com/fmayer 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] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-04 Thread Florian Mayer via cfe-commits
@@ -6435,10 +6433,44 @@ llvm::DILocation *CodeGenFunction::SanitizerAnnotateDebugInfo( #undef SANITIZER_CHECK }; + // Label doesn't require sanitization + fmayer wrote: random newline https://github.com/llvm/llvm-project/pull/141997 _

[clang] ed42e17 - [APINotes] Remove unused includes (NFC) (#142406)

2025-06-04 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-06-04T12:30:47-07:00 New Revision: ed42e172986a686e02cc030d2563374a1200e018 URL: https://github.com/llvm/llvm-project/commit/ed42e172986a686e02cc030d2563374a1200e018 DIFF: https://github.com/llvm/llvm-project/commit/ed42e172986a686e02cc030d2563374a1200e018.diff L

[clang] [APINotes] Remove unused includes (NFC) (PR #142406)

2025-06-04 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/142406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTMatchers] Remove unused includes (NFC) (PR #142407)

2025-06-04 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/142407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2158036 - [ASTMatchers] Remove unused includes (NFC) (#142407)

2025-06-04 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-06-04T12:31:46-07:00 New Revision: 21580369340a07bafa6c606bf0b3e46d7e374cfa URL: https://github.com/llvm/llvm-project/commit/21580369340a07bafa6c606bf0b3e46d7e374cfa DIFF: https://github.com/llvm/llvm-project/commit/21580369340a07bafa6c606bf0b3e46d7e374cfa.diff L

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

2025-06-04 Thread Florian Mayer via cfe-commits
@@ -6435,10 +6433,44 @@ llvm::DILocation *CodeGenFunction::SanitizerAnnotateDebugInfo( #undef SANITIZER_CHECK }; + // Label doesn't require sanitization + + return Label; +} + +static std::string +SanitizerOrdinalToCheckLabel(SanitizerKind::SanitizerOrdinal Ordinal) { +

[clang] Add sycl_external attribute (PR #140282)

2025-06-04 Thread via cfe-commits
https://github.com/schittir updated https://github.com/llvm/llvm-project/pull/140282 >From abdbf8905d324f9b935b34bbc97c508ede5ac028 Mon Sep 17 00:00:00 2001 From: "Chittireddy, Sindhu" Date: Fri, 16 May 2025 08:51:06 -0700 Subject: [PATCH 1/5] Add sycl_external attribute --- clang/include/cla

[clang] [clang-tools-extra] [llvm] [clang] Simplify device kernel attributes (PR #137882)

2025-06-04 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/137882 >From 080a9d43ba6544d46c2b36c5dc6a5af421264580 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 7 May 2025 12:17:30 -0700 Subject: [PATCH 1/7] [clang] Simplify device kernel attributes Signed-off-by: Sar

[clang-tools-extra] [clang-tidy] Add new check `llvm-prefer-static-over-anonymous-namespace` (PR #142839)

2025-06-04 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/142839 Finds function and variable declarations inside anonymous namespace and suggests replacing them with ``static`` declarations. The check will enforce that [restrict-visibility](https://llvm.org/docs/CodingStan

[clang] [clang-tools-extra] [llvm] [clang] Simplify device kernel attributes (PR #137882)

2025-06-04 Thread Nick Sarnie via cfe-commits
@@ -3541,7 +3541,7 @@ bool FunctionDecl::isExternC() const { } bool FunctionDecl::isInExternCContext() const { - if (hasAttr()) + if (hasAttr() && getASTContext().getLangOpts().OpenCL) sarnex wrote: Sorry for the delay, I just pushed a commit updating all t

[clang-tools-extra] [clang-tidy] Add new check `llvm-prefer-static-over-anonymous-namespace` (PR #142839)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Baranov Victor (vbvictor) Changes Finds function and variable declarations inside anonymous namespace and suggests replacing them with ``static`` declarations. The check will enforce that [restrict-visibility](https://llvm.org/docs/

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

2025-06-04 Thread Thurston Dang via cfe-commits
@@ -6435,10 +6433,44 @@ llvm::DILocation *CodeGenFunction::SanitizerAnnotateDebugInfo( #undef SANITIZER_CHECK }; + // Label doesn't require sanitization + thurstond wrote: Removed https://github.com/llvm/llvm-project/pull/141997 _

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

2025-06-04 Thread Thurston Dang via cfe-commits
@@ -6435,10 +6433,44 @@ llvm::DILocation *CodeGenFunction::SanitizerAnnotateDebugInfo( #undef SANITIZER_CHECK }; + // Label doesn't require sanitization + + return Label; +} + +static std::string +SanitizerOrdinalToCheckLabel(SanitizerKind::SanitizerOrdinal Ordinal) { +

[clang] [clang] Reduce LateInstantiatedAttrVec vector default size. (PR #142840)

2025-06-04 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/142840 This increases clang's template instantiation depths. I can see 7% increase (1510 -> 1612 on my local machine) for the `clang/test/SemaTemplate/instantiation-depth-default.cpp` case. No performance regressions

[clang] [clang] Reduce LateInstantiatedAttrVec vector default size. (PR #142840)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes This increases clang's template instantiation depths. I can see 7% increase (1510 -> 1612 on my local machine) for the `clang/test/SemaTemplate/instantiation-depth-default.cpp` case. No performance regression

[clang-tools-extra] [clang-tidy] modernize-use-std-print, format: Fix checks with Abseil functions (PR #142312)

2025-06-04 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe updated https://github.com/llvm/llvm-project/pull/142312 >From fcbda0ca98375fd4fd0dd1274f91262a8b1f95cd Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Thu, 29 May 2025 21:19:11 +0100 Subject: [PATCH 1/3] [clang-tidy] modernize-use-std-print,format: Fix checks with

[clang] [llvm] [NFC][LLVM] Refactor IRBuilder::Create{VScale,ElementCount,TypeSize}. (PR #142803)

2025-06-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/142803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new check `llvm-prefer-static-over-anonymous-namespace` (PR #142839)

2025-06-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: @AaronBallman, may you give some feedback on how good/bad this check would play on LLVM project in general. I feel it may be even "too strict" for whole LLVM, but for clang-tidy project it may be very helpful in guiding new contributors writing the right way. https://github.co

[clang] [clang] Remove the experimental prefix from -fexperimental-relative-c++-abi-vtables (PR #142845)

2025-06-04 Thread via cfe-commits
https://github.com/PiJoules created https://github.com/llvm/llvm-project/pull/142845 This actually creates an alias to the original flag omitting the experimental part. This has been in prod use for a while and isn't necessary. >From 676b29c1dd2b1c303211e3faf6252a12f5d69f31 Mon Sep 17 00:00:00

[clang] [clang] Remove the experimental prefix from -fexperimental-relative-c++-abi-vtables (PR #142845)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: None (PiJoules) Changes This actually creates an alias to the original flag omitting the experimental part. This has been in prod use for a while and isn't necessary. --- Full diff: https://github.com/llvm/llvm-project/pull/142845.

[clang] [clang] Remove the experimental prefix from -fexperimental-relative-c++-abi-vtables (PR #142845)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (PiJoules) Changes This actually creates an alias to the original flag omitting the experimental part. This has been in prod use for a while and isn't necessary. --- Full diff: https://github.com/llvm/llvm-project/pull/142845.diff

[clang] [clang] Remove the experimental prefix from -fexperimental-relative-c++-abi-vtables (PR #142845)

2025-06-04 Thread via cfe-commits
https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/142845 >From 7cf215da28c51159ffef7b458bd38d4389b410b1 Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Wed, 4 Jun 2025 13:25:07 -0700 Subject: [PATCH] [clang] Remove the experimental prefix from -fexperimental-relat

[clang] 50c5704 - modulemap: add arm64 intrinsics header (#142653)

2025-06-04 Thread via cfe-commits
Author: Fabrice de Gans Date: 2025-06-04T13:32:14-07:00 New Revision: 50c5704dc000cc0af41a511aa44db03233edf0af URL: https://github.com/llvm/llvm-project/commit/50c5704dc000cc0af41a511aa44db03233edf0af DIFF: https://github.com/llvm/llvm-project/commit/50c5704dc000cc0af41a511aa44db03233edf0af.dif

[clang] modulemap: add arm64 intrinsics header (PR #142653)

2025-06-04 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd closed https://github.com/llvm/llvm-project/pull/142653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] Simplify device kernel attributes (PR #137882)

2025-06-04 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I think this looks reasonable, LGTM. https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [CIR ] Add DLTI dialect support to module attributes (PR #142241)

2025-06-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for derived class declarations (PR #142823)

2025-06-04 Thread Erich Keane via cfe-commits
@@ -415,3 +456,38 @@ void CIRRecordLowering::lowerUnion() { if (layoutSize % getAlignment(storageType)) packed = true; } + +void CIRRecordLowering::accumulateBases(const CXXRecordDecl *cxxRecordDecl) { + // If we've got a primary virtual base, we need to add it with the

[clang] [CIR] Add support for derived class declarations (PR #142823)

2025-06-04 Thread Erich Keane via cfe-commits
@@ -96,6 +96,28 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { llvm_unreachable("Unsupported record kind"); } + /// Get a CIR named record type. + /// + /// If a record already exists and is complete, but the client tries to fetch erichkean

[clang] [CIR] Upstream global initialization for ComplexType (PR #141369)

2025-06-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/141369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Use move in std::vector local in HandleTranslationUnit (PR #142851)

2025-06-04 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/142851 Static analysis flagged this since we could move MergedRanges since it is a std::vector, a local and unused after that line. So there is a potential saving. >From b427ae1ef18c48126a0faf5f40678cc6e4e30634 Mon Sep

[clang] [Clang][NFC] Use move in std::vector local in HandleTranslationUnit (PR #142851)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Static analysis flagged this since we could move MergedRanges since it is a std::vector, a local and unused after that line. So there is a potential saving. --- Full diff: https://github.com/llvm/llvm-proj

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2025-06-04 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Sorry, I missed this Now that the ptrauth qualifier is available I'm going to be preparing and pushing the darwin libunwind+personality function changes, which are very aggressive in there protection of data and pointers https://github.com/llvm/llvm-project/pull/113368 _

[clang] [clang] Remove separate evaluation step for static class member init. (PR #142713)

2025-06-04 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: https://llvm-compile-time-tracker.com/compare.php?from=d204aa9deb72b8dcaf5e5b5550871d0ebe982825&to=9bc16d5c3b3c540ca3058e181b509f4122a2073b&stat=instructions:u . Basically no change... which is what I was expecting. There's maybe some slight savings from skipping the call

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

2025-06-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][AArch64] Protect PC within libunwind's context. (PR #113368)

2025-06-04 Thread Anton Korobeynikov via cfe-commits
@@ -1823,9 +1826,127 @@ extern "C" void *__libunwind_shstk_get_jump_target() { #endif class _LIBUNWIND_HIDDEN Registers_arm64 { + struct GPRs; + +private: + /// The program counter is used effectively as a return address + /// when the context is restored therefore protect

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

2025-06-04 Thread Dan Liew via cfe-commits
delcypher wrote: @vitalybuka > > Should we just rename stuff of this patch into __clang_trap_msg ? > > Actually no. > > __clang_trap_msg_* is only for trap. __ubsan_check_* is for instructions > evaluating check (as now there is a bonus: that __ubsan_check_* works as > __clang_trap_msg_* on

[clang] [clang] Remove separate evaluation step for static class member init. (PR #142713)

2025-06-04 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/142713 >From 9bc16d5c3b3c540ca3058e181b509f4122a2073b Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 3 Jun 2025 18:53:14 -0700 Subject: [PATCH 1/2] [clang] Remove separate evaluation step for static class

[clang] [CIR] Add support for derived class declarations (PR #142823)

2025-06-04 Thread Erich Keane via cfe-commits
@@ -32,3 +38,16 @@ CompleteC cc; // CIR: cir.global external @cc = #cir.zero : !rec_CompleteC // LLVM: @cc = global %class.CompleteC zeroinitializer // OGCG: @cc = global %class.CompleteC zeroinitializer + +class Base { +public: + int a; +}; + +class Derived : public B

[clang] [AArch64][FMV] Enable PAuth and BTI hardening of resolver functions (PR #141573)

2025-06-04 Thread Eli Friedman via cfe-commits
@@ -4652,6 +4659,7 @@ llvm::Constant *CodeGenModule::GetOrCreateMultiVersionResolver(GlobalDecl GD) { "", Resolver, &getModule()); GIF->setName(ResolverName); SetCommonAttributes(FD, GIF); +SetResolverAttrs(cast(*Resolver)); --

[clang] [AArch64][FMV] Enable PAuth and BTI hardening of resolver functions (PR #141573)

2025-06-04 Thread Eli Friedman via cfe-commits
@@ -4652,6 +4659,7 @@ llvm::Constant *CodeGenModule::GetOrCreateMultiVersionResolver(GlobalDecl GD) { "", Resolver, &getModule()); GIF->setName(ResolverName); SetCommonAttributes(FD, GIF); +SetResolverAttrs(cast(Resolver)); ---

[clang] [CUDA] Disallow use of address_space(N) on CUDA device variables. (PR #142857)

2025-06-04 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B created https://github.com/llvm/llvm-project/pull/142857 The variables have implicit host-side shadow instances and explicit address space attribute breaks them on the host. >From e2e8da0271ae11711dbd54f6e8d9ff498f3226d4 Mon Sep 17 00:00:00 2001 From: Artem Belevich

[clang] [CUDA] Disallow use of address_space(N) on CUDA device variables. (PR #142857)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Artem Belevich (Artem-B) Changes The variables have implicit host-side shadow instances and explicit address space attribute breaks them on the host. --- Full diff: https://github.com/llvm/llvm-project/pull/142857.diff 3 Files Affected:

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

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM (it will be nice to have a folder too in some follow up PR) https://github.com/llvm/llvm-project/pull/142393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

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

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM 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][NFCI] Update RValue class to reflect changes in classic CodeGen (PR #142779)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/142779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Update RValue class to reflect changes in classic CodeGen (PR #142779)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/142779 ___ 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-04 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > LGTM (it will be nice to have a folder too in some follow up PR) Sure, I will submit PR for the folder as a follow-up (https://github.com/llvm/llvm-project/pull/142393#issuecomment-2930835696) 😉 https://github.com/llvm/llvm-project/pull/142393

[clang] [CIR] Add support for derived class declarations (PR #142823)

2025-06-04 Thread Andy Kaylor via cfe-commits
@@ -415,3 +456,38 @@ void CIRRecordLowering::lowerUnion() { if (layoutSize % getAlignment(storageType)) packed = true; } + +void CIRRecordLowering::accumulateBases(const CXXRecordDecl *cxxRecordDecl) { + // If we've got a primary virtual base, we need to add it with the

[clang] [CIR] Add support for derived class declarations (PR #142823)

2025-06-04 Thread Andy Kaylor via cfe-commits
@@ -32,3 +38,16 @@ CompleteC cc; // CIR: cir.global external @cc = #cir.zero : !rec_CompleteC // LLVM: @cc = global %class.CompleteC zeroinitializer // OGCG: @cc = global %class.CompleteC zeroinitializer + +class Base { +public: + int a; +}; + +class Derived : public B

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

2025-06-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed 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] f327d6d - [CIR] Defer definitions of global variables until they are used. (#142496)

2025-06-04 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-06-04T14:34:54-07:00 New Revision: f327d6d4c344956a66002f9364fce9439a8127b3 URL: https://github.com/llvm/llvm-project/commit/f327d6d4c344956a66002f9364fce9439a8127b3 DIFF: https://github.com/llvm/llvm-project/commit/f327d6d4c344956a66002f9364fce9439a8127b3.diff L

[clang] [CIR] Add support for derived class declarations (PR #142823)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/142823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-04 Thread Slava Zakharin via cfe-commits
https://github.com/vzakhari edited https://github.com/llvm/llvm-project/pull/142800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix bad error recovery when classes are defined inside template (PR #142278)

2025-06-04 Thread Artyom Zabroda via cfe-commits
https://github.com/ArtyomZabroda edited https://github.com/llvm/llvm-project/pull/142278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Defer emitting function definitions (PR #142862)

2025-06-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/142862 This change implements deferring function definition emission until first use. >From 217f3a01f9ed161eb3afa3f7e6a594720e8a2840 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Mon, 2 Jun 2025 17:11:55 -0700 S

[clang] [CIR] Defer emitting function definitions (PR #142862)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This change implements deferring function definition emission until first use. --- Full diff: https://github.com/llvm/llvm-project/pull/142862.diff 2 Files Affected: - (modified) clang/lib/CIR/CodeGen/

[clang] [clang-tools-extra] [llvm] [clang] Simplify device kernel attributes (PR #137882)

2025-06-04 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/137882 >From 080a9d43ba6544d46c2b36c5dc6a5af421264580 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 7 May 2025 12:17:30 -0700 Subject: [PATCH 1/8] [clang] Simplify device kernel attributes Signed-off-by: Sar

[clang] [AArch64][FMV] Enable PAuth and BTI hardening of resolver functions (PR #141573)

2025-06-04 Thread Jon Roelofs via cfe-commits
@@ -4652,6 +4659,7 @@ llvm::Constant *CodeGenModule::GetOrCreateMultiVersionResolver(GlobalDecl GD) { "", Resolver, &getModule()); GIF->setName(ResolverName); SetCommonAttributes(FD, GIF); +SetResolverAttrs(cast(Resolver)); ---

[clang] [clang][Darwin] Simplify deployment version assignment in the Driver (PR #142013)

2025-06-04 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/142013 >From a12e45e0b3025126dc112c6f8dd552b2670e88f9 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 29 May 2025 12:19:09 -0700 Subject: [PATCH 1/3] [clang][Darwin] Simply deployment version assignment in

[clang] [clang][Darwin] Simplify deployment version assignment in the Driver (PR #142013)

2025-06-04 Thread Cyndy Ishida via cfe-commits
@@ -1938,11 +1942,22 @@ struct DarwinPlatform { SourceKind Kind; DarwinPlatformKind Platform; DarwinEnvironmentKind Environment = DarwinEnvironmentKind::NativeEnvironment; - VersionTuple NativeTargetVersion; - std::string OSVersion; - bool HasOSVersion = true, InferSim

[clang] Thread Safety Analysis: Warn when using negative reentrant capability (PR #141599)

2025-06-04 Thread Marco Elver via cfe-commits
https://github.com/melver edited 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

[clang] Add sycl_external attribute (PR #140282)

2025-06-04 Thread via cfe-commits
https://github.com/schittir updated https://github.com/llvm/llvm-project/pull/140282 >From abdbf8905d324f9b935b34bbc97c508ede5ac028 Mon Sep 17 00:00:00 2001 From: "Chittireddy, Sindhu" Date: Fri, 16 May 2025 08:51:06 -0700 Subject: [PATCH 1/6] Add sycl_external attribute --- clang/include/cla

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-04 Thread Tarun Prabhu via cfe-commits
@@ -3167,3 +3167,30 @@ void tools::handleInterchangeLoopsArgs(const ArgList &Args, options::OPT_fno_loop_interchange, EnableInterchange)) CmdArgs.push_back("-floop-interchange"); } + +void tools::ParseMPreferVectorWidthOption(clang::DiagnosticsEngine &Di

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-04 Thread Tarun Prabhu via cfe-commits
@@ -270,6 +270,12 @@ void handleVectorizeLoopsArgs(const llvm::opt::ArgList &Args, /// Enable -fslp-vectorize based on the optimization level selected. void handleVectorizeSLPArgs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs); +

[clang] [CIR ] Add DLTI dialect support to module attributes (PR #142241)

2025-06-04 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/142241 >From aad6aa4bb69ea96eceb7dc7911eb846047ac14cb Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Fri, 30 May 2025 18:13:31 -0500 Subject: [PATCH 1/2] Add DLTI dialect support to module attributes an

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-04 Thread Slava Zakharin via cfe-commits
@@ -3167,3 +3167,30 @@ void tools::handleInterchangeLoopsArgs(const ArgList &Args, options::OPT_fno_loop_interchange, EnableInterchange)) CmdArgs.push_back("-floop-interchange"); } + +void tools::ParseMPreferVectorWidthOption(clang::DiagnosticsEngine &Di

[clang] [CUDA] Disallow use of address_space(N) on CUDA device variables. (PR #142857)

2025-06-04 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh approved this pull request. Looks good. Thanks for adding this early detection of the incorrect CUDA code that would otherwise lead to violated invariants further down the road. https://github.com/llvm/llvm-project/pull/142857 __

[clang] [clang][Darwin] Simplify deployment version assignment in the Driver (PR #142013)

2025-06-04 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/142013 >From a12e45e0b3025126dc112c6f8dd552b2670e88f9 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 29 May 2025 12:19:09 -0700 Subject: [PATCH 1/3] [clang][Darwin] Simply deployment version assignment in

[clang] [clang-tools-extra] [llvm] [clang] Simplify device kernel attributes (PR #137882)

2025-06-04 Thread Nick Sarnie via cfe-commits
sarnex wrote: Thanks Erich! @AaronBallman Do you mind giving the final version another quick pass to make sure all concerns are addressed? Thanks! https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [CIR] Defer emitting function definitions (PR #142862)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Looks good, minor nit https://github.com/llvm/llvm-project/pull/142862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Defer emitting function definitions (PR #142862)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1523,6 +1523,50 @@ cir::FuncOp CIRGenModule::getOrCreateCIRFunction( cir::FuncOp funcOp = createCIRFunction( invalidLoc ? theModule->getLoc() : getLoc(funcDecl->getSourceRange()), mangledName, mlir::cast(funcType), funcDecl); + + if (!dontDefer) { ---

[clang] [CIR] Defer emitting function definitions (PR #142862)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/142862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Defer emitting function definitions (PR #142862)

2025-06-04 Thread Andy Kaylor via cfe-commits
@@ -1523,6 +1523,50 @@ cir::FuncOp CIRGenModule::getOrCreateCIRFunction( cir::FuncOp funcOp = createCIRFunction( invalidLoc ? theModule->getLoc() : getLoc(funcDecl->getSourceRange()), mangledName, mlir::cast(funcType), funcDecl); + + if (!dontDefer) { ---

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

2025-06-04 Thread via cfe-commits
https://github.com/MaggieYingYi updated https://github.com/llvm/llvm-project/pull/142409 >From c0cc666ab8864b665539a857dbdae6c592266227 Mon Sep 17 00:00:00 2001 From: Ying Yi Date: Mon, 2 Jun 2025 10:21:22 +0100 Subject: [PATCH 1/4] [Frontend][PCH]-Add support for ignoring PCH options (-ignore

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

2025-06-04 Thread 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`: MaggieYingYi wrote: > I will update -ignore-pch as a driver option which is similar as the > -inclu

[clang] [llvm] [MemProf] Split MemProfiler into Instrumentation and Use. (PR #142811)

2025-06-04 Thread Snehasish Kumar via cfe-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/142811 >From 0ba44d66dce0260055d7dd576141e098f7e1c1d5 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Tue, 3 Jun 2025 21:49:58 -0700 Subject: [PATCH] [MemProf] Split MemProfiler into Instrumentation and Use. --

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

2025-06-04 Thread Paul Kirth via cfe-commits
ilovepi wrote: > If we're open to adding a flag in the base `Info` like > `IsClassSpecialization`, then we can probably easily deal with these by > trying to reconstruct the specialization's arguments (will be something like > "Foo.json"). Functions don't produce their own files so function >

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-04 Thread Cameron McInally via cfe-commits
@@ -3167,3 +3167,30 @@ void tools::handleInterchangeLoopsArgs(const ArgList &Args, options::OPT_fno_loop_interchange, EnableInterchange)) CmdArgs.push_back("-floop-interchange"); } + +void tools::ParseMPreferVectorWidthOption(clang::DiagnosticsEngine &Di

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-04 Thread Cameron McInally via cfe-commits
https://github.com/mcinally edited https://github.com/llvm/llvm-project/pull/142800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Driver] Move CommonArgs to a location visible by the Frontend Drivers (PR #142800)

2025-06-04 Thread Cameron McInally via cfe-commits
https://github.com/mcinally updated https://github.com/llvm/llvm-project/pull/142800 >From 918b853de8c43dacebecb42cafa6d3b8fec15b47 Mon Sep 17 00:00:00 2001 From: Cameron McInally Date: Tue, 3 Jun 2025 11:12:42 -0700 Subject: [PATCH] [Driver] Move CommonArgs to a location visible by the Fronte

[clang] [CIR] Defer emitting function definitions (PR #142862)

2025-06-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/142862 >From 217f3a01f9ed161eb3afa3f7e6a594720e8a2840 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Mon, 2 Jun 2025 17:11:55 -0700 Subject: [PATCH 1/2] [CIR] Defer emitting function definitions This change imple

[clang] [CIR] Defer emitting function definitions (PR #142862)

2025-06-04 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 -- clang/test/CIR/CodeGen/deferred-fn-defs.cpp clang/li

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-06-04 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/141846 >From bfdf16cee252dc6491f15c0715c7a39538fbf120 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 23 Apr 2025 13:14:24 -0700 Subject: [PATCH 1/2] [Clang][attr] Add cfi_salt attribute The new 'cfi_salt' a

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-06-04 Thread Bill Wendling via cfe-commits
bwendling wrote: I moved the `cfi_salt` into the `FunctionProtoType` fields. I left it open for further additions. One bit of optimization I could do is merge the Arm stuff into this new struct, but wanted to do something a bit less cluttered first. https://github.com/llvm/llvm-project/pull/14

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-06-04 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/141846 >From bfdf16cee252dc6491f15c0715c7a39538fbf120 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 23 Apr 2025 13:14:24 -0700 Subject: [PATCH 1/2] [Clang][attr] Add cfi_salt attribute The new 'cfi_salt' a

[clang] [Clang][Driver][AArch64] Add support for aarch64-amazon-linux triple (PR #109263)

2025-06-04 Thread Benjamin Herrenschmidt via cfe-commits
ozbenh wrote: @MaskRay Fedora and RHEL also don't use -gnu ... we had no idea this mattered when we did this and we can't really change it at this point without breaking customers. I would understand applying the rule for new use cases, but this is an established one that cannot be fixed, and

[clang] [llvm] [MemProf] Split MemProfiler into Instrumentation and Use. (PR #142811)

2025-06-04 Thread Snehasish Kumar via cfe-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/142811 >From 912e0f8261137d98e7b8b62435e92f641c65a663 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Tue, 3 Jun 2025 21:49:58 -0700 Subject: [PATCH 1/2] [MemProf] Split MemProfiler into Instrumentation and Use.

[clang] [llvm] [MemProf] Split MemProfiler into Instrumentation and Use. (PR #142811)

2025-06-04 Thread Snehasish Kumar via cfe-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/142811 >From 912e0f8261137d98e7b8b62435e92f641c65a663 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Tue, 3 Jun 2025 21:49:58 -0700 Subject: [PATCH 1/2] [MemProf] Split MemProfiler into Instrumentation and Use.

[clang-tools-extra] [clang-tidy] Add check for assignment or comparision operators' operand in `readability-math-missing-parentheses` (PR #141345)

2025-06-04 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/141345 >From e020a00fcaa8283edf5fb1850653d0156918ca85 Mon Sep 17 00:00:00 2001 From: flovent Date: Sat, 24 May 2025 21:29:53 +0800 Subject: [PATCH 1/3] [clang-tidy] Add check for assignment or comparision operators' o

[clang] [llvm] [MemProf] Split MemProfiler into Instrumentation and Use. (PR #142811)

2025-06-04 Thread Snehasish Kumar via cfe-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/142811 >From 912e0f8261137d98e7b8b62435e92f641c65a663 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Tue, 3 Jun 2025 21:49:58 -0700 Subject: [PATCH 1/2] [MemProf] Split MemProfiler into Instrumentation and Use.

[clang-tools-extra] [clang-tidy] Add check for assignment or comparision operators' operand in `readability-math-missing-parentheses` (PR #141345)

2025-06-04 Thread via cfe-commits
flovent wrote: Thanks for catching, CHECK-FIXES added. > I don't know why tests didn't fail because of it, needs some investigation. I don't know either, but the check does produce `FixIt`, and it seems `CHECK-FIXES` is optional in this test file, doesn't affect whether the test pass. https:

[clang] [tools] Remove unused local variables (NFC) (PR #142880)

2025-06-04 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/142880 None >From 253456a94190d894a8d6241e8cc23b094c646702 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 4 Jun 2025 12:36:20 -0700 Subject: [PATCH] [tools] Remove unused local variables (NFC) --- clan

<    1   2   3   4   >