[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-04 Thread Deric Cheung via cfe-commits
Icohedron wrote: @vitalybuka Could you get more details as to why the original PR failed in the hwasan-check from the `sanitizer-aarch64-linux-bootstrap-hwasan` buildbot? The buildbot's report is linked here: [https://lab.llvm.org/buildbot/#/builders/55/builds/5962](https://lab.llvm.org/buildb

[clang] [CUDA] Increment VTable index for device thunks (PR #124989)

2025-02-04 Thread Artem Belevich via cfe-commits
Artem-B wrote: I'm out of my depth here and will leave it up to @yxsamliu. https://github.com/llvm/llvm-project/pull/124989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)

2025-02-04 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > it's a permitted point of instantiation; we could try it and see if it works > well enough in practice. We could also delay implicit definitions of special > members like we do for template instantiations to reduce the impact. Another possibility would be only saving the cont

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > --offload-arch= isn't an accepted -cc1 argument so it won't be forwarded at > > all. > > Silently? That would be wrong, imo. It should be diagnosed somewhere. It's already an error if you pass it directly via -`Xclang` because it's not an accepted `-cc1` argument. A lot of

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Artem Belevich via cfe-commits
@@ -0,0 +1,44 @@ +// RUN: %clang -x cuda %s -Xarch_nvptx64 -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x cuda %s -Xarch_device -O3 -S -nogpulib -nogpuinc -### 2>&1 | FileCheck -check-prefix=O3ONCE %s +// RUN: %clang -x hip %s -Xarch_

[clang] [analyzer] Do not destruct fields of unions (PR #122330)

2025-02-04 Thread Jameson Nash via cfe-commits
https://github.com/vtjnash updated https://github.com/llvm/llvm-project/pull/122330 >From 0293a835a395c2e5a54efd16b70a38e73f116c59 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 9 Jan 2025 17:10:08 + Subject: [PATCH 1/3] [Sema] do not destruct fields of unions The C++ standard proh

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #117904)

2025-02-04 Thread Alexey Bataev via cfe-commits
@@ -5965,6 +5967,269 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [clang] Improve diagnostics for vector builtins (PR #125673)

2025-02-04 Thread Farzon Lotfi via cfe-commits
farzonl wrote: This PR has me thinking about a related problem. In HLSL we have elementwise builtins like `__builtin_hlsl_elementwise_frac`. We do not add the `CustomTypeChecking` attribute to these builtins. This puts us down the variadic type check rules for scalar inputs to these builtins

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Fix a bug that the checker didn't take the object pointer into account. (PR #125662)

2025-02-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/125662 >From f44963f8bd1012ba877d363c9683bb2b03e8eb86 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Tue, 4 Feb 2025 02:02:19 -0800 Subject: [PATCH 1/2] [webkit.UncountedLambdaCapturesChecker] Fix a bug that the chec

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/124754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-04 Thread Ryan Mast via cfe-commits
https://github.com/nightlark created https://github.com/llvm/llvm-project/pull/125806 Add files for packaging libclang Python bindings as a sdist tarball and pure Python wheel. setuptools_scm is used to derive version numbers from git tags for a future workflow that automates publishing update

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-04 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [llvm] [llvm] Create() functions for ConvergenceControlInst (PR #125627)

2025-02-04 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra closed https://github.com/llvm/llvm-project/pull/125627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b85e71b - [llvm] Create() functions for ConvergenceControlInst (#125627)

2025-02-04 Thread via cfe-commits
Author: Sameer Sahasrabuddhe Date: 2025-02-05T11:41:26+05:30 New Revision: b85e71b9f2a961fd54777b5aef43b75d8a836214 URL: https://github.com/llvm/llvm-project/commit/b85e71b9f2a961fd54777b5aef43b75d8a836214 DIFF: https://github.com/llvm/llvm-project/commit/b85e71b9f2a961fd54777b5aef43b75d8a83621

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryan Mast (nightlark) Changes Add files for packaging libclang Python bindings as a sdist tarball and pure Python wheel. setuptools_scm is used to derive version numbers from git tags for a future workflow that automates publishing update

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-04 Thread Ryan Mast via cfe-commits
https://github.com/nightlark edited https://github.com/llvm/llvm-project/pull/125806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c5a9a72 - [C++20] [Modules] Don't diagnose duplicated friend declarations between modules incorrectly

2025-02-04 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-02-05T14:13:18+08:00 New Revision: c5a9a72b3cd118a23193d01bf9393fbf1d4b90ae URL: https://github.com/llvm/llvm-project/commit/c5a9a72b3cd118a23193d01bf9393fbf1d4b90ae DIFF: https://github.com/llvm/llvm-project/commit/c5a9a72b3cd118a23193d01bf9393fbf1d4b90ae.diff LO

[clang] [lldb] Reland: [clang] fix P3310 overload resolution flag propagation (PR #125791)

2025-02-04 Thread via cfe-commits
cor3ntin wrote: Initially reverted by https://github.com/llvm/llvm-project/pull/125710 @mizvekov did you do a stage2 build of lldb? https://github.com/llvm/llvm-project/pull/125791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-04 Thread Ryan Mast via cfe-commits
nightlark wrote: Hey, I'm new to the process of contributing to LLVM, so let me know of any best practices or things I might have missed in the contributed guide. I'm looking at improving the situation for packaging libclang bindings on PyPI and ideally would like maintain the things needed he

[clang] Add clang atomic control options and attribute (PR #114841)

2025-02-04 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,19 @@ +//===--- AtomicOptions.def - Atomic Options database -*- 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] Add clang atomic control options and attribute (PR #114841)

2025-02-04 Thread Yaxun Liu via cfe-commits
@@ -1096,6 +1100,177 @@ inline void FPOptions::applyChanges(FPOptionsOverride FPO) { *this = FPO.applyOverrides(*this); } +/// Atomic control options +class AtomicOptionsOverride; +class AtomicOptions { +public: + using storage_type = uint16_t; + + static constexpr unsign

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
@@ -1106,8 +1106,12 @@ bool AMDGPUToolChain::shouldSkipSanitizeOption( // For simplicity, we only allow -fsanitize=address SanitizerMask K = parseSanitizerValue(A->getValue(), /*AllowGroups=*/false); - if (K != SanitizerKind::Address) + if (K != SanitizerKind::Address) {

[clang] Add clang atomic control options and attribute (PR #114841)

2025-02-04 Thread Yaxun Liu via cfe-commits
@@ -1096,6 +1100,177 @@ inline void FPOptions::applyChanges(FPOptionsOverride FPO) { *this = FPO.applyOverrides(*this); } +/// Atomic control options +class AtomicOptionsOverride; +class AtomicOptions { +public: + using storage_type = uint16_t; + + static constexpr unsign

[clang] [llvm] [IR] Don't set strictfp on irrelevant calls (PR #122735)

2025-02-04 Thread Serge Pavlov via cfe-commits
spavloff wrote: Thank you for the clarification. Let's keep the meaning of this attribute as it currently stands. The explanations raises some concern, though. OK, strictfp at call sites keeps previous property of the call even if the basic block is detached. If a block is taken from a stric

[clang] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)

2025-02-04 Thread via cfe-commits
ShashwathiNavada wrote: > Can you add tests and a release note entry? Thanks! This PR adds diagnostics for unsupported options in mcmodel. Since this isn't a new feature, is a release note entry necessary? https://github.com/llvm/llvm-project/pull/125643 ___

[clang] [Driver] Teach Barmetal toolchain about GCC installation(1/3) (PR #121829)

2025-02-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/121829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm] Create() functions for ConvergenceControlInst (PR #125627)

2025-02-04 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra updated https://github.com/llvm/llvm-project/pull/125627 >From eb432f46aa1033432930e94f7db4ffc708a6f2a9 Mon Sep 17 00:00:00 2001 From: Sameer Sahasrabuddhe Date: Thu, 9 Jan 2025 13:36:20 +0530 Subject: [PATCH] [llvm] Create() functions for ConvergenceControlInst ---

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 deleted https://github.com/llvm/llvm-project/pull/124754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
@@ -1106,8 +1106,12 @@ bool AMDGPUToolChain::shouldSkipSanitizeOption( // For simplicity, we only allow -fsanitize=address SanitizerMask K = parseSanitizerValue(A->getValue(), /*AllowGroups=*/false); - if (K != SanitizerKind::Address) + if (K != SanitizerKind::Address) {

[clang] d5a2638 - [webkit.UncountedLambdaCapturesChecker] Fix a bug that the checker didn't take the object pointer into account. (#125662)

2025-02-04 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-02-04T21:51:16-08:00 New Revision: d5a2638ae98746d9382231a0f04b11a5415b5e8e URL: https://github.com/llvm/llvm-project/commit/d5a2638ae98746d9382231a0f04b11a5415b5e8e DIFF: https://github.com/llvm/llvm-project/commit/d5a2638ae98746d9382231a0f04b11a5415b5e8e.diff

[clang] [webkit.UncountedLambdaCapturesChecker] Fix a bug that the checker didn't take the object pointer into account. (PR #125662)

2025-02-04 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/125662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #117904)

2025-02-04 Thread via cfe-commits
@@ -5965,6 +5967,269 @@ static bool teamsLoopCanBeParallelFor(Stmt *AStmt, Sema &SemaRef) { return Checker.teamsLoopCanBeParallelFor(); } +static Expr *getInitialExprFromCapturedExpr(Expr *Cond) { + + Expr *SubExpr = Cond->IgnoreParenImpCasts(); + + if (auto *DeclRef = dy

[clang] [analyzer] Add option assume-one-iteration (PR #125494)

2025-02-04 Thread via cfe-commits
@@ -294,6 +294,16 @@ ANALYZER_OPTION( bool, ShouldUnrollLoops, "unroll-loops", "Whether the analysis should try to unroll loops with known bounds.", false) +ANALYZER_OPTION( +bool, ShouldAssumeOneIteration, "assume-one-iteration", +"Whether the analyzer should

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #117904)

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

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-04 Thread Honey Goyal via cfe-commits
https://github.com/honeygoyal updated https://github.com/llvm/llvm-project/pull/125388 >From f9d8e7f9c0df6beb8b4a63a01ebbc3b3ab93d091 Mon Sep 17 00:00:00 2001 From: Honey Goyal Date: Sun, 2 Feb 2025 14:27:01 +0530 Subject: [PATCH 01/13] Test Cases for adding -latomic (the access size (8 bytes)

[clang] 16c721f - [clang][bytecode] Destroy local variables in reverse order (#125727)

2025-02-04 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-05T08:09:13+01:00 New Revision: 16c721f2d1bf5ebbde1b3df103761b45f266a5ec URL: https://github.com/llvm/llvm-project/commit/16c721f2d1bf5ebbde1b3df103761b45f266a5ec DIFF: https://github.com/llvm/llvm-project/commit/16c721f2d1bf5ebbde1b3df103761b45f266a5ec.diff L

[clang] [clang][bytecode] Destroy local variables in reverse order (PR #125727)

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

[clang] e90f9b4 - [clang][bytecode] Print desriptor PrimType in dump() (#125726)

2025-02-04 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-05T08:04:59+01:00 New Revision: e90f9b4027c8781785e8ee1a0342b16963f56b11 URL: https://github.com/llvm/llvm-project/commit/e90f9b4027c8781785e8ee1a0342b16963f56b11 DIFF: https://github.com/llvm/llvm-project/commit/e90f9b4027c8781785e8ee1a0342b16963f56b11.diff L

[clang] [clang][bytecode] Print desriptor PrimType in dump() (PR #125726)

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

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125811)

2025-02-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125811)

2025-02-04 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/125811 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-04 Thread Cristian Le via cfe-commits
@@ -0,0 +1,3 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ LecrisUT wrote: Nitpick about the describe tags. Why not be more explicit with `llvmorg-[0-9]*]`? Anyway did you double check that it works

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-04 Thread Cristian Le via cfe-commits
@@ -0,0 +1,34 @@ +[build-system] +requires = ["setuptools>=42", "setuptools_scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "clang" +description = "libclang python bindings" +readme = {file = "README.txt", content-type = "text/plain"} + +license = { text = "Apa

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-04 Thread Cristian Le via cfe-commits
https://github.com/LecrisUT commented: Other than missing new-line at the end of file, it looks fine. License classifiers will soon be (or already are) deprecated, so check up with setuptools and when they support PEP639. https://github.com/llvm/llvm-project/pull/125806 ___

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-04 Thread Cristian Le via cfe-commits
https://github.com/LecrisUT edited https://github.com/llvm/llvm-project/pull/125806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-02-04 Thread Cristian Le via cfe-commits
@@ -0,0 +1,34 @@ +[build-system] +requires = ["setuptools>=42", "setuptools_scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "clang" +description = "libclang python bindings" +readme = {file = "README.txt", content-type = "text/plain"} + +license = { text = "Apa

[clang] [llvm] [clang] Add support for the c2000 architecture (PR #125663)

2025-02-04 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/125663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
@@ -1106,8 +1106,12 @@ bool AMDGPUToolChain::shouldSkipSanitizeOption( // For simplicity, we only allow -fsanitize=address SanitizerMask K = parseSanitizerValue(A->getValue(), /*AllowGroups=*/false); - if (K != SanitizerKind::Address) + if (K != SanitizerKind::Address) {

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/124754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dummy] Use basic string in tests (PR #125670)

2025-02-04 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/125670 [dummy] >From 6e8a4c942708aa11b0c2a735881b5a368f97580d Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 9 Oct 2024 18:41:19 + Subject: [PATCH 1/2] [clang] Update string and string_view in lifetimeboun

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/124754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-04 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 edited https://github.com/llvm/llvm-project/pull/124754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dummy] Use basic string in tests (PR #125670)

2025-02-04 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 ready_for_review https://github.com/llvm/llvm-project/pull/125670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dummy] Use basic string in tests (PR #125670)

2025-02-04 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/125670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Don't emit pointer-tbaa for void pointers. (PR #122116)

2025-02-04 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: I read about this commit in LLVM weekly. Thanks @fhahn and @rjmccall for adding documentation about strict aliasing! This is always a difficult topic for our users. One remark though. The documentation states: > `void*` is permitted to alias any pointer type, `void**` is pe

[clang] [llvm] [ARM] Ensure FPU Selection can select mode correctly (PR #124935)

2025-02-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang,llvm` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/15201 Here is the r

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Yaxun Liu via cfe-commits
@@ -1115,14 +1117,13 @@ def fno_convergent_functions : Flag<["-"], "fno-convergent-functions">, // Common offloading options let Group = offload_Group in { -def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>, yxsamliu wrote: For HI

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2025-02-04 Thread Ralf Jung via cfe-commits
RalfJung wrote: @chrisnc what are the next steps here? Maybe one solution, for maximum compatibility, would be to not emit any warnings when `Options.FloatABIType` is left at `FloatABI::Default`, but if it is explicitly set to `FloatABI::Hard` and the required target features are missing, tha

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -287,6 +288,34 @@ class PathDiagnosticBuilder : public BugReporterContext { const PathSensitiveBugReport *getBugReport() const { return R; } }; +std::string timeTraceName(const BugReportEquivClass &EQ) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + const a

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -287,6 +288,34 @@ class PathDiagnosticBuilder : public BugReporterContext { const PathSensitiveBugReport *getBugReport() const { return R; } }; +std::string timeTraceName(const BugReportEquivClass &EQ) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + const a

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -358,9 +359,41 @@ class AnalysisConsumer : public AnalysisASTConsumer, /// Print \p S to stderr if \c Opts.AnalyzerDisplayProgress is set. void reportAnalyzerProgress(StringRef S); -}; // namespace -} // end anonymous namespace +}; +std::string timeTraceScopeDeclName(

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -119,6 +121,28 @@ class CacheInitializer : public DynamicRecursiveASTVisitor { Ranges &Result; }; +std::string timeScopeName(const Decl *DeclWithIssue) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + return llvm::formatv( + "BugSuppression::isS

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -287,6 +288,34 @@ class PathDiagnosticBuilder : public BugReporterContext { const PathSensitiveBugReport *getBugReport() const { return R; } }; +std::string timeTraceName(const BugReportEquivClass &EQ) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + const a

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -119,6 +121,28 @@ class CacheInitializer : public DynamicRecursiveASTVisitor { Ranges &Result; }; +std::string timeScopeName(const Decl *DeclWithIssue) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + return llvm::formatv( + "BugSuppression::isS

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -134,6 +135,14 @@ static void expandGraphWithCheckers(CHECK_CTX checkCtx, namespace { +std::string checkerScopeName(StringRef name, const CheckerBase *checker) { + if (!llvm::timeTraceProfilerEnabled()) +return ""; + std::string checkerName = necto w

[clang] [analyzer] Add time-trace scopes for high-level analyzer steps (PR #125508)

2025-02-04 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -358,9 +359,41 @@ class AnalysisConsumer : public AnalysisASTConsumer, /// Print \p S to stderr if \c Opts.AnalyzerDisplayProgress is set. void reportAnalyzerProgress(StringRef S); -}; // namespace -} // end anonymous namespace +}; +std::string timeTraceScopeDeclName(

[clang] [llvm] [analyzer] Consolidate array bound checkers (PR #125534)

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

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -3832,6 +3832,9 @@ def warn_type_attribute_wrong_type : Warning< "'%0' only applies to %select{function|pointer|" "Objective-C object or block pointer}1 types; type here is %2">, InGroup; +def warn_attribute_on_void_param: Warning< + "attribute %0 cannot be applied to

[clang] [llvm] [analyzer] Consolidate array bound checkers (PR #125534)

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

[clang] [llvm] [analyzer] Consolidate array bound checkers (PR #125534)

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

[clang] [llvm] [AMDGPU][True16][MC][CodeGen] true16 for v_alignbyte_b32 (PR #119750)

2025-02-04 Thread Ivan Kosarev via cfe-commits
https://github.com/kosarev edited https://github.com/llvm/llvm-project/pull/119750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-02-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/124920 >From bd731e4be65fc9c1746aa6a8f63d206eb54bb2be Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 29 Jan 2025 15:17:06 +0200 Subject: [PATCH 01/11] [Clang] disallow attributes on void parameters --- clan

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/125370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Added support for 3-argument std::string ctor in bugprone-string-constructor check (PR #123413)

2025-02-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping https://github.com/llvm/llvm-project/pull/123413 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -0,0 +1,51 @@ +#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H +#define LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H + +#include "clang/CIR/Dialect/IR/CIRAttrs.h" + +namespace cir { + +template class CirAttrVisitor { +public: + // FIXME: Create a TableGen list to automatical

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-04 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/125372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -55,14 +104,19 @@ struct ConvertCIRToLLVMPass StringRef getArgument() const override { return "cir-flat-to-llvm"; } }; +/// Replace CIR global with a region initialized LLVM global and update +/// insertion point to the end of the initializer block. + mlir::LogicalResult

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -0,0 +1,51 @@ +#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H +#define LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H + +#include "clang/CIR/Dialect/IR/CIRAttrs.h" + +namespace cir { + +template class CirAttrVisitor { +public: + // FIXME: Create a TableGen list to automatical

[clang] [llvm] [IR] Don't set strictfp on irrelevant calls (PR #122735)

2025-02-04 Thread Kevin P. Neal via cfe-commits
kpneal wrote: > > > If strict floating-point semantics are required at this call site, they > > > are are required on every relevant call in this function. It means > > > strictfp is a function attribute. Does anything prevents us from removal > > > strictfp from all call sites? > > > > > >

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
@@ -658,7 +649,13 @@ void JumpScopeChecker::BuildScopeInformation(Stmt *S, Next = SC->getSubStmt(); else if (LabelStmt *LS = dyn_cast(SubStmt)) Next = LS->getSubStmt(); - else + else if (AttributedStmt *AS = dyn_cast(SubStmt)) { +if (GetM

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/125370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-04 Thread Michael Flanders via cfe-commits
@@ -247,45 +240,134 @@ void StackAddrEscapeChecker::checkPreCall(const CallEvent &Call, } } -void StackAddrEscapeChecker::checkPreStmt(const ReturnStmt *RS, - CheckerContext &C) const { - if (!ChecksEnabled[CK_StackAddrEscapeChecker

[clang] [CIR] Lowering to LLVM for global pointers (PR #125619)

2025-02-04 Thread Erich Keane via cfe-commits
@@ -92,6 +159,16 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( mlir::dyn_cast(init.value())) { // Initializer is a constant array: convert it to a compatible llvm init. init = rewriter.getIntegerAttr(llvmType, intAttr.getValu

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-04 Thread Michael Flanders via cfe-commits
@@ -247,45 +240,134 @@ void StackAddrEscapeChecker::checkPreCall(const CallEvent &Call, } } -void StackAddrEscapeChecker::checkPreStmt(const ReturnStmt *RS, - CheckerContext &C) const { - if (!ChecksEnabled[CK_StackAddrEscapeChecker

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
YutongZhuu wrote: > Could you add a test case - check in clang/test to see if other tests for the > diagnostic text in the original bug, and add a test case for that nearby > (maybe the same file the diagnostic is already tested in)? Do you mean I should check if there exists a test for the or

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/125370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/125370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Force AttributedStmtClass to not be scope parents (PR #125370)

2025-02-04 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu edited https://github.com/llvm/llvm-project/pull/125370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] NFC: rename MatchedPackOnParmToNonPackOnArg to StrictPackMatch (PR #125418)

2025-02-04 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/125418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement HLSL Flat casting (excluding splat cases) (PR #118842)

2025-02-04 Thread Sarah Spall via cfe-commits
@@ -14857,6 +14857,7 @@ bool IntExprEvaluator::VisitCastExpr(const CastExpr *E) { case CK_FixedPointCast: case CK_IntegralToFixedPoint: case CK_MatrixCast: +// TODO does CK_HLSLAggregateCast belong here? spall wrote: It can, and I do need to remove

[clang] [HLSL] Implement HLSL Flat casting (excluding splat cases) (PR #118842)

2025-02-04 Thread Sarah Spall via cfe-commits
@@ -14857,6 +14857,7 @@ bool IntExprEvaluator::VisitCastExpr(const CastExpr *E) { case CK_FixedPointCast: case CK_IntegralToFixedPoint: case CK_MatrixCast: +// TODO does CK_HLSLAggregateCast belong here? spall wrote: You can truncate (for example) a

[clang] [clang] fix P3310 overload resolution flag propagation (PR #125372)

2025-02-04 Thread Haojian Wu via cfe-commits
hokein wrote: The lldb code needs to be updated as well https://github.com/llvm/llvm-project/blob/d5488f157c74332646d2b6e9d16c88e61d5a789e/lldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp#L277-L283 https://github.com/llvm/llvm-project/pull/125372 _

[clang] [llvm] [AMDGPU][True16][MC][CodeGen] true16 for v_alignbyte_b32 (PR #119750)

2025-02-04 Thread Brox Chen via cfe-commits
https://github.com/broxigarchen closed https://github.com/llvm/llvm-project/pull/119750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement HLSL Flat casting (excluding splat cases) (PR #118842)

2025-02-04 Thread Sarah Spall via cfe-commits
@@ -6358,3 +6359,81 @@ RValue CodeGenFunction::EmitPseudoObjectRValue(const PseudoObjectExpr *E, LValue CodeGenFunction::EmitPseudoObjectLValue(const PseudoObjectExpr *E) { return emitPseudoObjectExpr(*this, E, true, AggValueSlot::ignored()).LV; } + +void CodeGenFunction::Fl

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-04 Thread Michael Flanders via cfe-commits
Flandini wrote: > I think this is going in the right direction but I'd love to see more tests > and some more thought about some scenarios. I'll do some structural induction approach to what could be returned and what could hold which things, and make sure these all have some test case coverag

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-04 Thread Joseph Huber via cfe-commits
@@ -1115,14 +1117,13 @@ def fno_convergent_functions : Flag<["-"], "fno-convergent-functions">, // Common offloading options let Group = offload_Group in { -def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>, jhuber6 wrote: Right n

[clang] Adding diagnostics for unsupported option (PR #125643)

2025-02-04 Thread via cfe-commits
ShashwathiNavada wrote: > Can you add tests and a release note entry? Thanks! Thank you for the response! Sure, will do that! https://github.com/llvm/llvm-project/pull/125643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] Adding diagnostics for unsupported option (PR #125643)

2025-02-04 Thread via cfe-commits
https://github.com/ShashwathiNavada updated https://github.com/llvm/llvm-project/pull/125643 >From 0aebcd7119fbcd51154c5d9706752e8ff3f041bc Mon Sep 17 00:00:00 2001 From: ShashwathiNavada Date: Tue, 4 Feb 2025 00:16:09 -0600 Subject: [PATCH 1/5] Adding diagnostics for unsupported option --- c

[clang] Add clang atomic control options and attribute (PR #114841)

2025-02-04 Thread Yaxun Liu via cfe-commits
@@ -5404,6 +5404,115 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

<    1   2   3   4   5   6   >