[clang] [clang] Forbid reinterpret_cast of function pointers in constexpr. (PR #150557)

2025-07-25 Thread Timm Baeder via cfe-commits
@@ -3,8 +3,8 @@ // RUN: %clang_cc1 -x c -fsyntax-only %s -verify=c -std=c11 -fexperimental-new-constant-interpreter // RUN: %clang_cc1 -x c -fsyntax-only %s -pedantic -verify=c-pedantic -std=c11 -fexperimental-new-constant-interpreter // -// RUN: %clang_cc1 -x c++ -fsyntax-on

[clang] [clang] Fix issue with FoldingSet and DependentTemplateSpecialization… (PR #150559)

2025-07-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/150559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RFC] Do not eat SFINAE diagnostics for explicit template arguments (PR #139066)

2025-07-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/139066 >From a6ee1af04225063bab4d853611c7a57b1db37aa9 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu, 8 May 2025 19:42:51 +0800 Subject: [PATCH 1/4] [Clang] Do not eat SFINAE diagnostics for explicit template a

[clang-tools-extra] [clang-tidy] fix `bugprone-narrowing-conversions` false positive for conditional expression (PR #139474)

2025-07-25 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, please rebase on latest main, ReleaseNotes were cleared after 21th release. After that, could be merged. https://github.com/llvm/llvm-project/pull/139474 ___ cfe-commits mailing list cfe-co

[clang] [clang][bytecode] Diagnose subtracting pointers to array elements... (PR #150407)

2025-07-25 Thread Timm Baeder via cfe-commits
tbaederr wrote: This breaks a bunch of libc++ tests in its current form. https://github.com/llvm/llvm-project/pull/150407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][llvm] Support fixed-length vector inline assembly constraints (PR #150724)

2025-07-25 Thread Brandon Wu via cfe-commits
4vtomat wrote: > Please can you add a LLVM IR test for `llc`? Yeah sure! > I don't think I know enough about the "fixed vectors in scalable vectors" > lowering to know if `splitValueIntoRegisterParts` and > `joinRegisterPartsIntoValue` are correct but they don't seem so wrong at a > glance.

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-25 Thread via cfe-commits
@@ -1,22 +1,22 @@ -// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -// CHECK: @[[LAMBDA_KERNEL3:[^\w]+]] = private unnamed_addr addrspace(1) constant [[LAMBDA_K3_SIZE:\[[0-9]+ x i8\]]] c"_ZTSZ4m

[clang] [llvm] [RISCV][llvm] Support fixed-length vector inline assembly constraints (PR #150724)

2025-07-25 Thread Brandon Wu via cfe-commits
@@ -0,0 +1,39 @@ +// REQUIRES: riscv-registered-target + +// RUN: %clang_cc1 -triple riscv32 -target-feature +v \ +// RUN: -mvscale-min=2 -mvscale-max=2 -O2 -emit-llvm %s -o - \ +// RUN: | FileCheck %s +// RUN: %clang_cc1 -triple riscv64 -target-feature +v \ +// RUN: -

[clang] [llvm] [RISCV][llvm] Support fixed-length vector inline assembly constraints (PR #150724)

2025-07-25 Thread Craig Topper via cfe-commits
@@ -0,0 +1,39 @@ +// REQUIRES: riscv-registered-target + +// RUN: %clang_cc1 -triple riscv32 -target-feature +v \ +// RUN: -mvscale-min=2 -mvscale-max=2 -O2 -emit-llvm %s -o - \ +// RUN: | FileCheck %s +// RUN: %clang_cc1 -triple riscv64 -target-feature +v \ +// RUN: -

[clang] [clang] Forbid reinterpret_cast of function pointers in constexpr. (PR #150557)

2025-07-25 Thread Timm Baeder via cfe-commits
@@ -3,8 +3,8 @@ // RUN: %clang_cc1 -x c -fsyntax-only %s -verify=c -std=c11 -fexperimental-new-constant-interpreter // RUN: %clang_cc1 -x c -fsyntax-only %s -pedantic -verify=c-pedantic -std=c11 -fexperimental-new-constant-interpreter // -// RUN: %clang_cc1 -x c++ -fsyntax-on

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-07-25 Thread JJ Marr via cfe-commits
jj-marr wrote: I broke my Gentoo installation during a system update so I haven't been able to work on this PR. TBD on when it'll be fixed. https://github.com/llvm/llvm-project/pull/146970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

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

2025-07-25 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj updated https://github.com/llvm/llvm-project/pull/135807 >From 9c56e59ba9984c14c15a8d5a95a02e7192a64e8f Mon Sep 17 00:00:00 2001 From: Ritanya B Bharadwaj Date: Sun, 6 Apr 2025 09:33:06 -0500 Subject: [PATCH 01/11] [OpenMP] Parsing Support of ThreadSets in

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-07-25 Thread Alexey Bataev via cfe-commits
@@ -11664,6 +11664,17 @@ def note_omp_implicit_dsa : Note< "implicitly determined as %0">; def err_omp_loop_var_dsa : Error< "loop iteration variable in the associated loop of 'omp %1' directive may not be %0, predetermined as %2">; +def err_omp_not_canonical_loop : Error<

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-07-25 Thread Alexey Bataev via cfe-commits
@@ -11664,6 +11664,17 @@ def note_omp_implicit_dsa : Note< "implicitly determined as %0">; def err_omp_loop_var_dsa : Error< "loop iteration variable in the associated loop of 'omp %1' directive may not be %0, predetermined as %2">; +def err_omp_not_canonical_loop : Error<

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-07-25 Thread Alexey Bataev via cfe-commits
@@ -11664,6 +11664,17 @@ def note_omp_implicit_dsa : Note< "implicitly determined as %0">; def err_omp_loop_var_dsa : Error< "loop iteration variable in the associated loop of 'omp %1' directive may not be %0, predetermined as %2">; +def err_omp_not_canonical_loop : Error<

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-07-25 Thread Alexey Bataev via cfe-commits
@@ -2162,6 +2162,10 @@ enum CXCursorKind { */ CXCursor_OMPStripeDirective = 310, + /** OpenMP fuse directive + */ + CXCursor_OMPFuseDirective = 318, alexey-bataev wrote: ```suggestion CXCursor_OMPFuseDirective = 311, ``` https://github.com/llvm/l

[clang-tools-extra] 8059482 - [clang-doc] add param comments to comment template (#150571)

2025-07-25 Thread via cfe-commits
Author: Erick Velez Date: 2025-07-25T11:16:04-07:00 New Revision: 80594820512605f25993b28d0aab2214d5308d59 URL: https://github.com/llvm/llvm-project/commit/80594820512605f25993b28d0aab2214d5308d59 DIFF: https://github.com/llvm/llvm-project/commit/80594820512605f25993b28d0aab2214d5308d59.diff L

[clang-tools-extra] [clang-doc] add param comments to comment template (PR #150571)

2025-07-25 Thread Erick Velez via cfe-commits
https://github.com/evelez7 closed https://github.com/llvm/llvm-project/pull/150571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly handle taking the address of an explicit object member function template (PR #147046)

2025-07-25 Thread Shafik Yaghmour via cfe-commits
@@ -4981,7 +4986,7 @@ TemplateDeductionResult Sema::DeduceTemplateArguments( Result = FinishTemplateArgumentDeduction( ConversionTemplate, Deduced, 0, ConversionSpecialized, Info, &OriginalCallArgs, /*PartialOverloading=*/false, -/*PartialOrdering=*/

[clang-tools-extra] [clang-doc] add return comments to comment template (PR #150647)

2025-07-25 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/150647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Handle pruned-edges (null blocks) in dataflow (PR #150670)

2025-07-25 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/150670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-07-25 Thread Alexey Bataev via cfe-commits
@@ -1479,7 +1492,109 @@ class SemaOpenMP : public SemaBase { bool checkTransformableLoopNest( OpenMPDirectiveKind Kind, Stmt *AStmt, int NumLoops, SmallVectorImpl &LoopHelpers, - Stmt *&Body, SmallVectorImpl> &OriginalInits); + Stmt *&Body, SmallVectorIm

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-07-25 Thread Alexey Bataev via cfe-commits
@@ -3256,9 +3256,8 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { var, ConvertTypeForMem(VD->getType()), getContext().getDeclAlign(VD)); // No other cases for now. -} else { +} else alexey-bataev wrote: Restore br

[clang] [LifetimeSafety] Handle pruned-edges (null blocks) in dataflow (PR #150670)

2025-07-25 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/150670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Handle pruned-edges (null blocks) in dataflow (PR #150670)

2025-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: Utkarsh Saxena (usx95) Changes Fix a crash in the lifetime safety dataflow analysis when handling null CFG blocks. Added a null check for adjacent blocks in the dataflow analysis algorithm to prevent d

[clang] [LifetimeSafety] Handle pruned-edges (null blocks) in dataflow (PR #150670)

2025-07-25 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/150670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] add return comments to comment template (PR #150647)

2025-07-25 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/150647 >From cb68a058a60158d144af7395aa23346324687964 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Wed, 23 Jul 2025 11:25:05 -0700 Subject: [PATCH 1/2] [clang-doc] precommit return comments test --- .../clang-doc

[clang-tools-extra] [clang-doc] place HTML/JSON output inside their own directories (PR #150655)

2025-07-25 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. Is the plan just to handle this for JSON and Mustache for now, and when we have templates for Markdown (and whatever else) they'll just use this pattern? And I guess migrate any tests we want to keep for HTML once we switch to the mustache

[clang] 479ae4a - Revert "fix: replace report_fatal_error with Diags and exit" (#150662)

2025-07-25 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-07-25T13:24:00-04:00 New Revision: 479ae4aa8fe894dbb00a895b98620120c5e06769 URL: https://github.com/llvm/llvm-project/commit/479ae4aa8fe894dbb00a895b98620120c5e06769 DIFF: https://github.com/llvm/llvm-project/commit/479ae4aa8fe894dbb00a895b98620120c5e06769.diff

[clang] [llvm] Revert "fix: replace report_fatal_error with Diags and exit" (PR #150662)

2025-07-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/150662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "fix: replace report_fatal_error with Diags and exit" (PR #150662)

2025-07-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/150662 Reverts llvm/llvm-project#147959 >From a413ff23ce599eb42a537460c3e240dfd58b87fd Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 25 Jul 2025 13:23:38 -0400 Subject: [PATCH] Revert "fix: replace repo

[clang] [llvm] fix: replace report_fatal_error with Diags and exit (PR #147959)

2025-07-25 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Reverting the changes because these failures look related to the patch. I *think* we're missing a call to `initSanitizers()` somewhere, possibly in `SanitizerSpecialCaseList::create()`. I don't have the bandwidth to try to debug it now, hence the revert. https://github.com

[clang] [llvm] Revert "fix: replace report_fatal_error with Diags and exit" (PR #150662)

2025-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support @llvm/pr-subscribers-clang-driver Author: Aaron Ballman (AaronBallman) Changes Reverts llvm/llvm-project#147959 --- Full diff: https://github.com/llvm/llvm-project/pull/150662.diff 14 Files Affected: - (modified) clang/include/clang/AST/

[clang] [llvm] Revert "fix: replace report_fatal_error with Diags and exit" (PR #150662)

2025-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Reverts llvm/llvm-project#147959 --- Full diff: https://github.com/llvm/llvm-project/pull/150662.diff 14 Files Affected: - (modified) clang/include/clang/AST/ASTContext.h (-2) - (modified) clang/inc

[clang] 6cbcfb9 - [OpenACC] Fix Sema 'reduction' to allow arrays

2025-07-25 Thread via cfe-commits
Author: erichkeane Date: 2025-07-25T10:26:10-07:00 New Revision: 6cbcfb9a7cb79658c315732b1d7d86ce8a52bc45 URL: https://github.com/llvm/llvm-project/commit/6cbcfb9a7cb79658c315732b1d7d86ce8a52bc45 DIFF: https://github.com/llvm/llvm-project/commit/6cbcfb9a7cb79658c315732b1d7d86ce8a52bc45.diff LO

[clang] [LifetimeSafety] Implement a basic use-after-free diagnostic (PR #149731)

2025-07-25 Thread Gábor Horváth via cfe-commits
@@ -492,7 +522,8 @@ class FactGenerator : public ConstStmtVisitor { // Check if the loan is for a stack variable and if that variable // is the one being destructed. if (LoanPath.D == DestructedVD) -CurrentBlockFacts.push_back(FactMgr.createFact(L.ID)

[clang] [LifetimeSafety] Implement a basic use-after-free diagnostic (PR #149731)

2025-07-25 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun commented: Overall looks good but will want to have another pass. Added some random comments most of which are probably not actionable at the moment. https://github.com/llvm/llvm-project/pull/149731 ___ cfe-commits mailin

[clang] [LifetimeSafety] Implement a basic use-after-free diagnostic (PR #149731)

2025-07-25 Thread Gábor Horváth via cfe-commits
@@ -910,24 +961,129 @@ class ExpiredLoansAnalysis Lattice transfer(Lattice In, const IssueFact &F) { return Lattice(Factory.remove(In.Expired, F.getLoanID())); } + + ExpiredLoanMap getExpiredLoans(ProgramPoint P) { return getState(P).Expired; } }; // =

[clang] [LifetimeSafety] Implement a basic use-after-free diagnostic (PR #149731)

2025-07-25 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/149731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Implement a basic use-after-free diagnostic (PR #149731)

2025-07-25 Thread Gábor Horváth via cfe-commits
@@ -19,14 +19,35 @@ #define LLVM_CLANG_ANALYSIS_ANALYSES_LIFETIMESAFETY_H #include "clang/Analysis/AnalysisDeclContext.h" #include "clang/Analysis/CFG.h" +#include "clang/Basic/SourceLocation.h" +#include "llvm/ADT/DenseMapInfo.h" +#include "llvm/ADT/ImmutableMap.h" #include "

[clang-tools-extra] [clang-doc] place HTML/JSON output inside their own directories (PR #150655)

2025-07-25 Thread Erick Velez via cfe-commits
evelez7 wrote: > Is the plan just to handle this for JSON and Mustache for now, and when we > have templates for Markdown (and whatever else) they'll just use this > pattern? And I guess migrate any tests we want to keep for HTML once we > switch to the mustache implementation by default? Tha

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-25 Thread via cfe-commits
jeremyd2019 wrote: > That said, I also encountered the same issue with BFD-ld (when building > libc++ with @tyan0's patches from cygwin-packages), so I should try to > reproduce it again to be sure. It may take a few days to rebuild and > investigate... What I saw is probably a bug in LLD, an

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

2025-07-25 Thread via cfe-commits
@@ -24,6 +26,48 @@ using namespace llvm; using namespace llvm::dxil; namespace { +static const char *ResourceClassToString(llvm::dxil::ResourceClass Class) { + switch (Class) { + case ResourceClass::SRV: +return "SRV"; + case ResourceClass::UAV: +return "UAV"; + ca

[clang] [llvm] [WebAssembly,clang] Add __builtin_wasm_test_function_pointer_signature (PR #150201)

2025-07-25 Thread Derek Schuff via cfe-commits
https://github.com/dschuff updated https://github.com/llvm/llvm-project/pull/150201 >From 6c3c8a1d43b3b06c6b38e8e3d2e00ef2dc5fbc4e Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Mon, 7 Jul 2025 22:50:08 +0200 Subject: [PATCH 01/13] [WebAssembly,clang] Add __builtin_wasm_test_function_pointe

[clang] [llvm] [WebAssembly,clang] Add __builtin_wasm_test_function_pointer_signature (PR #150201)

2025-07-25 Thread Derek Schuff via cfe-commits
@@ -218,6 +221,64 @@ Value *CodeGenFunction::EmitWebAssemblyBuiltinExpr(unsigned BuiltinID, Function *Callee = CGM.getIntrinsic(Intrinsic::wasm_ref_null_func); return Builder.CreateCall(Callee); } + case WebAssembly::BI__builtin_wasm_test_function_pointer_signature:

[clang] [llvm] [WebAssembly,clang] Add __builtin_wasm_test_function_pointer_signature (PR #150201)

2025-07-25 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. https://github.com/llvm/llvm-project/pull/150201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ObjCARC] Completely remove ObjCARCAPElimPass (PR #150717)

2025-07-25 Thread via cfe-commits
https://github.com/AZero13 created https://github.com/llvm/llvm-project/pull/150717 ObjCARCAPElimPass has been made obsolete now that we remove unused autorelease pools. >From 85d32f0a84881412ed782aedda8cea6f1fa17cd8 Mon Sep 17 00:00:00 2001 From: Rose Date: Fri, 25 Jul 2025 19:01:43 -0400 Su

[clang] [llvm] [ObjCARC] Completely remove ObjCARCAPElimPass (PR #150717)

2025-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: AZero13 (AZero13) Changes ObjCARCAPElimPass has been made obsolete now that we remove unused autorelease pools. --- Full diff: https://github.com/llvm/llvm-project/pull/150717.diff 7 Files Affected: - (modified) clang/lib/CodeGen/Backe

[clang] [clang-format] fix typo in docs (PR #150658)

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

[clang] [flang] [llvm] [IR] Remove size argument from lifetime intrinsics (PR #150248)

2025-07-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Probably should release note, yes. Also, can we try to land some of the changes separately? I mean, some things can't land separately, or it would be a pain in the neck to land them separately because of test changes, but we can at least merge the SelectionDAG bits and t

[clang-tools-extra] [clang-doc] add return comments to comment template (PR #150647)

2025-07-25 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/150647 >From 8e02cb5be5a006631177c76ced0f246b82b16745 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Wed, 23 Jul 2025 11:25:05 -0700 Subject: [PATCH 1/2] [clang-doc] precommit return comments test --- .../clang-doc

[clang] 8b7dc4c - [clang] Fix issue with FoldingSet and DependentTemplateSpecialization… (#150559)

2025-07-25 Thread via cfe-commits
Author: premanandrao Date: 2025-07-25T15:21:30-04:00 New Revision: 8b7dc4cadb622e2b4a13155bffa5cec8c8fb6b8b URL: https://github.com/llvm/llvm-project/commit/8b7dc4cadb622e2b4a13155bffa5cec8c8fb6b8b DIFF: https://github.com/llvm/llvm-project/commit/8b7dc4cadb622e2b4a13155bffa5cec8c8fb6b8b.diff

[clang] [clang] Fix issue with FoldingSet and DependentTemplateSpecialization… (PR #150559)

2025-07-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/150559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] add return comments to comment template (PR #150647)

2025-07-25 Thread Erick Velez via cfe-commits
https://github.com/evelez7 reopened https://github.com/llvm/llvm-project/pull/150647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] add return comments to comment template (PR #150647)

2025-07-25 Thread Erick Velez via cfe-commits
https://github.com/evelez7 closed https://github.com/llvm/llvm-project/pull/150647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Andy Kaylor via cfe-commits
@@ -923,4 +923,129 @@ CIRGenFunction::emitArrayLength(const clang::ArrayType *origArrayType, return builder.getConstInt(*currSrcLoc, SizeTy, countFromCLAs); } +// TODO(cir): most part of this function can be shared between CIRGen +// and traditional LLVM codegen +void CIRGe

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Andy Kaylor via cfe-commits
@@ -1208,6 +1208,16 @@ cir::GlobalOp CIRGenModule::getGlobalForStringLiteral(const StringLiteral *s, return gv; } +void CIRGenModule::emitExplicitCastExprType(const ExplicitCastExpr *e, +CIRGenFunction *cgf) { + // Bind VLAs in t

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. Looks good, with a few nits. https://github.com/llvm/llvm-project/pull/150668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Andy Kaylor via cfe-commits
@@ -923,4 +923,129 @@ CIRGenFunction::emitArrayLength(const clang::ArrayType *origArrayType, return builder.getConstInt(*currSrcLoc, SizeTy, countFromCLAs); } +// TODO(cir): most part of this function can be shared between CIRGen +// and traditional LLVM codegen +void CIRGe

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Andy Kaylor via cfe-commits
@@ -923,4 +923,129 @@ CIRGenFunction::emitArrayLength(const clang::ArrayType *origArrayType, return builder.getConstInt(*currSrcLoc, SizeTy, countFromCLAs); } +// TODO(cir): most part of this function can be shared between CIRGen andykaylor wrote: ```sugge

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/150668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] add return comments to comment template (PR #150647)

2025-07-25 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/150647 >From b3aed4f0786a7084908473985d796f21caf58436 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Wed, 23 Jul 2025 11:25:05 -0700 Subject: [PATCH 1/2] [clang-doc] precommit return comments test --- .../clang-doc

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/150668 >From 2858cdcc7f217e59a5ebf6e6b6afbd3e9bdc6deb Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 25 Jul 2025 19:49:11 +0200 Subject: [PATCH 1/2] [CIR] Implement LValueBitcast for ComplexType --- clan

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Amr Hesham via cfe-commits
@@ -1208,6 +1208,16 @@ cir::GlobalOp CIRGenModule::getGlobalForStringLiteral(const StringLiteral *s, return gv; } +void CIRGenModule::emitExplicitCastExprType(const ExplicitCastExpr *e, +CIRGenFunction *cgf) { + // Bind VLAs in t

[clang] [flang] [llvm] [IR] Remove size argument from lifetime intrinsics (PR #150248)

2025-07-25 Thread Nikita Popov via cfe-commits
nikic wrote: I've added a release note. > Also, can we try to land some of the changes separately? I mean, some things > can't land separately, or it would be a pain in the neck to land them > separately because of test changes, but we can at least merge the > SelectionDAG bits and the analys

[clang-tools-extra] [clang-doc] add return comments to comment template (PR #150647)

2025-07-25 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/150647 >From d793f82c2f86568dbdb9005e18d4835158ac3c85 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Wed, 23 Jul 2025 11:25:05 -0700 Subject: [PATCH 1/2] [clang-doc] precommit return comments test --- .../clang-doc

[clang] [llvm] [WebAssembly,clang] Add __builtin_wasm_test_function_pointer_signature (PR #150201)

2025-07-25 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. https://github.com/llvm/llvm-project/pull/150201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly,clang] Add __builtin_wasm_test_function_pointer_signature (PR #150201)

2025-07-25 Thread Derek Schuff via cfe-commits
https://github.com/dschuff edited https://github.com/llvm/llvm-project/pull/150201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly,clang] Add __builtin_wasm_test_function_pointer_signature (PR #150201)

2025-07-25 Thread Derek Schuff via cfe-commits
https://github.com/dschuff updated https://github.com/llvm/llvm-project/pull/150201 >From 6c3c8a1d43b3b06c6b38e8e3d2e00ef2dc5fbc4e Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Mon, 7 Jul 2025 22:50:08 +0200 Subject: [PATCH 01/12] [WebAssembly,clang] Add __builtin_wasm_test_function_pointe

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-25 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/146355 >From fc3b77d8c4b5dd264bd746ed997bcea6cddaf389 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Mon, 30 Jun 2025 17:05:41 +0300 Subject: [PATCH 01/19] Initial implementation --- .../bugprone/unchecked-option

[clang] [Analysis] Prevent revisiting block when searching for noreturn vars (PR #150582)

2025-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Serge Pavlov (spavloff) Changes When searching for noreturn variable initializations, do not visit CFG blocks that are already visited, it prevents hanging the analysis. It must fix Ihttps://github.com/llvm/llvm-project/issues/150336. -

[clang] [Analysis] Prevent revisiting block when searching for noreturn vars (PR #150582)

2025-07-25 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff created https://github.com/llvm/llvm-project/pull/150582 When searching for noreturn variable initializations, do not visit CFG blocks that are already visited, it prevents hanging the analysis. It must fix Ihttps://github.com/llvm/llvm-project/issues/150336. >Fro

[clang] [llvm] [Clang][OpenMP] Non-contiguous strided update (PR #144635)

2025-07-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions h,cpp,c -- clang/test/OpenMP/target_update_strided_messages.

[clang] [flang] [flang][OpenMP] Add -f[no]-openmp-simd (PR #150269)

2025-07-25 Thread via cfe-commits
NimishMishra wrote: > It's a pretty niche feature in the grand scheme of things, hence I thought it > would be better to keep the code for it in its own file rather than all over > the core lowering logic. Wasted CPU cycles are the thing being traded off > here, but given that it is a niche fe

[clang] [flang] [flang][OpenMP] Add -f[no]-openmp-simd (PR #150269)

2025-07-25 Thread via cfe-commits
@@ -3706,14 +3706,19 @@ def fopenmp_relocatable_target : Flag<["-"], "fopenmp-relocatable-target">, def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">, Group, Flags<[NoArgumentUnused, HelpHidden]>, Visibility<[ClangOption, CC1Option]>; -def fope

[clang] [clang][driver] Improve warning message for complex range overrides and GCC incompatibility (PR #149028)

2025-07-25 Thread Shunsuke Watanabe via cfe-commits
s-watanabe314 wrote: > I'm not sure the combined warning is necessary. I think just stating that the > clang option overrides the GCC option is sufficient since there is no sense > in which clang-specific options can be incompatible with GCC if GCC doesn't > implement the option. In this patc

[clang] [llvm] fix: replace report_fatal_error with Diags and exit (PR #147959)

2025-07-25 Thread via cfe-commits
woruyu wrote: we can't use diagnostics in llvm-tools, so keep the overload function `std::string &Error`, which is called by llvm-cfi-verify.cpp or CodeCoverage.cpp ``` LLVM_ABI static std::unique_ptr create(const std::vector &Paths, llvm::vfs::FileSystem &FS, std::string &Error); //

[clang] [Clang][AArch64] Remove unwarranted 'cannot be used in non-streaming mode' diagnostic. (PR #150592)

2025-07-25 Thread Harald van Dijk via cfe-commits
@@ -5988,11 +5988,9 @@ bool clang::IsArmStreamingFunction(const FunctionDecl *FD, if (FD->hasAttr()) return true; - if (const Type *Ty = FD->getType().getTypePtrOrNull()) hvdijk wrote: This change looks like it should not be necessary for your mai

[clang] [libcxx] [libc++][Clang] Added explanation why is_constructible evaluated to false. Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-07-25 Thread Victor Campos via cfe-commits
vhscampos wrote: @egorshamshura This patch has caused a failure in libcxx tests: https://github.com/llvm/llvm-project/issues/150601 The failure only happens with a libcxx build without exceptions and RTTI. Can you please have a look at it? https://github.com/llvm/llvm-project/pull/144220

[clang] [Fuchsia] Add fputs workaround in baremetal targets (PR #150565)

2025-07-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux` running on `systemz-1` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/42/builds/5495 Here is the relevant piece of the build log f

[clang] [analyzer] Conversion to CheckerFamily: DereferenceChecker (PR #150442)

2025-07-25 Thread Donát Nagy via cfe-commits
@@ -158,115 +172,85 @@ static bool isDeclRefExprToReference(const Expr *E) { return false; } -void DereferenceChecker::reportBug(DerefKind K, ProgramStateRef State, - const Stmt *S, CheckerContext &C) const { - const BugType *BT = nullptr;

[clang] [analyzer] Conversion to CheckerFamily: DereferenceChecker (PR #150442)

2025-07-25 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/150442 From 4403a6e50ba82d3d2cc4bb50f1cbc5ecf718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 24 Jul 2025 17:17:05 +0200 Subject: [PATCH 1/2] [analyzer] Conversion to CheckerFamily: De

[clang] [Clang][AArch64] Remove unwarranted 'cannot be used in non-streaming mode' diagnostic. (PR #150592)

2025-07-25 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/150592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Conversion to CheckerFamily: DereferenceChecker (PR #150442)

2025-07-25 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/150442 From 4403a6e50ba82d3d2cc4bb50f1cbc5ecf718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 24 Jul 2025 17:17:05 +0200 Subject: [PATCH 1/3] [analyzer] Conversion to CheckerFamily: De

[clang] [analyzer] Conversion to CheckerFamily: DereferenceChecker (PR #150442)

2025-07-25 Thread Donát Nagy via cfe-commits
@@ -25,18 +25,22 @@ using namespace clang; using namespace ento; namespace { + +class DerefBugType : public BugType { + StringRef ArrayMsg, FieldMsg; + +public: + DerefBugType(CheckerFrontend *FE, StringRef Desc, const char *RMsg, + const char *FMsg = nullptr)

[clang] [Clang][Unittest] Support for `target` directive and `from` clause in clang unittests (PR #150580)

2025-07-25 Thread Amit Tiwari via cfe-commits
https://github.com/amitamd7 updated https://github.com/llvm/llvm-project/pull/150580 >From 4b0be55b282fcd5482ef4f8b52cb07127501c254 Mon Sep 17 00:00:00 2001 From: amtiwari Date: Fri, 25 Jul 2025 02:45:34 -0400 Subject: [PATCH] support_for_target_directive_clang_unittests --- clang/include/cla

[clang] [RISCV] Add negative pre-defined macro test for XSfmm* extension. NFC. (PR #150596)

2025-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Jim Lin (tclin914) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/150596.diff 1 Files Affected: - (modified) clang/test/Preprocessor/riscv-target-features-sifive.c (+16) ``diff diff --git a/clang/t

[clang] [flang] [mlir] Revert "[flang][flang-driver][mlir][OpenMP] atomic control support" (PR #150504)

2025-07-25 Thread Sergio Afonso via cfe-commits
skatrak wrote: I imagine we could fix the problem by removing the `-triple amdgcn-amd-amdgpu` option from the RUN lines of the new failing test, or by adding a `!REQUIRES: amdgpu-registered-target` if the option is needed. https://github.com/llvm/llvm-project/pull/150504 __

[clang] [RISCV] Add negative pre-defined macro test for XSfmm* extension. NFC. (PR #150596)

2025-07-25 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/150596 None >From 18bf25a06939d3063121e88c3053899c4e09a9f5 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Fri, 25 Jul 2025 16:37:38 +0800 Subject: [PATCH] [RISCV] Add negative pre-defined macro test for XSfmm* extensi

[clang] [llvm] [StackProtector] Introduce stack-protect-attributor pass to remove unnecessary protections. (PR #150390)

2025-07-25 Thread via cfe-commits
https://github.com/Mermen edited https://github.com/llvm/llvm-project/pull/150390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Fix crash while lazy-loading template specializations (PR #150430)

2025-07-25 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: I'd wait to hear from @hahnjo before merging. Should not take too long. https://github.com/llvm/llvm-project/pull/150430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-25 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Weak symbols do not work out well in PE/COFF They work just fine in clang+lld environments for mingw targets, but there's a handful of known issues relating to them with gcc+ld.bfd, for mingw. But apparently those issues don't hit cygwin targets. https://github.com/llvm/llvm

[clang] [clang-tools-extra] [llvm] [BOLT] Require CFG in BAT mode (PR #150488)

2025-07-25 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/150488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream Support Init ComplexType from 1 size InitList (PR #150293)

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

[clang] [clang][driver] Improve warning message for complex range overrides and GCC incompatibility (PR #149028)

2025-07-25 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > To be honest, I'm not entirely convinced of the value of having these > > warnings in the first place. RenderFloatingPointOptions is already pretty > > gnarly and hard to follow, and trying to capture what gcc would have done > > based on its priority system so we can w

[clang] [Clang][AArch64] Remove unwarranted 'cannot be used in non-streaming mode' diagnostic. (PR #150592)

2025-07-25 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/150592 Previously Clang would give an unwarranted error on the capture of '&a' in the function below, even though the parent function and the lambda are both `__arm_streaming` functions, when the target is compi

[clang] [Clang][AArch64] Remove unwarranted 'cannot be used in non-streaming mode' diagnostic. (PR #150592)

2025-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sander de Smalen (sdesmalen-arm) Changes Previously Clang would give an unwarranted error on the capture of '&a' in the function below, even though the parent function and the lambda are both `__arm_streaming` functions, when the target i

[clang] [analyzer] Fix FP for cplusplus.placement new #149240 (PR #150161)

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

[clang] [analyzer] Fix FP for cplusplus.placement new #149240 (PR #150161)

2025-07-25 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: I added some technical remarks in inline comments. If those are handled, I'm leaning towards merging this PR, because it I agree that these warnings (where the array would fit into the buffer where it's initialized, but the overhead of the array new can

[clang] [analyzer] Fix FP for cplusplus.placement new #149240 (PR #150161)

2025-07-25 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: %clang -fsyntax-only -Xclang -analyze -Xclang -analyzer-checker=cplusplus.PlacementNew -Xclang -verify -std=c++17 %s + +#include NagyDonat wrote: These tests do not include real system headers (if I understand correctly, this is becau

  1   2   3   4   >