[clang] [clang-format] Correctly identify include guards (PR #137112)

2025-04-23 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/137112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ARM][AArch64] Don't require arm_acle header for universally defined intrinsics (PR #136742)

2025-04-23 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: I think we should revert https://github.com/llvm/llvm-project/pull/128222 if we can't move forward with this one soon. Unfortunately I'm not sure if I'm qualified to review it. https://github.com/llvm/llvm-project/pull/136742 ___ cfe-

[clang] [cfi] Fix one -fno-sanitize-merge case, and add two TODOs (PR #135438)

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

[clang] Upstream enum support (PR #136807)

2025-04-23 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/136807 >From 44a384b8ad774939c7664c8a476e852f1d4a7341 Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Tue, 22 Apr 2025 20:04:34 -0700 Subject: [PATCH 1/6] Upstream enum support --- clang/lib/CIR/CodeGen/CIRGenModu

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-23 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll having merged #135773 and rebased, the issues with file equality for in-memory files are resolved. I've reduced this to two tests now, that run on the except same C code except one of them uses on-disk files and the other one uses in-memory files. This replicates

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-23 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From 1e6ed0266fb849f14d6b952dcd84e277ed70aa58 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 01/11] [libclang/python] Add equality comparison operators

[clang] [cfi] Fix one -fno-sanitize-merge case, and add two TODOs (PR #135438)

2025-04-23 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/135438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 31c7997 - [cfi] Fix one -fno-sanitize-merge case, and add two TODOs (#135438)

2025-04-23 Thread via cfe-commits
Author: Thurston Dang Date: 2025-04-23T22:00:11-07:00 New Revision: 31c7997a4acb838c94d5ab40baaf154556532ad9 URL: https://github.com/llvm/llvm-project/commit/31c7997a4acb838c94d5ab40baaf154556532ad9 DIFF: https://github.com/llvm/llvm-project/commit/31c7997a4acb838c94d5ab40baaf154556532ad9.diff

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-23 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/136386 >From c1a89d6896edd29ff345dd8fdc30cd040f3760f3 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 18 Apr 2025 16:06:18 -0700 Subject: [PATCH 1/3] add md node type filter, and test --- .../test/CodeGenHL

[clang] cb8495c - [Driver][CFI] Add missing '-' into error message (#137097)

2025-04-23 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-04-23T21:13:18-07:00 New Revision: cb8495c0fcf32592c6fcd23429b702dccb57d2eb URL: https://github.com/llvm/llvm-project/commit/cb8495c0fcf32592c6fcd23429b702dccb57d2eb DIFF: https://github.com/llvm/llvm-project/commit/cb8495c0fcf32592c6fcd23429b702dccb57d2eb.diff L

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-23 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/136386 >From c1a89d6896edd29ff345dd8fdc30cd040f3760f3 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 18 Apr 2025 16:06:18 -0700 Subject: [PATCH 1/2] add md node type filter, and test --- .../test/CodeGenHL

[clang] [llvm] [clang][OpenMP] New OpenMP 6.0 threadset clause (PR #135807)

2025-04-23 Thread via cfe-commits
@@ -101,9 +103,11 @@ T tmain(T argc, T *argv) { a = 2; #pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d) if (argc > 0) final(S::TS > 0) priority(argc) affinity(argc, argv[b:argc], arr[:], ([argc][sizeof(T)])argv) foo(); +#ifndef OMP60 -

[libclc] 77fe6aa - [libclc] only check filename part of the source for avoiding duplication (#135710)

2025-04-23 Thread via cfe-commits
Author: Wenju He Date: 2025-04-24T05:35:16+01:00 New Revision: 77fe6aaeaaf2b16e021675e92e543dafd18bbc0b URL: https://github.com/llvm/llvm-project/commit/77fe6aaeaaf2b16e021675e92e543dafd18bbc0b DIFF: https://github.com/llvm/llvm-project/commit/77fe6aaeaaf2b16e021675e92e543dafd18bbc0b.diff LOG:

[libclc] [libclc] only check filename part of the source for avoiding duplication (PR #135710)

2025-04-23 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/135710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] only check filename part of the source for avoiding duplication (PR #135710)

2025-04-23 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > > I would like to further investigate weak linkage as another means of > > overriding specific builtins down to a finer granularity. That approach > > might warrant another method of file discovery. > > It would bring unnecessary builds and may increase build time. Filenam

[clang] [sanitizer] Allow use-after-scope front-end argument to take effect with -fsanitize=kernel-address (PR #137015)

2025-04-23 Thread Vitaly Buka via cfe-commits
@@ -1099,7 +1099,13 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, } } else { -AsanUseAfterScope = false; +if (AllAddedKinds & SanitizerKind::KernelAddress) { vitalybuka wrote: I see, there is Asan case already and we need kernel one ther

[clang] cd92d8d - [clang-format][NFC] Reformat clang/test/Format/lit.local.cfg with black

2025-04-23 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-04-23T21:28:58-07:00 New Revision: cd92d8db34afd95335697f85a527028fa8309d18 URL: https://github.com/llvm/llvm-project/commit/cd92d8db34afd95335697f85a527028fa8309d18 DIFF: https://github.com/llvm/llvm-project/commit/cd92d8db34afd95335697f85a527028fa8309d18.diff LOG:

[clang] [sanitizer] Allow use-after-scope front-end argument to take effect with -fsanitize=kernel-address (PR #137015)

2025-04-23 Thread Vitaly Buka via cfe-commits
@@ -1099,7 +1099,13 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC, } } else { -AsanUseAfterScope = false; +if (AllAddedKinds & SanitizerKind::KernelAddress) { vitalybuka wrote: why just kernel? https://github.com/llvm/llvm-project/pull/13

[clang] [Driver][CFI] Allow CFI with minimal runtime (PR #137103)

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

[clang] [Driver][CFI] Add missing '-' into error message (PR #137097)

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

[clang] Upstream enum support (PR #136807)

2025-04-23 Thread Ankur Ahir via cfe-commits
Ankur-0429 wrote: > I would also want to see tests that show uses of an enum, as well as fixed > underlying type, scoped enums/etc. Going to wait to confirm I did the "fixed underlying type" part first. If you have more specific enum use cases that we should test for, please let me know. ht

[clang] [clang-format] Correctly identify include guards (PR #137112)

2025-04-23 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/137112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly identify include guards (PR #137112)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix 136814 --- Full diff: https://github.com/llvm/llvm-project/pull/137112.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+7) - (modified) clang/unittests/Format/FormatTes

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-04-23 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From 1e6ed0266fb849f14d6b952dcd84e277ed70aa58 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 01/10] [libclang/python] Add equality comparison operators

[clang] [clang-format] Correctly identify include guards (PR #137112)

2025-04-23 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/137112 Fix 136814 >From bc60c11dd71696cfd798978ec238f166240263a4 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 23 Apr 2025 19:48:39 -0700 Subject: [PATCH] [clang-format] Correctly identify include guards Fix 1368

[clang] [Clang] diagnose deleted/default redeclaration of defined friend functions (PR #136717)

2025-04-23 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/136717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] diagnose deleted/default redeclaration of defined friend functions (PR #136717)

2025-04-23 Thread Younan Zhang via cfe-commits
@@ -142,6 +142,14 @@ NamedDecl *Parser::ParseCXXInlineMethodDef( SkipUntil(tok::semi); } +if (FunctionDecl *FD = +dyn_cast_if_present(FnD->getPreviousDecl())) { + if (isa(FD->getLexicalDeclContext()) || + Actions.getDefaultedFunctionKind

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/25516 Here is the r

[clang] [flang] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-23 Thread via cfe-commits
@@ -892,6 +909,20 @@ static void generateMachineCodeOrAssemblyImpl(clang::DiagnosticsEngine &diags, delete tlii; } + +// Default filename used for profile generation. +namespace llvm { + extern llvm::cl::opt DebugInfoCorrelate; + extern llvm::cl::opt ProfileCorrelate; +

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/24173 Here is the rel

[clang] Upstream enum support (PR #136807)

2025-04-23 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/136807 >From 44a384b8ad774939c7664c8a476e852f1d4a7341 Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Tue, 22 Apr 2025 20:04:34 -0700 Subject: [PATCH 1/3] Upstream enum support --- clang/lib/CIR/CodeGen/CIRGenModu

[clang] Upstream enum support (PR #136807)

2025-04-23 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/136807 >From 44a384b8ad774939c7664c8a476e852f1d4a7341 Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Tue, 22 Apr 2025 20:04:34 -0700 Subject: [PATCH 1/2] Upstream enum support --- clang/lib/CIR/CodeGen/CIRGenModu

[clang] [clang][p2719] Module deserialization does not restore allocator flags (PR #137102)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Oliver Hunt (ojhunt) Changes When serializing and deserializing a FunctionDecl we don't recover whether or not the decl was a type aware allocator or destroying delete, because in the final PR that information was placed in a side

[clang] [flang] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-23 Thread via cfe-commits
@@ -148,6 +148,55 @@ class CodeGenOptions : public CodeGenOptionsBase { /// OpenMP is enabled. using DoConcurrentMappingKind = flangomp::DoConcurrentMappingKind; + enum ProfileInstrKind { +ProfileNone, // Profile instrumentation is turned off. +ProfileClangI

[clang] [flang] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-23 Thread via cfe-commits
@@ -148,6 +148,55 @@ class CodeGenOptions : public CodeGenOptionsBase { /// OpenMP is enabled. using DoConcurrentMappingKind = flangomp::DoConcurrentMappingKind; + enum ProfileInstrKind { +ProfileNone, // Profile instrumentation is turned off. +ProfileClangI

[clang] [clang][p2719] Module deserialization does not restore allocator flags (PR #137102)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes When serializing and deserializing a FunctionDecl we don't recover whether or not the decl was a type aware allocator or destroying delete, because in the final PR that information was placed in a side table i

[clang] [clang][p2719] Module deserialization does not restore allocator flags (PR #137102)

2025-04-23 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Ok, added PCH and module tests - verified both tests fail without this fix to the serialization, and they pass now. https://github.com/llvm/llvm-project/pull/137102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [clang][p2719] Module deserialization does not restore allocator flags (PR #137102)

2025-04-23 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt ready_for_review https://github.com/llvm/llvm-project/pull/137102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][p2719] Module deserialization does not restore allocator flags (PR #137102)

2025-04-23 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/137102 >From dec6509a54940fdda77577c9d07e1c061701ab75 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Wed, 23 Apr 2025 18:09:22 -0700 Subject: [PATCH] [clang][p2719] Module deserialization does not restore allocator f

[clang] [llvm] [RISCV] Add Andes A45/AX45 processor definition (PR #136832)

2025-04-23 Thread Jim Lin via cfe-commits
https://github.com/tclin914 closed https://github.com/llvm/llvm-project/pull/136832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][CFI] Add missing '-' into error message (PR #137097)

2025-04-23 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/137097 >From 6cc2abc81fdb997e2096db44b56a41cd01bba611 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 23 Apr 2025 17:22:03 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?

[clang] [clang][p2719] Module deserialization does not restore allocator flags (PR #137102)

2025-04-23 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/lib/Serialization/ASTReaderDecl.cpp clang/lib/

[clang] [Driver][CFI] Add missing '-' into error message (PR #137097)

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

[clang] 5981be7 - [RISCV] Add Andes A45/AX45 processor definition (#136832)

2025-04-23 Thread via cfe-commits
Author: Jim Lin Date: 2025-04-24T09:16:12+08:00 New Revision: 5981be76925c2d6ee5b33029332beae254addb46 URL: https://github.com/llvm/llvm-project/commit/5981be76925c2d6ee5b33029332beae254addb46 DIFF: https://github.com/llvm/llvm-project/commit/5981be76925c2d6ee5b33029332beae254addb46.diff LOG:

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-23 Thread Oliver Hunt via cfe-commits
ojhunt wrote: @alexfh yeah I think I found the issue, would you mind trying https://github.com/llvm/llvm-project/pull/137102 ? (need to work on tests but wanted you to be able to test quickly - I'm currently waiting on a fresh build alas so the PR is currently done blind) https://github.com/l

[clang] [llvm] [LLVM][Clang][Cygwin] Fix building Clang for Cygwin (PR #134494)

2025-04-23 Thread via cfe-commits
Mateusz =?utf-8?q?Miku=C5=82a?= , Mateusz =?utf-8?q?Miku=C5=82a?= , Mateusz =?utf-8?q?Miku=C5=82a?= , Mateusz =?utf-8?q?Miku=C5=82a?= Message-ID: In-Reply-To: https://github.com/jeremyd2019 approved this pull request. https://github.com/llvm/llvm-project/pull/134494 __

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-23 Thread Alexander Kornienko via cfe-commits
alexfh wrote: There are two issues: 1. an assertion failure in Clang: `assertion failed at clang/lib/CodeGen/CGExprCXX.cpp:1428 in UsualDeleteParams getUsualDeleteParams(const FunctionDecl *): AI == AE && "unexpected usual deallocation function parameter"` 2. `no suitable member 'operator dele

[clang] [clang][p2719] Module deserialization does not restore allocator flags (PR #137102)

2025-04-23 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/137102 When serializing and deserializing a FunctionDecl we don't recover whether or not the decl was a type aware allocator or destroying delete, because in the final PR that information was placed in a side table in

[clang] [CIR] Upstream support for name mangling (PR #137094)

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

[clang] [CIR] Upstream support for name mangling (PR #137094)

2025-04-23 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Seems alright so far.Though if we're going to add the CUDA global, we should have a test for it. https://github.com/llvm/llvm-project/pull/137094 ___ cfe-commits mailing list cfe-commits@li

[clang] [CIR] Upstream support for name mangling (PR #137094)

2025-04-23 Thread Erich Keane via cfe-commits
@@ -639,13 +674,82 @@ cir::FuncOp CIRGenModule::getAddrOfFunction(clang::GlobalDecl gd, funcType = convertType(fd->getType()); } - assert(!cir::MissingFeatures::mangledNames()); - cir::FuncOp func = getOrCreateCIRFunction( - cast(gd.getDecl())->getIdentifier()->g

[clang] [ARM] enable FENV_ACCESS pragma support for hard-float targets (PR #137101)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erik Enikeev (Varnike) Changes Added support for FENV_ACCESS pragma on hard-float ARM platforms. Also changes were made to clang/test/Parser/pragma-fp-warn.c so that for thumbv7a only the soft-float-abi target case is checked. --- Full d

[clang] [ARM] enable FENV_ACCESS pragma support for hard-float targets (PR #137101)

2025-04-23 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [ARM] enable FENV_ACCESS pragma support for hard-float targets (PR #137101)

2025-04-23 Thread Erik Enikeev via cfe-commits
https://github.com/Varnike created https://github.com/llvm/llvm-project/pull/137101 Added support for FENV_ACCESS pragma on hard-float ARM platforms. Also changes were made to clang/test/Parser/pragma-fp-warn.c so that for thumbv7a only the soft-float-abi target case is checked. >From c15b9e7

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-23 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > We have tracked two more issues to this commit. Both only manifest when using > Clang header modules, which likely means that AST serialization is somehow > incorrect after this patch. I'm reducing one of the test cases now, but it's > taking a lot of time. In the meantime, ple

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-04-23 Thread Richard Smith via cfe-commits
zygoloid wrote: > * I'm not sure this matches the requirements for C++ semantics; noalias is > very aggressive, so we might end up with undefined behavior in unintended > cases. I'd like someone familiar with the relevant standard bits to comment > on the requirements here. CC @zygoloid The

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-04-23 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > We have tracked two more issues to this commit. Both only manifest when using > Clang header modules, which likely means that AST serialization is somehow > incorrect after this patch. I'm reducing one of the test cases now, but it's > taking a lot of time. In the meantime, ple

[libclc] [libclc] Fix unguarded use of image types (PR #136871)

2025-04-23 Thread Wenju He via cfe-commits
wenju-he wrote: thanks @frasercrmck https://github.com/llvm/llvm-project/pull/136871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Eval string one past end reland (PR #137091)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn created https://github.com/llvm/llvm-project/pull/137091 Relands #137078 after updating clang/test/AST/ByteCode/cxx20.cpp to account for diagnostic outputs that differ between Linux and macOS. >From 92e524de8e568b47d8506f8d9156dc3f3d064aaa Mon Sep 17 00:00:00 2001 F

[clang] [clang][Modules] Diagnose mismatching pcm dependencies in explicit buiilds (PR #137068)

2025-04-23 Thread Cyndy Ishida via cfe-commits
@@ -3311,11 +3312,22 @@ ASTReader::ReadControlBlock(ModuleFile &F, SignatureBytes.end()); Blob = Blob.substr(ASTFileSignature::size); +// Use BaseDirectoryAsWritten to ensure we use the same path in the +

[clang] Eval string one past end reland (PR #137091)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrik G. Olsson (hnrklssn) Changes Relands #137078 after updating clang/test/AST/ByteCode/cxx20.cpp to account for diagnostic outputs that differ between Linux and macOS. --- Full diff: https://github.com/llvm/llvm-project/pull/137091.di

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-23 Thread Bob Wilson via cfe-commits
https://github.com/bob-wilson updated https://github.com/llvm/llvm-project/pull/137087 >From a7195bdc6d98f672344c25ea8794c434cc58e0ef Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Tue, 22 Apr 2025 09:24:49 -0700 Subject: [PATCH 1/2] [Clang] Add new -header-include-filtering=direct-per-file o

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/14998 Here is the relevant pi

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-b-1` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/13648 Here is the relevant

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/18865 Here is th

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn edited https://github.com/llvm/llvm-project/pull/137078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 55160e6 - [ConstEval] Fix crash when comparing strings past the end (#137078)

2025-04-23 Thread via cfe-commits
Author: Henrik G. Olsson Date: 2025-04-23T16:41:21-07:00 New Revision: 55160e6a89820f219eaa218fa02da2006213ed2c URL: https://github.com/llvm/llvm-project/commit/55160e6a89820f219eaa218fa02da2006213ed2c DIFF: https://github.com/llvm/llvm-project/commit/55160e6a89820f219eaa218fa02da2006213ed2c.di

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` running on `sie-win-worker` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/15667 Here is th

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang` at step 7 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/4024 Here is the re

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/15716 Here is the relevant pie

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/16533 Here is the relevant piece of the

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang` at step 6 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/21837 Here is

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
@@ -119,6 +119,15 @@ constexpr auto b3 = name1() == name1(); // ref-error {{must be initialized by a constexpr auto b4 = name1() == name2(); static_assert(!b4); +constexpr auto bar(const char *p) { return p + __builtin_strlen(p); } +constexpr auto b5 = bar(p1) == p1; +static_

[clang] Revert "[ConstEval] Fix crash when comparing strings past the end" (PR #137088)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrik G. Olsson (hnrklssn) Changes Reverts llvm/llvm-project#137078 --- Full diff: https://github.com/llvm/llvm-project/pull/137088.diff 3 Files Affected: - (modified) clang/lib/AST/ExprConstant.cpp (+2-7) - (modified) clang/test/AST/

[clang] Revert "[ConstEval] Fix crash when comparing strings past the end" (PR #137088)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn closed https://github.com/llvm/llvm-project/pull/137088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[ConstEval] Fix crash when comparing strings past the end" (PR #137088)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn created https://github.com/llvm/llvm-project/pull/137088 Reverts llvm/llvm-project#137078 >From 30f38f86a765a24e368083ffbcac9f036e6fc221 Mon Sep 17 00:00:00 2001 From: "Henrik G. Olsson" Date: Wed, 23 Apr 2025 16:48:29 -0700 Subject: [PATCH] Revert "[ConstEval] Fix

[clang] 93705c3 - Revert "[ConstEval] Fix crash when comparing strings past the end" (#137088)

2025-04-23 Thread via cfe-commits
Author: Henrik G. Olsson Date: 2025-04-23T16:48:46-07:00 New Revision: 93705c3a76e9b00137be84fbc6ef3b4af5fcc031 URL: https://github.com/llvm/llvm-project/commit/93705c3a76e9b00137be84fbc6ef3b4af5fcc031 DIFF: https://github.com/llvm/llvm-project/commit/93705c3a76e9b00137be84fbc6ef3b4af5fcc031.di

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/23465

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Bob Wilson (bob-wilson) Changes This adds a new filtering option to be used along with the -header-include-format=json option. The existing "only-direct-system" filtering option is missing some things: - It does not show module imports. -

[clang] [Clang] Add new -header-include-filtering=direct-per-file option (PR #137087)

2025-04-23 Thread Bob Wilson via cfe-commits
https://github.com/bob-wilson created https://github.com/llvm/llvm-project/pull/137087 This adds a new filtering option to be used along with the -header-include-format=json option. The existing "only-direct-system" filtering option is missing some things: - It does not show module imports. -

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn closed https://github.com/llvm/llvm-project/pull/137078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
@@ -119,6 +119,15 @@ constexpr auto b3 = name1() == name1(); // ref-error {{must be initialized by a constexpr auto b4 = name1() == name2(); static_assert(!b4); +constexpr auto bar(const char *p) { return p + __builtin_strlen(p); } +constexpr auto b5 = bar(p1) == p1; +static_

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Richard Smith via cfe-commits
zygoloid wrote: Yeah. I agree that using the overlap diagnostic only in the case where there's at least one byte of potential overlap (as this PR does) is best. https://github.com/llvm/llvm-project/pull/137078 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-04-23 Thread Reid Kleckner via cfe-commits
https://github.com/rnk edited https://github.com/llvm/llvm-project/pull/136046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-04-23 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,127 @@ +//===--- RunOnNewStack.cpp - Crash Recovery ---===// +// +// 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

[clang] [llvm] Reland: [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #136046)

2025-04-23 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. If we ever generalize this, it would make sense to have a standalone .s /.asm file in the build. https://github.com/llvm/llvm-project/pull/136046 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Henrik G. Olsson via cfe-commits
hnrklssn wrote: > Thanks for the fix! > > I was wondering if the new code paths should actually return `true` not > `false`, but I think it makes sense that for a comparison like `"hello" + 6 > == "world"`, we say that the strings are _not_ potentially-overlapping but we > instead detect the

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-23 Thread Andy Kaylor via cfe-commits
@@ -13,20 +13,76 @@ #include "CIRGenCall.h" #include "CIRGenFunction.h" +#include "CIRGenFunctionInfo.h" #include "clang/CIR/MissingFeatures.h" using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType)

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-04-23 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: That said, in terms of whether we actually care about what the committee says... both the C and C++ committees have a terrible track record on the fine details of stuff related to memory. I'd be okay with being slightly more aggressive than the standard technically allows

[clang] [Driver] Teach Barmetal toolchain about GCC installation (PR #121829)

2025-04-23 Thread Garvit Gupta via cfe-commits
@@ -110,20 +110,81 @@ static std::string computeBaseSysRoot(const Driver &D, bool IncludeTriple) { return std::string(SysRootDir); } +static bool hasGCCToolChainAlongSideClang(const Driver &D) { + SmallString<128> GCCDir; + llvm::sys::path::append(GCCDir, D.Dir, "..", D.g

[clang] [clang] Ensure correct copying of records with authenticated fields (PR #136783)

2025-04-23 Thread Oliver Hunt via cfe-commits
@@ -2801,6 +2801,10 @@ static bool isTriviallyCopyableTypeImpl(const QualType &type, if (type.hasNonTrivialObjCLifetime()) return false; + QualType::PrimitiveCopyKind PCK = type.isNonTrivialToPrimitiveCopy(); + if (PCK != QualType::PCK_Trivial && PCK != QualType::PCK_

[clang] [BPF] Fix issues with external declarations of C++ structor decls (PR #137079)

2025-04-23 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/137079 >From e78b8012376798746b5cf4d664e656e22591acdb Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 23 Apr 2025 22:29:22 + Subject: [PATCH 1/3] [BPF] Fix issues with external declarations of C++ structor decl

[clang] [Clang] Fix crash when -header-include-filtering is not specified (PR #136232)

2025-04-23 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/136232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4f36ada - [Clang] Fix crash when -header-include-filtering is not specified (#136232)

2025-04-23 Thread via cfe-commits
Author: Bob Wilson Date: 2025-04-23T16:09:38-07:00 New Revision: 4f36ada1e205df08ad4377df88729f8defb36558 URL: https://github.com/llvm/llvm-project/commit/4f36ada1e205df08ad4377df88729f8defb36558 DIFF: https://github.com/llvm/llvm-project/commit/4f36ada1e205df08ad4377df88729f8defb36558.diff LO

[clang] [Clang] Add `noalias` to `this` pointer in C++ constructors (PR #136792)

2025-04-23 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: We don't really specify what, exactly, the consequences are for violating noalias in LangRef. But... we do say elsewhere "If memory accesses alias even though they are noalias according to !tbaa metadata, the behavior is undefined." Probably the same has to apply to noal

[clang] [clang] Ensure correct copying of records with authenticated fields (PR #136783)

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

[clang] [ConstEval] Fix crash when comparing strings past the end (PR #137078)

2025-04-23 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Thanks for the fix! I was wondering if the new code paths should actually return `true` not `false`, but I think it makes sense that for a comparison like `"hello" + 6 == "world"`, we say that the strings are *not* potentially-overlapping

[clang] [BPF] Fix issues with external declarations of C++ structor decls (PR #137079)

2025-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Reid Kleckner (rnk) Changes Use GetAddrOfGlobal, which is a more general API that takes a GlobalDecl, and handles declaring C++ destructors and other types in a general way. We can use this to generalize over functions and variable declar

[clang] [BPF] Fix issues with external declarations of C++ structor decls (PR #137079)

2025-04-23 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 h,cpp -- clang/test/CodeGenCXX/bpf-debug-structors.cpp clan

[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-23 Thread Reid Kleckner via cfe-commits
Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= , Markus =?utf-8?q?Gscho=C3=9Fmann?= Message-ID: In-Reply-To: rnk wrote: We should be able to reland after #137079 lands https://github.com/llvm/llvm-project/pull/130674 __

  1   2   3   4   5   >