[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)

2025-05-12 Thread Philipp Jung via cfe-commits
https://github.com/JungPhilipp updated https://github.com/llvm/llvm-project/pull/138282 >From 0567bc8e1168bb409ee759dd5505861a644a8ead Mon Sep 17 00:00:00 2001 From: Philipp Jung Date: Fri, 2 May 2025 15:22:40 +0200 Subject: [PATCH 1/7] Add check 'modernize-use-enum-class' Warn on non-class en

[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)

2025-05-12 Thread Philipp Jung via cfe-commits
https://github.com/JungPhilipp updated https://github.com/llvm/llvm-project/pull/138282 >From 0567bc8e1168bb409ee759dd5505861a644a8ead Mon Sep 17 00:00:00 2001 From: Philipp Jung Date: Fri, 2 May 2025 15:22:40 +0200 Subject: [PATCH 1/8] Add check 'modernize-use-enum-class' Warn on non-class en

[clang] [Preprocessor] Do not expand macros if the input is already preprocessed (PR #137665)

2025-05-12 Thread Juan Manuel Martinez Caamaño via cfe-commits
jmmartinez wrote: > module maps don't get preprocessed, so I don't think it matters what that is > set to. For normal module.modulemap files `Preprocessed` is `false`. I think > it's fine to remove the true and see if anything breaks, the preprocessor > just skips over that section anyway. Cu

[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)

2025-05-12 Thread Philipp Jung via cfe-commits
@@ -117,6 +117,11 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`cppcoreguidelines-use-enum-class JungPhilipp wrote: Done https://github.com/llvm/llvm-project/pull/138282 ___ cfe-commits mailing l

[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)

2025-05-12 Thread Philipp Jung via cfe-commits
@@ -198,7 +203,7 @@ Changes in existing checks diagnosing designated initializers for ``std::array`` initializations. - Improved :doc:`modernize-use-ranges - ` check by updating suppress + ` check by updating suppress JungPhilipp wrote: Done. Was added b

[clang] [llvm] [AArch64] Fix feature list for FUJITSU-MONAKA processor (PR #139212)

2025-05-12 Thread David Green via cfe-commits
davemgreen wrote: It looks like this came from #122280 / #122716. Sorry about the break, it should have updated the CPU dependencies correctly too. LGTM https://github.com/llvm/llvm-project/pull/139212 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] 5a1edf0 - [NFC] Optimize file kind determination (#139492)

2025-05-12 Thread via cfe-commits
Author: Serge Pavlov Date: 2025-05-12T15:22:44+07:00 New Revision: 5a1edf0f515ef7b1448ea0f9584a995ad6591865 URL: https://github.com/llvm/llvm-project/commit/5a1edf0f515ef7b1448ea0f9584a995ad6591865 DIFF: https://github.com/llvm/llvm-project/commit/5a1edf0f515ef7b1448ea0f9584a995ad6591865.diff

[clang] [NFC] Optimize file kind determination (PR #139492)

2025-05-12 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff closed https://github.com/llvm/llvm-project/pull/139492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9600a12 - [analyzer] Workaround for slowdown spikes (unintended scope increase) (#136720)

2025-05-12 Thread via cfe-commits
Author: Donát Nagy Date: 2025-05-12T10:56:29+02:00 New Revision: 9600a12f0de233324b559f60997b9c2db153fede URL: https://github.com/llvm/llvm-project/commit/9600a12f0de233324b559f60997b9c2db153fede DIFF: https://github.com/llvm/llvm-project/commit/9600a12f0de233324b559f60997b9c2db153fede.diff LO

[clang] [analyzer] Workaround for slowdown spikes (unintended scope increase) (PR #136720)

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

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp commented: Thanks! The PR is neater now! Please add a ReleaseNote as well. https://github.com/llvm/llvm-project/pull/139369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] 9e27db0 - [RISCV] Add Andes XAndesVPackFPH (Andes Vector Packed FP16) extension. (#138827)

2025-05-12 Thread via cfe-commits
Author: Jim Lin Date: 2025-05-12T16:58:39+08:00 New Revision: 9e27db0a50162023f25f119dc18a0f41b0824aac URL: https://github.com/llvm/llvm-project/commit/9e27db0a50162023f25f119dc18a0f41b0824aac DIFF: https://github.com/llvm/llvm-project/commit/9e27db0a50162023f25f119dc18a0f41b0824aac.diff LOG:

[clang] [llvm] [RISCV] Add Andes XAndesVPackFPH (Andes Vector Packed FP16) extension. (PR #138827)

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

[clang] [StaticAnalyzer] Handle `__builtin_bit_cast` (PR #139188)

2025-05-12 Thread Donát Nagy via cfe-commits
@@ -285,15 +285,43 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex, ExplodedNodeSet dstPreStmt; getCheckerManager().runCheckersForPreStmt(dstPreStmt, Pred, CastE, *this); - if (CastE->getCastKind() == CK_LValueToRValue || - CastE->getCastKind() =

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/139369 >From 1de7cc4392964c41db85a28a71295e69f6234f94 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 12 May 2025 13:19:06 +0800 Subject: [PATCH 1/2] [RISCV][MC] Add support for Q extension --- .../Driv

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/139369 >From 5baec475b8b1213f667a2e4bd9bfe16ba68b4786 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 12 May 2025 13:19:06 +0800 Subject: [PATCH 1/2] [RISCV][MC] Add support for Q extension --- .../Driv

[clang] [analyzer] Workaround for slowdown spikes (unintended scope increase) (PR #136720)

2025-05-12 Thread Balázs Benics via cfe-commits
balazs-benics-sonarsource wrote: Thanks for the fix, I'll proceed with the backport if you still believe it's worthy. @NagyDonat https://github.com/llvm/llvm-project/pull/136720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [Clang][AArch64] Add pessimistic vscale_range for sve/sme (PR #137624)

2025-05-12 Thread Matthew Devereau via cfe-commits
MDevereau wrote: @efriedma-quic Is it OK for me to revert back to parsing the target-features string without using `getFunctionFeatureMap` as it appears to have a bug? https://github.com/llvm/llvm-project/pull/137624 ___ cfe-commits mailing list cfe-

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread via cfe-commits
https://github.com/imkiva created https://github.com/llvm/llvm-project/pull/139519 This PR adds the missing intrinsic `__builtin_riscv_pause` for the zihintpause extension. Spec: https://five-embeddev.com/riscv-user-isa-manual/Priv-v1.12/zihintpause.html Fixes #129961

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kiva (imkiva) Changes This PR adds the missing intrinsic `__builtin_riscv_pause` for the zihintpause extension. Spec: https://five-embeddev.com/riscv-user-isa-manual/Priv-v1.12/zihintpause.html Fixes #129961 --- Full diff: http

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Kiva (imkiva) Changes This PR adds the missing intrinsic `__builtin_riscv_pause` for the zihintpause extension. Spec: https://five-embeddev.com/riscv-user-isa-manual/Priv-v1.12/zihintpause.html Fixes #129961 --- Full diff: htt

[clang] [llvm] [RISCV] Add Andes XAndesVPackFPH (Andes Vector Packed FP16) extension. (PR #138827)

2025-05-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang,llvm` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/5170 Here is the relevan

[clang] [Clang] Stop changing DC when instantiating dependent friend specializations (PR #139436)

2025-05-12 Thread Younan Zhang via cfe-commits
@@ -5751,14 +5751,16 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, RebuildTypeSourceInfoForDefaultSpecialMembers(); SetDeclDefaulted(Function, PatternDecl->getLocation()); } else { -NamedDecl *ND = Function; -DeclContext *DC

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-05-12 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: If there are any new test cases including those for only `Other == true`, can you move them to a future patch? https://github.com/llvm/llvm-project/pull/134337 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

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

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-05-12 Thread Owen Pan via cfe-commits
@@ -5685,11 +5685,27 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.is(tok::r_brace) && Left.is(tok::l_brace) && !Left.Children.empty()) { // Support AllowShortFunctionsOnASingleLine for JavaScript. - return Style.AllowShort

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-05-12 Thread Owen Pan via cfe-commits
@@ -291,54 +291,59 @@ class LineJoiner { auto ShouldMergeShortFunctions = [this, &I, &NextLine, PreviousLine, TheLine]() { - if (Style.AllowShortFunctionsOnASingleLine == FormatStyle::SFS_All) + if (Style.AllowShortFunctionsO

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Pengcheng Wang via cfe-commits
@@ -0,0 +1,153 @@ +//===-- RISCVInstrInfoQ.td - RISC-V 'Q' instructions ---*- tablegen -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
@@ -131,20 +131,22 @@ def FPR32INX : RegisterOperand { // The DAGOperand can be unset if the predicates are not enough to define it. class ExtInfo predicates, ValueType primaryvt, DAGOperand primaryty, DAGOperand f32ty, - DAGOperand f64ty, DAGOperand

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2025-05-12 Thread Paul Heidekrüger via cfe-commits
@@ -0,0 +1,50 @@ +.. title:: clang-tidy - cppcoreguidelines-pro-bounds-avoid-unchecked-container-accesses + +cppcoreguidelines-pro-bounds-avoid-unchecked-container-accesses +=== + +Flags calls to ``operator[]`` in STL co

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-05-12 Thread David Green via cfe-commits
https://github.com/davemgreen edited https://github.com/llvm/llvm-project/pull/135064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Compound Literal Statement Constant Expression Assertion Fix (PR #139479)

2025-05-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -7220,6 +7220,17 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, if (auto ILE = dyn_cast(LiteralExpr)) for (unsigned i = 0, j = ILE->getNumInits(); i != j; i++) { Expr *Init = ILE->getInit(i); +// C99 6.5.2.5 +

[clang] [Clang][RISCV] Add preprocessor macros for Zicfilp CFI scheme (PR #109600)

2025-05-12 Thread Kito Cheng via cfe-commits
@@ -238,6 +238,25 @@ void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts, else Builder.defineMacro("__riscv_32e"); } + + if (Opts.CFProtectionBranch) { +auto Scheme = Opts.getCFBranchLabelScheme(); +if (Scheme == CFBranchLabelSchemeKind::Default

[clang] [clang] Compound Literal Statement Constant Expression Assertion Fix (PR #139479)

2025-05-12 Thread Mariya Podchishchaeva via cfe-commits
@@ -7220,6 +7220,17 @@ Sema::BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, if (auto ILE = dyn_cast(LiteralExpr)) for (unsigned i = 0, j = ILE->getNumInits(); i != j; i++) { Expr *Init = ILE->getInit(i); +// C99 6.5.2.5 +

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/139369 >From 5ee05130e5735c1d0257f8fee66d61bdfd057087 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 12 May 2025 13:19:06 +0800 Subject: [PATCH] [RISCV][MC] Add support for Q extension --- .../Driver/p

[clang] ca3121b - [Clang][Driver] Fix condition in combineBackendCompile when using -no-integrated-cpp (#136853)

2025-05-12 Thread via cfe-commits
Author: Juan Manuel Martinez Caamaño Date: 2025-05-12T09:49:59+02:00 New Revision: ca3121b8981905d3be80c4297f50f761391dbf6c URL: https://github.com/llvm/llvm-project/commit/ca3121b8981905d3be80c4297f50f761391dbf6c DIFF: https://github.com/llvm/llvm-project/commit/ca3121b8981905d3be80c4297f50f76

[clang] [Clang][Driver] Fix condition in combineBackendCompile when using -no-integrated-cpp (PR #136853)

2025-05-12 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez closed https://github.com/llvm/llvm-project/pull/136853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Pengcheng Wang via cfe-commits
@@ -131,20 +131,22 @@ def FPR32INX : RegisterOperand { // The DAGOperand can be unset if the predicates are not enough to define it. class ExtInfo predicates, ValueType primaryvt, DAGOperand primaryty, DAGOperand f32ty, - DAGOperand f64ty, DAGOperand

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/139369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Optimize file kind determination (PR #139492)

2025-05-12 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez approved this pull request. Thanks @spavloff ! I'm sorry I didn't address the remarks earlier, I was out-of-office and didn't see the notifications. https://github.com/llvm/llvm-project/pull/139492 ___ cfe-commits mailing

[clang] fbf08a6 - [ObjectiveC] -rewrite-objc was treating inputs as preprocessed files (#137623)

2025-05-12 Thread via cfe-commits
Author: Juan Manuel Martinez Caamaño Date: 2025-05-12T09:50:15+02:00 New Revision: fbf08a68b8b292bef0823a401e4e22b60d859d51 URL: https://github.com/llvm/llvm-project/commit/fbf08a68b8b292bef0823a401e4e22b60d859d51 DIFF: https://github.com/llvm/llvm-project/commit/fbf08a68b8b292bef0823a401e4e22b

[clang] [ObjectiveC] -rewrite-objc was treating inputs as preprocessed files (PR #137623)

2025-05-12 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez closed https://github.com/llvm/llvm-project/pull/137623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/139369 >From fb1cd01c31abbc3f97a8cb03e6a7f5887aeb16fa Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 12 May 2025 13:19:06 +0800 Subject: [PATCH] [RISCV][MC] Add support for Q extension --- .../Driver/p

[clang] [NFC] Optimize file kind determination (PR #139492)

2025-05-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/13818 Here is the relevant piece of the

[clang] [llvm] [RISCV] Add Andes XAndesVPackFPH (Andes Vector Packed FP16) extension. (PR #138827)

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

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread Iris Shi via cfe-commits
@@ -0,0 +1,10 @@ +//===-- RISCVInstrInfoZihintpause.td ---*- tablegen -*-===// +// +// 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] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread Iris Shi via cfe-commits
@@ -147,6 +147,13 @@ def ntl_load : RISCVBuiltin<"void(...)">; def ntl_store : RISCVBuiltin<"void(...)">; } // Features = "zihintntl", Attributes = [CustomTypeChecking] +//===--===// +// Zihintpause extension.

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread via cfe-commits
https://github.com/imkiva updated https://github.com/llvm/llvm-project/pull/139519 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread via cfe-commits
@@ -0,0 +1,10 @@ +//===-- RISCVInstrInfoZihintpause.td ---*- tablegen -*-===// +// +// 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] [Clang][RFC] Do not eat SFINAE diagnostics for explicit template arguments (PR #139066)

2025-05-12 Thread Younan Zhang via cfe-commits
@@ -12166,6 +12174,15 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, diag::note_ovl_candidate_explicit_arg_mismatch_unnamed) << (index + 1); } + +if (PartialDiagnosticAt *PDiag = DeductionFailure.getSFINAEDiagnost

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread via cfe-commits
@@ -147,6 +147,13 @@ def ntl_load : RISCVBuiltin<"void(...)">; def ntl_store : RISCVBuiltin<"void(...)">; } // Features = "zihintntl", Attributes = [CustomTypeChecking] +//===--===// +// Zihintpause extension.

[clang] af03d6b - [AArch64][SVE] Refactor getPTrue to return splat(1) when pattern=all. (#139236)

2025-05-12 Thread via cfe-commits
Author: Ricardo Jesus Date: 2025-05-12T10:35:30+01:00 New Revision: af03d6b5186235620316640b58006b51301d316d URL: https://github.com/llvm/llvm-project/commit/af03d6b5186235620316640b58006b51301d316d DIFF: https://github.com/llvm/llvm-project/commit/af03d6b5186235620316640b58006b51301d316d.diff

[clang] [llvm] [AArch64][SVE] Refactor getPTrue to return splat(1) when pattern=all. (PR #139236)

2025-05-12 Thread Ricardo Jesus via cfe-commits
https://github.com/rj-jesus closed https://github.com/llvm/llvm-project/pull/139236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Stop changing DC when instantiating dependent friend specializations (PR #139436)

2025-05-12 Thread Younan Zhang via cfe-commits
@@ -5751,14 +5751,16 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, RebuildTypeSourceInfoForDefaultSpecialMembers(); SetDeclDefaulted(Function, PatternDecl->getLocation()); } else { -NamedDecl *ND = Function; -DeclContext *DC

[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-05-12 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[libclc] [libclc] Move sin, cos & sincos to CLC library (PR #139527)

2025-05-12 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/139527 >From 875c5fa90fff79456da734ae4be1e4590df6d127 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 1 May 2025 17:24:58 +0100 Subject: [PATCH 1/3] [libclc] Move sin, cos & sincos to CLC library This com

[libclc] [libclc] Move sin, cos & sincos to CLC library (PR #139527)

2025-05-12 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/139527 This commit moves the remaining FP64 sin and cos helper functions to the CLC library. As a consequence, it formally moves all sin, cos and sincos builtins to the CLC library. Previously, the FP16 and FP32 w

[libclc] [libclc] Move sin, cos & sincos to CLC library (PR #139527)

2025-05-12 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 cl,inc,h -- libclc/clc/include/clc/math/clc_cos.h libclc/clc

[libclc] [libclc] Move sin, cos & sincos to CLC library (PR #139527)

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

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-05-12 Thread via cfe-commits
@@ -1920,9 +1920,17 @@ static bool EvaluateComplex(const Expr *E, ComplexValue &Res, EvalInfo &Info); static bool EvaluateAtomic(const Expr *E, const LValue *This, APValue &Result, EvalInfo &Info); static bool EvaluateAsRValue(EvalInfo &Info, const E

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-05-12 Thread via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -1920,9 +1920,17 @@ static bool EvaluateComplex(c

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-05-12 Thread via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -17971,46 +18006,117 @@ static bool EvaluateBuilt

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-05-12 Thread via cfe-commits
=?utf-8?q?F=C3=A9lix?= Cloutier , =?utf-8?q?F=C3=A9lix?= Cloutier , =?utf-8?q?F=C3=A9lix?= Cloutier , =?utf-8?q?F=C3=A9lix?= Cloutier , =?utf-8?q?F=C3=A9lix?= Cloutier , =?utf-8?q?F=C3=A9lix?= Cloutier , =?utf-8?q?F=C3=A9lix?= Cloutier Message-ID: In-Reply-To: @@ -791,10 +791,2

[libclc] 4f107cd - [libclc] Move sin, cos & sincos to CLC library (#139527)

2025-05-12 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-05-12T11:32:15+01:00 New Revision: 4f107cd8f8b879fa611a7afbd70b9d029d2bdf29 URL: https://github.com/llvm/llvm-project/commit/4f107cd8f8b879fa611a7afbd70b9d029d2bdf29 DIFF: https://github.com/llvm/llvm-project/commit/4f107cd8f8b879fa611a7afbd70b9d029d2bdf29.diff

[libclc] [libclc] Move sin, cos & sincos to CLC library (PR #139527)

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

[clang-tools-extra] [clang-tidy] Add check performance-lost-std-move (PR #139525)

2025-05-12 Thread Oliver Stöneberg via cfe-commits
firewave wrote: See also #53489 and #57908. CC @Febbe https://github.com/llvm/llvm-project/pull/139525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Wasm][Clang] Add __builtin_wasm_ref_is_null_extern (PR #139580)

2025-05-12 Thread Sam Clegg via cfe-commits
@@ -741,6 +741,12 @@ __externref_t externref_null() { // WEBASSEMBLY-NEXT: ret } +int externref_is_null(__externref_t arg) { + return __builtin_wasm_ref_is_null_extern(arg); + // WEBASSEMBLY: tail call i32 @llvm.wasm.ref.is_null.extern(ptr addrspace(10) %arg)

[clang] [Wasm][Clang] Add __builtin_wasm_ref_is_null_extern (PR #139580)

2025-05-12 Thread Sam Clegg via cfe-commits
@@ -52,14 +52,33 @@ static bool CheckWasmBuiltinArgIsInteger(Sema &S, CallExpr *E, } bool SemaWasm::BuiltinWasmRefNullExtern(CallExpr *TheCall) { - if (TheCall->getNumArgs() != 0) + if (TheCall->getNumArgs() != 0) { sbc100 wrote: Maybe a comment explaining

[clang] e74877b - [Sema] Fix a warning

2025-05-12 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2025-05-12T10:16:00-07:00 New Revision: e74877bafebeff40f7213c199c8125bb49818fc1 URL: https://github.com/llvm/llvm-project/commit/e74877bafebeff40f7213c199c8125bb49818fc1 DIFF: https://github.com/llvm/llvm-project/commit/e74877bafebeff40f7213c199c8125bb49818fc1.diff L

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Andy Kaylor via cfe-commits
@@ -1401,18 +1401,19 @@ def ShiftOp : CIR_Op<"shift", [Pure]> { The `cir.shift` operation performs a bitwise shift, either to the left or to the right, based on the first operand. The second operand specifies the value to be shifted, and the third operand determine

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Andy Kaylor via cfe-commits
@@ -1399,8 +1400,10 @@ mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite( if (op.getIsShiftleft()) { rewriter.replaceOpWithNewOp(op, llvmTy, val, amt); } else { -assert(!cir::MissingFeatures::vectorType()); -bool isUnsigned = !cirValTy.isSigned(); +

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Andy Kaylor via cfe-commits
@@ -213,3 +213,68 @@ void foo4() { // OGCG: %[[TMP2:.*]] = load i32, ptr %[[IDX]], align 4 // OGCG: %[[ELE:.*]] = extractelement <4 x i32> %[[TMP1]], i32 %[[TMP2]] // OGCG: store i32 %[[ELE]], ptr %[[INIT]], align 4 + +void foo9() { andykaylor wrote: Can you a

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Andy Kaylor via cfe-commits
@@ -1401,18 +1401,19 @@ def ShiftOp : CIR_Op<"shift", [Pure]> { The `cir.shift` operation performs a bitwise shift, either to the left or to the right, based on the first operand. The second operand specifies the value to be shifted, and the third operand determine

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

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

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good. I just have a few minor suggestions. https://github.com/llvm/llvm-project/pull/139465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [WebAssembly][Clang] Add __builtin_wasm_ref_is_null_extern (PR #139580)

2025-05-12 Thread Hood Chatham via cfe-commits
https://github.com/hoodmane edited https://github.com/llvm/llvm-project/pull/139580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-12 Thread Donát Nagy via cfe-commits
@@ -143,6 +143,32 @@ if (LLVM_ENABLE_SPHINX) gen_rst_file_from_td(DiagnosticsReference.rst -gen-diag-docs ../include/clang/Basic/Diagnostic.td "${docs_targets}") gen_rst_file_from_td(ClangCommandLineReference.rst -gen-opt-docs ../include/clang/Driver/ClangOptionDocs.td

[clang] [llvm] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-05-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/8957 Here is the r

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-12 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,102 @@ + +Configuring the Analyzer + + +The clang static analyzer supports two kinds of options: + +1. Global **analyzer options** influence the behavior of the analyzer engine. + They are documented on this page, in the

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-12 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,102 @@ + +Configuring the Analyzer + + +The clang static analyzer supports two kinds of options: + +1. Global **analyzer options** influence the behavior of the analyzer engine. + They are documented on this page, in the

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-12 Thread Donát Nagy via cfe-commits
@@ -143,6 +143,32 @@ if (LLVM_ENABLE_SPHINX) gen_rst_file_from_td(DiagnosticsReference.rst -gen-diag-docs ../include/clang/Basic/Diagnostic.td "${docs_targets}") gen_rst_file_from_td(ClangCommandLineReference.rst -gen-opt-docs ../include/clang/Driver/ClangOptionDocs.td

[clang] [clang] Add hasAnyNameInVector matcher (PR #139594)

2025-05-12 Thread Florian Mayer via cfe-commits
fmayer wrote: > Are there any planned in-tree uses for this matcher? I had a downstream use planned. Does this mean I will have to reimplement `internal::HasNameMatcher`? https://github.com/llvm/llvm-project/pull/139594 ___ cfe-commits mailing list c

[clang] [RISCV] Improve casting between i1 scalable vectors and i8 fixed vectors for -mrvv-vector-bits (PR #139190)

2025-05-12 Thread Craig Topper via cfe-commits
@@ -1476,8 +1486,14 @@ CoerceScalableToFixed(CodeGenFunction &CGF, llvm::FixedVectorType *ToTy, // If we are casting a scalable i1 predicate vector to a fixed i8 // vector, first bitcast the source. if (FromTy->getElementType()->isIntegerTy(1) && - FromTy->getElemen

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-12 Thread Donát Nagy via cfe-commits
NagyDonat wrote: @steakhal Gentle ping. https://github.com/llvm/llvm-project/pull/135169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix Name Mangling Crashes (PR #134486)

2025-05-12 Thread via cfe-commits
https://github.com/Mr-Anyone converted_to_draft https://github.com/llvm/llvm-project/pull/134486 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-05-12 Thread via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID: In-Reply-To: @@ -1920,9 +1920,17 @@ static bool EvaluateComplex(c

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-05-12 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,242 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by reading `AnalyzerOptions.def`. + +import argparse +from collections import namedtuple +from enum import Enum, auto +import re +impo

[clang] [llvm] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-05-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-rhel` running on `ppc64le-clang-rhel-test` while building `clang,llvm` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/6958 Here is the releva

[clang] [llvm] [RISCV] Add `zihintpause` LLVM/Clang intrinsic (PR #139519)

2025-05-12 Thread Craig Topper via cfe-commits
topperc wrote: Add to the RISC-V section of the clang release notes? https://github.com/llvm/llvm-project/pull/139519 ___ 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 HTMLMustacheGenerator.cpp (PR #138060)

2025-05-12 Thread Daniel Thornburgh via cfe-commits
https://github.com/mysterymath approved this pull request. https://github.com/llvm/llvm-project/pull/138060 ___ 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 HTMLMustacheGenerator.cpp (PR #138060)

2025-05-12 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/138060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] fix wrapper cmath header to match #136101 (PR #139164)

2025-05-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Right now this checks for `libc++` less than 14. Is that still relevant following that change? https://github.com/llvm/llvm-project/pull/139164 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] Reduce number of run steps in ppc rop-protect test. (PR #139607)

2025-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sean Fertile (mandlebug) Changes Test was running both -mcpu=pwrN and -mcpu=powerN compile steps for power N = 8, 9 and 10. Reduce to one run step for each form using power8 for one instance and power 10 for the other. --- Full diff: htt

[clang] Reduce number of run steps in ppc rop-protect test. (PR #139607)

2025-05-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Sean Fertile (mandlebug) Changes Test was running both -mcpu=pwrN and -mcpu=powerN compile steps for power N = 8, 9 and 10. Reduce to one run step for each form using power8 for one instance and power 10 for the other. --- Full di

[clang] Reduce number of run steps in ppc rop-protect test. (PR #139607)

2025-05-12 Thread Sean Fertile via cfe-commits
https://github.com/mandlebug created https://github.com/llvm/llvm-project/pull/139607 Test was running both -mcpu=pwrN and -mcpu=powerN compile steps for power N = 8, 9 and 10. Reduce to one run step for each form using power8 for one instance and power 10 for the other. >From 5c551ba6ab687db

[clang] Reland [Clang] Deprecate `__is_trivially_relocatable` (PR #139061)

2025-05-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I don't know all the background here, so apologies if this is a silly > question, but we have some code that's checking: > > ``` > static_assert(__is_trivially_relocatable(std::pair)); > ``` > > which now triggers a -Wdeprecated-builtins warning. > > But if I switch to `

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
@@ -213,3 +213,68 @@ void foo4() { // OGCG: %[[TMP2:.*]] = load i32, ptr %[[IDX]], align 4 // OGCG: %[[ELE:.*]] = extractelement <4 x i32> %[[TMP1]], i32 %[[TMP2]] // OGCG: store i32 %[[ELE]], ptr %[[INIT]], align 4 + +void foo9() { AmrDeveloper wrote: Both of

[clang] [CIR] Upstream shift operators for VectorType (PR #139465)

2025-05-12 Thread Amr Hesham via cfe-commits
@@ -1399,8 +1400,10 @@ mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite( if (op.getIsShiftleft()) { rewriter.replaceOpWithNewOp(op, llvmTy, val, amt); } else { -assert(!cir::MissingFeatures::vectorType()); -bool isUnsigned = !cirValTy.isSigned(); +

[clang] [analyzer] Fix crashing __builtin_bit_cast (PR #139188)

2025-05-12 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/139188 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang] [llvm] [RISCV][MC] Add support for Q extension (PR #139369)

2025-05-12 Thread Craig Topper via cfe-commits
@@ -0,0 +1,151 @@ +//===-- RISCVInstrInfoQ.td - RISC-V 'Q' instructions ---*- tablegen -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

  1   2   3   4   5   >