[clang] [clang] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-05 Thread Thurston Dang via cfe-commits
thurstond wrote: If it is not quick and easy to fix forward, please consider reverting in the meantime, so that the buildbots can be green and provide useful feedback to contributors. Thanks! https://github.com/llvm/llvm-project/pull/132748 ___ cfe-c

[clang] [llvm] Remove Native Client support (PR #133661)

2025-04-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Thanks for working on this! This will be the first time I'm not going to > oppose an effort to remove Native Client support 🎉 Although I am going to ask > you to wait a couple of months to land it, until we finally turn it off for > good and start deleting the support code fro

[clang] [clang-sycl-linker] Fix flaky failure and add REQUIRES (PR #134125)

2025-04-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-win-fast` running on `as-builder-3` while building `clang` at step 6 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/2/builds/20755 Here is the relevant piece

[clang] [clang] ASTContext: flesh out implementation of getCommonNNS (PR #131964)

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

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-04-05 Thread Alex Voicu via cfe-commits
@@ -15576,6 +15609,38 @@ static bool isOverflowingIntegerType(ASTContext &Ctx, QualType T) { return Ctx.getIntWidth(T) >= Ctx.getIntWidth(Ctx.IntTy); } +static Expr *ExpandAMDGPUPredicateBI(ASTContext &Ctx, CallExpr *CE) { + if (!CE->getBuiltinCallee()) +return CXXBool

[clang] [WIP] Implement `-dump-deserialized-declaration-ranges` flag. (PR #133910)

2025-04-05 Thread Ilya Biryukov via cfe-commits
@@ -49,6 +51,135 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// Dumps deserialized declarations. +class DeserializedDeclsLineRangePrinter : public DelegatingDeserializationListener, public ASTConsumer { +public: + explicit DeserializedDeclsLineRangePr

[libclc] [libclc] Fix unresolved reference to missing table (PR #133691)

2025-04-05 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/133691 Splitting the 'ln_tbl' into two in db98e292 wasn't done thoroughly enough as some references to the old table still remained. This commit fixes the unresolved references by updating to the new split table.

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-04-05 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/132250 From d4878a62a69304dc2ae32902803f8c8efb1c69ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 20 Mar 2025 17:09:46 +0100 Subject: [PATCH 1/3] [NFC][analyzer] Multipart checker refactor

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Sumit Agarwal (sumitsays) Changes Resolves #99221 Key points: For SPIRV backend, it decompose into a `dot` followed a `add`. - [x] Implement dot2add clang builtin, - [x] Link dot2add clang builtin with hlsl_intrinsics.h - [x] Add se

[clang] [llvm] [Clang][NVVM] Support `-f[no-]cuda-prec-sqrt` and propagate precision flag to `NVVMReflect` (PR #134244)

2025-04-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Why is this a module flag, instead of a function attribute? https://github.com/llvm/llvm-project/pull/134244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-04-05 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/134188 >From 357f8d3b2fc424968a9e17c3dd2a13fe046f6cf9 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Wed, 2 Apr 2025 21:02:00 -0400 Subject: [PATCH] [clang-tidy] Improve integer comparison by matching valid expre

[clang] [clang] Handle Binary StingLiteral kind in one more place (PR #132201)

2025-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes The bots are upset by https://github.com/llvm/llvm-project/pull/127629 . Fix that. --- Full diff: https://github.com/llvm/llvm-project/pull/132201.diff 1 Files Affected: - (modified) clang/lib/

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

2025-04-05 Thread Oliver Hunt via cfe-commits
@@ -2474,19 +2474,46 @@ bool CXXMethodDecl::isUsualDeallocationFunction( getOverloadedOperator() != OO_Array_Delete) return false; + auto NumParams = getNumParams(); + bool IsTypeAware = IsTypeAwareOperatorNewOrDelete(); + // C++ [basic.stc.dynamic.deallocation]

[clang] [CIR] Upstream a basic version of class LexicalScope (PR #131945)

2025-04-05 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi closed https://github.com/llvm/llvm-project/pull/131945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add binary operators (PR #132420)

2025-04-05 Thread Morris Hafner via cfe-commits
@@ -558,8 +624,225 @@ class ScalarExprEmitter : public StmtVisitor { return res; } + + BinOpInfo emitBinOps(const BinaryOperator *e, + QualType promotionType = QualType()) { +BinOpInfo result; +result.lhs = cgf.emitPromotedScalarExpr(e->ge

[clang] [Format] Do not crash on non-null terminated strings (PR #131299)

2025-04-05 Thread Ilya Biryukov via cfe-commits
@@ -29096,6 +29096,17 @@ TEST_F(FormatTest, BreakBeforeClassName) { "ArenaSafeUniquePtr {};"); } +TEST_F(FormatTest, DoesNotCrashOnNonNullTerminatedStringRefs) { + llvm::StringRef TwoLines = "namespace foo {}\n" + "namespace bar

[clang] [X86][AVX10.2] Replace nepbh with bf16 to match with others, NFCI (PR #134240)

2025-04-05 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: are we missing clang codegen tests for these? https://github.com/llvm/llvm-project/pull/134240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Finish exposing half types and intrinsics always (PR #132804)

2025-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Sarah Spall (spall) Changes Finish the work of #81782 Closes #132793 --- Full diff: https://github.com/llvm/llvm-project/pull/132804.diff 1 Files Affected: - (modified) clang/lib/Headers/hlsl/hlsl_alias_intrinsics.h (+32-16)

[clang] [HLSL][RootSignature] Define and integrate `HLSLRootSignatureAttr` (PR #134124)

2025-04-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/16830 Here is the relevant piece of the build log fo

[clang] [Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (PR #132348)

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

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-04-05 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > The git history says the FIXME about "Pure" was added when @cmarcelo > introduced `UnaryOp` in the incubator, but there is no PR associated with the > commit so I don't know what discussions may have taken place. We floated the idea of implementing operators as part of `

[clang] [clang][bytecode] Return Invalid() on non-constexpr builtins (PR #133700)

2025-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes So the diagnostic output matches with the current interpreter --- Full diff: https://github.com/llvm/llvm-project/pull/133700.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+

[clang] Reapply "[Clang] [NFC] Introduce a helper for emitting compatibility diagnostics (#132348)" (PR #134043)

2025-04-05 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/134043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-04-05 Thread Sumit Agarwal via cfe-commits
https://github.com/sumitsays edited https://github.com/llvm/llvm-project/pull/131237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce a trait to determine the structure binding size (PR #131515)

2025-04-05 Thread via cfe-commits
@@ -368,7 +368,11 @@ std::optional SValBuilder::getConstantVal(const Expr *E) { case Stmt::TypeTraitExprClass: { const auto *TE = cast(E); -return makeTruthVal(TE->getValue(), TE->getType()); +if (TE->isStoredAsBoolean()) + return makeTruthVal(TE->getBoolVa

[clang] [WIP][Clang] Allow floating point fixed vectors with atomic builtins (PR #129495)

2025-04-05 Thread Vikram Hegde via cfe-commits
@@ -240,6 +255,9 @@ void f(_Atomic(int) *i, const _Atomic(int) *ci, __atomic_fetch_sub(P, 3, memory_order_seq_cst); __atomic_fetch_sub(F, 3, memory_order_seq_cst); __atomic_fetch_sub(s1, 3, memory_order_seq_cst); // expected-error {{must be a pointer to integer, pointer

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-04-05 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: @@ -260,7 +260,7 @@ AMDGPUTargetInfo::AMDGPUTargetInfo(const llvm::Triple &Triple, MaxAtomicPromoteWidth = MaxAtomicInli

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/133472 >From f9268b3a331fd8caf2440d742a1f084c0f9648ce Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 28 Mar 2025 13:01:58 -0400 Subject: [PATCH 1/3] [C11] Implement WG14 N1285 (temporary lifetimes) This

[clang] [clang-tools-extra] [clang] Concepts: support pack expansions for type constraints (PR #132626)

2025-04-05 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/132626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 69b7011 - [TableGen] Avoid repeated hash lookups (NFC) (#132142)

2025-04-05 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-03-20T09:10:23-07:00 New Revision: 69b70110b78930b942a5e92db40bcefd0ac7890b URL: https://github.com/llvm/llvm-project/commit/69b70110b78930b942a5e92db40bcefd0ac7890b DIFF: https://github.com/llvm/llvm-project/commit/69b70110b78930b942a5e92db40bcefd0ac7890b.diff L

[clang] [llvm] [llvm:ir] Add support for constant data exceeding 4GiB (PR #126481)

2025-04-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Code formatter returned issues; please fix (https://github.com/llvm/llvm-project/pull/126481#issuecomment-2649368078) https://github.com/llvm/llvm-project/pull/126481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-04-05 Thread Sumit Agarwal via cfe-commits
https://github.com/sumitsays edited https://github.com/llvm/llvm-project/pull/131237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Optimize Module Dependency Handling for Efficient Memory Usage (PR #132638)

2025-04-05 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] [flang] [Flang][OpenMP][Driver][AMDGPU] Fix -mcode-object-version (PR #134230)

2025-04-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/134230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 468452b - [CodeGen] Fix unused variable warning (NFC)

2025-04-05 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2025-03-20T19:36:38+01:00 New Revision: 468452b0814a3ad04700455af2d225e25a6aecaf URL: https://github.com/llvm/llvm-project/commit/468452b0814a3ad04700455af2d225e25a6aecaf DIFF: https://github.com/llvm/llvm-project/commit/468452b0814a3ad04700455af2d225e25a6aecaf.diff

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/134138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Consistently use "load" to refer to populating clang::ModuleMap (PR #132970)

2025-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Spencer (Bigcheese) Changes Now that we have ModuleMapFile.cpp which parses module maps, it's confusing what ModuleMap::parseModuleMapFile actually does. HeaderSearch already called this loading a module map, so consistently use t

[clang] dcc2fae - [HLSL] Fix codegen to support classes in `cbuffer` (#132828)

2025-04-05 Thread via cfe-commits
Author: Helena Kotas Date: 2025-03-31T10:05:59-07:00 New Revision: dcc2faecd8aebc64eb541aebe0005ecceffef558 URL: https://github.com/llvm/llvm-project/commit/dcc2faecd8aebc64eb541aebe0005ecceffef558 DIFF: https://github.com/llvm/llvm-project/commit/dcc2faecd8aebc64eb541aebe0005ecceffef558.diff

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-04-05 Thread Alexey Bataev via cfe-commits
@@ -18933,12 +18945,34 @@ static bool actOnOMPReductionKindClause( reportOriginalDsa(S, Stack, D, DVar); continue; } + // OpenMP 6.0 [ 7.6.10 ] + // Support Reduction over private variables with reduction clause. + // A list item in a reduct

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

2025-04-05 Thread Oliver Hunt via cfe-commits
@@ -2527,6 +2527,32 @@ class FunctionDecl : public DeclaratorDecl, /// If this function is an allocation/deallocation function that takes /// the `std::nothrow_t` tag, return true through IsNothrow, bool isReplaceableGlobalAllocationFunction( + std::optional *Alignme

[clang] 4e3440d - [CIR] Upstream a basic version of class LexicalScope (#131945)

2025-04-05 Thread via cfe-commits
Author: David Olsen Date: 2025-03-19T12:56:41-07:00 New Revision: 4e3440d9dd181f83ac1aa23f9c458d1344413e98 URL: https://github.com/llvm/llvm-project/commit/4e3440d9dd181f83ac1aa23f9c458d1344413e98 DIFF: https://github.com/llvm/llvm-project/commit/4e3440d9dd181f83ac1aa23f9c458d1344413e98.diff L

[clang] [clang-format] Recognize TableGen paste operator on separate line (PR #133722)

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

[clang] Fix complex long double division with -mno-x87. (PR #133152)

2025-04-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/133152 >From 56a000612da3f58928362229a46800c6f077cc71 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Wed, 26 Mar 2025 13:18:36 -0700 Subject: [PATCH 1/3] Fix complex long division with -mno-x87. --- clang/

[clang] [clang][analyzer] Move 'alpha.core.FixedAddressDereference' out of alpha (PR #132404)

2025-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/132404.diff 8 Files Affected: - (modified) clang/docs/analyzer/checkers.rst (+35-35) - (modified) clang/include/clang/StaticAnalyzer/Checkers/Chec

[clang] [clang][CGObjC] Prefer PointerType::get with LLVMContext over Type (NFC) (PR #133871)

2025-04-05 Thread Mats Jun Larsen via cfe-commits
junlarsen wrote: * **#133871** https://app.graphite.dev/github/pr/llvm/llvm-project/133871?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/13

[clang] Revert "[Clang] [NFC] Introduce a helper for emitting compatibility diagnostics" (PR #134036)

2025-04-05 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/134036 Reverts llvm/llvm-project#132348 Some tests are failing and I still need to figure out what is going on here. >From 12372457f6284197ba610616c3fdd4ddea937d5c Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed,

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-05 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,142 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s + +#define AQ __ptrauth

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-04-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/133125 >From 75ef42d644da9136fb07014ade18b6be137426a1 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 26 Mar 2025 12:54:29 -0400 Subject: [PATCH 1/3] [C2y] Implement WG14 N3369 and N3469 (_Countof) C2y ad

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

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

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-04-05 Thread Younan Zhang via cfe-commits
@@ -1650,6 +1665,23 @@ namespace { return inherited::TransformTemplateArgument(Input, Output, Uneval); } +std::optional ComputeSizeOfPackExprWithoutSubstitution( +ArrayRef PackArgs) { + // Don't do this when rewriting template parameters for CTAD: +

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

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

[clang] [Clang][Cmake] fix libtool duplicate member name warnings (PR #133619)

2025-04-05 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. This looks sensible to me. https://github.com/llvm/llvm-project/pull/133619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Added driver options for arrays repacking. (PR #134002)

2025-04-05 Thread David Truby via cfe-commits
https://github.com/DavidTruby approved this pull request. LGTM thanks! https://github.com/llvm/llvm-project/pull/134002 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Revert "[clang] NFC: Clear some uses of MemberPointerType::getClass" (PR #132281)

2025-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Matheus Izvekov (mizvekov) Changes Reverts llvm/llvm-project#131965 Reverted due to issue reported here: https://github.com/llvm/llvm-project/pull/131965#issuecomment-2741619498 --- Patch is 28.29 KiB, truncated to 20.00 KiB bel

[clang] [compiler-rt] Reland [Coverage] Fix region termination for GNU statement expressions (PR #132222)

2025-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Cady (justincady) Changes Relands #130976 with adjustments to test requirements. Calls to __noreturn__ functions result in region termination for coverage mapping. But this creates incorrect coverage results when __noreturn__ functi

[clang] [alpha.webkit.ForwardDeclChecker] Ignore forward declared struct. (PR #133804)

2025-04-05 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/StaticAnalyzer/Checkers/WebKit/ForwardDeclC

[clang] 976a384 - [clang] implement common-sugar for adjusted member-pointers (#133613)

2025-04-05 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-03-30T01:45:00-03:00 New Revision: 976a384ba67adf059ab9fe5550e7e67b6fc53396 URL: https://github.com/llvm/llvm-project/commit/976a384ba67adf059ab9fe5550e7e67b6fc53396 DIFF: https://github.com/llvm/llvm-project/commit/976a384ba67adf059ab9fe5550e7e67b6fc53396.dif

[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

2025-04-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/130537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do not share ownership of `HeaderSearchOptions` (PR #132984)

2025-04-05 Thread Ben Langmuir via cfe-commits
@@ -48,7 +48,7 @@ void ASTMergeAction::ExecuteAction() { /*ShouldOwnClient=*/true)); std::unique_ptr Unit = ASTUnit::LoadFromASTFile( ASTFiles[I], CI.getPCHContainerReader(), ASTUnit::LoadEverything, Diags, -CI.getFileSys

[clang] [clang-tools-extra] Suppress pedantic diagnostic for a file not ending in EOL (PR #131794)

2025-04-05 Thread Erich Keane via cfe-commits
@@ -3194,18 +3194,12 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { SourceLocation EndLoc = getSourceLocation(BufferEnd); unsigned DiagID = diag::warn_no_newline_eof; -if (LangOpts.CPlusPlus11) { - // C++11 [lex.phases] 2.2 p2 - // Pref

[clang] Reapply "[cmake] Refactor clang unittest cmake" (PR #134195)

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

[clang-tools-extra] [NFC] Fixes proposed by code sanitizer. (PR #134138)

2025-04-05 Thread Piotr Zegar via cfe-commits
@@ -260,7 +260,7 @@ static IntegerRange createFromType(const ASTContext &Context, llvm::APSInt LowerValue(PrecisionBits + 2, /*isUnsigned*/ false); LowerValue.setBit(PrecisionBits); LowerValue.setSignBit(); -return {LowerValue, UpperValue}; +return {std::mo

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-04-05 Thread via cfe-commits
@@ -14689,18 +14934,24 @@ void Sema::LookupOverloadedBinOp(OverloadCandidateSet &CandidateSet, // rewritten candidates using these functions if necessary. AddNonMemberOperatorCandidates(Fns, Args, CandidateSet); + // As template candidates are not deduced immediately, +

[clang] [llvm] [HLSL][RootSignature] Implement parsing of a DescriptorTable with empty clauses (PR #133302)

2025-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Finn Plummer (inbelic) Changes - defines the Parser class and an initial set of helper methods to support consuming tokens. functionality is demonstrated through a simple empty descriptor table test case - defines an initial in-memory repre

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-04-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG with a nit https://github.com/llvm/llvm-project/pull/129938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [AMDGPU] Use a target feature to enable __builtin_amdgcn_global_load_lds on gfx9/10 (PR #133055)

2025-04-05 Thread Juan Manuel Martinez Caamaño via cfe-commits
jmmartinez wrote: I've added a commit to have a common attribute that we could use for both, global-load-lds and buffer-load-lds builtins. https://github.com/llvm/llvm-project/pull/133055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] Optimize Module Dependency Handling for Efficient Memory Usage (PR #133524)

2025-04-05 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 created https://github.com/llvm/llvm-project/pull/133524 -Optimized addModuleFiles functions for both CompilerInvocation and CowCompilerInvocation to reduce redundant function calls and improve efficiency -Introduced memory preallocation using reserve() when

[clang] [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

2025-04-05 Thread Zequan Wu via cfe-commits
@@ -785,6 +786,34 @@ static void addPGOAndCoverageFlags(const ToolChain &TC, Compilation &C, D.Diag(diag::err_drv_unsupported_option_argument) << A->getSpelling() << Val; } + if (const auto *A = Args.getLastArg(options::OPT_fprofile_continuous)) { +if (!

[clang] [CLANG-CL] ignores wpadded (PR #130182)

2025-04-05 Thread Mikael Holmén via cfe-commits
@@ -3004,6 +3010,15 @@ void MicrosoftRecordLayoutBuilder::layoutField(const FieldDecl *FD) { } else { FieldOffset = Size.alignTo(Info.Alignment); } + + uint64_t UnpaddedFielddOffsetInBits = + Context.toBits(DataSize) - RemainingBitsInField; mikae

[libclc] libclc: erfc: fix fp32 implementation (PR #132390)

2025-04-05 Thread Romaric Jodin via cfe-commits
https://github.com/rjodinchr created https://github.com/llvm/llvm-project/pull/132390 On some implementation, the current implementation lead to slight accuracy issues. While the maths behing this implementation is correct, it does not take into account the accumulation of errors coming from o

[clang] [clang-tools-extra] [lldb] [llvm] Add test to clang-doc, it can test comments in macro. Original issue is #59819. (PR #132360)

2025-04-05 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: clang-doc --format=md --doxygen --output=%t --executor=standalone %s +// RUN: clang-doc --format=html --doxygen --output=%t --executor=standalone %s +// RUN: FileCheck %s < %t/GlobalNamespace/MyClass.md --check-prefix=MD

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-04-05 Thread Alexey Bataev via cfe-commits
@@ -18933,12 +18945,35 @@ static bool actOnOMPReductionKindClause( reportOriginalDsa(S, Stack, D, DVar); continue; } + // OpenMP 6.0 [ 7.6.10 ] + // Support Reduction over private variables with reduction clause. + // A list item in a reduct

[clang] [MS][clang] Fix crash on deletion of array of pointers (PR #134088)

2025-04-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-ubuntu` running on `as-builder-9` while building `clang` at step 16 "test-check-lldb-api". Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/7144 Here is the relevant piece

[clang] [llvm] [NVPTX] Auto-Upgrade llvm.nvvm.atomic.load.{inc,dec}.32 (PR #134111)

2025-04-05 Thread Akshay Deodhar via cfe-commits
@@ -2314,6 +2317,12 @@ static Value *upgradeNVVMIntrinsicCall(StringRef Name, CallBase *CI, Value *Val = CI->getArgOperand(1); Rep = Builder.CreateAtomicRMW(AtomicRMWInst::FAdd, Ptr, Val, MaybeAlign(), AtomicOrdering::SequentiallyConsi

[clang] [clang][bytecode] Implement __builtin_constant_p differently (PR #122099)

2025-04-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/122099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Don't include CGDebugInfo.h in CodeGenFunction.h (NFC) (PR #134100)

2025-04-05 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/134100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][fix] crashes when generating HTML without `--repository` (PR #131698)

2025-04-05 Thread Paul Kirth via cfe-commits
ilovepi wrote: > @ilovepi I see you opened a PR to solve the same issue > [here](https://github.com/llvm/llvm-project/pull/131939). Wouldn't be better > if I continue working on it with your suggestions? 😅 I'm fine either way, but I wanted some kind of testing so I could verify the fix. htt

[clang] [Clang][RFC] Bypass TAD during overload resolution if a perfect match exists (PR #133426)

2025-04-05 Thread Younan Zhang via cfe-commits
@@ -14354,6 +14584,17 @@ ExprResult Sema::BuildOverloadedCallExpr(Scope *S, Expr *Fn, OverloadingResult OverloadResult = CandidateSet.BestViableFunction(*this, Fn->getBeginLoc(), Best); + // [C++23][over.call.func] + // if overload resolution selects a non-static me

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Reid Kleckner (rnk) Changes This reduces the size of the clang/unittests build directory by 64% and my overall build dir size by 5%. Static linking is the real driving factor here, but even if the default build configuration used shared l

[clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

2025-04-05 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/133878 >From 289f8630dccf916b8cf7cc43758bae60df036c5d Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Wed, 2 Apr 2025 00:53:33 -0700 Subject: [PATCH 1/3] clang frontend crash with friend class declaration and overl

[clang] [clang][HeuristicResolver] Default argument heuristic for template parameters (PR #132465)

2025-04-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: This was previously submitted and approved at https://github.com/llvm/llvm-project/pull/131074, I just mistakenly merged that into a user branch. https://github.com/llvm/llvm-project/pull/132465 ___ cfe-commits mailing list cfe-

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-04-05 Thread Jack Styles via cfe-commits
@@ -0,0 +1,31 @@ +// Ensures that when targeting an ARM target with an Asm file, clang +// collects the features from the FPU. This is critical in the +// activation of NEON for supported targets. The Cortex-R52 will be +// used and tested for VFP and NEON Support + +// RUN: %clan

[clang] fixed clang frontend crash with friend class declaration and overload == (PR #133878)

2025-04-05 Thread via cfe-commits
@@ -355,6 +355,7 @@ Bug Fixes to Attribute Support Bug Fixes to C++ Support +- Clang Now supports Implicitly-Defined Comparison Operators for Friend-Declarations cor3ntin wrote: ```suggestion - Clang now supports implicitly defined c

[clang-tools-extra] [clangd] Add `HeaderInsertion` yaml config option (PR #128503)

2025-04-05 Thread via cfe-commits
github-actions[bot] wrote: @MythreyaK Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a buil

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-05 Thread Paul Walker via cfe-commits
@@ -2034,6 +2071,18 @@ static Value *convertValue(const DataLayout &DL, IRBuilderTy &IRB, Value *V, } } + if (isa(NewTy) && isa(OldTy)) { +auto *Ty = VectorType::getWithSizeAndScalar(cast(NewTy), OldTy); +V = IRB.CreateInsertVector(Ty, PoisonValue::get(Ty), V,

[clang] [Clang] emit -Wunused-variable warning for unused structured bindings without the [[maybe_unused]] attribute (PR #127061)

2025-04-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/127061 >From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 13 Feb 2025 15:24:09 +0200 Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused structur

[clang] [Clang] Fix the assertion condition after b8d1f3d6 (PR #132669)

2025-04-05 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/132669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMAKE][AMDGPU] fix build failure caused by PR #133619 (PR #133776)

2025-04-05 Thread Farzon Lotfi via cfe-commits
farzonl wrote: > I tried to build it locally and I got a series of 'undefined reference' > errors. Sorry, I will need to revert my approval. Attn. @jhuber6 > > Thanks Could you provide the failures you were seeing, specific build instructions, and platform you were doing this on. https://gi

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-04-05 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > Hi, I tried to explain everything here: Thanks, I missed that! For RFCs it's preferable to use [Discourse](https://discourse.llvm.org/c/clang/clang-tidy/71), as there is a lot less traffic and can more easily catch the eyes of relevant people. I did not see much discuss

[clang] [flang] [flang] Complete alignment of -x language modes with gfortran (PR #133775)

2025-04-05 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/133775 >From aeca7c2c7bf4cc7aef87374f3890f2a42e61d07d Mon Sep 17 00:00:00 2001 From: David Truby Date: Mon, 31 Mar 2025 19:39:37 +0100 Subject: [PATCH 1/2] [flang] Complete alignment of -x language modes with gfort

[clang] [clang][modules] Lazily load by name lookups in module maps (PR #132853)

2025-04-05 Thread Michael Spencer via cfe-commits
@@ -2128,9 +2245,16 @@ bool ModuleMap::loadModuleMapFile(FileEntryRef File, bool IsSystem, // If the module map file wasn't already entered, do so now. if (ID.isInvalid()) { -auto FileCharacter = -IsSystem ? SrcMgr::C_System_ModuleMap : SrcMgr::C_User_ModuleMa

[clang] [llvm] [HLSL] Add SPIR-V target type for StructuredBuffers (PR #132027)

2025-04-05 Thread Nathan Gauër via cfe-commits
@@ -711,13 +711,14 @@ BuiltinTypeDeclBuilder::addHandleAccessFunction(DeclarationName &Name, using PH = BuiltinTypeMethodBuilder::PlaceHolder; QualType ElemTy = getHandleElementType(); - // TODO: Map to an hlsl_device address space. - QualType ElemPtrTy = AST.getPointer

[clang] [clang-tools-extra] Revert "[clang] NFC: Clear some uses of MemberPointerType::getClass" (PR #132281)

2025-04-05 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/132281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-04-05 Thread Eli Friedman via cfe-commits
@@ -42,6 +42,11 @@ Potentially Breaking Changes C/C++ Language Potentially Breaking Changes --- +- Some old-style offsetof idioms like ``((int)(&(((struct S *)0)->field)))`` are treated efriedma-quic wrote: Well, no, b

[clang] [Clang] Improve subsumption. (PR #132849)

2025-04-05 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/132849 >From b5b5275093f6942238536834c6508551f7ceffd8 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sun, 16 Mar 2025 23:34:19 +0100 Subject: [PATCH 1/6] [Clang] Improve subsumption. The main goal of this patch

[clang] [CodeGen] Don't include CGDebugInfo.h in CodeGenFunction.h (NFC) (PR #134100)

2025-04-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines @llvm/pr-subscribers-debuginfo Author: Nikita Popov (nikic) Changes This is an expensive header, only include it where needed. Move some functions out of line to achieve that. This reduces time to build clang by ~0.5% in terms of instruction

[clang] [Clang] Add warning message for C++17 alias template CTAD (PR #133806)

2025-04-05 Thread via cfe-commits
@@ -9920,7 +9920,9 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (auto *AliasTemplate = dyn_cast_or_null( TemplateName.getAsTemplateDecl())) { Diag(Kind.getLocation(), - diag::warn_cxx17_compat_ctad_for_alias_templates); +

[clang] [alpha.webkit.UncountedCallArgsChecker] os_log functions should be treated as safe. (PR #131500)

2025-04-05 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/131500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] add option to control bin-packing keyworded parameters (PR #131605)

2025-04-05 Thread Eugene Shalygin via cfe-commits
https://github.com/zeule updated https://github.com/llvm/llvm-project/pull/131605 >From 352742af34d52dd265cc01ff47ca73047aa423e5 Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Mon, 17 Mar 2025 11:23:35 +0100 Subject: [PATCH] [clang-format] option to control bin-packing keyworded paramete

[clang] [clang] Implement CWG2815 (PR #132778)

2025-04-05 Thread Vlad Serebrennikov via cfe-commits
@@ -47,6 +47,28 @@ void f() { #endif } // namespace cwg2813 +namespace cwg2815 { // cwg2815: 21 +#if __cpp_noexcept_function_type >= 201510 Endilll wrote: Yes, C++ DR tests are concerned with language modes, and not individual features. https://github.com/l

  1   2   3   4   5   6   7   8   >