[clang] [ExtractAPI] Include tilde in destructor name (PR #146001)

2025-07-03 Thread via cfe-commits
https://github.com/QuietMisdreavus approved this pull request. https://github.com/llvm/llvm-project/pull/146001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [P3074] Partial implementation of support for trivial unions (PR #146815)

2025-07-03 Thread Barry Revzin via cfe-commits
https://github.com/brevzin updated https://github.com/llvm/llvm-project/pull/146815 >From 40290a957b6f349a9b670193c8bc699d8eb7d373 Mon Sep 17 00:00:00 2001 From: Barry Revzin Date: Fri, 27 Jun 2025 17:29:45 -0500 Subject: [PATCH 1/8] [P3074] Implementing part of trivial unions --- clang/lib/A

[clang] [P3074] Partial implementation of support for trivial unions (PR #146815)

2025-07-03 Thread Barry Revzin via cfe-commits
https://github.com/brevzin updated https://github.com/llvm/llvm-project/pull/146815 >From 40290a957b6f349a9b670193c8bc699d8eb7d373 Mon Sep 17 00:00:00 2001 From: Barry Revzin Date: Fri, 27 Jun 2025 17:29:45 -0500 Subject: [PATCH 1/9] [P3074] Implementing part of trivial unions --- clang/lib/A

[clang] [lld] [llvm] [Clang][AArch64] Remove redundant tune args to the backend (PR #146896)

2025-07-03 Thread Tomer Shafir via cfe-commits
https://github.com/tomershafir updated https://github.com/llvm/llvm-project/pull/146896 >From 10e9d8f141c0a31ecc189b3365d5d18c65c7ae4b Mon Sep 17 00:00:00 2001 From: tomershafir Date: Thu, 3 Jul 2025 16:53:26 +0300 Subject: [PATCH] [Clang][AArch64] Remove redundant tune args to the backend Thi

[clang] [Index] Remove an unnecessary cast (NFC) (PR #146944)

2025-07-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/146944 We don't need to cast twice to the same type. >From 03383da4eee7f35bdf1148b37cb44a2056b547d0 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 3 Jul 2025 12:04:54 -0700 Subject: [PATCH] [Index] Remo

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-07-03 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > I'm not so sure it's about conversion function templates in particular: if > > it's really commit > > [658d55b](https://github.com/llvm/llvm-project/commit/658d55ba1117a029f37f51a3072585a1fd9fc59f) > > causing the problem (@emaxx-google if you happen to have some time, it

[clang] [Index] Remove an unnecessary cast (NFC) (PR #146944)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes We don't need to cast twice to the same type. --- Full diff: https://github.com/llvm/llvm-project/pull/146944.diff 1 Files Affected: - (modified) clang/lib/Index/IndexBody.cpp (+1-1) ``di

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/146890 Deal with the following scenario ```cpp struct S { char* c = new char; constexpr ~S() { delete c; } }; if constexpr((S{}, true)){}; ``` There were two issues - We need to produce a full ex

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

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

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

2025-07-03 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Thanks for the updates! I added a few minor comments, but I hope that after those the PR could be merged. https://github.com/llvm/llvm-project/pull/146212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

2025-07-03 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,106 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s NagyDonat wrote: Please ensure that (the relevant parts of) `CStringChecker` is actually enabled in this test file -- its sub-checkers are in the `unix.cstring` and `alpha.unix.cstr

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

2025-07-03 Thread Donát Nagy via cfe-commits
@@ -2223,16 +2223,59 @@ void CStringChecker::evalStrcpyCommon(CheckerContext &C, const CallEvent &Call, Result = lastElement; } +// For bounded method, amountCopied take the minimum of two values, +// for ConcatFnKind::strlcat: +// amountCopied = min (

[clang] [CIR] Add nothrow attribute to the call operation (PR #145178)

2025-07-03 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/145178 >From ce5ccf394f039188b6a180b46979fba23b3d9d83 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Sun, 29 Jun 2025 20:06:51 +0800 Subject: [PATCH] [CIR] Add nothrow attribute to call operations This patch adds nothr

[clang] 438863a - [OpenACC][Sema] Implement warning for 'cache' invalid var ref

2025-07-03 Thread via cfe-commits
Author: erichkeane Date: 2025-07-03T07:13:30-07:00 New Revision: 438863a09e2d907c36c4114228ef1130e16b URL: https://github.com/llvm/llvm-project/commit/438863a09e2d907c36c4114228ef1130e16b DIFF: https://github.com/llvm/llvm-project/commit/438863a09e2d907c36c4114228ef1130e16b.diff LO

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-03 Thread via cfe-commits
yronglin wrote: > ```c++ > typeof(int){} x; // Probably parsed as typeof(int{}) > ``` GCC reject this https://godbolt.org/z/YEdnGh8T5 https://github.com/llvm/llvm-project/pull/146394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/146890 >From c138801c212f69f4dee83c7516e0e77eb876a9f0 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 3 Jul 2025 14:26:59 +0200 Subject: [PATCH 1/3] [Clang] Correctly handle allocations in the condition of a

[clang] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)

2025-07-03 Thread Richard Thomson via cfe-commits
LegalizeAdulthood wrote: > What about symlinks though? In that case WYGIWYD (what you get is what you deserve) applies. https://github.com/llvm/llvm-project/pull/143520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang-tools-extra] [clang-tidy] Add new check: `modernize-use-concise-preprocessor-directives` (PR #146830)

2025-07-03 Thread via cfe-commits
@@ -0,0 +1,28 @@ +.. title:: clang-tidy - modernize-use-concise-preprocessor-directives + +modernize-use-concise-preprocessor-directives += + +Shortens `#if` preprocessor conditions: EugeneZelenko wrote: Please make fir

[clang-tools-extra] [clang-tidy] Add new check: `modernize-use-concise-preprocessor-directives` (PR #146830)

2025-07-03 Thread via cfe-commits
@@ -0,0 +1,105 @@ +//===--- UseConcisePreprocessorDirectivesCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Add new check: `modernize-use-concise-preprocessor-directives` (PR #146830)

2025-07-03 Thread via cfe-commits
@@ -0,0 +1,37 @@ +//===--- UseConcisePreprocessorDirectivesCheck.h - clang-tidy ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] 4b9f622 - [CIR] Bit manipulation builtin functions (#146529)

2025-07-03 Thread via cfe-commits
Author: Sirui Mu Date: 2025-07-03T23:08:49+08:00 New Revision: 4b9f622ca94d8f4c0102560cb15c99f4e0013f99 URL: https://github.com/llvm/llvm-project/commit/4b9f622ca94d8f4c0102560cb15c99f4e0013f99 DIFF: https://github.com/llvm/llvm-project/commit/4b9f622ca94d8f4c0102560cb15c99f4e0013f99.diff LOG:

[clang] [CIR] Bit manipulation builtin functions (PR #146529)

2025-07-03 Thread Sirui Mu via cfe-commits
https://github.com/Lancern closed https://github.com/llvm/llvm-project/pull/146529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/146890 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Handle when `this` refers to a different location (PR #146900)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: Jan Voung (jvoung) Changes When `this` is under a CXXDefaultInitExpr it could refer to the location of an InitListExpr object instead of the `this` of a member function. E.g.: ``` struct S { int x; i

[clang] [clang][dataflow] Handle when `this` refers to a different location (PR #146900)

2025-07-03 Thread Jan Voung via cfe-commits
https://github.com/jvoung edited https://github.com/llvm/llvm-project/pull/146900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-03 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > ```c++ > > typeof(int){} x; // Probably parsed as typeof(int{}) > > ``` > > GCC reject this https://godbolt.org/z/YEdnGh8T5 Yeah, I think there are a few different issues. 1) we should not accept in C. 2) C++ has its own issue in that we accept `typeof` there despite th

[clang] [clang][dataflow] Handle when `this` refers to a different location (PR #146900)

2025-07-03 Thread Jan Voung via cfe-commits
https://github.com/jvoung edited https://github.com/llvm/llvm-project/pull/146900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Remove redundant tune args to the backend (PR #146896)

2025-07-03 Thread Tomer Shafir via cfe-commits
https://github.com/tomershafir updated https://github.com/llvm/llvm-project/pull/146896 >From 81792060d3229148df45ea70b23a24d5cbef4a36 Mon Sep 17 00:00:00 2001 From: tomershafir Date: Thu, 3 Jul 2025 16:53:26 +0300 Subject: [PATCH] [Clang][AArch64] Remove redundant tune args to the backend Thi

[clang] [Clang][AArch64] Remove redundant tune args to the backend (PR #146896)

2025-07-03 Thread Tomer Shafir via cfe-commits
https://github.com/tomershafir edited https://github.com/llvm/llvm-project/pull/146896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-03 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > ```c++ > > > typeof(int){} x; // Probably parsed as typeof(int{}) > > > ``` > > > > > > GCC reject this https://godbolt.org/z/YEdnGh8T5 > > Yeah, I think there are a few different issues. 1) we should not accept in C. > 2) C++ has its own issue in that we accept `typ

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-03 Thread via cfe-commits
Sirraide wrote: Since we’re on to C++ support now, here’s one more fun case: ```c++ class A {}; A a; class B : typeof(A) {}; class C : typeof(a) {}; ``` https://github.com/llvm/llvm-project/pull/146394 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Erich Keane via cfe-commits
@@ -1931,15 +1931,13 @@ Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, return ParseCXXCondition(nullptr, Loc, CK, MissingOK); } -ExprResult Expr = [&] { - EnterExpressionEvaluationContext Eval( - Actions, Sema::ExpressionEvalua

[clang] [clang][analyzer] Add checker 'unix.cstring.MissingTerminatingZero' (PR #146664)

2025-07-03 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,295 @@ +//=== MissingTerminatingZeroChecker.cpp -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Clang] Fix evaluation context of lambdas appearing in discarded statements (PR #146857)

2025-07-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/146857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-03 Thread Tarun Prabhu via cfe-commits
@@ -629,6 +655,20 @@ static void addFloatingPointOptions(const Driver &D, const ArgList &Args, default: continue; +case options::OPT_fcomplex_arithmetic_EQ: { tarunprabhu wrote: I think this can be moved to `CommonArgs.cpp` as well. https://gi

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-03 Thread Tarun Prabhu via cfe-commits
@@ -9,6 +9,7 @@ #ifndef FORTRAN_OPTIMIZER_CODEGEN_CODEGEN_H #define FORTRAN_OPTIMIZER_CODEGEN_CODEGEN_H +#include "flang/Frontend/CodeGenOptions.h" tarunprabhu wrote: I think the `CodeGenOptions.h` header is included because of the `ComplexRangeKind` enum. I

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-03 Thread Tarun Prabhu via cfe-commits
@@ -192,6 +192,31 @@ class CodeGenOptions : public CodeGenOptionsBase { return getProfileUse() == llvm::driver::ProfileCSIRInstr; } + /// Controls the various implementations for complex division. tarunprabhu wrote: If this is exactly the same as the e

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-03 Thread Tarun Prabhu via cfe-commits
@@ -609,6 +609,17 @@ class FirOpBuilder : public mlir::OpBuilder, public mlir::OpBuilder::Listener { return integerOverflowFlags; } + /// Set ComplexDivisionToRuntimeFlag value for whether complex number division + /// is lowered to a runtime function by this builder

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-03 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/146641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-03 Thread Tarun Prabhu via cfe-commits
@@ -484,6 +484,21 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts, } parseDoConcurrentMapping(opts, args, diags); + + if (const auto *arg = tarunprabhu wrote: Could we use a concrete type instead of `auto` here? https://github.c

[clang] [flang] [flang] Add -fcomplex-arithmetic= option and select complex division algorithm (PR #146641)

2025-07-03 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu commented: Thanks. I think we should share the `ComplexRangeKind` enum between `clang` and `flang`. I am ok with doing it in a separate PR. https://github.com/llvm/llvm-project/pull/146641 ___ cfe-commits mailing list cf

[clang] [OpenACC][CIR] 'cache' construct lowering (PR #146915)

2025-07-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/146915 The 'cache' construct is an interesting one, in that it doesn't take any clauses, and is exclusively a collection of variables. Lowering wise, these just get added to the associated acc.loop. This did req

[clang] [OpenACC][CIR] 'cache' construct lowering (PR #146915)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes The 'cache' construct is an interesting one, in that it doesn't take any clauses, and is exclusively a collection of variables. Lowering wise, these just get added to the associated acc.loop. This did

[clang] [OpenACC][CIR] 'cache' construct lowering (PR #146915)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes The 'cache' construct is an interesting one, in that it doesn't take any clauses, and is exclusively a collection of variables. Lowering wise, these just get added to the associated acc.loop. This did r

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

2025-07-03 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon converted_to_draft https://github.com/llvm/llvm-project/pull/146854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Clang] Introduce `--offload-targets` for `-fopenmp-targets` (PR #146594)

2025-07-03 Thread Nick Sarnie via cfe-commits
@@ -1138,6 +1138,10 @@ def fno_convergent_functions : Flag<["-"], "fno-convergent-functions">, // Common offloading options let Group = offload_Group in { +def offload_targets_EQ : CommaJoined<["--"], "offload-targets=">, sarnex wrote: I'm not sure if this i

[clang] [llvm] [RISCV] Remove implied extension Zvfhmin for XAndesVPackFPH (PR #146861)

2025-07-03 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/146861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Add MC support of Zibi experimental extension (PR #127463)

2025-07-03 Thread Craig Topper via cfe-commits
@@ -0,0 +1,42 @@ +//===-- RISCVInstrInfoZibi.td - 'Zibi' 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: Apache

[clang] [llvm] [RISCV][MC] Add MC support of Zibi experimental extension (PR #127463)

2025-07-03 Thread Craig Topper via cfe-commits
@@ -0,0 +1,42 @@ +//===-- RISCVInstrInfoZibi.td - 'Zibi' 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: Apache

[clang-tools-extra] [clang-tidy] Add modernize-avoid-fundamental-integer-types (PR #146970)

2025-07-03 Thread JJ Marr via cfe-commits
https://github.com/jj-marr created https://github.com/llvm/llvm-project/pull/146970 The fundamental types are widely recognized to be flawed because they're of implementation-defined sizes without a common purpose. For example, `long int` is a footgun since its 32 bits on Windows and 64 bits

[clang] [Modules] fix assert in hasInitWithSideEffects (PR #146468)

2025-07-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/20434 Here is the relevant piece of the

[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--precompile` (PR #121046)

2025-07-03 Thread via cfe-commits
h-vetinari wrote: > given how important this it, I hope we can make this for clang21. Thanks! FYI, branching for LLVM v21 is less than [two weeks away](https://discourse.llvm.org/t/llvm-21-x-release-information-and-branching/87065) https://github.com/llvm/llvm-project/pull/121046 __

[clang] [analyzer] Fix crash on compound literals with bitfields in unions (PR #146418)

2025-07-03 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/146418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-07-03 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141937 >From 185be04e482344ce2f76eeb02859162e1838150e Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Tue, 27 May 2025 19:36:42 + Subject: [PATCH 1/9] [debuginfo][coro] Emit debug info labels for coro

[clang] afd20aa - [clang-scan-deps] Fix "unterminated conditional directive" bug (#146645)

2025-07-03 Thread via cfe-commits
Author: Ziqing Luo Date: 2025-07-04T12:53:23+08:00 New Revision: afd20aaca5fd89dd14992c3fe2f735c5e16ad986 URL: https://github.com/llvm/llvm-project/commit/afd20aaca5fd89dd14992c3fe2f735c5e16ad986 DIFF: https://github.com/llvm/llvm-project/commit/afd20aaca5fd89dd14992c3fe2f735c5e16ad986.diff LO

[clang] [clang-scan-deps] Fix "unterminated conditional directive" bug (PR #146645)

2025-07-03 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 closed https://github.com/llvm/llvm-project/pull/146645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] add -floop-fuse to clang and flang (PR #142686)

2025-07-03 Thread Madhur Amilkanthwar via cfe-commits
@@ -34,6 +34,7 @@ page](https://llvm.org/releases/). * -floop-interchange is now recognized by flang. * -floop-interchange is enabled by default at -O2 and above. +* -fexperimental-fuse-loops is now recognized by flang. madhur13490 wrote: We should make a sim

[clang] [Driver][Test] pgo-sample-use-profi.c: Specify targets to fix test (PR #146996)

2025-07-03 Thread Nilanjana Basu via cfe-commits
https://github.com/nilanjana87 updated https://github.com/llvm/llvm-project/pull/146996 >From 93579c9f09516d2eb5cc58ee321fb3a93b2c2bc4 Mon Sep 17 00:00:00 2001 From: Nilanjana Basu Date: Thu, 3 Jul 2025 21:05:20 -0700 Subject: [PATCH 1/2] [Driver][Test] pgo-sample-use-profi.c: Specify targets t

[clang] [Serialization] Remove an unnecessary cast (NFC) (PR #146986)

2025-07-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata edited https://github.com/llvm/llvm-project/pull/146986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Make library output directories explicit (PR #146833)

2025-07-03 Thread Fraser Cormack via cfe-commits
@@ -120,14 +120,15 @@ function(link_bc) endif() add_custom_command( -OUTPUT ${ARG_TARGET}.bc -COMMAND ${llvm-link_exe} ${link_flags} -o ${ARG_TARGET}.bc ${LINK_INPUT_ARG} +OUTPUT ${LIBCLC_ARCH_OBJFILE_DIR}/${ARG_TARGET}.bc +COMMAND ${llvm-link_exe} ${link_

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

2025-07-03 Thread via cfe-commits
@@ -2223,16 +2223,81 @@ void CStringChecker::evalStrcpyCommon(CheckerContext &C, const CallEvent &Call, Result = lastElement; } +// For bounded method, amountCopied take the minimum of two values, +// for ConcatFnKind::strlcat: +// amountCopied = min (

[clang] [analyzer] Add support for consteval in ConditionBRVisitor::VisitTerminator (PR #146859)

2025-07-03 Thread Imad Aldij via cfe-commits
https://github.com/imdj updated https://github.com/llvm/llvm-project/pull/146859 >From 1077e164158965e824097542dc4c3ecc8821d6dc Mon Sep 17 00:00:00 2001 From: Imad Aldij Date: Thu, 3 Jul 2025 13:50:55 +0300 Subject: [PATCH 1/3] Add support for consteval if in ConditionBRVisitor --- clang/lib/S

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

2025-07-03 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/146212 >From 9da53c788fc01cd3fc2dd4c178b836035b5d380b Mon Sep 17 00:00:00 2001 From: flovent Date: Sat, 28 Jun 2025 20:58:43 +0800 Subject: [PATCH 1/6] [analyzer] Avoid unnecessary super region invalidation in `CStrin

[clang] d805707 - [clang][test] Correct UNSUPPORTED syntax in print-ranges.cpp

2025-07-03 Thread David Spickett via cfe-commits
Author: David Spickett Date: 2025-07-03T13:36:30Z New Revision: d805707ee435fbe83440ceaf0eb515bf1d536f01 URL: https://github.com/llvm/llvm-project/commit/d805707ee435fbe83440ceaf0eb515bf1d536f01 DIFF: https://github.com/llvm/llvm-project/commit/d805707ee435fbe83440ceaf0eb515bf1d536f01.diff LOG

[libclc] [libclc] Make library output directories explicit (PR #146833)

2025-07-03 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/146833 >From 27ede3bfae2776deef2dfce803a5f500bf0c7278 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 3 Jul 2025 09:24:59 +0100 Subject: [PATCH 1/2] [libclc] Make library output directories explicit These

[clang] [llvm] [HIPSTDPAR] Add support for globals (PR #146813)

2025-07-03 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/146813 >From d98e3785a144ada9881cdbe24c86f273850eca20 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 3 Jul 2025 02:02:04 +0100 Subject: [PATCH 1/4] Add support for true globals. --- llvm/lib/Transforms/HipStdPa

[clang] [clang] Refactor `CodeGenOptions` to specify AST effect as X macro arg (PR #146910)

2025-07-03 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/146910 >From 12825e992f8e7c8c9d50e7738e94f7d3770fd356 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 3 Jul 2025 07:31:00 -0700 Subject: [PATCH 1/2] [clang] Refactor `CodeGenOptions` to specify AST effect a

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-07-03 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/144611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-07-03 Thread Sander de Smalen via cfe-commits
@@ -2261,6 +2261,23 @@ void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { } } } + +if (auto *VT = Ty->getAs(); +VT && FD && +(VT->getVectorKind() == VectorKind::SveFixedLengthData || + VT->getVectorKind()

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-07-03 Thread Sander de Smalen via cfe-commits
@@ -2261,6 +2261,21 @@ void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { } } } + +if (auto *VT = Ty->getAs(); +VT && FD && +(VT->getVectorKind() == VectorKind::SveFixedLengthData || + VT->getVectorKind()

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-07-03 Thread Sander de Smalen via cfe-commits
@@ -2261,6 +2261,23 @@ void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { } } } + +if (auto *VT = Ty->getAs(); +VT && FD && +(VT->getVectorKind() == VectorKind::SveFixedLengthData || + VT->getVectorKind()

[clang] [clang-tools-extra] [clang-tidy] EndSourceFile() for preprocessor before diagnostic client (PR #145784)

2025-07-03 Thread Dave Bartolomeo via cfe-commits
https://github.com/dbartol updated https://github.com/llvm/llvm-project/pull/145784 >From 0be65986e1e2adf973a032936afa9cf48841055b Mon Sep 17 00:00:00 2001 From: Dave Bartolomeo Date: Wed, 25 Jun 2025 17:45:50 -0400 Subject: [PATCH 1/4] EndSourceFile() for preprocessor before diagnostic client

[clang] [CIR] Upstream UnaryDeref support for ComplexType (PR #146757)

2025-07-03 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/146757 >From 255b4ee2e630d446351244934b06733e5a3e9358 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 2 Jul 2025 20:48:36 +0200 Subject: [PATCH] [CIR] Upstream UnaryDeref support for ComplexType --- clang

[clang] [llvm] [win][aarch64] Always reserve frame pointers for Arm64 Windows (PR #146582)

2025-07-03 Thread Daniel Paoliello via cfe-commits
@@ -518,6 +518,27 @@ bool AArch64FrameLowering::hasFPImpl(const MachineFunction &MF) const { return false; } +/// Should the Frame Pointer be reserved for the current function? +bool AArch64FrameLowering::isFPReserved(const MachineFunction &MF) const { + const TargetMachin

[clang] [NFC][Clang][OpenMP] Refactor mapinfo generation for captured vars (PR #146891)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Abhinav Gaba (abhinavgaba) Changes The refactored code would allow creating multiple member-of maps for the same captured var, which would be useful for changes like https://github.com/llvm/llvm-project/pull/145454. --- Full diff: https:

[clang] [NFC][Clang][OpenMP] Refactor mapinfo generation for captured vars (PR #146891)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Abhinav Gaba (abhinavgaba) Changes The refactored code would allow creating multiple member-of maps for the same captured var, which would be useful for changes like https://github.com/llvm/llvm-project/pull/145454. --- Full diff

[clang] e93a346 - [CIR] Upstream SubstNonTypeTemplateParmExpr support for ComplexType (#146755)

2025-07-03 Thread via cfe-commits
Author: Amr Hesham Date: 2025-07-03T17:50:21+02:00 New Revision: e93a34662f1471c17f2afa7461ec71bf7913b984 URL: https://github.com/llvm/llvm-project/commit/e93a34662f1471c17f2afa7461ec71bf7913b984 DIFF: https://github.com/llvm/llvm-project/commit/e93a34662f1471c17f2afa7461ec71bf7913b984.diff LO

[clang] [CIR] Upstream SubstNonTypeTemplateParmExpr support for ComplexType (PR #146755)

2025-07-03 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/146755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

2025-07-03 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/146212 >From 9da53c788fc01cd3fc2dd4c178b836035b5d380b Mon Sep 17 00:00:00 2001 From: flovent Date: Sat, 28 Jun 2025 20:58:43 +0800 Subject: [PATCH 01/10] [analyzer] Avoid unnecessary super region invalidation in `CStr

[clang] 59d641a - [CIR] Upstream support for SubstNonTypeTemplateParmExpr (#146751)

2025-07-03 Thread via cfe-commits
Author: Amr Hesham Date: 2025-07-03T17:50:00+02:00 New Revision: 59d641a2dab475f6ab0ab1308b1d6dd641dccb6a URL: https://github.com/llvm/llvm-project/commit/59d641a2dab475f6ab0ab1308b1d6dd641dccb6a DIFF: https://github.com/llvm/llvm-project/commit/59d641a2dab475f6ab0ab1308b1d6dd641dccb6a.diff LO

[clang] [NFC][Clang][OpenMP] Refactor mapinfo generation for captured vars (PR #146891)

2025-07-03 Thread Abhinav Gaba via cfe-commits
https://github.com/abhinavgaba ready_for_review https://github.com/llvm/llvm-project/pull/146891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for SubstNonTypeTemplateParmExpr (PR #146751)

2025-07-03 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/146751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [P3074] Partial implementation of support for trivial unions (PR #146815)

2025-07-03 Thread Barry Revzin via cfe-commits
https://github.com/brevzin updated https://github.com/llvm/llvm-project/pull/146815 >From 40290a957b6f349a9b670193c8bc699d8eb7d373 Mon Sep 17 00:00:00 2001 From: Barry Revzin Date: Fri, 27 Jun 2025 17:29:45 -0500 Subject: [PATCH 1/6] [P3074] Implementing part of trivial unions --- clang/lib/A

[clang] [P3074] Partial implementation of support for trivial unions (PR #146815)

2025-07-03 Thread Barry Revzin via cfe-commits
https://github.com/brevzin updated https://github.com/llvm/llvm-project/pull/146815 >From 40290a957b6f349a9b670193c8bc699d8eb7d373 Mon Sep 17 00:00:00 2001 From: Barry Revzin Date: Fri, 27 Jun 2025 17:29:45 -0500 Subject: [PATCH 1/7] [P3074] Implementing part of trivial unions --- clang/lib/A

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

2025-07-03 Thread via cfe-commits
@@ -0,0 +1,106 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s flovent wrote: > Added `alpha.unix.cstring` and `unix.cstring` to testcase, > `alpha.unix.cstring` makes a difference, in line 66, if `size` is equal to > `dest`'s size, `alpha.uni

[clang] [Clang][AArch64] Remove redundant tune args to the backend (PR #146896)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Tomer Shafir (tomershafir) Changes This change removes unnecessary tune args to the AArch64 backend. The AArch64 backend automatically handles `tune-cpu` and adds the necessar y features based on the models from TableGen. It fol

[clang] [Clang][AArch64] Remove redundant tune args to the backend (PR #146896)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Tomer Shafir (tomershafir) Changes This change removes unnecessary tune args to the AArch64 backend. The AArch64 backend automatically handles `tune-cpu` and adds the necessar y features based on the models from TableGen. It follow

[clang] [Clang][AArch64] Remove redundant tune args to the backend (PR #146896)

2025-07-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tomer Shafir (tomershafir) Changes This change removes unnecessary tune args to the AArch64 backend. The AArch64 backend automatically handles `tune-cpu` and adds the necessar y features based on the models from TableGen. It follows this

[clang] [Clang][AArch64] Remove redundant tune args to the backend (PR #146896)

2025-07-03 Thread Tomer Shafir via cfe-commits
https://github.com/tomershafir ready_for_review https://github.com/llvm/llvm-project/pull/146896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][OpenMP] Refactor mapinfo generation for captured vars (PR #146891)

2025-07-03 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 cpp -- clang/lib/CodeGen/CGOpenMPRuntime.cpp ``

[clang] [llvm] [win][aarch64] Always reserve frame pointers for Arm64 Windows (PR #146582)

2025-07-03 Thread David Spickett via cfe-commits
DavidSpickett wrote: The actual error is the same as seen elsewhere: ``` $ /home/david.spickett/build-llvm-aarch64/bin/flang --target=aarch64-pc-windows-msvc -Werror ../llvm-project/flang/test/Semantics/windows.f90 flang-21: warning: unable to find a Visual Studio installation; try running Cla

[clang] [clang] SourceManager: Cache offsets for LastFileIDLookup to speed up getFileID (PR #146782)

2025-07-03 Thread Haojian Wu via cfe-commits
@@ -832,13 +835,11 @@ FileID SourceManager::getFileIDLocal(SourceLocation::UIntTy SLocOffset) const { unsigned LessIndex = 0; // upper bound of the search range. unsigned GreaterIndex = LocalSLocEntryTable.size(); - if (LastFileIDLookup.ID >= 0) { -// Use the LastFi

[clang] [NFC][Clang][OpenMP] Refactor mapinfo generation for captured vars (PR #146891)

2025-07-03 Thread Abhinav Gaba via cfe-commits
@@ -8727,11 +8733,13 @@ class MappableExprsHandler { } } - /// Generate the base pointers, section pointers, sizes, map types, and - /// mappers associated to a given capture (all included in \a CombinedInfo). - void generateInfoForCapture(const CapturedStmt::Capture

[clang] [NFC][Clang][OpenMP] Refactor mapinfo generation for captured vars (PR #146891)

2025-07-03 Thread Abhinav Gaba via cfe-commits
@@ -8826,6 +8830,51 @@ class MappableExprsHandler { return (HasPresent && !HasPresentR) || (HasAllocs && !HasAllocsR); }); +auto GenerateInfoForComponentLists = +[&](ArrayRef DeclComponentLists, +bool IsEligibleForTargetParamFlag) { +

[clang] [clang][dataflow] Handle when `this` refers to a different location (PR #146900)

2025-07-03 Thread Jan Voung via cfe-commits
https://github.com/jvoung created https://github.com/llvm/llvm-project/pull/146900 When `this` is under a CXXDefaultInitExpr. E.g., struct S { int x; int y = this->x; }; struct R { int foo() { // `this` for `a` refers to an R, but `this` // for `x` refers to an S. return S{this

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/146890 >From c138801c212f69f4dee83c7516e0e77eb876a9f0 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 3 Jul 2025 14:26:59 +0200 Subject: [PATCH 1/2] [Clang] Correctly handle allocations in the condition of a

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
@@ -20629,6 +20629,9 @@ Sema::ConditionResult Sema::ActOnCondition(Scope *S, SourceLocation Loc, case ConditionKind::ConstexprIf: Cond = CheckBooleanCondition(Loc, SubExpr, true); +assert(isa(Cond.get()) && cor3ntin wrote: Actually the assert was i

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
@@ -1931,15 +1931,13 @@ Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, return ParseCXXCondition(nullptr, Loc, CK, MissingOK); } -ExprResult Expr = [&] { - EnterExpressionEvaluationContext Eval( - Actions, Sema::ExpressionEvalua

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Erich Keane via cfe-commits
@@ -20643,10 +20641,12 @@ Sema::ConditionResult Sema::ActOnCondition(Scope *S, SourceLocation Loc, {SubExpr}, PreferredConditionType(CK)); if (!Cond.get()) return ConditionError(); - } - if (!isa(Cond.get())) + } else if (Cond.isUsabl

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

2025-07-03 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: According to the CI Checks, one of your testcases is failing: https://github.com/llvm/llvm-project/actions/runs/16055061425?pr=146212 > error: 'expected-warning' diagnostics expected but not seen: File /home/gha/actions-runner/_work/llvm-project/llvm-pr

  1   2   3   4   5   6   >