[clang] [llvm] [AArch64] Add support for -mcpu=gb10. (PR #146515)

2025-07-02 Thread Ricardo Jesus via cfe-commits
@@ -176,25 +176,43 @@ StringRef sys::detail::getHostCPUNameForARM(StringRef ProcCpuinfoContent) { SmallVector Lines; ProcCpuinfoContent.split(Lines, '\n'); - // Look for the CPU implementer line. + // Look for the CPU implementer and hardware lines, and store the CPU pa

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-07-02 Thread Lukas Döllerer via cfe-commits
@@ -2562,8 +2565,9 @@ void WebAssemblyCFGStackify::rewriteDepthImmediates(MachineFunction &MF) { MO = MachineOperand::CreateImm(getDelegateDepth(Stack, MO.getMBB())); else if (MI.getOpcode() == WebAssembly::RETHROW) MO = MachineOperand::CreateImm(ge

[clang] [llvm] [SPIRV] Add more id and range builtIns (PR #143909)

2025-07-02 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > There was an attempt to add universal GPU builtins in #131190 . Between these > 2 patches I prefer the current approach as it adds more common functionality > for all vendors. Yet let me tag folks that have participated in a discussion > of the mentioned PR. I would love to h

[clang-tools-extra] [clang-tidy] Fix false positive for cppcoreguidelines-pro-bounds-pointer-arithmetic (PR #127394)

2025-07-02 Thread Baranov Victor via cfe-commits
vbvictor wrote: "Checking for the ability to merge automatically..." was for the past 6 hours, could you please rebase on fresh main again, maybe some conflicts cause it. https://github.com/llvm/llvm-project/pull/127394 ___ cfe-commits mailing list cf

[clang] [llvm] [SPIRV] Add more id and range builtIns (PR #143909)

2025-07-02 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/143909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add more id and range builtIns (PR #143909)

2025-07-02 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/143909 ___ 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-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 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] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)

2025-07-02 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Ok, looks like the clang-tidy test failure is related to the `-header-filter` > option: > > ```c++ > // Check that `-header-filter` operates on the same file paths as paths in > // diagnostics printed by ClangTidy. > #include "dir1/dir2/../header_alias.h" > // CHECK_HEADER

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-02 Thread via cfe-commits
@@ -7246,337 +7248,339 @@ class Parser : public CodeCompletionHandler { ParseStatementOrDeclaration(StmtVector &Stmts, ParsedStmtContext StmtCtx, SourceLocation *TrailingElseLoc = nullptr); - StmtResult ParseStatementOrDeclarationAfterAttribute

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-07-02 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From 4816fb9bc0761d8761798300bb419db0072c9d04 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/5] [flang][flang-driver] atomic control support --- clang/i

[clang] [clang-tools-extra] [clang][modules] Serialize `CodeGenOptions` (PR #146422)

2025-07-02 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > > Would you have a different opinion if I told you that the next PR in my > > queue re-introduces AFFECTING_*_CODEGENOPT to represent the affecting > > ENUM_LANGOPT(ExceptionHandling, ...? > > I think it helps a bit, but the core problem is that we don't have > `BENIGN_C

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

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

[clang-tools-extra] [clang-tidy] fix false negatives with type aliases in `cppcoreguidlines-pro-bounds-pointer-arithmetic` check (PR #139430)

2025-07-02 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/139430 >From 08ae4bb4acbd52db438a9defa80ab9568c9e00d8 Mon Sep 17 00:00:00 2001 From: Baranov Victor Date: Sun, 11 May 2025 05:22:55 +0300 Subject: [PATCH] [clang-tidy] fix false positives with type aliases in pro-bou

[clang] [clang-format] Propagate `LeadingEmptyLinesAffected` when joining lines (PR #146761)

2025-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Eric Li (tJener) Changes Before this commit, when `LineJoiner` joins a line with affected leading whitespace, it would drop the knowledge of this entirely. However, when the `AffectedRangeManager` is computing the affected lines, t

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-02 Thread via cfe-commits
@@ -80,6 +81,11 @@ Parser::ParseStatementOrDeclaration(StmtVector &Stmts, assert((CXX11Attrs.empty() || Res.isInvalid() || Res.isUsable()) && "attributes on empty statement"); + if (HasStdAttr && getLangOpts().C99 && yronglin wrote: I originally w

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-02 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng edited https://github.com/llvm/llvm-project/pull/146636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-02 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng updated https://github.com/llvm/llvm-project/pull/146636 >From b6aa91862046fdd021e638f0f22e9cbbbfba418f Mon Sep 17 00:00:00 2001 From: Changpeng Fang Date: Tue, 1 Jul 2025 22:41:41 -0700 Subject: [PATCH 1/2] AMDGPU: Implement tensor load and store instructions for

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

2025-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes Upstream SubstNonTypeTemplateParmExpr support for ComplexType https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/146755.diff 2 Files Affected:

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

2025-07-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/146755 Upstream SubstNonTypeTemplateParmExpr support for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 535fcf7db24542fe123e91c8bcdb5de3bdfd8594 Mon Sep 17 00:00:00 2001 From: AmrDeveloper

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

2025-07-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 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] [C23] Fix typeof handling in enum declarations (PR #146394)

2025-07-02 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/146394 ___ 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-02 Thread via cfe-commits
@@ -2850,7 +2870,8 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr, isFoldOperator(NextToken().getKind())) { ExprType = ParenParseOption::FoldExpr; return ParseFoldExpression(ExprResult(), T); - } else if (isTypeCast) { +

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

2025-07-02 Thread via cfe-commits
Sirraide wrote: > ```c++ > typeof(int){} x; // Probably parsed as typeof(int{}) > ``` Actually, I’m not sure what we think this is supposed to be; I haven’t checked. https://github.com/llvm/llvm-project/pull/146394 ___ cfe-commits mailing list cfe-co

[clang] [Clang][attr] Add cfi_salt attribute (PR #141846)

2025-07-02 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/141846 >From bfdf16cee252dc6491f15c0715c7a39538fbf120 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 23 Apr 2025 13:14:24 -0700 Subject: [PATCH 1/2] [Clang][attr] Add cfi_salt attribute The new 'cfi_salt' a

[clang] [llvm] WebAssembly: Move validation of EH flags to TargetMachine construct time (PR #146634)

2025-07-02 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-a-1` while building `clang,llvm` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/18644 Here is the rele

[clang] [llvm] Add __attribute__((visibility("default"))) attribute to certain symbols to stop them being hidden when linking clangInterpreter library to other libraries during Emscripten build (PR #1

2025-07-02 Thread via cfe-commits
https://github.com/mcbarton updated https://github.com/llvm/llvm-project/pull/146786 >From ef5f9e92dca662c7de4dd6cc2ef8c02ec3aaad60 Mon Sep 17 00:00:00 2001 From: mcbarton <150042563+mcbar...@users.noreply.github.com> Date: Wed, 2 Jul 2025 22:17:30 +0100 Subject: [PATCH 1/3] Add __attribute__((v

[clang] [llvm] Revert "Move python binding tests to lit framework (#146486)" (PR #146789)

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

[libclc] [libclc] Declare workitem built-ins in clc, move ptx-nvidiacl workitem built-ins into clc (PR #144333)

2025-07-02 Thread Wenju He via cfe-commits
https://github.com/wenju-he edited https://github.com/llvm/llvm-project/pull/144333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Declare workitem built-ins in clc, move ptx-nvidiacl workitem built-ins into clc (PR #144333)

2025-07-02 Thread Wenju He via cfe-commits
wenju-he wrote: > I am seeing unresolved CLC functions in `nvptx--.bc` and `nvptx64--.bc`. I > think it's because we're now building things like `get_num_groups` for > `nvptx`/`nvptx64`, whereas previously they were not being built for those > targets. We're also not building `__clc_get_num_gr

[clang] [Clang][Driver][SamplePGO] Enable -fsample-profile-use-profi by default (PR #146795)

2025-07-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: Driver change looks reasonable if samplepgo maintainers decide to proceed. https://github.com/llvm/llvm-project/pull/146795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

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

2025-07-02 Thread Barry Revzin via cfe-commits
https://github.com/brevzin created https://github.com/llvm/llvm-project/pull/146815 This commit makes union construction/destruction trivial by default, but does not add the lifetime aspects of the paper — am holding out until P3726R0 will be discussed which alters that approach somewhat based

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

2025-07-02 Thread Barry Revzin via cfe-commits
https://github.com/brevzin edited https://github.com/llvm/llvm-project/pull/146815 ___ 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-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Barry Revzin (brevzin) Changes This commit makes union construction/destruction trivial by default, but does not add the lifetime aspects of the paper — am holding out until P3726R0 will be discussed which alters that approach somewhat ba

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

2025-07-02 Thread Barry Revzin via cfe-commits
brevzin wrote: Oh. Actually I didn't quite properly implement the destructor rule, since that changed since I originally implemented this. The new rule is that the default destructor for a union `X` [is deleted if](http://eel.is/c++draft/class.dtor#7.2) * default constructing an `X` either fa

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

2025-07-02 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/2] [P3074] Implementing part of trivial unions --- clang/lib/A

[clang] [Clang][Driver][SamplePGO] Enable -fsample-profile-use-profi by default (PR #146795)

2025-07-02 Thread Snehasish Kumar via cfe-commits
https://github.com/snehasish approved this pull request. LGTM, please give downstream users ~1w to add the opt out flag to build configs before landing this. CC @llvm/pr-subscribers-pgo for visibility. https://github.com/llvm/llvm-project/pull/146795 __

[clang] [llvm] [AArch64] Add support for -mcpu=gb10. (PR #146515)

2025-07-02 Thread Sjoerd Meijer via cfe-commits
https://github.com/sjoerdmeijer approved this pull request. Thanks, LGTM too. https://github.com/llvm/llvm-project/pull/146515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0588e81 - [Serialization] Use the SourceLocation::UIntTy instead of the raw type

2025-07-02 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2025-07-02T09:11:55+02:00 New Revision: 0588e8188c647460b641b09467fe6b13a8d510d5 URL: https://github.com/llvm/llvm-project/commit/0588e8188c647460b641b09467fe6b13a8d510d5 DIFF: https://github.com/llvm/llvm-project/commit/0588e8188c647460b641b09467fe6b13a8d510d5.diff LO

[clang] [clang] [modules] Add err_main_in_named_module (PR #146635)

2025-07-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/146635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [modules] Add err_main_in_named_module (PR #146635)

2025-07-02 Thread Chuanqi Xu via cfe-commits
@@ -12486,6 +12486,14 @@ void Sema::CheckMain(FunctionDecl *FD, const DeclSpec &DS) { : FixItHint()); FD->setInvalidDecl(true); } + +// In C++ [basic.start.main]p3, it is said a program attaching main to a +// named module is i

[clang] [clang] [modules] Add err_main_in_named_module (PR #146635)

2025-07-02 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/146635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [modules] Add err_main_in_named_module (PR #146635)

2025-07-02 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Please make sure the libc++ tests won't get affected. I am not sure if the modules related tests in libc++ run by default. https://github.com/llvm/llvm-project/pull/146635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] [AArch64] Add support for -mcpu=gb10. (PR #146515)

2025-07-02 Thread David Green via cfe-commits
@@ -176,25 +176,43 @@ StringRef sys::detail::getHostCPUNameForARM(StringRef ProcCpuinfoContent) { SmallVector Lines; ProcCpuinfoContent.split(Lines, '\n'); - // Look for the CPU implementer line. + // Look for the CPU implementer and hardware lines, and store the CPU pa

[clang] [llvm] Non constant size and offset in DWARF (PR #141106)

2025-07-02 Thread Adam Nemet via cfe-commits
anemet wrote: > I have a fix for the crash that I'll send momentarily. Do you have a link? https://github.com/llvm/llvm-project/pull/141106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] clang: Fix parsing of seh exception model (PR #146643)

2025-07-02 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/146643 Fixes regression reported https://github.com/llvm/llvm-project/pull/146342#issuecomment-3026600152 The test could probably be better. I'm not sure what special is happening with the module compile, but I can't

[clang] clang: Fix parsing of seh exception model (PR #146643)

2025-07-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: * **#146643** https://app.graphite.dev/github/pr/llvm/llvm-project/146643?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14664

[clang] clang: Fix parsing of seh exception model (PR #146643)

2025-07-02 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/146643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Fix parsing of seh exception model (PR #146643)

2025-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Matt Arsenault (arsenm) Changes Fixes regression reported https://github.com/llvm/llvm-project/pull/146342#issuecomment-3026600152 The test could probably be better. I'm not sure what special is happening

[clang] clang: Forward exception_model flag for bitcode inputs (PR #146342)

2025-07-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: > This broke building C++ modules for mingw targets. Repro: > > `empty.cppm`: > > ```c++ > export module empty; > ``` > > ``` > $ clang -target x86_64-windows-gnu -x c++-module empty.cppm -c -o > empty.cppm.obj -std=gnu++23 > error: invalid value 'seh' in '-exception-model=seh'

[clang] HIPSPV: Unbundle SDL (PR #136412)

2025-07-02 Thread Paulius Velesko via cfe-commits
https://github.com/pvelesko updated https://github.com/llvm/llvm-project/pull/136412 >From fe6a426fc135c7232650b5ebac465ceaa66d7a20 Mon Sep 17 00:00:00 2001 From: Paulius Velesko Date: Sat, 19 Apr 2025 10:02:59 +0300 Subject: [PATCH 1/4] HIPSPV: Unbundle SDL This fixes the issue of rdc linking

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-02 Thread Nikita Popov via cfe-commits
@@ -849,6 +896,7 @@ const CGFunctionInfo &CodeGenTypes::arrangeLLVMFunctionInfo( void *insertPos = nullptr; CGFunctionInfo *FI = FunctionInfos.FindNodeOrInsertPos(ID, insertPos); + llvm::abi::ABIFunctionInfo *tempFI; nikic wrote: Move down to initializat

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-02 Thread Nikita Popov via cfe-commits
@@ -825,6 +831,47 @@ void computeSPIRKernelABIInfo(CodeGenModule &CGM, CGFunctionInfo &FI); } } // namespace clang +ABIArgInfo CodeGenTypes::convertABIArgInfo(const llvm::abi::ABIArgInfo &abiInfo, + QualType type) {

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-02 Thread Nikita Popov via cfe-commits
@@ -825,6 +831,47 @@ void computeSPIRKernelABIInfo(CodeGenModule &CGM, CGFunctionInfo &FI); } } // namespace clang +ABIArgInfo CodeGenTypes::convertABIArgInfo(const llvm::abi::ABIArgInfo &abiInfo, + QualType type) { + ABIArgInfo res

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-02 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,69 @@ +//===- ABIInfo.h - ABI information access & encapsulation - 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] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)

2025-07-02 Thread Corentin Jabot via cfe-commits
@@ -35,6 +35,7 @@ namespace clang { class TextDiagnostic : public DiagnosticRenderer { raw_ostream &OS; const Preprocessor *PP; + llvm::StringMap> SimplifiedFileNameCache; cor3ntin wrote: Is this used? https://github.com/llvm/llvm-project/pull/143520 ___

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

2025-07-02 Thread Corentin Jabot via cfe-commits
@@ -2403,3 +2403,75 @@ SourceManagerForFile::SourceManagerForFile(StringRef FileName, assert(ID.isValid()); SourceMgr->setMainFileID(ID); } + +StringRef +SourceManager::getNameForDiagnostic(StringRef Filename, +const DiagnosticOptions &O

[clang] HIPSPV: Unbundle SDL (PR #136412)

2025-07-02 Thread Paulius Velesko via cfe-commits
pvelesko wrote: @svenvh saw you merged other SPIR-V/HIP related PRs https://github.com/llvm/llvm-project/pull/136412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DenseMap] Do not align pointer sentinel values (NFC) (PR #146595)

2025-07-02 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/146595 >From 8bfa43c61c47c978ddcba509f22cf0a605b83fa0 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 1 Jul 2025 13:51:43 +0200 Subject: [PATCH 1/2] [DenseMap] Do not align pointer sentinel values (NFC) DenseMapI

[clang] [libcxx] [clang] [modules] Add err_main_in_named_module (PR #146635)

2025-07-02 Thread Ashwin Banwari via cfe-commits
kish1n wrote: I can't figure out how to make buildbot run the libc++ tests forcefully, so I add a dummy change in libcxx so the tests will run on this PR, and then will remove the change after. https://github.com/llvm/llvm-project/pull/146635 ___ cfe

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

2025-07-02 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/146664 A new checker for checking if terminating zero is missing from a string. There is an existing `unix.cstring.NotNullTerminated` checker that looks similar but checks just if a non-string like object is passed t

[clang] [CIR] Introduce IntTypeInterface to allow uniform integer types handling (PR #146660)

2025-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: Henrich Lauko (xlauko) Changes This will in future allow to use builtin integer types within cir operations This mirrors incubat changes from https://github.com/llvm/clangir/pull/1724 --- Full diff: https://gi

[clang] [DebugInfo] Init DwarfVersion of MCOptions like the other. (PR #146666)

2025-07-02 Thread Liu Ke via cfe-commits
https://github.com/Sockke created https://github.com/llvm/llvm-project/pull/14 Should the backend's DwarfVersion be initialized like other options? Previously, -gdwarf-xxx did not take effect in the backend—was there a specific reason for this? >From 1a402b04e60ef3c74c8a3a7ecb3ef0439415d6

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

2025-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Kéri (balazske) Changes A new checker for checking if terminating zero is missing from a string. There is an existing `unix.cstring.NotNullTerminated` checker that looks similar but checks just if a non-string lik

[clang] [DebugInfo] Init DwarfVersion of MCOptions like the other. (PR #146666)

2025-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Liu Ke (Sockke) Changes Should the backend's DwarfVersion be initialized like other options? Previously, -gdwarf-xxx did not take effect in the backend—was there a specific reason for this? --- Full diff: https://github.com/llvm/llvm-pro

[clang] [llvm] [SPIRV] Add more id and range builtIns (PR #143909)

2025-07-02 Thread Dmitry Sidorov via cfe-commits
https://github.com/MrSidims approved this pull request. https://github.com/llvm/llvm-project/pull/143909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add MC layer support for load transpose instructions for gfx1250 (PR #146024)

2025-07-02 Thread Mariusz Sikora via cfe-commits
@@ -1092,19 +1092,23 @@ let SubtargetPredicate = isGFX12Plus in { } let WaveSizePredicate = isWave32 in { -let Mnemonic = "global_load_tr_b128" in -defm GLOBAL_LOAD_TR_B128_w32 : FLAT_Global_Load_Pseudo <"global_load_tr_b128_w32", VReg_128>; -let Mnemonic = "

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

2025-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes A new checker for checking if terminating zero is missing from a string. There is an existing `unix.cstring.NotNullTerminated` checker that looks similar but checks just if a non-string like object is passed

[clang] [llvm] [SPIRV] Add more id and range builtIns (PR #143909)

2025-07-02 Thread Dmitry Sidorov via cfe-commits
MrSidims wrote: There was an attempt to add GPU intrinsics (with exposure of them in clang) in https://github.com/llvm/llvm-project/pull/131190 . Between these 2 patches I prefer the current approach as it adds more common functionality for all vendors. Yet let me tag folks that have participa

[clang] [lld] [llvm] [LLVM][WebAssembly] Implement branch hinting proposal (PR #146230)

2025-07-02 Thread Lukas Döllerer via cfe-commits
https://github.com/Lukasdoe updated https://github.com/llvm/llvm-project/pull/146230 From e4b0ccd8e1ac579066c559e890c3d610bbf226fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=B6llerer?= Date: Wed, 2 Jul 2025 10:14:20 +0200 Subject: [PATCH 1/4] [LLVM][WebAssembly] Implement branch hint

[clang] [CIR] Introduce IntTypeInterface to allow uniform integer types handling (PR #146660)

2025-07-02 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#146663** https://app.graphite.dev/github/pr/llvm/llvm-project/146663?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> * **#146662** https://app.graphite.dev/github/pr/llvm/llvm-p

[clang] [clang-tools-extra] [clang][CodeComplete] skip explicit obj param in SignatureHelp (PR #146649)

2025-07-02 Thread Yanzuo Liu via cfe-commits
@@ -6,9 +6,21 @@ int main() { A a {}; a. } -// RUN: %clang_cc1 -cc1 -fsyntax-only -code-completion-at=%s:%(line-2):5 -std=c++23 %s | FileCheck %s -// CHECK: COMPLETION: A : A:: -// CHECK-NEXT: COMPLETION: foo : [#void#]foo(<#int arg#>) -// CHECK-NEXT: COMPLETION: operator=

[clang] [clang-tools-extra] [clang][CodeComplete] skip explicit obj param in SignatureHelp (PR #146649)

2025-07-02 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: Thank you for the fix! https://github.com/llvm/llvm-project/pull/146649 ___ 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-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Upstream support for SubstNonTypeTemplateParmExpr --- Full diff: https://github.com/llvm/llvm-project/pull/146751.diff 2 Files Affected: - (modified) clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp (+5) - (

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

2025-07-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/146751 Upstream support for SubstNonTypeTemplateParmExpr >From 09eb48db09711dd0a88d37b07eb0873c939c9176 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 2 Jul 2025 20:02:35 +0200 Subject: [PATCH] [CIR] Upst

[clang] [clang-tools-extra] [clang][modules] Serialize `CodeGenOptions` (PR #146422)

2025-07-02 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: > Would you have a different opinion if I told you that the next PR in my > queue re-introduces AFFECTING_*_CODEGENOPT to represent the affecting > ENUM_LANGOPT(ExceptionHandling, ...? I think it helps a bit, but the core problem is that we don't have `BENIGN_CODEGENOPT`.

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-07-02 Thread John McCall via cfe-commits
rjmccall wrote: I think Eli is suggesting something like the rule for [@available](https://clang.llvm.org/docs/LanguageExtensions.html#objective-c-available): - If a builtin is unconditionally available, you can always use it without any diagnostics. - If a builtin is only available on specific

[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)

2025-07-02 Thread Changpeng Fang via cfe-commits
@@ -5354,6 +5368,22 @@ AMDGPURegisterBankInfo::getInstrMapping(const MachineInstr &MI) const { } case Intrinsic::amdgcn_pops_exiting_wave_id: return getDefaultMappingSOP(MI); +case Intrinsic::amdgcn_tensor_load_to_lds_d2: +case Intrinsic::amdgcn_tensor_st

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-02 Thread via cfe-commits
@@ -15,18 +15,19 @@ void f(int n) { return; } case 2: +// FIXME: Should we emit an error {{fallthrough annotation does not directly precede switch label}}? yronglin wrote: Hmm, this because I originally set the new diagnostic's severity to `Er

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-02 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/146224 >From 43e2dc670d7c9ed5e23b5d26dff1e273c84b5a53 Mon Sep 17 00:00:00 2001 From: yronglin Date: Thu, 3 Jul 2025 02:15:22 +0800 Subject: [PATCH 1/2] [C23][Parser] Diagnostic for attribute declaration where stateme

[clang] 2ed7b22 - [HLSL] Add `-Gis` option to clang-dxc (#146448)

2025-07-02 Thread via cfe-commits
Author: Joshua Batista Date: 2025-07-02T11:22:42-07:00 New Revision: 2ed7b22f0c9e91cf2565aafe1b0bdf387c5a366a URL: https://github.com/llvm/llvm-project/commit/2ed7b22f0c9e91cf2565aafe1b0bdf387c5a366a DIFF: https://github.com/llvm/llvm-project/commit/2ed7b22f0c9e91cf2565aafe1b0bdf387c5a366a.diff

[clang] [HLSL] Add `-Gis` option to clang-dxc (PR #146448)

2025-07-02 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/146448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-02 Thread via cfe-commits
@@ -35,7 +36,7 @@ void f(int n) { [[fallthrough]]; } case 8: -[[fallthrough]]; // expected-error {{does not directly precede switch label}} +[[fallthrough]]; // FIXME: The error {{does not directly precede switch label}} cannot reproduce in this translate

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-02 Thread via cfe-commits
yronglin wrote: Thanks for your review! https://github.com/llvm/llvm-project/pull/146224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver][SamplePGO] Introduce -fno_sample_profile_use_profi flag for SamplePGO (PR #145957)

2025-07-02 Thread Nilanjana Basu via cfe-commits
https://github.com/nilanjana87 updated https://github.com/llvm/llvm-project/pull/145957 >From f0893f3b64661fc5a6ab39e7bdcc86a9142221a1 Mon Sep 17 00:00:00 2001 From: Nilanjana Basu Date: Thu, 26 Jun 2025 11:54:14 -0700 Subject: [PATCH 1/3] [Clang][Driver][SamplePGO] Enable -fsample-profile-use

[clang] [flang] [mlir] [flang][flang-driver][mlir][OpenMP] atomic control support (PR #143441)

2025-07-02 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/143441 >From 4816fb9bc0761d8761798300bb419db0072c9d04 Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Wed, 4 Jun 2025 15:12:49 -0500 Subject: [PATCH 1/5] [flang][flang-driver] atomic control support --- clang/i

[clang] [clang-format] Propagate `LeadingEmptyLinesAffected` when joining lines (PR #146761)

2025-07-02 Thread Eric Li via cfe-commits
https://github.com/tJener updated https://github.com/llvm/llvm-project/pull/146761 >From 61e2f8e1d79563ad9bd9478e97ee1d597518f305 Mon Sep 17 00:00:00 2001 From: Eric Li Date: Wed, 2 Jul 2025 14:46:45 -0400 Subject: [PATCH 1/2] [clang-format] Propagate `LeadingEmptyLinesAffected` when joining l

[clang] clang: Fix parsing of seh exception model (PR #146643)

2025-07-02 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: I'll go ahead and land this now to unbreak my builds. https://github.com/llvm/llvm-project/pull/146643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7fc50e9 - clang: Fix parsing of seh exception model (#146643)

2025-07-02 Thread via cfe-commits
Author: Matt Arsenault Date: 2025-07-02T23:21:47+03:00 New Revision: 7fc50e92a59c764eb6b1897fcdd506aacb92629c URL: https://github.com/llvm/llvm-project/commit/7fc50e92a59c764eb6b1897fcdd506aacb92629c DIFF: https://github.com/llvm/llvm-project/commit/7fc50e92a59c764eb6b1897fcdd506aacb92629c.diff

[clang] clang: Fix parsing of seh exception model (PR #146643)

2025-07-02 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo closed https://github.com/llvm/llvm-project/pull/146643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream get_bitfield operation to load bit-field members from structs (PR #145971)

2025-07-02 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/145971 >From f1f1d8c8db9d3c976e2baa50ac70bfa88b905434 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Thu, 26 Jun 2025 15:51:02 -0500 Subject: [PATCH 1/7] Get Lvalue for bit-field --- clang/include/cla

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-02 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/143345 >From 2211dbf5b3167797ec2e5bf4db5adc13427d3e7b Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Mon, 9 Jun 2025 00:58:47 -0400 Subject: [PATCH] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeCom

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-02 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review https://github.com/llvm/llvm-project/pull/143345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (PR #143345)

2025-07-02 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Updated patch to add dedicated `HeuristicResolver` tests. And I did catch a bug in the unified implementation in the process, so thank you for suggesting it:) https://github.com/llvm/llvm-project/pull/143345 ___ cfe-commits maili

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-07-02 Thread John McCall via cfe-commits
rjmccall wrote: So your users today are building for generic AMDGPU but using builtins that are only available on a specific processor release? Presumably that code is protected *somehow* and their programs are not simply crashing at runtime. Is that something you'd be able to leverage at all,

[clang] [Clang] Fix clang crash for fopenmp statement(parallel for) inside lambda function (PR #146772)

2025-07-02 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta created https://github.com/llvm/llvm-project/pull/146772 Previously, implicit variable like `__begin3` used in range-based OpenMP for-loops were not being properly privatized, leading to missing entries in LocalDeclMap and crashes. This patch ensures such implicit

[clang] [Clang] Fix clang crash for fopenmp statement(parallel for) inside lambda function (PR #146772)

2025-07-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Shivam Gupta (xgupta) Changes Previously, implicit variable like `__begin3` used in range-based OpenMP for-loops were not being properly privatized, leading to missing entries in LocalDeclMap and cras

[clang] clang: Fix parsing of seh exception model (PR #146643)

2025-07-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/18970 Here is the relevant pie

[clang] clang: Fix parsing of seh exception model (PR #146643)

2025-07-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/22666 Here is th

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-07-02 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > So your users today are building for generic AMDGPU but using builtins that > are only available on a specific processor release? Presumably that code is > protected _somehow_ and their programs are not simply crashing at runtime. Is > that something you'd be able to leverage

[clang] [clang-tools-extra] [clang][modules] Serialize `CodeGenOptions` (PR #146422)

2025-07-02 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: > Ok, so what do you suggest? Change all CODEGENOPT to BENIGN_CODEGENOPT before > this PR lands? This would be fine with me. > (Or alternatively/equivalently go all the way and add an explicit benign > effect on AST argument to CODEGENOPT, similar to what I linked above for

<    1   2   3   4   5   >