[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 `

[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
@@ -1,44 +1,84 @@ // REQUIRES: x86 -// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o +// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o -x86-apx-relax-relocations=true // RUN: ld.lld %t.o -o %t1 // RUN: llvm-readobj -r %t1 | FileCheck -

[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
@@ -912,9 +912,9 @@ void X86_64::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const { case R_X86_64_CODE_4_GOTPC32_TLSDESC: case R_X86_64_TLSDESC_CALL: case R_X86_64_TLSGD: -if (rel.expr == R_RELAX_TLS_GD_TO_LE) { +if (rel.expr == R_RELAX_TLS_GD_TO

[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
@@ -89,6 +89,7 @@ set(sources GISel/X86InstructionSelector.cpp GISel/X86LegalizerInfo.cpp GISel/X86RegisterBankInfo.cpp + X86SuppressAPXForReloc.cpp phoebewang wrote: Put it in alphabetic order? https://github.com/llvm/llvm-project/pull/136660

[clang] [clang][bytecode] Propagate IsVolatile bit to subobjects (PR #137293)

2025-04-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/137293 For ```c++ struct S { constexpr S(int=0) : i(1) {} int i; }; constexpr volatile S vs; ``` reading from `vs.i` is not allowed, even though `i` is not volatile qualified. Propagate the IsVolatile b

[clang] [clang][bytecode] Propagate IsVolatile bit to subobjects (PR #137293)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes For ```c++ struct S { constexpr S(int=0) : i(1) {} int i; }; constexpr volatile S vs; ``` reading from `vs.i` is not allowed, even though `i` is not volatile qualified. Propagate the IsVolatile

[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] [Driver][CFI] Allow CFI with minimal runtime (PR #137103)

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

[clang] 7aa8ece - [Driver][CFI] Allow CFI with minimal runtime (#137103)

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

[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
@@ -0,0 +1,173 @@ +//===- X86SuppressAPXForReloc.cpp - Suppress APX features for relocations -===// +// +// 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] a9788e3 - Thread Safety Analysis: Test: Minor style fix

2025-04-25 Thread Marco Elver via cfe-commits
Author: Marco Elver Date: 2025-04-25T09:56:54+02:00 New Revision: a9788e3a86cab64ae92dd7d041718b0722f43c3a URL: https://github.com/llvm/llvm-project/commit/a9788e3a86cab64ae92dd7d041718b0722f43c3a DIFF: https://github.com/llvm/llvm-project/commit/a9788e3a86cab64ae92dd7d041718b0722f43c3a.diff L

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

2025-04-25 Thread Urvi Rav via cfe-commits
@@ -1660,6 +1660,10 @@ def err_omp_expected_colon : Error<"missing ':' in %0">; def err_omp_missing_comma : Error< "missing ',' after %0">; def err_omp_expected_context_selector : Error<"expected valid context selector in %0">; +def err_omp_unknown_clause r

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

2025-04-25 Thread Urvi Rav via cfe-commits
@@ -1660,6 +1660,10 @@ def err_omp_expected_colon : Error<"missing ':' in %0">; def err_omp_missing_comma : Error< "missing ',' after %0">; def err_omp_expected_context_selector : Error<"expected valid context selector in %0">; +def err_omp_unknown_clause +: Error<"expe

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

2025-04-25 Thread Urvi Rav via cfe-commits
@@ -78,10 +78,7 @@ void foo(void) { for (int i = 0; i < 16; i++) ; -#pragma omp metadirective when(user = {condition(0)} \ - : parallel for) otherwise() - for (int i=0; i<10; i++) -; + ravurvi20 wrote: Since for versi

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

2025-04-25 Thread Henrich Lauko 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 Henrich Lauko 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 Henrich Lauko 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 closed https://github.com/llvm/llvm-project/pull/137103 ___ 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# where clause (PR #137295)

2025-04-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/137295 Fix #74947 >From 6c376532edb6d2ae28094bc8c0eb88970b65fc66 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 25 Apr 2025 01:25:32 -0700 Subject: [PATCH] [clang-format] Correctly handle C# where clause Fix #7494

[clang] [clang-format] Correctly handle C# where clause (PR #137295)

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

[clang-tools-extra] [clang-tidy] Add check 'bugprone-invalid-enum-default-initialization' (PR #136823)

2025-04-25 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/136823 From 4ce7497bb0dc89de3b9f139177c295291e7d3e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Thu, 17 Apr 2025 17:36:03 +0200 Subject: [PATCH 1/3] [clang-tidy] Add check 'bugprone-inva

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

2025-04-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. 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] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-04-25 Thread Urvi Rav via cfe-commits
https://github.com/ravurvi20 updated https://github.com/llvm/llvm-project/pull/128640 >From 6ebd5991788608fbd104ea9c23230912044462d3 Mon Sep 17 00:00:00 2001 From: Urvi Rav Date: Tue, 25 Feb 2025 00:49:07 -0600 Subject: [PATCH 1/4] default clause replaced by otherwise clause for metadirective

[clang] [clang][bytecode] Don't diagnose const extern reads in CPCE mode (PR #137285)

2025-04-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/137285 ___ 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 John McCall via cfe-commits
https://github.com/rjmccall commented: Functionality seems fine. A couple minor requests, then LGTM. https://github.com/llvm/llvm-project/pull/136867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

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

2025-04-25 Thread John McCall via cfe-commits
@@ -6001,8 +6001,18 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, for (auto it = EHStack.find(CurrentCleanupScopeDepth); it != EHStack.end(); ++it) { EHCleanupScope *Cleanup = dyn_cast(&*it); - if (!(Cleanup && Cleanup->getCleanup(

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

2025-04-25 Thread John McCall via cfe-commits
@@ -0,0 +1,56 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -emit-llvm -fextend-variable-liveness -o - %s | FileCheck %s + +/// Tests that when we have fake uses in a function ending in a musttail call,

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

2025-04-25 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/136867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/137289 None >From ac42d4d9f411fb309bc464fe004783bc1da0ec9c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 25 Apr 2025 00:15:14 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia

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

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Vitaly Buka (vitalybuka) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/137289.diff 1 Files Affected: - (modified) clang/test/Driver/fsanitize.c (+1-1) ``diff diff --git a/clang/test/Driver/fsanitize

[clang] [clang][bytecode] Don't diagnose const extern reads in CPCE mode (PR #137285)

2025-04-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-b-1` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/13758 Here is the relevant

[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. ``` llc -mtriple=avr bbi-106478.ll ``` crashes with ``` SoftenFloatOperand Op #1: t2: ch = fake_use t0, ConstantFP:f64<0.00e+00> LLVM ERROR: Do not know how to soften this operator's operand!

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

2025-04-25 Thread Urvi Rav via cfe-commits
https://github.com/ravurvi20 updated https://github.com/llvm/llvm-project/pull/128640 >From 6ebd5991788608fbd104ea9c23230912044462d3 Mon Sep 17 00:00:00 2001 From: Urvi Rav Date: Tue, 25 Feb 2025 00:49:07 -0600 Subject: [PATCH 1/4] default clause replaced by otherwise clause for metadirective

  1   2   3   >