[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-25 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: This should have a release note. https://github.com/llvm/llvm-project/pull/137429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Check for dummy pointers when calling pseudo dtors (PR #137437)

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

[clang] b8f5e3c - [clang][bytecode] Diagnose PointerToIntegral casts (#137444)

2025-04-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-26T07:11:30+02:00 New Revision: b8f5e3c573577a388f2674a88901faf760bca8a6 URL: https://github.com/llvm/llvm-project/commit/b8f5e3c573577a388f2674a88901faf760bca8a6 DIFF: https://github.com/llvm/llvm-project/commit/b8f5e3c573577a388f2674a88901faf760bca8a6.diff L

[clang] [clang][bytecode] Diagnose PointerToIntegral casts (PR #137444)

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

[clang] 4eb66f7 - [clang][bytecode] Allow memory leaks before C++20 (#137445)

2025-04-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-26T07:13:44+02:00 New Revision: 4eb66f7462d0ea89f9354df1fcb63cdb614adc28 URL: https://github.com/llvm/llvm-project/commit/4eb66f7462d0ea89f9354df1fcb63cdb614adc28 DIFF: https://github.com/llvm/llvm-project/commit/4eb66f7462d0ea89f9354df1fcb63cdb614adc28.diff L

[clang] [clang][bytecode] Allow memory leaks before C++20 (PR #137445)

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

[clang] [clang][bytecode] Diagnose destroying already dead locals (PR #137357)

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

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/137421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Check for dummy pointers when calling pseudo dtors (PR #137437)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/137437.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.cpp (+1-2) - (modified) clang/lib/AST/ByteCode/Interp.h (+2) - (modified

[clang] [clang][bytecode] Check for dummy pointers when calling pseudo dtors (PR #137437)

2025-04-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/137437 None >From 043c655ece82e3a167745000a102911cee56143f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 26 Apr 2025 04:53:56 +0200 Subject: [PATCH] [clang][bytecode] Check for dummy pointer

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-25 Thread Justin Bogner via cfe-commits
https://github.com/bogner commented: Description / commit message needs to be updated to match how this ended up, but otherwise this is looking pretty good. A couple of minor comments inline. https://github.com/llvm/llvm-project/pull/136386 ___ cfe-co

[clang] Fix crash with -ast-dump=json (PR #137324)

2025-04-25 Thread Akira Hatanaka via cfe-commits
@@ -211,6 +211,8 @@ Non-comprehensive list of changes in this release - Added `__builtin_elementwise_exp10`. - For AMDPGU targets, added `__builtin_v_cvt_off_f32_i4` that maps to the `v_cvt_off_f32_i4` instruction. - Added `__builtin_elementwise_minnum` and `__builtin_elementw

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-25 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Note to reviewers: `clang/test/ClangScanDeps/export.c` is the new test. The rest of the test changes are updates. https://github.com/llvm/llvm-project/pull/137421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-25 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/137429 clang currently issues a warning when memset is used on a struct that contains an address-discriminated pointer field, even though this is entirely valid behavior. For example: ``` struct S { int * __ptrau

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-04-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. https://github.com/llvm/llvm-project/pull/137393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Akira Hatanaka (ahatanak) Changes clang currently issues a warning when memset is used on a struct that contains an address-discriminated pointer field, even though this is entirely valid behavior. For example: ``` struct S { int * __

[clang] cfc5baf - [RISCV] SiFive CLIC Support (#132481)

2025-04-25 Thread via cfe-commits
Author: Sam Elliott Date: 2025-04-25T17:12:27-07:00 New Revision: cfc5baf6e6fc083fdbb584534a3fb8ea289752d2 URL: https://github.com/llvm/llvm-project/commit/cfc5baf6e6fc083fdbb584534a3fb8ea289752d2 DIFF: https://github.com/llvm/llvm-project/commit/cfc5baf6e6fc083fdbb584534a3fb8ea289752d2.diff L

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-04-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-expensive-checks-debian` running on `gribozavr4` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/16/builds/1

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-04-25 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar approved this pull request. https://github.com/llvm/llvm-project/pull/137393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly handle C# new modifier (PR #137430)

2025-04-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/137430 Fix #75815 >From f02cb0bca31a46e815fa3bc8df8a18d9757e5020 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 25 Apr 2025 18:41:48 -0700 Subject: [PATCH] [clang-format] Correctly handle C# new modifier Fix #7581

[clang] [clang-format] Correctly handle C# new modifier (PR #137430)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix #75815 --- Full diff: https://github.com/llvm/llvm-project/pull/137430.diff 3 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+7-1) - (modified) clang/unittests/Format/FormatT

[clang] [lld] [llvm] [X86] Implement disabling APX relocations and EPGR/NDD instrs for relocations (PR #136660)

2025-04-25 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > > Any comments? > > Still not understand the requirement... I'm confused by the test cases too. I understood the code as we replace the EGPR or NDD instructions with non-APX ones, which meets my expection. But the option and tests are in MC phase, which means instructions

[clang] [Clang][NFC] Const correctness fix for range based for loop (PR #137431)

2025-04-25 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/137431 Static analysis flagged that we did not make const a item declaration b/c we did not modify it all during the loop. >From 6b1e4f4c170c3f15697209f385397f295d15d2db Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour

[clang] [Clang][NFC] Const correctness fix for range based for loop (PR #137431)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Static analysis flagged that we did not make const a item declaration b/c we did not modify it all during the loop. --- Full diff: https://github.com/llvm/llvm-project/pull/137431.diff 1 Files Affected:

[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-25 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak ready_for_review https://github.com/llvm/llvm-project/pull/137429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][headers][Apple] Don't include_next float.h to avoid an unnecessary module dependency (PR #137432)

2025-04-25 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: This was originally added in d93779d / d89a1eb (can't find either of these in Phabricator) for `_HAS_SUBNORM`, but that's since been obsoleted by . So including this header just causes an unnecessary include and module build of Apple's

[clang] [clang][headers][Apple] Don't include_next float.h to avoid an unnecessary module dependency (PR #137432)

2025-04-25 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/137432 float.h doesn't define anything in Apple's SDKs that the clang float.h doesn't undefine, so all the include_next does is add an unnecessary module dependency. Skip the include_next and completely shad

[clang] [clang][headers][Apple] Don't include_next float.h to avoid an unnecessary module dependency (PR #137432)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Ian Anderson (ian-twilightcoder) Changes float.h doesn't define anything in Apple's SDKs that the clang float.h doesn't undefine, so all the include_next does is add an unnecessary module dependency. Skip the include_next and comple

[clang] [clang-format] Annotate tok::star in a*b*c as BinaryOperator (PR #137433)

2025-04-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/137433 Fix #137400 >From 62b436a3b71dd7109977b95afeda3db15e37d74c Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 25 Apr 2025 19:24:44 -0700 Subject: [PATCH] [clang-format] Annotate tok::star in a*b*c as BinaryOpera

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [clang-format] Annotate tok::star in a*b*c as BinaryOperator (PR #137433)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix #137400 --- Full diff: https://github.com/llvm/llvm-project/pull/137433.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+5-1) - (modified) clang/unittests/Format/TokenAnnota

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-25 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,39 @@ +; RUN: opt -S --dxil-prepare %s | FileCheck %s + +; This test tests the whitelist inside of DxilPrepare.cpp. +; It ensures that certain metadata nodes are removed that aren't +; in the whitelist, and that certain nodes may remain that +; are on the whitelist. + +

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-25 Thread Marco Elver via cfe-commits
https://github.com/melver updated https://github.com/llvm/llvm-project/pull/137133 >From d3324c1023533bf784a3c3c3ef095d07c865e6f9 Mon Sep 17 00:00:00 2001 From: Marco Elver Date: Wed, 23 Apr 2025 11:31:25 +0200 Subject: [PATCH 1/2] Thread Safety Analysis: Convert CapabilityExpr::CapExpr to hol

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-25 Thread Marco Elver via cfe-commits
@@ -434,6 +434,16 @@ class can be used as a capability. The string argument specifies the kind of capability in error messages, e.g. ``"mutex"``. See the ``Container`` example given above, or the ``Mutex`` class in :ref:`mutexheader`. +REENTRANT +- + +``REENTRANT``

[clang] [clang-repl] Handle frontend options for clang-repl before calling executeAction (PR #132670)

2025-04-25 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Hey @serge-sans-paille , Gentle ping. This should be ready from my side. Would be great if you could review it anytime soon. https://github.com/llvm/llvm-project/pull/132670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [CIR] Fix calling defined functions (PR #137271)

2025-04-25 Thread Erich Keane via cfe-commits
@@ -1,19 +1,20 @@ // RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - 2>&1 | FileCheck %s -void f1(); +void f1() {} void f2() { f1(); } -// CHECK-LABEL: cir.func @_Z2f1v +// CHECK-LABEL: cir.func @_Z2f1v erichkean

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-25 Thread Marco Elver via cfe-commits
https://github.com/melver updated https://github.com/llvm/llvm-project/pull/137133 >From d3324c1023533bf784a3c3c3ef095d07c865e6f9 Mon Sep 17 00:00:00 2001 From: Marco Elver Date: Wed, 23 Apr 2025 11:31:25 +0200 Subject: [PATCH 1/2] Thread Safety Analysis: Convert CapabilityExpr::CapExpr to hol

[clang] [llvm] [AArch64] Add FEAT_FPAC to supported CPUs (PR #137330)

2025-04-25 Thread via cfe-commits
https://github.com/jyli0116 created https://github.com/llvm/llvm-project/pull/137330 Added FEAT_FPAC onto supported AArch64 CPUs which don't have it under the processor description. >From 99ad372e888bd90595b1505368601fb0714653d0 Mon Sep 17 00:00:00 2001 From: Yu Li Date: Fri, 25 Apr 2025 12:5

[clang] [llvm] [AArch64] Add FEAT_FPAC to supported CPUs (PR #137330)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-backend-aarch64 Author: None (jyli0116) Changes Added FEAT_FPAC onto supported AArch64 CPUs which don't have it under the processor description. --- Patch is 40.80 KiB, truncated to 20.00 KiB below, full version: htt

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-25 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > But the token kind we have is `identifier` and not one of the keywords, > > > so we can't do the more trivial integer comparisons. > > > > > > Can we precompute a list/map/whatever of all identifiers that are keywords > > in C++ but not in C and then do pointer compa

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: Not a full review, just some initial comments on combineCCMask. I think it would be good to have more comments explaining the specific transformations you're attempting to implement, with an argument why they are correct for all inputs. https://github.

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
@@ -8694,66 +8726,455 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +// Combine IPM sequence for flag output operands. static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condi

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
@@ -8694,66 +8726,455 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +// Combine IPM sequence for flag output operands. static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condi

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
@@ -8694,66 +8726,455 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +// Combine IPM sequence for flag output operands. static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condi

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
@@ -8694,66 +8726,455 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +// Combine IPM sequence for flag output operands. static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condi

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
@@ -8694,66 +8726,455 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +// Combine IPM sequence for flag output operands. static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condi

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
@@ -8694,66 +8726,455 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +// Combine IPM sequence for flag output operands. static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condi

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
@@ -8694,66 +8726,455 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +// Combine IPM sequence for flag output operands. static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condi

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
@@ -8694,66 +8726,455 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +// Combine IPM sequence for flag output operands. static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condi

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
@@ -8694,66 +8726,455 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +// Combine IPM sequence for flag output operands. static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condi

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/125970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-04-25 Thread Alexey Bataev via cfe-commits
@@ -2759,6 +2759,18 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( OpenMPClauseKind CKind = Tok.isAnnotation() ? OMPC_unknown : getOpenMPClauseKind(PP.getSpelling(Tok)); + // C

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
@@ -8694,66 +8726,455 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +// Combine IPM sequence for flag output operands. static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condi

[clang] 77148fc - [clang] Do not share ownership of `HeaderSearchOptions` (#132984)

2025-04-25 Thread via cfe-commits
Author: Jan Svoboda Date: 2025-04-25T07:38:51-07:00 New Revision: 77148fce6f35743c368e6c01ad24ebcec9fdea13 URL: https://github.com/llvm/llvm-project/commit/77148fce6f35743c368e6c01ad24ebcec9fdea13 DIFF: https://github.com/llvm/llvm-project/commit/77148fce6f35743c368e6c01ad24ebcec9fdea13.diff L

[clang] [Driver][CFI] Allow CFI with minimal runtime (PR #137103)

2025-04-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/137103 >From b4ae58e13bbbc62272a900cac5e1f158c437e8c1 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 23 Apr 2025 18:16:42 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [clang][analyzer][NFC] Add a helper for conjuring symbols at call events (PR #137182)

2025-04-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM thanks https://github.com/llvm/llvm-project/pull/137182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

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

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

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

[clang] [Clang][CodeGen] Emit fake uses before musttail calls (PR #136867)

2025-04-25 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/136867 >From 90c09c8326077a1ba6797519bbefd014f32b5beb Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Wed, 23 Apr 2025 14:24:50 +0100 Subject: [PATCH 1/4] [Clang] Emit Fake Uses before musttail calls Fixes the issu

[clang] d775b91 - [clang][bytecode] Diagnose pseudo dtor calls before C++20 (#137303)

2025-04-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-25T13:03:58+02:00 New Revision: d775b911c90e631f5cc332c07474f7121564e25b URL: https://github.com/llvm/llvm-project/commit/d775b911c90e631f5cc332c07474f7121564e25b DIFF: https://github.com/llvm/llvm-project/commit/d775b911c90e631f5cc332c07474f7121564e25b.diff L

[clang] [clang][bytecode] Diagnose pseudo dtor calls before C++20 (PR #137303)

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

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-25 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/136404 >From d10dab46a0d95ad5e3d44ac826efd18c8aa645ee Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Fri, 18 Apr 2025 18:45:00 +0530 Subject: [PATCH 1/3] Fix cuda flag with clang-repl --- clang/include/clang/Inte

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

2025-04-25 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/136720 From 011008bd03f66e9afdfb3eec24a1c1c8a4018f52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 22 Apr 2025 16:46:05 +0200 Subject: [PATCH 1/5] [analyzer] Workaround for unintended slowdo

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-25 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/136404 >From d10dab46a0d95ad5e3d44ac826efd18c8aa645ee Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Fri, 18 Apr 2025 18:45:00 +0530 Subject: [PATCH 1/4] Fix cuda flag with clang-repl --- clang/include/clang/Inte

[clang] [C] Warn on uninitialized const objects (PR #137166)

2025-04-25 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,55 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=c,unsafe -Wdefault-const-init %s +// RUN: %clang_cc1 -fsyntax-only -verify=c,unsafe -Wc++-compat %s +// RUN: %clang_cc1 -fsyntax-only -verify=unsafe %s +// RUN: %clang_cc1 -fsyntax-only -verify=c -Wdefault-const-init -Wno

[clang] [C] Warn on uninitialized const objects (PR #137166)

2025-04-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137166 >From bb184fc38d13126f244615425cfefe7368ca71b8 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 23 Apr 2025 13:40:44 -0400 Subject: [PATCH 1/8] Add -Wdefault-const-init --- clang/docs/ReleaseNotes.

[clang] [C] Warn on uninitialized const objects (PR #137166)

2025-04-25 Thread Aaron Ballman via cfe-commits
@@ -6496,6 +6496,17 @@ static bool canPerformArrayCopy(const InitializedEntity &Entity) { return false; } +static const FieldDecl *getConstField(const RecordDecl *RD) { + for (const FieldDecl *FD : RD->fields()) { +QualType QT = FD->getType(); +if (QT.isConstQualif

[clang] [C] Warn on uninitialized const objects (PR #137166)

2025-04-25 Thread Aaron Ballman via cfe-commits
@@ -6496,6 +6496,17 @@ static bool canPerformArrayCopy(const InitializedEntity &Entity) { return false; } +static const FieldDecl *GetConstField(const RecordDecl *RD) { AaronBallman wrote: Ah fair enough, I've added an assert https://github.com/llvm/llvm-

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2025-04-25 Thread Stephen Tozer via cfe-commits
SLTozer wrote: > I did some downstream testing with "-Og" since this patch and noticed that > e.g. Thanks for catching these - in terms of legalizer support it looks like everything relevant is implemented except for `SoftenFloatOperand`, so that should be a straightforward fix. The target-sp

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-25 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/136404 >From d10dab46a0d95ad5e3d44ac826efd18c8aa645ee Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Fri, 18 Apr 2025 18:45:00 +0530 Subject: [PATCH 1/2] Fix cuda flag with clang-repl --- clang/include/clang/Inte

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-25 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/136404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-25 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Alas, I think this PR may be a non-starter due to performance: https://llvm-compile-time-tracker.com/?config=Overview&stat=wall-time&remote=AaronBallman: ``` C 56a3f3cd28 8.04s (+2.96%) 8.23s (+3.32%) 11.87s (+1.92%) 2.83s (+10.21%) 8.50s

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

2025-04-25 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > But I was shocked that sometimes intuition fails, and we didn't check the RT > for that patch. This is a legacy project with many skeletons hidden in various closets... The main moral of this story is probably that we should be more paranoid about measuring runtime (I'm thi

[clang] [clang][analyzer][NFC] Add a helper for conjuring symbols at call events (PR #137182)

2025-04-25 Thread Fangyi Zhou via cfe-commits
fangyi-zhou wrote: Could you please merge this pull request first, now that the other one got reverted? https://github.com/llvm/llvm-project/pull/137182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] 3177635 - [clang][analyzer][NFC] Add a helper for conjuring symbols at call events (#137182)

2025-04-25 Thread via cfe-commits
Author: Fangyi Zhou Date: 2025-04-25T13:32:38+02:00 New Revision: 317763580fa92a05ba04f4a04677124acb958ea3 URL: https://github.com/llvm/llvm-project/commit/317763580fa92a05ba04f4a04677124acb958ea3 DIFF: https://github.com/llvm/llvm-project/commit/317763580fa92a05ba04f4a04677124acb958ea3.diff L

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2025-04-25 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: > > I did some downstream testing with "-Og" since this patch and noticed that > > e.g. > > Thanks for catching these - in terms of legalizer support it looks like > everything relevant is implemented except for `SoftenFloatOperand`, so that > should be a straightforward f

[clang] [clang][analyzer][NFC] Add a helper for conjuring symbols at call events (PR #137182)

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

[clang] [Clang][Parse] Fix ambiguity with nested-name-specifiers that may declarative (PR #96364)

2025-04-25 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: This change appears to have introduced a regression: https://github.com/llvm/llvm-project/issues/114815 with fairly trivial code: ``` int decltype; ``` Any chance you can investigate @sdkrystian? https://github.com/llvm/llvm-project/pull/96364 ___

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-25 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,213 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Widentifier-is-c++-keyword %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wc++-compat %s +// RUN: %clang_cc1 -fsyntax-only -verify=good %s +// RUN: %clang_cc1 -fsyntax-only -verify=cxx -x c++ -std=c++2c %s +// good-no-dia

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-25 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > What about `and`, `or`, and friends (which I think are only keywords in C if > you include a certain header irrc). Good call, I'll add those. https://github.com/llvm/llvm-project/pull/137234 ___ cfe-commits mailing list cfe-comm

[clang] [llvm] [clang][CodeGen][AA] Add `!llvm.errno.tbaa` gathering int-compatible TBAA nodes (PR #125258)

2025-04-25 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: Kind ping. https://github.com/llvm/llvm-project/pull/125258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix crash with -ast-dump=json (PR #137324)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes When given an invalid Objective-C extension, Clang would crash when trying to emit the mangled name of the method to the JSON dump output. Fixes #137320 --- Full diff: https://github.com/llvm/llvm-pro

[clang] [CIR] Fix calling defined functions (PR #137271)

2025-04-25 Thread Erich Keane via cfe-commits
@@ -773,6 +773,58 @@ cir::FuncOp CIRGenModule::getOrCreateCIRFunction( StringRef mangledName, mlir::Type funcType, GlobalDecl gd, bool forVTable, bool dontDefer, bool isThunk, ForDefinition_t isForDefinition, mlir::ArrayAttr extraAttrs) { + const Decl *d = gd.getDe

[clang] [CIR] Fix calling defined functions (PR #137271)

2025-04-25 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 2 nits, else lgtm. https://github.com/llvm/llvm-project/pull/137271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Fix calling defined functions (PR #137271)

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

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-25 Thread Marco Elver via cfe-commits
melver wrote: > I think the biggest issue is that removing `const` from `FactEntry` does not > work. You'll have to undo all those changes and instead create a new > `FactEntry` for every lock/unlock. Good catch, reworked this. PTAL. https://github.com/llvm/llvm-project/pull/137133 __

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137234 >From 56a3f3cd282e9bd5ef9014e4125380e0d9685121 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 24 Apr 2025 14:17:42 -0400 Subject: [PATCH 01/11] [C] Diagnose use of C++ keywords in C This adds a ne

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-25 Thread Morris Hafner via cfe-commits
@@ -1246,6 +1246,59 @@ def SelectOp : CIR_Op<"select", [Pure, }]; } +//===--===// +// TernaryOp +//===--===// + +def TernaryOp : CIR_Op<"te

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

2025-04-25 Thread Aaron Ballman via cfe-commits
@@ -304,7 +304,7 @@ getCodeModel(const CodeGenOptions &CodeGenOpts) { .Case("kernel", llvm::CodeModel::Kernel) .Case("medium", llvm::CodeModel::Medium) .Case("large", llvm::CodeModel::Large) -

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-25 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/137184 >From 1eed90e3859c2ad8d703708f89976cad8f0faeec Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Thu, 24 Apr 2025 16:12:37 +0200 Subject: [PATCH 1/3] [CIR] Upstream TernaryOp This patch adds TernaryOp to CIR plus

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-25 Thread Morris Hafner via cfe-commits
@@ -609,8 +609,8 @@ def ConditionOp : CIR_Op<"condition", [ //===--===// def YieldOp : CIR_Op<"yield", [ReturnLike, Terminator, - ParentOneOf<["IfOp", "ScopeOp", "WhileOp", -

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

2025-04-25 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/132984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-04-25 Thread Ulrich Weigand via cfe-commits
@@ -8694,66 +8726,455 @@ SDValue SystemZTargetLowering::combineSETCC( return SDValue(); } +// Combine IPM sequence for flag output operands. static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condi

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/137106 >From da645e2445e5539e7ea53307596de684203ecd27 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Tue, 22 Apr 2025 15:16:19 -0500 Subject: [PATCH 1/5] Add initial CIR support for switch operation --

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread via cfe-commits
@@ -802,6 +804,132 @@ Block *cir::BrCondOp::getSuccessorForOperands(ArrayRef operands) { return nullptr; } +//===--===// +// CaseOp +//===

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread via cfe-commits
@@ -802,6 +804,132 @@ Block *cir::BrCondOp::getSuccessorForOperands(ArrayRef operands) { return nullptr; } +//===--===// +// CaseOp +//===

[clang] [Driver][CFI] Allow CFI with minimal runtime (PR #137103)

2025-04-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/137103 >From b4ae58e13bbbc62272a900cac5e1f158c437e8c1 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 23 Apr 2025 18:16:42 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [NFC][Driver] Add missing `-resource-dir` into test (PR #137289)

2025-04-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/137289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ac3dec7 - [NFC][Driver] Add missing `-resource-dir` into test (#137289)

2025-04-25 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-04-25T00:33:12-07:00 New Revision: ac3dec7bbe6ef7ea5ed60648c3ac1d4c90bd4962 URL: https://github.com/llvm/llvm-project/commit/ac3dec7bbe6ef7ea5ed60648c3ac1d4c90bd4962 DIFF: https://github.com/llvm/llvm-project/commit/ac3dec7bbe6ef7ea5ed60648c3ac1d4c90bd4962.diff L

[clang] [clang][ASTImporter] Fix AST import if anonymous namespaces are merged (PR #128735)

2025-04-25 Thread Balázs Kéri via cfe-commits
balazske wrote: The current behavior is the same for named or anonymous namespace: If there is an existing namespace with same name in the target ("To") TU, the imported one is merged into this (this is what was wrong before this fix, the anonymous namespace was not merged if it was inside a `

  1   2   3   4   >