[clang] [Clang-Repl] Add custom function as lambda in launchExecutor and fetch PID of launched executor (PR #147478)

2025-08-05 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/147478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Leandro Lupori via cfe-commits
https://github.com/luporl approved this pull request. LGTM, works on my machine. Thanks for digging deeper into the cause of the problem. https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [PATCH 1/7] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-05 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: My game plan for merging this PR is to merge all the other PRs into this branch, collapsing everything into a single PR again. Then wait for CI to pass, and merge it. Let me know if you have better ideas. https://github.com/llvm/llvm-project/pull/147835

[clang] [Clang] fix for heterogeneous chip's host side's MaybeODRUseExprs clear (PR #121085)

2025-08-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I don't think I understand this change. There at least needs to be a more detailed summary and tests. I imagine test would help clarify the intent better. https://github.com/llvm/llvm-project/pull/121085 ___ cfe-co

[clang] [Clang][Basic] Enable `__has_feature(cfi)` (PR #151348)

2025-08-05 Thread via cfe-commits
PiJoules wrote: @pcc @fmayer How would y'all feel about proceeding with how UBSan handles this and instead introducing one __has_feature for each of the cfi schemes as opposed to one global one? https://github.com/llvm/llvm-project/pull/151348 ___ cf

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-08-05 Thread Andy Kaylor via cfe-commits
@@ -630,6 +654,104 @@ ComplexExprEmitter::emitBinOps(const BinaryOperator *e, QualType promotionTy) { return binOpInfo; } +LValue ComplexExprEmitter::emitCompoundAssignLValue( +const CompoundAssignOperator *e, +mlir::Value (ComplexExprEmitter::*func)(const BinOpInfo

[clang] [clang][bytecode] Overrride locs for certain CXXConstructExprs (PR #152185)

2025-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Do it only if we will end up skipping the initializer anyway because it's a trivial copy or move constructor. --- Full diff: https://github.com/llvm/llvm-project/pull/152185.diff 4 Files Affected: - (modi

[clang] [clang][bytecode] Overrride locs for certain CXXConstructExprs (PR #152185)

2025-08-05 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/152185 Do it only if we will end up skipping the initializer anyway because it's a trivial copy or move constructor. >From 293e92d5f2273d7aedcc0567bda17f46e048ae35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-05 Thread Patryk Wychowaniec via cfe-commits
https://github.com/Patryk27 commented: It's a very nice catch! I think the code is good (modulo the comments already left by @benshi001) and it'd be nice to get this merged 🙂 https://github.com/llvm/llvm-project/pull/152028 ___ cfe-commits mailing li

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-05 Thread Patryk Wychowaniec via cfe-commits
@@ -112,8 +112,8 @@ while.end:; preds = %while.body, %entry define void @store16predec(ptr %x, i16 %y) { ; CHECK-LABEL: store16predec: -; CHECK: st -{{[XYZ]}}, {{.*}} -; CHECK: st -{{[XYZ]}}, {{.*}} +; TODO: st -{{[XYZ]}}, {{.*}} --

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-05 Thread Patryk Wychowaniec via cfe-commits
https://github.com/Patryk27 edited https://github.com/llvm/llvm-project/pull/152028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-05 Thread Patryk Wychowaniec via cfe-commits
https://github.com/Patryk27 edited https://github.com/llvm/llvm-project/pull/152028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AVR] Fix Avr indvar detection and strength reduction (missed optimization) (PR #152028)

2025-08-05 Thread Patryk Wychowaniec via cfe-commits
@@ -0,0 +1,56 @@ +//===- AVRTargetTransformInfo.h - AVR specific TTI -*- C++ -*-===// +// +// 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: Apache-2.

[clang] [clang] Fix crash in dynamic_cast final class optimization (PR #152076)

2025-08-05 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/152076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix crash in dynamic_cast final class optimization (PR #152076)

2025-08-05 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I think I'd prefer to split the pointer authentication changes into a separate patch; I'm not sure I'm comfortable reviewing that bit. Other changes look fine. https://github.com/llvm/llvm-project/pull/152076 _

[clang] [clang] Fix crash in dynamic_cast final class optimization (PR #152076)

2025-08-05 Thread Eli Friedman via cfe-commits
@@ -2294,6 +2294,18 @@ llvm::Value *CodeGenFunction::EmitDynamicCast(Address ThisAddr, DestRecordTy->getAsCXXRecordDecl()->isEffectivelyFinal() && CGM.getCXXABI().shouldEmitExactDynamicCast(DestRecordTy); + std::optional ExactCastInfo; + if

[clang] [clang] Fix crash in dynamic_cast final class optimization (PR #152076)

2025-08-05 Thread Eli Friedman via cfe-commits
@@ -1722,41 +1728,95 @@ llvm::Value *ItaniumCXXABI::emitExactDynamicCast( if (!Offset) Offset = PathOffset; else if (Offset != PathOffset) { - // Base appears in at least two different places. Find the most-derived - // object and see if it's a DestDecl.

[clang] [llvm] [HLSL][Sema] Use hlsl::BindingInfoBuilder instead of RangeInfo. NFC (PR #150634)

2025-08-05 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/150634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8a2d3f5 - [HLSL][Sema] Use hlsl::BindingInfoBuilder instead of RangeInfo. NFC (#150634)

2025-08-05 Thread via cfe-commits
Author: Justin Bogner Date: 2025-08-05T10:47:06-07:00 New Revision: 8a2d3f5653eb8b97049e06a98459a61db397c01c URL: https://github.com/llvm/llvm-project/commit/8a2d3f5653eb8b97049e06a98459a61db397c01c DIFF: https://github.com/llvm/llvm-project/commit/8a2d3f5653eb8b97049e06a98459a61db397c01c.diff

[clang] [clang][bytecode][NFC] Only collect non-null args if we have to (PR #152074)

2025-08-05 Thread Shafik Yaghmour via cfe-commits
@@ -2064,7 +2069,7 @@ bool Compiler::visitCallArgs(ArrayRef Args, return false; } -if (FuncDecl && NonNullArgs[ArgIndex]) { +if (HasNonNullAttr && NonNullArgs[ArgIndex]) { shafik wrote: Couldn't we just use `!NonNullArgs.empty()` rather th

[clang] [llvm] Trying to fix undefined symbol error caused by iterator variable (PR #141507)

2025-08-05 Thread via cfe-commits
ShashwathiNavada wrote: > Independent of your patch, the following seems to crash. Is it supposed to be > valid? Is there an open bug? > > ``` > typedef struct myvec { > int a; > double *b; > } myvec_t; > void foo() { > #pragma omp declare mapper(id: myvec_t v) map(iterator(it=0:v.a), t

[clang] [llvm] [HLSL][Sema] Use hlsl::BindingInfoBuilder instead of RangeInfo. NFC (PR #150634)

2025-08-05 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/150634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Peter Klausler via cfe-commits
https://github.com/klausler approved this pull request. Works for me; thanks! https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV][Zicfilp] Force user to use `-mcf-branch-label-scheme=unlabeled` (PR #152122)

2025-08-05 Thread Craig Topper via cfe-commits
@@ -356,6 +356,8 @@ def err_opt_not_valid_without_opt : Error< "option '%0' cannot be specified without '%1'">; def err_opt_not_valid_on_target : Error< "option '%0' cannot be specified on this target">; +def err_opt_unsupported_with_sugguest : Error< toppe

[clang] [clang] Introduce elementwise ctlz/cttz builtins (PR #131995)

2025-08-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > > We don't currently have a definition of what it means to "use" a value in a > > way that would cause undefined behavior with poison. > > Which means stating it produces undefined behavior less accurate? We have to document semantics that describe the behavior with all

[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

2025-08-05 Thread via cfe-commits
@@ -271,15 +237,29 @@ static void reportErrors(Module &M, DXILResourceMap &DRM, if (auto RSD = getRootSignature(RSBI, MMI)) { -llvm::hlsl::rootsig::RootSignatureBindingValidation Validation = -initRSBindingValidation(*RSD, tripleToVisibility(MMI.ShaderProfile));

[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

2025-08-05 Thread via cfe-commits
@@ -95,6 +97,8 @@ class BindingInfo { LLVM_ABI std::optional findAvailableBinding(dxil::ResourceClass RC, uint32_t Space, int32_t Size); + LLVM_ABI bool isBound(dxil::ResourceClass RC, uint32_t Space, BindingRange B); joaosaffran wrote: No, `findAvailab

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-08-05 Thread via cfe-commits
@@ -36,3 +36,8 @@ void* h(unsigned x) { // expected-error@+1 {{argument value 1048575 is outside the valid range [0, 65535]}} return __builtin_frame_address(0xF); } + +void *i() { +// expected-error@+1 {{too many arguments to function call, expected 0, have 1}} +return __

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-08-05 Thread via cfe-commits
moorabbit wrote: > I'm not sure if there is any expected difference in behavior between > STACKSAVE and STACKADDRESS On most targets, the behavior is the same. SPARC is an exception. `STACKADDRESS` needs to be expanded so it returns the starting address of the stack region that's available to

[clang] [HLSL][NFC] Move all resource tests under CodeGenHLSL\resources (PR #152035)

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

[clang] 3b2a1a5 - [HLSL][NFC] Move all resource tests under CodeGenHLSL\resources (#152035)

2025-08-05 Thread via cfe-commits
Author: Helena Kotas Date: 2025-08-05T10:05:05-07:00 New Revision: 3b2a1a5d9bb071bf210a2b070ee931b1d8e29b9e URL: https://github.com/llvm/llvm-project/commit/3b2a1a5d9bb071bf210a2b070ee931b1d8e29b9e DIFF: https://github.com/llvm/llvm-project/commit/3b2a1a5d9bb071bf210a2b070ee931b1d8e29b9e.diff

[clang] [llvm] [Clang][AMDGPU] Add builtins for some buffer resource atomics (PR #149216)

2025-08-05 Thread via cfe-commits
https://github.com/zGoldthorpe closed https://github.com/llvm/llvm-project/pull/149216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d7074b6 - [Clang][AMDGPU] Add builtins for some buffer resource atomics (#149216)

2025-08-05 Thread via cfe-commits
Author: zGoldthorpe Date: 2025-08-05T11:04:15-06:00 New Revision: d7074b63ed2022e27d3d9c884f0a4922b453b1f7 URL: https://github.com/llvm/llvm-project/commit/d7074b63ed2022e27d3d9c884f0a4922b453b1f7 DIFF: https://github.com/llvm/llvm-project/commit/d7074b63ed2022e27d3d9c884f0a4922b453b1f7.diff L

[clang] 913c5b4 - clang -cc1as: Remove a redundant initSections call

2025-08-05 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2025-08-05T10:02:53-07:00 New Revision: 913c5b4d1fffa00585edb6ba4f0915f29afa90cc URL: https://github.com/llvm/llvm-project/commit/913c5b4d1fffa00585edb6ba4f0915f29afa90cc DIFF: https://github.com/llvm/llvm-project/commit/913c5b4d1fffa00585edb6ba4f0915f29afa90cc.diff

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

2025-08-05 Thread Erich Keane via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) + return true; + +// Delay if this is not a function type.

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

2025-08-05 Thread Aaron Ballman via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) + return true; + +// Delay if this is not a function type.

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

2025-08-05 Thread Erich Keane via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) + return true; + +// Delay if this is not a function type.

[clang] [llvm] [Instrumentor] A configurable instrumentation pass plugin (PR #151551)

2025-08-05 Thread Asher Mancinelli via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: ashermancinelli wrote: Thank you for this! I would love to see a user of the plugin API built by default, both as extra assurance that the API maintained and to serve as documentatio

[clang] [llvm] [LLVM] Add GNU make jobserver support (PR #145131)

2025-08-05 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: ping. any further comments or concerns? thanks https://github.com/llvm/llvm-project/pull/145131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][AMDGPU] Add builtins for some buffer resource atomics (PR #149216)

2025-08-05 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/149216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Instrumentor] A configurable instrumentation pass plugin (PR #151551)

2025-08-05 Thread Asher Mancinelli via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: @@ -0,0 +1,86 @@ +//===- tools/plugins-shlib/ReferencePlugin.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with

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

2025-08-05 Thread Aaron Ballman via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) + return true; + +// Delay if this is not a function type.

[clang] [llvm] [Instrumentor] A configurable instrumentation pass plugin (PR #151551)

2025-08-05 Thread Asher Mancinelli via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: @@ -0,0 +1,341 @@ +//===-- Instrumentor.cpp - Highly configurable instrumentation pass ---===// ashermancinelli wrote: I like the instrumentor -

[clang] [Headers][X86] Allow AVX _mm256_set* intrinsics to be used in constexpr (PR #152173)

2025-08-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 c,h -- clang/lib/Headers/avxintrin.h clang/test/CodeGen/X86/

[clang] [Headers][X86] Allow AVX _mm256_set* intrinsics to be used in constexpr (PR #152173)

2025-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Simon Pilgrim (RKSimon) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/152173.diff 3 Files Affected: - (modified) clang/lib/Headers/avxintrin.h (+12-12) - (modified) clang/test/CodeGe

[clang] [Headers][X86] Allow AVX _mm256_set* intrinsics to be used in constexpr (PR #152173)

2025-08-05 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/152173 None >From ceee2231765e02a6ce53b545b16db6882c4464ba Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 5 Aug 2025 17:32:04 +0100 Subject: [PATCH] [Headers][X86] Allow AVX _mm256_set* intrinsics to be used

[clang] 258997c - [OpenACC][NFCI] Add 'InitRecipes' to 'firstprivate' AST node

2025-08-05 Thread via cfe-commits
Author: erichkeane Date: 2025-08-05T09:26:47-07:00 New Revision: 258997c16e4d5438207377d6ce4f9d608860d7ae URL: https://github.com/llvm/llvm-project/commit/258997c16e4d5438207377d6ce4f9d608860d7ae DIFF: https://github.com/llvm/llvm-project/commit/258997c16e4d5438207377d6ce4f9d608860d7ae.diff LO

[clang] [llvm] [Clang][AMDGPU] Add builtins for some buffer resource atomics (PR #149216)

2025-08-05 Thread via cfe-commits
https://github.com/zGoldthorpe updated https://github.com/llvm/llvm-project/pull/149216 >From c82bff38f45c65d8fbac77bd4ef3369a16b768d9 Mon Sep 17 00:00:00 2001 From: Zach Goldthorpe Date: Wed, 16 Jul 2025 17:45:04 -0500 Subject: [PATCH 1/6] Exposed some AMDGCN raw buffer atomic intrinsics to c

[clang] [Clang-Repl] Add custom function as lambda in launchExecutor and fetch PID of launched executor (PR #147478)

2025-08-05 Thread Abhinav Kumar via cfe-commits
https://github.com/kr-2003 updated https://github.com/llvm/llvm-project/pull/147478 >From 79849c3ba76ebf66fd7856fa92cd98af56ac49a6 Mon Sep 17 00:00:00 2001 From: kr-2003 Date: Tue, 1 Jul 2025 18:55:21 +0530 Subject: [PATCH 01/16] pipes for redirection in oop jit --- .../clang/Interpreter/Remo

[clang] Fix missing clang changes for #151983 (PR #152066)

2025-08-05 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: LGTM, thanks https://github.com/llvm/llvm-project/pull/152066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

2025-08-05 Thread Finn Plummer via cfe-commits
@@ -95,6 +97,8 @@ class BindingInfo { LLVM_ABI std::optional findAvailableBinding(dxil::ResourceClass RC, uint32_t Space, int32_t Size); + LLVM_ABI bool isBound(dxil::ResourceClass RC, uint32_t Space, BindingRange B); inbelic wrote: Isn't this equivalen

[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

2025-08-05 Thread Finn Plummer via cfe-commits
@@ -271,15 +237,29 @@ static void reportErrors(Module &M, DXILResourceMap &DRM, if (auto RSD = getRootSignature(RSBI, MMI)) { -llvm::hlsl::rootsig::RootSignatureBindingValidation Validation = -initRSBindingValidation(*RSD, tripleToVisibility(MMI.ShaderProfile));

[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

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

[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

2025-08-05 Thread Finn Plummer via cfe-commits
@@ -271,15 +237,29 @@ static void reportErrors(Module &M, DXILResourceMap &DRM, if (auto RSD = getRootSignature(RSBI, MMI)) { -llvm::hlsl::rootsig::RootSignatureBindingValidation Validation = -initRSBindingValidation(*RSD, tripleToVisibility(MMI.ShaderProfile));

[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

2025-08-05 Thread Finn Plummer via cfe-commits
https://github.com/inbelic commented: I also think some unneeded includes crept in. Eg: `` https://github.com/llvm/llvm-project/pull/146785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [clang] Respect [[gnu::error]] on functions passed to [[gnu::cleanup]] (PR #152082)

2025-08-05 Thread Eli Friedman via cfe-commits
@@ -624,8 +624,15 @@ namespace { CallArgList Args; Args.add(RValue::get(Arg), CGF.getContext().getPointerType(Var.getType())); - auto Callee = CGCallee::forDirect(CleanupFn); - CGF.EmitCall(FnInfo, Callee, ReturnValueSlot(), Args); + bo

[clang] [llvm] [InferAlignment] Propagate alignment between loads/stores of the same base pointer (PR #145733)

2025-08-05 Thread Drew Kersnar via cfe-commits
dakersnar wrote: Good call, they were not being handled correctly. Taking the `abs` of the offsets before calling `getLimitedValue` should do the trick as far as I can reason. https://github.com/llvm/llvm-project/pull/145733 ___ cfe-commits mailing l

[clang] [clang-repl] add %help, documentation, and tests for %commands (PR #150348)

2025-08-05 Thread Aaron Danen via cfe-commits
aadanen wrote: Nice! https://github.com/llvm/llvm-project/pull/150348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Drop assertion enforcing that assume args are known constants (PR #151908)

2025-08-05 Thread Balazs Benics via cfe-commits
steakhal 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/b

[clang] [analyzer] Drop assertion enforcing that assume args are known constants (PR #151908)

2025-08-05 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/32123

[clang] [analyzer] Add missing expected-warning after #151908 (PR #152162)

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

[clang] 6c9f1ce - [analyzer] Add missing expected-warning after #151908

2025-08-05 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2025-08-05T17:28:49+02:00 New Revision: 6c9f1ce429809e5a91683ed6cef9a435047bebd1 URL: https://github.com/llvm/llvm-project/commit/6c9f1ce429809e5a91683ed6cef9a435047bebd1 DIFF: https://github.com/llvm/llvm-project/commit/6c9f1ce429809e5a91683ed6cef9a435047bebd1.diff

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

2025-08-05 Thread Erich Keane via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) + return true; + +// Delay if this is not a function type.

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

2025-08-05 Thread Erich Keane via cfe-commits
@@ -7941,6 +7942,31 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() != 1) erichkeane wrote: I'm still a little surprised we

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

2025-08-05 Thread Aaron Ballman via cfe-commits
@@ -7941,6 +7942,32 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, return true; } + if (attr.getKind() == ParsedAttr::AT_CFISalt) { +if (attr.getNumArgs() == 0) + return true; + +// Delay if this is not a function type.

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

2025-08-05 Thread Aaron Ballman via cfe-commits
@@ -3643,6 +3643,95 @@ make the function's CFI jump table canonical. See :ref:`the CFI documentation }]; } +def CFISaltDocs : Documentation { + let Category = DocCatFunction; + let Heading = "cfi_salt"; + let Label = "langext-cfi_salt"; + let Content = [{ +The ``cfi_sal

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

2025-08-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,51 @@ +// RUN: %clang_cc1 -fsyntax-only -fsanitize=kcfi -verify %s + +#define __cfi_salt(S) __attribute__((cfi_salt(S))) + +int bad1() __cfi_salt(); // expected-error{{'cfi_salt' attribute takes one argument}} +int bad2() __cfi_salt(42); // expected-error{{expected str

[clang] [analyzer] Remove impossible BugType from CStringChecker (PR #152163)

2025-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes CStringChecker had an AdditionOverflow bug type which was intended for a situation where the analyzer concludes that the addition of two size/length values overflows `size_t`. I strongly suspect that the an

[clang] [analyzer] Add missing expected-warning after #151908 (PR #152162)

2025-08-05 Thread Balazs Benics via cfe-commits
steakhal wrote: This should fix the test failure introduced by #151908 https://github.com/llvm/llvm-project/pull/152162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Remove impossible BugType from CStringChecker (PR #152163)

2025-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Donát Nagy (NagyDonat) Changes CStringChecker had an AdditionOverflow bug type which was intended for a situation where the analyzer concludes that the addition of two size/length values overflows `size_t`. I strongly s

[clang] [analyzer] Add missing expected-warning after #151908 (PR #152162)

2025-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes This should fix the bots like: https://lab.llvm.org/buildbot/#/builders/10/builds/10899/steps/7/logs/FAIL__Clang__cxx23-assume-attribute_cpp ``` TEST 'Clang :: Analysi

[clang] [analyzer] Remove impossible BugType from CStringChecker (PR #152163)

2025-08-05 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/152163 CStringChecker had an AdditionOverflow bug type which was intended for a situation where the analyzer concludes that the addition of two size/length values overflows `size_t`. I strongly suspect that the ana

[clang] [analyzer] Add missing expected-warning after #151908 (PR #152162)

2025-08-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/152162 This should fix the bots like: https://lab.llvm.org/buildbot/#/builders/10/builds/10899/steps/7/logs/FAIL__Clang__cxx23-assume-attribute_cpp ``` TEST 'Clang :: Analysis/cxx23-assume-attribu

[clang] [llvm] [Clang][AMDGPU] Add builtins for some buffer resource atomics (PR #149216)

2025-08-05 Thread via cfe-commits
https://github.com/zGoldthorpe updated https://github.com/llvm/llvm-project/pull/149216 >From c82bff38f45c65d8fbac77bd4ef3369a16b768d9 Mon Sep 17 00:00:00 2001 From: Zach Goldthorpe Date: Wed, 16 Jul 2025 17:45:04 -0500 Subject: [PATCH 1/6] Exposed some AMDGCN raw buffer atomic intrinsics to c

[clang] [llvm] [Clang][AMDGPU] Add builtins for some buffer resource atomics (PR #149216)

2025-08-05 Thread via cfe-commits
https://github.com/zGoldthorpe updated https://github.com/llvm/llvm-project/pull/149216 >From c82bff38f45c65d8fbac77bd4ef3369a16b768d9 Mon Sep 17 00:00:00 2001 From: Zach Goldthorpe Date: Wed, 16 Jul 2025 17:45:04 -0500 Subject: [PATCH 1/6] Exposed some AMDGCN raw buffer atomic intrinsics to c

[clang] 74af2ce - [OpenACC] Fix 'type' checks in private/firstprivate for array types

2025-08-05 Thread via cfe-commits
Author: erichkeane Date: 2025-08-05T08:25:34-07:00 New Revision: 74af2cec7bbd307d1dcb7f9f3cdf339d551a1f9f URL: https://github.com/llvm/llvm-project/commit/74af2cec7bbd307d1dcb7f9f3cdf339d551a1f9f DIFF: https://github.com/llvm/llvm-project/commit/74af2cec7bbd307d1dcb7f9f3cdf339d551a1f9f.diff LO

[clang] [NFC][analyzer] Conversion to CheckerFamily: RetainCountChecker (PR #152138)

2025-08-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I don't think I have much to say here. Maybe, thank you :) I'm not too interested reviewing this. I scrolled through and in that 2 minutes I didn't spot any issues. Do a review and merge it. https://github.com/llvm/llvm-project/pull/152138

[clang] [NFC][analyzer] Conversion to CheckerFamily: RetainCountChecker (PR #152138)

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

[clang] [NFC][analyzer] Conversion to CheckerFamily: RetainCountChecker (PR #152138)

2025-08-05 Thread Balazs Benics via cfe-commits
@@ -25,25 +25,39 @@ namespace ento { namespace retaincountchecker { class RefCountBug : public BugType { + StringRef ReportMessage; + public: - enum RefCountBugKind { -UseAfterRelease, -ReleaseNotOwned, -DeallocNotOwned, -FreeNotOwned, -OverAutorelease,

[clang] clang: Make the type_info builtin declaration a singleton (PR #151277)

2025-08-05 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: Thanks! https://github.com/llvm/llvm-project/pull/151277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][NFCi] Pass if bind is to a Decl or not to checkBind (PR #152137)

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

[clang] [clang][analyzer][NFCi] Pass if bind is to a Decl or not to checkBind (PR #152137)

2025-08-05 Thread Balazs Benics via cfe-commits
@@ -175,9 +175,12 @@ class CheckerDocumentation /// \param Loc The value of the location (pointer). /// \param Val The value which will be stored at the location Loc. /// \param S The bind is performed while processing the statement S. + /// \param atDeclInit Whether t

[clang] [clang][analyzer][NFCi] Pass if bind is to a Decl or not to checkBind (PR #152137)

2025-08-05 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: We use UpperCamelCase style for variable names, including parameter names. Have you checked if any of the checkBind users used an `isa` or `dyncast` as a proxy to determine if its an assignment expression or an initialization? I suspect there could have be

[clang] 0a1eff2 - [analyzer] Drop assertion enforcing that assume args are known constants (#151908)

2025-08-05 Thread via cfe-commits
Author: Balazs Benics Date: 2025-08-05T17:03:53+02:00 New Revision: 0a1eff2ecedcb11acb3e9d4b75ee1e1bebd69a70 URL: https://github.com/llvm/llvm-project/commit/0a1eff2ecedcb11acb3e9d4b75ee1e1bebd69a70 DIFF: https://github.com/llvm/llvm-project/commit/0a1eff2ecedcb11acb3e9d4b75ee1e1bebd69a70.diff

[clang] [analyzer] Drop assertion enforcing that assume args are known constants (PR #151908)

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

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Flang] Search flang_rt in clang_rt path (PR #151954)

2025-08-05 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/151954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2e0ddbb - [clang] Use llvm::iterator_range::empty (NFC) (#152088)

2025-08-05 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-08-05T07:39:21-07:00 New Revision: 2e0ddbb5cd5b4c860cba6197b6977b96b9dde881 URL: https://github.com/llvm/llvm-project/commit/2e0ddbb5cd5b4c860cba6197b6977b96b9dde881 DIFF: https://github.com/llvm/llvm-project/commit/2e0ddbb5cd5b4c860cba6197b6977b96b9dde881.diff L

[clang] [CIR] Add support for __builtin_assume_aligned (PR #152152)

2025-08-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Sirui Mu (Lancern) Changes This patch upstreams CIRGen and LLVM lowering support for the `__builtin_assume_aligned` builtin function. --- Full diff: https://github.com/llvm/llvm-project/pull/152152.diff 9 Files Affected: - (modified)

[clang] [CIR] Add support for __builtin_assume_aligned (PR #152152)

2025-08-05 Thread Sirui Mu via cfe-commits
https://github.com/Lancern created https://github.com/llvm/llvm-project/pull/152152 This patch upstreams CIRGen and LLVM lowering support for the `__builtin_assume_aligned` builtin function. >From 46e1300ba7f0c2168a2157facf51834ed6549d00 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Tue, 5 Au

[clang] [C23] AST equivalence of attributes (PR #151196)

2025-08-05 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#152149 https://github.com/llvm/llvm-project/pull/151196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use llvm::iterator_range::empty (NFC) (PR #152088)

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

[clang] [C23] AST equivalence of attributes (PR #151196)

2025-08-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: /cherry-pick 30a5d56 https://github.com/llvm/llvm-project/pull/151196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Fixing Clang error for metadirective with multiple when clauses and no otherwise (PR #148583)

2025-08-05 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj closed https://github.com/llvm/llvm-project/pull/148583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1d594fd - [Clang][OpenMP] Fixing Clang error for metadirective with multiple when clauses and no otherwise (#148583)

2025-08-05 Thread via cfe-commits
Author: Ritanya-B-Bharadwaj Date: 2025-08-05T20:02:44+05:30 New Revision: 1d594fdb8d0d210893ae346bb6869343dd7a1949 URL: https://github.com/llvm/llvm-project/commit/1d594fdb8d0d210893ae346bb6869343dd7a1949 DIFF: https://github.com/llvm/llvm-project/commit/1d594fdb8d0d210893ae346bb6869343dd7a1949

[clang] [Clang][OpenMP] Fixing Clang error for metadirective with multiple when clauses and no otherwise (PR #148583)

2025-08-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam approved this pull request. Looks good. Thanks. https://github.com/llvm/llvm-project/pull/148583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGCNSPIRV][NFC] Match AMDGPU's `__builtin_va_list` type (PR #152044)

2025-08-05 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/152044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   7   8   9   10   >