[clang] 3ca9238 - [clang-format][NFC] Fix test case format

2025-02-11 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-02-11T23:58:53-08:00 New Revision: 3ca9238cb0d3cdf1961c81931a624b24c787ed82 URL: https://github.com/llvm/llvm-project/commit/3ca9238cb0d3cdf1961c81931a624b24c787ed82 DIFF: https://github.com/llvm/llvm-project/commit/3ca9238cb0d3cdf1961c81931a624b24c787ed82.diff LOG:

[clang] [Clang][CMake][MSVC] Install PDBs alongside executables (PR #126675)

2025-02-11 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Also this one is broken https://lab.llvm.org/buildbot/#/builders/107/builds/7929 cc @fmayer https://github.com/llvm/llvm-project/pull/126675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang-format] Add ConfigFile option (PR #113864)

2025-02-11 Thread Owen Pan via cfe-commits
owenca wrote: Did you get an answer to my [question](https://github.com/llvm/llvm-project/issues/107808#issuecomment-2601159049) yet? https://github.com/llvm/llvm-project/pull/113864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [clang][bytecode] Fix operator new source expression (PR #126870)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes ... for composite element types. Looks like I forgot this in e6030d389571b3f1b0f0c5a35b7fa45937ed0f6c --- Full diff: https://github.com/llvm/llvm-project/pull/126870.diff 2 Files Affected: - (modified) cl

[clang] [clang][bytecode] Fix operator new source expression (PR #126870)

2025-02-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/126870 ... for composite element types. Looks like I forgot this in e6030d389571b3f1b0f0c5a35b7fa45937ed0f6c >From 56245b317f3b71a2c11a188ac0bb4de114ea012c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?=

[clang] [clang-tools-extra] Revert "[clang] Compute accurate begin location for CallExpr with exp… (PR #126789)

2025-02-11 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: I posted a fix at https://github.com/llvm/llvm-project/pull/126868. https://github.com/llvm/llvm-project/pull/126789 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-11 Thread via cfe-commits
luxufan wrote: > Thanks for the work! Do you have some stats with this change applied? Thank you for your review! I currently only have statistics for the implementation for -fsplit-lto-unit, as I have not yet evaluated -fno-split-lto-unit in our benchmark. https://github.com/llvm/llvm-projec

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-11 Thread via cfe-commits
@@ -0,0 +1,20 @@ +; RUN: llvm-as %s -o - | llvm-dis -o %t.ll +; RUN: grep "^\^" %s >%t2 +; RUN: grep "^\^" %t.ll >%t3 +; Expect that the summary information is the same after round-trip through +; llvm-as and llvm-dis. +; RUN: diff -b %t2 %t3 + +target triple = "aarch64-unknown-li

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-11 Thread via cfe-commits
https://github.com/luxufan updated https://github.com/llvm/llvm-project/pull/126336 >From 83b532a3382a07e472558b8813d43a6f51801423 Mon Sep 17 00:00:00 2001 From: luxufan Date: Thu, 23 Jan 2025 09:28:15 +0800 Subject: [PATCH 1/9] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto

[clang] [-Wunsafe-buffer-usage] Fix assert when constexpr size passed to snprintf() (#119786) (PR #124022)

2025-02-11 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > When possible we should always add tests, I think the right place would be: > > https://github.com/llvm/llvm-project/blob/main/clang/test/SemaCXX/warn-unsafe-buffer-usage-libc-functions.cpp > > CC @ziqingluo-90 > > Do we need a release note or is this feature clang-20? T

[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)

2025-02-11 Thread Amit Kumar Pandey via cfe-commits
ampandey-1995 wrote: Hi @arsenm & @jhuber6 , I removed the usage of ```std::tuple``` in the last commit f738420 so as to simplify it much further. https://github.com/llvm/llvm-project/pull/126671 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)

2025-02-11 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/126671 >From 8367c38f7f04273e3ab2451351b6db8d3f7dbc0c Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Tue, 11 Feb 2025 08:06:21 +0530 Subject: [PATCH 1/4] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From d1ed094aec0713cf6ff75b4244bcd4d15265c6af Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/4] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
@@ -352,16 +352,37 @@ bool CodeGenAction::beginSourceFileAction() { // Add OpenMP-related passes // WARNING: These passes must be run immediately after the lowering to ensure // that the FIR is correct with respect to OpenMP operations/attributes. - if (ci.getInvocation(

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From d1ed094aec0713cf6ff75b4244bcd4d15265c6af Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/3] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,104 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// 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] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-11 Thread Kareem Ergawy via cfe-commits
@@ -292,7 +298,19 @@ createTargetMachine(llvm::StringRef targetTriple, std::string &error) { static llvm::LogicalResult runOpenMPPasses(mlir::ModuleOp mlirModule) { mlir::PassManager pm(mlirModule->getName(), mlir::OpPassManager::Nesting::Implicit); -

[clang] [Clang][CMake][MSVC] Install PDBs alongside executables (PR #126675)

2025-02-11 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/22611 Here is

[clang] [Clang] Don't give up on an unsuccessful function instantiation (PR #126723)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes For constexpr function templates, we immediately instantiate them upon reference. However, if the function isn't defined at the time of instantiation, even though it might be defined later, the instantiation

[clang] [Clang] Don't give up on an unsuccessful function instantiation (PR #126723)

2025-02-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/126723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't give up on an unsuccessful function instantiation (PR #126723)

2025-02-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/126723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't give up on an unsuccessful function instantiation (PR #126723)

2025-02-11 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Compile time tracker: http://llvm-compile-time-tracker.com/compare.php?from=83a8bb363ad578da67a7cb568460a3871ce0ad8b&to=21ca76a13ca62715ce98fb2c8b0361df727769b0 I think the difference is acceptable? https://github.com/llvm/llvm-project/pull/126723 ___

[clang] [C++20] [Modules] Instantiate pending instantiations when GMF ends (PR #126842)

2025-02-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/126842 >From a25871dd97fded43484f7b690f6ff58664be0b99 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 12 Feb 2025 11:35:37 +0800 Subject: [PATCH] [C++20] [Modules] Instantiate pending instantiations when GMF e

[clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-02-11 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu created https://github.com/llvm/llvm-project/pull/126846 Fix to issue #18878 This PR issues the bug of not throwing warning for the following code: ```c++ int test13(unsigned a, int *b) { return a > ~(95 != *b); // expected-warning {{comparison of integers

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-02-11 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/123977 >From 50f8b16bf83d70cc37f2ac7e70c9195a4c4cda02 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Thu, 16 Jan 2025 01:32:25 + Subject: [PATCH 01/11] wip --- clang/lib/CodeGen/CGExpr.cpp | 19

[clang] [clang-format] Fix a crash on parsing requires clause (PR #125021)

2025-02-11 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 14178deab0334d9ce095ae7adce408868659faee https://github.com/llvm/llvm-project/pull/125021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a crash on parsing requires clause (PR #125021)

2025-02-11 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/125021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coverage][MC/DC] Show uncoverable and unreachable conditions (PR #94137)

2025-02-11 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: What's the current status? I think marking extended semantics (to Regions) will still be the issue. Could we enhance "Gap"? https://github.com/llvm/llvm-project/pull/94137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [MC/DC] Update CoverageMapping tests (PR #125404)

2025-02-11 Thread NAKAMURA Takumi via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fcoverage-mcdc -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s 2> %t.stderr.txt | FileCheck %s chapuni wrote: Note, this test will be withdrawn

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-11 Thread Teresa Johnson via cfe-commits
teresajohnson wrote: > > Thanks for sending this for review! I've only just skimmed the PR so far, > > and need to dig more into it. However, it is massive. It's nice to see how > > it all fits together, but for the purpose of reviewing and upstreaming, > > could you split it up into multiple

[clang] [clang-format] Fix a regression in `PointerAlignment: Left` (PR #124085)

2025-02-11 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: 6330f1e052dbec842e0d12e3d0cc44996e8663d2 https://github.com/llvm/llvm-project/actions/runs/13277229863 Please manually backport the fix and push it to your github fork. Once this is done, please create a [pull request](https://github.com/llvm/llvm-proje

[clang] [clang-format] Fix a regression in `PointerAlignment: Left` (PR #124085)

2025-02-11 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 6330f1e052dbec842e0d12e3d0cc44996e8663d2 https://github.com/llvm/llvm-project/pull/124085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a regression in `PointerAlignment: Left` (PR #124085)

2025-02-11 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/124085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-02-11 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/123141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't give up on an unsuccessful function instantiation (PR #126723)

2025-02-11 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/126723 >From 21ca76a13ca62715ce98fb2c8b0361df727769b0 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Tue, 11 Feb 2025 17:13:34 +0800 Subject: [PATCH 1/2] [Clang] Don't give up on an unsuccessful function instantiat

[clang] [Sema] -Wformat: warn about C23 %b %B when not in C23 language mode (PR #126694)

2025-02-11 Thread via cfe-commits
SharonXSharon wrote: > /cc @SharonXSharon thanks for submitting the fix! A noob question, I wonder in general why does clang choose to warn on the invalid formatter instead of erroring out given it'll be undefined behavior for invalid formatter? https://github.com/llvm/llvm-project/pull/12669

[clang] [-Wunsafe-buffer-usage] Fix assert when constexpr size passed to snprintf() (#119786) (PR #124022)

2025-02-11 Thread Thomas Sepez via cfe-commits
tsepez wrote: Sure, I'll back-fill the tests shortly. https://github.com/llvm/llvm-project/pull/124022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-11 Thread via cfe-commits
https://github.com/bd1976bris edited https://github.com/llvm/llvm-project/pull/126654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support warning on taking address of guarded variables (PR #123063)

2025-02-11 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > The equivalent of passing a `pt_guarded_by` variable by value doesn't seem to > warn. This inconsistency is probably my largest concern. If you have ```c int x GUARDED_BY(mu); int *p PT_GUARDED_BY(mu); ``` then `&x` should basically behave like `p`, and `x` like `*p`. But

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

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

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-02-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/123141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-02-11 Thread Farzon Lotfi via cfe-commits
@@ -3010,3 +3010,183 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD) { } } } + +static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E, +llvm::SmallVectorImpl &List, +llvm::SmallVectorImpl &DestT

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-02-11 Thread Chris B via cfe-commits
llvm-beanz wrote: I did find a bug in this for handling data structures with resources... I'm working on it and will update the PR when I have a fix. https://github.com/llvm/llvm-project/pull/123141 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-02-11 Thread Chris B via cfe-commits
@@ -2576,3 +2576,162 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl *VD) { } } } + +static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E, +llvm::SmallVectorImpl &List, +llvm::SmallVectorImpl &DestT

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-11 Thread via cfe-commits
@@ -116,7 +117,18 @@ BitcodeCompiler::BitcodeCompiler(COFFLinkerContext &c) : ctx(c) { // Initialize ltoObj. lto::ThinBackend backend; - if (ctx.config.thinLTOIndexOnly) { + if (!ctx.config.DTLTODistributor.empty()) { +StringRef version = getenv("LLD_VERSION"); // F

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-11 Thread Nuri Amari via cfe-commits
@@ -2142,3 +2190,327 @@ std::vector lto::generateModulesOrdering(ArrayRef R) { }); return ModulesOrdering; } + +namespace { +// For this out-of-process backend no codegen is done when invoked for each +// task. Instead we generate the required information (e.g. the summary

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2025-02-11 Thread Johannes Doerfert via cfe-commits
@@ -1359,4 +1362,107 @@ COMPILER_RT_VISIBILITY int __llvm_profile_set_file_object(FILE *File, return 0; } +int __llvm_write_custom_profile(const char *Target, +const __llvm_profile_data *DataBegin, +const __llv

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-11 Thread Galen Elias via cfe-commits
@@ -28430,6 +28430,36 @@ TEST_F(FormatTest, ShortNamespacesOption) { "}}} // namespace foo::bar::baz", "namespace foo { namespace bar { namespace baz { class qux; } } }", Style); + Style.FixNamespaceComments = false; + + Style.BreakBeforeBraces = FormatStyle

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-11 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The public libclang interface needs to be stable, yes... but in this context, that's just the interfaces declared in clang/include/clang-c/CXString.h. We can do whatever we want with the internal interface in clang/tools/libclang/CXString.h. https://github.com/llvm/llvm-p

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2025-02-11 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert approved this pull request. LG, one minor comment https://github.com/llvm/llvm-project/pull/93365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Eli Friedman via cfe-commits
@@ -1593,35 +1593,38 @@ QualType Sema::BuildQualifiedType(QualType T, SourceLocation Loc, // object or incomplete types shall not be restrict-qualified." if (Qs.hasRestrict()) { unsigned DiagID = 0; -QualType ProblemTy; - -if (T->isAnyPointerType() || T->isRefe

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-11 Thread Paul Kirth via cfe-commits
@@ -1702,6 +1703,38 @@ static uint8_t getOsAbi(const Triple &t) { } } +namespace dtlto { +// Check if an archive file is a thin archive. +bool isThinArchive(Ctx &ctx, StringRef archiveFilePath) { + const size_t thinArchiveMagicLen = sizeof(ThinArchiveMagic) - 1; + + ErrorO

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-11 Thread Tobias Hieta via cfe-commits
tru wrote: > Great. Actually, we wanted to add support for distributing via FASTBuild, > icecream and distcc with the initial DTLTO PR. However, we investigated found > that these couldn't be supported without extending the existing codebases. > More details to follow.. Interesting. Intereste

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2025-02-11 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert edited https://github.com/llvm/llvm-project/pull/93365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Florian Mayer (fmayer) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/126796.diff 1 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp (+1-1) ``diff diff --

[clang] b88b6a2 - [clang] Assert the enum FPOpts and LangOpts fit into the storage (#126166)

2025-02-11 Thread via cfe-commits
Author: Florian Mayer Date: 2025-02-11T13:35:14-08:00 New Revision: b88b6a2b633a942d454205f336703cdc62074686 URL: https://github.com/llvm/llvm-project/commit/b88b6a2b633a942d454205f336703cdc62074686 DIFF: https://github.com/llvm/llvm-project/commit/b88b6a2b633a942d454205f336703cdc62074686.diff

[clang] [HLSL][RootSignature] Implement Lexing of DescriptorTables (PR #122981)

2025-02-11 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/122981 >From 98deff6a407b912852e70b2bdc3618aaec8a1931 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 24 Jan 2025 22:23:39 + Subject: [PATCH 01/16] [HLSL][RootSignature] Initial Lexer Definition with puncua

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-11 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Can you just move the modf handling into the section for non-math intrinsics? It's not a "math intrinsic" in this context: it doesn't set errno or raise exceptions. https://github.com/llvm/llvm-project/pull/126750 ___ cfe-commit

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-11 Thread Paul Kirth via cfe-commits
@@ -240,6 +240,38 @@ The ``BOOTSTRAP_LLVM_ENABLE_LTO=Thin`` will enable ThinLTO for stage 2 and stage 3 in case the compiler used for stage 1 does not support the ThinLTO option. +Distributed ThinLTO (DTLTO) +--- + +DTLTO allows for the distribution of

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-11 Thread Paul Kirth via cfe-commits
@@ -969,6 +969,10 @@ def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>, Visibility<[ClangOption, CLOption, FlangOption]>, HelpText<"Pass to the linker">, MetaVarName<"">, Group; +def Xdist : Separate<["-"], "Xdist">, Flags<[LinkOption]>,

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/126796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread Florian Mayer via cfe-commits
fmayer wrote: > I think isa should be preferred if the result of dyncast is not used. Same > applied to the surrounding ifs too. https://github.com/llvm/llvm-project/commit/ad905f133c5b22896900f3f335de990d0daf1ff4 https://github.com/llvm/llvm-project/pull/126796 ___

[clang] ad905f1 - [NFC] [clang] Use isa instead of dyn_cast

2025-02-11 Thread Florian Mayer via cfe-commits
Author: Florian Mayer Date: 2025-02-11T13:42:31-08:00 New Revision: ad905f133c5b22896900f3f335de990d0daf1ff4 URL: https://github.com/llvm/llvm-project/commit/ad905f133c5b22896900f3f335de990d0daf1ff4 DIFF: https://github.com/llvm/llvm-project/commit/ad905f133c5b22896900f3f335de990d0daf1ff4.diff

[clang] [libc] [libcxx] [lldb] [llvm] [doc] Add Discord invite link alongside channel links (PR #126352)

2025-02-11 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy approved this pull request. https://github.com/llvm/llvm-project/pull/126352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread Balazs Benics via cfe-commits
steakhal wrote: Ah, so this one is already merged. Then nvm. It's not worth a followup. https://github.com/llvm/llvm-project/pull/126796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP][OpenMPIRBuilder] Support SPIR-V device variant matches (PR #126801)

2025-02-11 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/126801 running ci >From 2aca2724050b3b4d521c224bbe2f3197244ac2f3 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Tue, 11 Feb 2025 13:05:21 -0800 Subject: [PATCH] [OpenMP][OpenMPIRBuilder] Support SPIR-V device vari

[clang] [-Wunsafe-buffer-usage] Fix assert when constexpr size passed to snprintf() (#119786) (PR #124022)

2025-02-11 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: When possible we should always add tests, I think the right place would be: https://github.com/llvm/llvm-project/blob/main/clang/test/SemaCXX/warn-unsafe-buffer-usage-libc-functions.cpp CC @ziqingluo-90 Do we need a release note or is this feature clang-20

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa commented: Oh oops, thank you for the fix. It's odd that the checks didn't catch this before the merge... https://github.com/llvm/llvm-project/pull/126796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [clang] Assert the enum FPOpts and LangOpts fit into the storage (PR #126166)

2025-02-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/126166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-11 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > > when -fno-math-errno is set > > What does -fno-math-errno have to do with anything? modf never sets errno > anyway. With the current `modf` builtin (not changed here) it skips the code path for emitting intrinsics when `math-errno` is enabled. I think setting `ConstIgnoring

[clang] [llvm] [mlir] [NVPTX] Convert scalar function nvvm.annotations to attributes (PR #125908)

2025-02-11 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/125908 >From cb6ac07e72cc1361343470842793cf9bc4995a19 Mon Sep 17 00:00:00 2001 From: Alex Maclean Date: Wed, 5 Feb 2025 18:46:03 + Subject: [PATCH 1/2] [NVPTX] Convert scalar function nvvm.annotations to attri

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I think isa should be preferred if the result of dyncast is not used. Same applied to the surrounding ifs too. https://github.com/llvm/llvm-project/pull/126796 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang] Assert the enum FPOpts and LangOpts fit into the storage (PR #126166)

2025-02-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/126166 >From 85540ede2e0ba1b6f0b8a69ac6d5a6ddf56fdfc8 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 6 Feb 2025 17:41:59 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
@@ -359,9 +405,158 @@ ABIArgInfo RISCVABIInfo::coerceAndExpandFPCCEligibleStruct( return ABIArgInfo::getCoerceAndExpand(CoerceToType, UnpaddedCoerceToType); } +bool RISCVABIInfo::detectVLSCCEligibleStruct(QualType Ty, unsigned ABIVLen, +

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Florian Mayer (fmayer) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/126796.diff 1 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp (+1-1) ``diff diff --git a/clang/lib/St

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer ready_for_review https://github.com/llvm/llvm-project/pull/126796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5c7071e - [NFC] [clang] fix unused variable warning (#126796)

2025-02-11 Thread via cfe-commits
Author: Florian Mayer Date: 2025-02-11T13:22:22-08:00 New Revision: 5c7071e996b8b26080219038c2eb262567c18769 URL: https://github.com/llvm/llvm-project/commit/5c7071e996b8b26080219038c2eb262567c18769 DIFF: https://github.com/llvm/llvm-project/commit/5c7071e996b8b26080219038c2eb262567c18769.diff

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
@@ -385,23 +580,50 @@ ABIArgInfo RISCVABIInfo::coerceVLSVector(QualType Ty) const { NumElts *= 8; break; default: -assert(VT->getVectorKind() == VectorKind::RVVFixedLengthData && +assert((VT->getVectorKind() == VectorKind::Generic || +VT->getVecto

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
@@ -385,23 +580,50 @@ ABIArgInfo RISCVABIInfo::coerceVLSVector(QualType Ty) const { NumElts *= 8; break; default: -assert(VT->getVectorKind() == VectorKind::RVVFixedLengthData && +assert((VT->getVectorKind() == VectorKind::Generic || +VT->getVecto

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
@@ -359,9 +405,158 @@ ABIArgInfo RISCVABIInfo::coerceAndExpandFPCCEligibleStruct( return ABIArgInfo::getCoerceAndExpand(CoerceToType, UnpaddedCoerceToType); } +bool RISCVABIInfo::detectVLSCCEligibleStruct(QualType Ty, unsigned ABIVLen, +

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
https://github.com/topperc requested changes to this pull request. https://github.com/llvm/llvm-project/pull/100346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-11 Thread Craig Topper via cfe-commits
@@ -111,9 +115,51 @@ void RISCVABIInfo::appendAttributeMangling(StringRef AttrStr, } void RISCVABIInfo::computeInfo(CGFunctionInfo &FI) const { + unsigned ABIVLen; + switch (FI.getExtInfo().getCC()) { + default: +ABIVLen = 0; +break; + case CallingConv::CC_RISCVVL

[clang] [ASTWriter] Do not allocate source location space for module maps used only for textual headers (PR #116374)

2025-02-11 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Hi @ilya-biryukov, I wanted to apologize for the late reply (I was on a leave) and thank you for going through the test case and taking time to understand why it works. Sounds good! https://github.com/llvm/llvm-project/pull/116374 ___

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2025-02-11 Thread via cfe-commits
ruotongyu wrote: Hi, I really like this design and am trying to apply it to more architectures, such as x86. However, it seems that the jump table is not properly mapped to the instruction that references it. Do you have any suggestions on how to correctly associate the jump table with the cor

[clang] [clang] Rename ReadPCHAndPreprocessAction (NFC) (PR #122390)

2025-02-11 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I agree that the name can be confusing. I think the original motivation for this name was to avoid spreading the concept of modular dependency scanning through the Clang codebase. Could we move this class into `Tooling/DependencyScanning` to keep that concept self-contained

[clang] [NFC] [clang] fix unused variable warning (PR #126796)

2025-02-11 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/126796 None >From 9811b24583640d9d70e5a496d1e3444ee86fea77 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 11 Feb 2025 13:14:26 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [clang] Assert the enum FPOpts and LangOpts fit into the storage (PR #126166)

2025-02-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. Ok, makes sense to fix the immediate problem now and follow up with the more robust fix later. Would be good if you could leave a FIXME on one of the `assert` calls in `LangOptions.h` outlining the potential improvement via `static_as

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/126689 >From 9a11851a8057f1d0e6efcfe9ddb9038fc8ca0a98 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 11 Feb 2025 01:56:50 -0500 Subject: [PATCH] [clang][HeuristicResolver] Track the expression whose type

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Rebased) https://github.com/llvm/llvm-project/pull/126689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HeuristicResolver] Track the expression whose type is being simplified after each step in simplifyType() (PR #126689)

2025-02-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/126689 >From 32b94e342ce6eb0d3703eb66586b393c0b4fd20c Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 11 Feb 2025 01:56:50 -0500 Subject: [PATCH] [clang][HeuristicResolver] Track the expression whose type

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -pedantic -verify=pedantic %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -Wpre-c2x-compat -verify=pre-c2x-compat %s + +typedef int (*T1)[2]; +restrict T1 t1;

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Oleksandr T. via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -pedantic -verify=pedantic %s +// RUN: %clang_cc1 -std=c17 -fsyntax-only -Wpre-c2x-compat -verify=pre-c2x-compat %s + +typedef int (*T1)[2]; +restrict T1 t1;

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/120896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Oleksandr T. via cfe-commits
@@ -7409,6 +7409,11 @@ def warn_c23_compat_utf8_string : Warning< def note_cxx20_c23_compat_utf8_string_remove_u8 : Note< "remove 'u8' prefix to avoid a change of behavior; " "Clang encodes unprefixed narrow string literals as UTF-8">; +def warn_c23_compat_restrict_pointers

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-11 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/120896 >From 295df258043ef5a87ae603eedd308b863bad7b59 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 22 Dec 2024 15:14:30 +0200 Subject: [PATCH 1/9] [Clang] allow restrict qualifier for array types with poin

[clang] [llvm] [Clang] [OpenMP] Add support for '#pragma omp stripe'. (PR #119891)

2025-02-11 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: I'm seeing the same build error as the one present in the build log above: ``` clang/lib/CodeGen/CGStmt.cpp:99:11: error: enumeration value 'OMPStripeDirectiveClass' not handled in switch [-Werror,-Wswitch] 99 | switch (S->getStmtClass()) { | ^

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-02-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Previously in case of multiable aliases exists for the same base we just accept the first one https://github.com/llvm/llvm-project/blob/2cf6663d3c86b065edeb693815e6a4b325045cc2/clang/lib/ASTMatchers/ASTMa

[clang] [Clang][ASTMatcher] Improve matching isDerivedFrom base in case of multi aliases exists (PR #126793)

2025-02-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/126793 Previously in case of multiable aliases exists for the same base we just accept the first one https://github.com/llvm/llvm-project/blob/2cf6663d3c86b065edeb693815e6a4b325045cc2/clang/lib/ASTMatchers/ASTMat

[clang] [llvm] [aarch64][x86][win] Add compiler support for MSVC's /funcoverride flag (Windows kernel loader replaceable functions) (PR #125320)

2025-02-11 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/125320 >From fe5b7ada3eae41bac26639d90e3d0d105a30be8f Mon Sep 17 00:00:00 2001 From: "Daniel Paoliello (HE/HIM)" Date: Fri, 31 Jan 2025 16:47:23 -0800 Subject: [PATCH] [aarch64][x86][win] Add support for MSVC's /fun

  1   2   3   4   5   >