[clang] [Clang][OpenMP] Add an additional class to hold data that will be shared between all loop transformations (PR #155849)

2025-09-08 Thread Roger Ferrer Ibáñez via cfe-commits
https://github.com/rofirrim updated https://github.com/llvm/llvm-project/pull/155849 From 365c3c5d18b0c466fee85075d6f6bc3c63267fef Mon Sep 17 00:00:00 2001 From: Roger Ferrer Ibanez Date: Wed, 27 Aug 2025 08:18:02 + Subject: [PATCH] [Clang][OpenMP] Add an additional class to hold data that

[clang] [LifetimeSafety] Associate origins to all l-valued expressions (PR #156896)

2025-09-08 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/156896 >From f7906c207782f94873936a5c4545c7900165534e Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 4 Sep 2025 14:27:37 + Subject: [PATCH] all-lvalues-have-origin --- clang/lib/Analysis/LifetimeSafety.cp

[clang] [clang][CodeGen][MSVC] Return vector types from methods indirectly (PR #157365)

2025-09-08 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: Hi, thank you for the patch. I wonder if it can make clang ABI incompatible with its previous versions? Perhaps it makes sense to put the new behavior under `-fclang-abi-compat` flag. https://github.com/llvm/llvm-project/pull/157365 _

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-09-08 Thread Valentyn Yukhymenko via cfe-commits
BaLiKfromUA wrote: @vbvictor thanks for approval! I addressed your remark about the release note. Could you merge this PR, please, when you are available? I don't have merge permissions https://github.com/llvm/llvm-project/pull/144313 ___ cfe-commits

[clang] [llvm] [mlir] [AArch64][SME] Improve codegen for aarch64.sme.cnts* when not in streaming mode (PR #154761)

2025-09-08 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/154761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [AArch64][SME] Improve codegen for aarch64.sme.cnts* when not in streaming mode (PR #154761)

2025-09-08 Thread Paul Walker via cfe-commits
@@ -4304,9 +4304,10 @@ Value *CodeGenFunction::EmitSMELd1St1(const SVETypeFlags &TypeFlags, // size in bytes. if (Ops.size() == 5) { Function *StreamingVectorLength = -CGM.getIntrinsic(Intrinsic::aarch64_sme_cntsb); +CGM.getIntrinsic(Intrinsic::aarch64_

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-08 Thread Morris Hafner via cfe-commits
@@ -1053,9 +1053,12 @@ mlir::LogicalResult CIRToLLVMBaseClassAddrOpLowering::matchAndRewrite( mlir::LogicalResult CIRToLLVMAllocaOpLowering::matchAndRewrite( cir::AllocaOp op, OpAdaptor adaptor, mlir::ConversionPatternRewriter &rewriter) const { - assert(!cir::Missing

[clang] 2946879 - [CIR] Fix assertion order in 'Address' (#157477)

2025-09-08 Thread via cfe-commits
Author: Erich Keane Date: 2025-09-08T14:59:31Z New Revision: 2946879c49d2cb17d1b53ff398edd681baf49417 URL: https://github.com/llvm/llvm-project/commit/2946879c49d2cb17d1b53ff398edd681baf49417 DIFF: https://github.com/llvm/llvm-project/commit/2946879c49d2cb17d1b53ff398edd681baf49417.diff LOG: [

[clang] [clang] Allow attributes on first constructor argument in pre-C++11 (PR #157300)

2025-09-08 Thread Shafik Yaghmour via cfe-commits
@@ -6007,10 +6007,9 @@ bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide, // A C++11 attribute here signals that we have a constructor, and is an // attribute on the first constructor parameter. - if (getLangOpts().CPlusPlus11 && - isCXX11

[clang] [clang][AST] Added assert to prevent infinite recursion in computing layout (PR #154134)

2025-09-08 Thread Michael Buch via cfe-commits
Michael137 wrote: Personally i think the assert makes sense here (if a user can't ever create an AST like that, which IIUC they can't). Although it is true that we try not to assert on user input as Jonas mentioned, this was a bug in our LLDB's AST creation. Malformed DWARF can already cause a

[clang] [llvm] [SYCL] Add offload wrapping for SYCL kind. (PR #147508)

2025-09-08 Thread Yury Plyakhin via cfe-commits
@@ -620,6 +635,422 @@ void createRegisterFatbinFunction(Module &M, GlobalVariable *FatbinDesc, // Add this function to constructors. appendToGlobalCtors(M, CtorFunc, /*Priority=*/101); } + +/// SYCLWrapper helper class that creates all LLVM IRs wrapping given images. +stru

[clang] [CIR] Fix LLVM lowering crashes after #155244 (PR #157471)

2025-09-08 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good, but it isn't clear to me why the crashes were occurring. I see from the description of #155244 that replaceAllUsesWith now has a delayed effect in some circumstances. Was the fact that we were erasing the replaced op ca

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-08 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -282,14 +327,17 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes &Attrs, return; } } break; - case ParsedAttr::UnknownAttribute: -Diag(Loc, diag::

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-08 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -4943,13 +4932,35 @@ def HLSLResourceBinding: InheritableAttr { }]; } -def HLSLSV_Position : HLSLAnnotationAttr { - let Spellings = [HLSLAnnotation<"sv_position">];

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-08 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -3054,6 +3057,9 @@ static void emitAttributes(const RecordKeeper &Records, raw_ostream &OS, << (R.getValueAsBit("InheritEvenIfAlreadyPresent") ? "true"

[clang] [clang] Fix OOB read in SemaSwift::validateSwiftFunctionName (PR #157139)

2025-09-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM but we need a release note. https://github.com/llvm/llvm-project/pull/157139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tools-extra] Remove 'REQUIRES: shell' from lit tests. (PR #156950)

2025-09-08 Thread via cfe-commits
https://github.com/cmtice updated https://github.com/llvm/llvm-project/pull/156950 >From 05fa2572ad23795ef821b81ecd5dd4ff4d0aea7a Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Thu, 4 Sep 2025 12:00:44 -0700 Subject: [PATCH 1/2] [clang-tools-extra] Remove 'REQUIRES: shell' from lit tests.

[clang] [CIR] Fix LLVM lowering crashes after #155244 (PR #157471)

2025-09-08 Thread Morris Hafner via cfe-commits
mmha wrote: My understanding is that we are not supposed to erase an op that was replaced anymore. `eraseOp` calls `replaceOp` internally which lead to the double replacement assertion failure. I also think in our case it doesn't really matter whether we use `replaceOp` and `replaceAllUseWith

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
@@ -676,6 +774,58 @@ BuiltinTypeDeclBuilder::addHandleConstructorFromImplicitBinding() { .finalize(); } +BuiltinTypeDeclBuilder &BuiltinTypeDeclBuilder::addCreateFromBinding() { hekota wrote: We do want these methods to be separate with different names

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-08 Thread Bhasawut Singhaphan via cfe-commits
https://github.com/markbhasawut updated https://github.com/llvm/llvm-project/pull/157464 >From 70b779e23b1b0866e9bdd5ff2b2f6cc86feebd31 Mon Sep 17 00:00:00 2001 From: Bhasawut Singhaphan Date: Mon, 8 Sep 2025 15:51:33 +0700 Subject: [PATCH 1/5] [Headers][X86] Enable constexpr handling for MMX/

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
@@ -483,6 +532,55 @@ BuiltinTypeMethodBuilder &BuiltinTypeMethodBuilder::dereference(T Ptr) { return *this; } +template +BuiltinTypeMethodBuilder & +BuiltinTypeMethodBuilder::getResourceHandle(T ResourceRecord) { hekota wrote: I'll change the name to `acc

[clang] [clang-repl] Teach clang-repl how to load PCHs (reprise) (PR #157359)

2025-09-08 Thread Jeaye Wilkerson via cfe-commits
jeaye wrote: I've scoured the latest Linux/Windows build+test logs and the failures in there have seemingly nothing to do with this PR. Based on comparing these results with other recently opened PRs, it's unclear to me if these are consistent. @vgvassilev do you know? https://github.com/llvm

[clang] [clang-tools-extra] [compiler-rt] [Clang] [Sema] Make `-Wincompatible-pointer-types` an error by default (PR #157364)

2025-09-08 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 origin/main HEAD --extensions cl,c -- clang-tools-extra/test/clang-tidy/checkers/bugp

[clang] [clang-tools-extra] [compiler-rt] [Clang] [Sema] Make `-Wincompatible-pointer-types` an error by default (PR #157364)

2025-09-08 Thread via cfe-commits
Sirraide wrote: > IIRC the Clang behaviour for `-Wincompatible-pointer-types` differs from GCC > as it includes qualifiers while GCC doesn't, so it may show up with some new > failures. That's not a comment for or against changing it. Sort of: while `-Werror=incompatible-pointer-types` *would*

[clang-tools-extra] [clang-tidy][NFC] Enable `modernize-use-auto` in clang-tidy config and fix warnings (PR #157468)

2025-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (flovent) Changes Closes [#156154](https://github.com/llvm/llvm-project/issues/156154) --- Full diff: https://github.com/llvm/llvm-project/pull/157468.diff 4 Files Affected: - (modified) clang-tools-extra/clang-tidy/.clang-tid

[clang] [clang] Restrict -Wnrvo to C++ code only. (PR #157059)

2025-09-08 Thread via cfe-commits
@@ -223,6 +223,7 @@ Deprecated Compiler Flags Modified Compiler Flags --- - The `-gkey-instructions` compiler flag is now enabled by default when DWARF is emitted for plain C/C++ and optimizations are enabled. (#GH149509) +- The `-Wnrvo` compiler flag will

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/155866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-08 Thread Balázs Kéri via cfe-commits
@@ -379,6 +386,111 @@ void DereferenceChecker::checkBind(SVal L, SVal V, const Stmt *S, C.addTransition(State, this); } +void DereferenceChecker::checkPreStmt(const BinaryOperator *Op, + CheckerContext &C) const { + if (!Op->isAdditiveO

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-08 Thread Bhasawut Singhaphan via cfe-commits
@@ -496,9 +496,8 @@ _mm256_andnot_si256(__m256i __a, __m256i __b) /// \param __b ///A 256-bit integer vector. /// \returns A 256-bit integer vector containing the result. -static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_avg_epu8(__m256i __a, __m256i __b) -{ +static

[clang] [clang] Rename overloaded virtual member function to prevent shadowing, NFCI (PR #157501)

2025-09-08 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/157501 Resolves warnings triggered by `Woverloaded-virtual` >From 54fee3ec74c6f7b75f2aba5fc796d034311df830 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 8 Sep 2025 09:00:27 -0700 Subject: [PATCH] [clang]

[clang] [docs][OpenMP] Update the status of GROUPPRIVATE in flang (PR #157470)

2025-09-08 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/157470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-08 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/157116 >From 4121aecbda6be80161eb8fe22c351fadd5bbe62a Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Fri, 5 Sep 2025 16:27:28 +0200 Subject: [PATCH 1/2] [CIR] Add support for __builtin_alloca This patch adds support f

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-08 Thread Balázs Kéri via cfe-commits
@@ -173,9 +178,11 @@ static bool isDeclRefExprToReference(const Expr *E) { return false; } -void DereferenceChecker::reportBug(const DerefBugType &BT, - ProgramStateRef State, const Stmt *S, - CheckerContext

[clang] [llvm] Explicit types in cbuffer layouts (PR #156919)

2025-09-08 Thread Justin Bogner via cfe-commits
@@ -111,53 +118,52 @@ llvm::TargetExtType *HLSLBufferLayoutBuilder::createLayoutType( if (!PackOffsets || PO != -1) { if (!layoutField(FD, EndOffset, FieldOffset, FieldType, PO)) return nullptr; -Layout.push_back(FieldOffset); -LayoutEle

[clang] [Frontend] Define __SANITIZE__ macros for kernel address variants (PR #156543)

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

[clang-tools-extra] [clang-tidy] New bugprone-derived-method-shadowing-base-method (PR #154746)

2025-09-08 Thread via cfe-commits
@@ -0,0 +1,127 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/155866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
@@ -431,15 +464,31 @@ Expr *BuiltinTypeMethodBuilder::getResourceHandleExpr() { OK_Ordinary); } +BuiltinTypeMethodBuilder & +BuiltinTypeMethodBuilder::createLocalVar(StringRef Name, QualType Ty) { + ensureCompleteDecl(); + + ASTContext &AS

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
@@ -431,15 +464,31 @@ Expr *BuiltinTypeMethodBuilder::getResourceHandleExpr() { OK_Ordinary); } +BuiltinTypeMethodBuilder & +BuiltinTypeMethodBuilder::createLocalVar(StringRef Name, QualType Ty) { + ensureCompleteDecl(); + + ASTContext &AS

[clang] [clang] Fix OOB read in SemaSwift::validateSwiftFunctionName (PR #157139)

2025-09-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Release note + bug number is a good idea, else LGTM. https://github.com/llvm/llvm-project/pull/157139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-08 Thread Helena Kotas via cfe-commits
@@ -130,13 +143,17 @@ struct BuiltinTypeMethodBuilder { BuiltinTypeMethodBuilder(BuiltinTypeDeclBuilder &DB, DeclarationName &Name, QualType ReturnTy, bool IsConst = false, - bool IsCtor = false) +

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-08 Thread via cfe-commits
=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slani

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-09-08 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA updated https://github.com/llvm/llvm-project/pull/144313 >From b2e5ee18bf7f03bbf5f99ef124ef707dc3116886 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Mon, 16 Jun 2025 08:55:06 +0100 Subject: [PATCH 1/5] first iteration of fix --- .../bde/types/bdlb_nu

[clang-tools-extra] [clang-tidy] Minor documentation wording for performance-noexcept-move-constructor (PR #157384)

2025-09-08 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. https://github.com/llvm/llvm-project/pull/157384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-09-08 Thread St. Muench via cfe-commits
https://github.com/stmuench closed https://github.com/llvm/llvm-project/pull/131468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] VectorExprEvaluator::VisitCallExpr - add constant folding for X86 pslldqi/psrldqi infrinsics (PR #157403)

2025-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (kimyounhoex1) Changes These X86 builtins (`__builtin_ia32_pslldqi128/256_byteshift` and `__builtin_ia32_psrldqi128/256_byteshift`) can now be evaluated at compile time when the shift amount is a constant integer. This improves consis

[clang] [clang] VectorExprEvaluator::VisitCallExpr - add constant folding for X86 pslldqi/psrldqi infrinsics (PR #157403)

2025-09-08 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] [clang] VectorExprEvaluator::VisitCallExpr - add constant folding for X86 pslldqi/psrldqi infrinsics (PR #157403)

2025-09-08 Thread via cfe-commits
https://github.com/kimyounhoex1 created https://github.com/llvm/llvm-project/pull/157403 These X86 builtins (`__builtin_ia32_pslldqi128/256_byteshift` and `__builtin_ia32_psrldqi128/256_byteshift`) can now be evaluated at compile time when the shift amount is a constant integer. This improves c

[clang] [clang] VectorExprEvaluator::VisitCallExpr - add constant folding for X86 pslldqi/psrldqi infrinsics (PR #157403)

2025-09-08 Thread via cfe-commits
https://github.com/kimyounhoex1 updated https://github.com/llvm/llvm-project/pull/157403 >From 38b90ecc3dc30668860cc80a6c8f075536764b5e Mon Sep 17 00:00:00 2001 From: kimyounhoex1 Date: Thu, 4 Sep 2025 00:55:24 +0900 Subject: [PATCH 1/5] todo list --- clang/lib/AST/ExprConstant.cpp | 4

[clang-tools-extra] [clang-tidy] make `misc-const-correctness` work with `auto` variables and lambdas (PR #157319)

2025-09-08 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > There is though Maybe I was looking at an outdated version, sorry! Looks good. https://github.com/llvm/llvm-project/pull/157319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-09-08 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA updated https://github.com/llvm/llvm-project/pull/144313 >From b2e5ee18bf7f03bbf5f99ef124ef707dc3116886 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Mon, 16 Jun 2025 08:55:06 +0100 Subject: [PATCH 1/5] first iteration of fix --- .../bde/types/bdlb_nu

[clang] [lldb] [clang] remove IsDefaulted bit from TemplateArgument (PR #155120)

2025-09-08 Thread Michael Buch via cfe-commits
@@ -48,7 +48,7 @@ int main() { // COMMON-SAME: templateParams: ![[PARAM:[0-9]+]] // COMMON: ![[PARAM]] = !{![[TEMPL_TYPE_PARAM:[0-9]+]]} // GDB: ![[TEMPL_TYPE_PARAM]] = !DITemplateTypeParameter(name: "T", type: ![[BAR_INT_TY]]) -// LLDB:![[TEMPL_TYPE_PARAM

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-08 Thread Nikita Popov via cfe-commits
nikic wrote: > Given this is in the `preopt` IR, the change would occur in an even earlier > stage, right? I'll see if I can get some IR out of whatever stage that may be. Yes, you're currently dumping the pre-LTO IR, but we'd want the full optimized one produced by the compiler. (Should be po

[clang] [Clang][NFC] Rename OMPLoopTransformationDirective to OMPCanonicalLoopNestTransformationDirective (PR #155848)

2025-09-08 Thread Roger Ferrer Ibáñez via cfe-commits
https://github.com/rofirrim closed https://github.com/llvm/llvm-project/pull/155848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][Mangle] Inject structor type into mangled name when mangling for LLDB JIT expressions (PR #155485)

2025-09-08 Thread Michael Buch via cfe-commits
Michael137 wrote: friendly ping https://github.com/llvm/llvm-project/pull/155485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 0a9b54b - [clang-tidy][NFC] Enable `readability-container-contains` check in clang-tidy config and apply fix-its (#157123)

2025-09-08 Thread via cfe-commits
Author: flovent Date: 2025-09-08T15:23:16+03:00 New Revision: 0a9b54b2b866a4ca4e345368feeaf825662328c5 URL: https://github.com/llvm/llvm-project/commit/0a9b54b2b866a4ca4e345368feeaf825662328c5 DIFF: https://github.com/llvm/llvm-project/commit/0a9b54b2b866a4ca4e345368feeaf825662328c5.diff LOG:

[clang] [llvm] [NFC][analyzer] Rename `ValistChecker.cpp` to `VAListChecker.cpp` (PR #157438)

2025-09-08 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/157438 ...to follow the capitalization style that was already applied within the file by recent commit a80c393a9c498279a1ec9fd630535b9ff139b49f. From e9978e652252e161eb48a09d798fd1b1eee486bc Mon Sep 17 00:00:00 2001

[clang-tools-extra] [clang-tidy][NFC] Enable `readability-container-contains` check in clang-tidy config and apply fix-its (PR #157123)

2025-09-08 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/157123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][analyzer] Rename `ValistChecker.cpp` to `VAListChecker.cpp` (PR #157438)

2025-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Donát Nagy (NagyDonat) Changes ...to follow the capitalization style that was already applied within the file by recent commit a80c393a9c498279a1ec9fd630535b9ff139b49f. --- Full diff: https://github.com/llvm/llvm-project

[clang] [NFC][analyzer] Fix copypaste error in security.VAList docs (PR #157440)

2025-09-08 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/157440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP][Clang] Remove __AMDGCN_WAVEFRONT_SIZE macros (PR #157463)

2025-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fabian Ritter (ritter-x2a) Changes Remove definitions, test uses, and documentation of the macros, which were deprecated in November 2024 with PR #112849 / #115507. Where required, the wavefront size should instead be queried via means pro

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-08 Thread Bhasawut Singhaphan via cfe-commits
https://github.com/markbhasawut created https://github.com/llvm/llvm-project/pull/157464 This PR updates the avg builtins to support constant expression handling, by extending the VectorExprEvaluator::VisitCallExpr that handles elementwise integer binop builtins. Closes #155390 >From 6a34a55

[clang] [HIP][Clang] Remove __AMDGCN_WAVEFRONT_SIZE macros (PR #157463)

2025-09-08 Thread Fabian Ritter via cfe-commits
ritter-x2a wrote: * **#157463** https://app.graphite.dev/github/pr/llvm/llvm-project/157463?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/1

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-08 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/157129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Using type deduction to define __SIZE_TYPE__ and __PTRDIFF_TYPE__ (PR #155979)

2025-09-08 Thread Erich Keane via cfe-commits
@@ -1175,13 +1175,15 @@ static void InitializePredefinedMacros(const TargetInfo &TI, Builder.defineMacro("__UINTMAX_C_SUFFIX__", ConstSuffix); Builder.defineMacro("__UINTMAX_C(c)", ConstSuffix.size() ? Twine("c##") + ConstSuffix : "c"); - DefineType(

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-09-08 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: FYI, this change caused some kinda noisy warnings from GCC, and the warnings don't sound entirely bogus: ``` In file included from ../../clang/include/clang/Serialization/ASTRecordReader.h:20, from ../../clang/lib/Serialization/ASTReaderDecl.cpp:55: ../../clang/

[clang] [clang-repl] Add support for running custom code in Remote JIT executor (PR #157358)

2025-09-08 Thread Vassil Vassilev via cfe-commits
@@ -135,11 +135,13 @@ class Interpreter { std::string OrcRuntimePath = ""; /// PID of the out-of-process JIT executor. uint32_t ExecutorPID = 0; +/// Custom lambda to be executed inside child process/executor +std::function CustomizeFork = nullptr; -

[clang] [clang-repl] Add support for running custom code in Remote JIT executor (PR #157358)

2025-09-08 Thread Vassil Vassilev via cfe-commits
@@ -135,11 +135,13 @@ class Interpreter { std::string OrcRuntimePath = ""; /// PID of the out-of-process JIT executor. uint32_t ExecutorPID = 0; +/// Custom lambda to be executed inside child process/executor +std::function CustomizeFork = nullptr; -

[clang] [Clang][OpenMP] Handle check for pointer-based array sections (PR #157443)

2025-09-08 Thread Amit Tiwari via cfe-commits
amitamd7 wrote: > Does this patch work for the > test_target_update_mapper_{to,from}_discontiguous tests? Yes Julian, for the compilation error marked in [SWDEV-553534](https://ontrack-internal.amd.com/browse/SWDEV-553534) https://github.com/llvm/llvm-project/pull/157443 _

[clang] [CodeGen] Fix cleanup attribute for C89 for-loop init variables (PR #156643)

2025-09-08 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi updated https://github.com/llvm/llvm-project/pull/156643 >From 471273e66583dbec3f145c7f5723a4d5b524d15b Mon Sep 17 00:00:00 2001 From: Jongmyeong Choi Date: Wed, 3 Sep 2025 18:41:46 +0900 Subject: [PATCH 1/4] [CodeGen] Fix cleanup attribute for C89 for-loop in

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-08 Thread Donát Nagy via cfe-commits
@@ -379,6 +386,111 @@ void DereferenceChecker::checkBind(SVal L, SVal V, const Stmt *S, C.addTransition(State, this); } +void DereferenceChecker::checkPreStmt(const BinaryOperator *Op, + CheckerContext &C) const { + if (!Op->isAdditiveO

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

2025-09-08 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea approved this pull request. Please update the description before you merge. https://github.com/llvm/llvm-project/pull/141573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] a80c393 - [analyzer] Consolidate the va_list checkers (#156682)

2025-09-08 Thread via cfe-commits
Author: Donát Nagy Date: 2025-09-08T13:16:24+02:00 New Revision: a80c393a9c498279a1ec9fd630535b9ff139b49f URL: https://github.com/llvm/llvm-project/commit/a80c393a9c498279a1ec9fd630535b9ff139b49f DIFF: https://github.com/llvm/llvm-project/commit/a80c393a9c498279a1ec9fd630535b9ff139b49f.diff LO

[clang] [analyzer] Consolidate the va_list checkers (PR #156682)

2025-09-08 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/156682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang-repl] Reimplement value printing using MemoryAccess to support in-process and out-of-process (PR #156649)

2025-09-08 Thread via cfe-commits
https://github.com/SahilPatidar updated https://github.com/llvm/llvm-project/pull/156649 >From 4a56b9825b7dda9b729bd2a7790526a3a7d286c7 Mon Sep 17 00:00:00 2001 From: SahilPatidar Date: Tue, 2 Sep 2025 12:08:29 +0530 Subject: [PATCH 1/4] [clang-repl] Reimplement value printing using MemoryAcce

[clang] [compiler-rt] [clang-repl] Reimplement value printing using MemoryAccess to support in-process and out-of-process (PR #156649)

2025-09-08 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 origin/main HEAD --extensions cpp,h -- compiler-rt/lib/orc/send_value.cpp clang/incl

[clang] [CIR] Fix assertion order in 'Address' (PR #157477)

2025-09-08 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/157477 We are checking the 'type' of 'pointer' before we are checking whether it is null or not! This is clearly incorrect, so this patch reorders the asserts. >From b0d937cc90e9797094248a7df1f5c5d8b373c015 Mon Se

[clang] 40edc34 - [docs][OpenMP] Update the status of GROUPPRIVATE in flang (#157470)

2025-09-08 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2025-09-08T09:40:34-05:00 New Revision: 40edc34782b3a804639042c2981c3c4ae6661a92 URL: https://github.com/llvm/llvm-project/commit/40edc34782b3a804639042c2981c3c4ae6661a92 DIFF: https://github.com/llvm/llvm-project/commit/40edc34782b3a804639042c2981c3c4ae6661a92

[clang] 17a7114 - [clang][bytecode] Use InterpState::InConstantContext directly (#157224)

2025-09-08 Thread via cfe-commits
Author: Timm Baeder Date: 2025-09-08T16:29:44+02:00 New Revision: 17a7114054ff13a4e58c3fd34a1c9f33f756 URL: https://github.com/llvm/llvm-project/commit/17a7114054ff13a4e58c3fd34a1c9f33f756 DIFF: https://github.com/llvm/llvm-project/commit/17a7114054ff13a4e58c3fd34a1c9f33f756.diff L

[clang] [CIR] Fix LLVM lowering crashes after #155244 (PR #157471)

2025-09-08 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 origin/main HEAD --extensions cpp -- clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.

[clang] [CIR] Fix assertion order in 'Address' (PR #157477)

2025-09-08 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/157477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Fix assertion order in 'Address' (PR #157477)

2025-09-08 Thread Morris Hafner via cfe-commits
https://github.com/mmha approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/157477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC][CLANG] DMF VSX Vector float GER 2x (rank-2 update) (PR #147383)

2025-09-08 Thread Maryam Moghadas via cfe-commits
https://github.com/maryammo edited https://github.com/llvm/llvm-project/pull/147383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Revert #115918, so empty base class optimization works again (PR #157480)

2025-09-08 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/157480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0833493 - [Clang][NFC] Rename OMPLoopTransformationDirective to OMPCanonicalLoopNestTransformationDirective (#155848)

2025-09-08 Thread via cfe-commits
Author: Roger Ferrer Ibáñez Date: 2025-09-08T10:47:01+02:00 New Revision: 0833493603e44d27771de23e9c925d04fb4a0525 URL: https://github.com/llvm/llvm-project/commit/0833493603e44d27771de23e9c925d04fb4a0525 DIFF: https://github.com/llvm/llvm-project/commit/0833493603e44d27771de23e9c925d04fb4a0525

[clang-tools-extra] [clang-tidy][NFC] Enable `modernize-use-auto` in clang-tidy config and fix warnings (PR #157468)

2025-09-08 Thread via cfe-commits
@@ -138,9 +138,9 @@ void UseIntegerSignComparisonCheck::check( return; const Expr *SubExprLHS = nullptr; const Expr *SubExprRHS = nullptr; - SourceRange R1 = SourceRange(LHS->getBeginLoc()); - SourceRange R2 = SourceRange(BinaryOp->getOperatorLoc()); - SourceRange R3

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-08 Thread Bhasawut Singhaphan via cfe-commits
https://github.com/markbhasawut updated https://github.com/llvm/llvm-project/pull/157464 >From c30c57337978904f756031a173816c1cc238e958 Mon Sep 17 00:00:00 2001 From: Bhasawut Singhaphan Date: Mon, 8 Sep 2025 15:51:33 +0700 Subject: [PATCH 1/2] [Headers][X86] Enable constexpr handling for MMX/

[clang] [docs][OpenMP] Update the status of GROUPPRIVATE in flang (PR #157470)

2025-09-08 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/157470 None >From 3696002c3ad21de3312dec9f0fe730010519ee9d Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Mon, 8 Sep 2025 09:17:33 -0500 Subject: [PATCH] [docs][OpenMP] Update the status of GROUPPRIVATE in

[clang] [NFC][analyzer] Fix copypaste error in security.VAList docs (PR #157440)

2025-09-08 Thread Donát Nagy via cfe-commits
NagyDonat wrote: As this patch is very trivial, I'll merge it without reviews when the CI succeeds. https://github.com/llvm/llvm-project/pull/157440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [CIR] Fix LLVM lowering crashes after #155244 (PR #157471)

2025-09-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Morris Hafner (mmha) Changes This patch replaces all uses of `replaceAllUseWith` with `replaceOp`. This fixes a number of regressions post #155244. --- Full diff: https://github.com/llvm/llvm-project/pull/157471.diff 1 Files Affected:

[clang] 85aebdb - [CIR] Fix lowering after 2929a2978cc3bdb0ff12a0e5d0a9236ff221f668

2025-09-08 Thread Michael Liao via cfe-commits
Author: Michael Liao Date: 2025-09-08T10:24:27-04:00 New Revision: 85aebdb4b32e27de665dc05358bf376d17f57189 URL: https://github.com/llvm/llvm-project/commit/85aebdb4b32e27de665dc05358bf376d17f57189 DIFF: https://github.com/llvm/llvm-project/commit/85aebdb4b32e27de665dc05358bf376d17f57189.diff

[clang-tools-extra] [clang-tidy][NFC] Enable `modernize-use-auto` in clang-tidy config and fix warnings (PR #157468)

2025-09-08 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, thank you https://github.com/llvm/llvm-project/pull/157468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] [flang] [libcxx] [libcxxabi] [lld] [lldb] [llvm] [Inclusive Language] migrate "sanity" checks to "soundness" checks (PR #156995)

2025-09-08 Thread Jay Foad via cfe-commits
jayfoad wrote: > Replacing `sanity` with `sound`, as in `sound of mind`, a _direct synonym_ > with the exact same connotation. > > Seems like it'd do more harm than good. I don't buy that argument at all. "Sound" has plenty of uses. It does not imply "sound of mind". https://github.com/llvm/

[clang] [llvm] [NFC][analyzer] Rename `ValistChecker.cpp` to `VAListChecker.cpp` (PR #157438)

2025-09-08 Thread Donát Nagy via cfe-commits
NagyDonat wrote: As this patch is very trivial and I already promised it within https://github.com/llvm/llvm-project/pull/156682 (which was reviewed), I'll merge it without a separate review when the CI succeeds. https://github.com/llvm/llvm-project/pull/157438 ___

[clang] [llvm] [OpenMP] Fix non-contiguous array omp target update (PR #156889)

2025-09-08 Thread Ivan R. Ivanov via cfe-commits
ivanradanov wrote: For reference, this is a test that exhibits the issue: ``` #include #define N 6 #define SLICE1 1:2:2 #define SLICE2 2:3 int main() { int darr[N][N]; for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) darr[i][j] = 100 + 10 * i + j; #pragma omp target enter

[clang] [clang] fix clang_cmake_builddir (PR #155844)

2025-09-08 Thread Nathan Gauër via cfe-commits
Keenuts wrote: @tstellar would you be the one to review the build files? https://github.com/llvm/llvm-project/pull/155844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang] remove IsDefaulted bit from TemplateArgument (PR #155120)

2025-09-08 Thread Michael Buch via cfe-commits
@@ -2125,9 +2125,9 @@ bool DWARFASTParserClang::ParseTemplateDIE( if (tag == DW_TAG_template_value_parameter && uval64_valid) { if (auto value = MakeAPValue(ast, clang_type, uval64)) { template_param_infos.InsertArg( - name, clang::TemplateA

[clang-tools-extra] [clang-tidy] make `misc-const-correctness` work with `auto` variables and lambdas (PR #157319)

2025-09-08 Thread Carlos Galvez via cfe-commits
@@ -10,6 +10,12 @@ template void type_dependent_variables() { T value = 42; auto &ref = value; + // CHECK-MESSAGES:[[@LINE-1]]:3: warning: variable 'ref' of type 'int &' can be declared 'const' + // CHECK-FIXES: auto const&ref = value; carlosgalvezp wr

[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)

2025-09-08 Thread Donát Nagy via cfe-commits
@@ -173,9 +178,11 @@ static bool isDeclRefExprToReference(const Expr *E) { return false; } -void DereferenceChecker::reportBug(const DerefBugType &BT, - ProgramStateRef State, const Stmt *S, - CheckerContext

[clang] [Clang][OpenMP] Handle check for pointer-based array sections (PR #157443)

2025-09-08 Thread Julian Brown via cfe-commits
jtb20 wrote: Does this patch work for the test_target_update_mapper_{to,from}_discontiguous tests? https://github.com/llvm/llvm-project/pull/157443 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

  1   2   >