[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-06 Thread via cfe-commits
@@ -404,142 +370,174 @@ enum ArmSMEState : unsigned { ArmZT0Mask = 0b11 << 2 }; -bool SemaARM::ParseSVEImmChecks( -CallExpr *TheCall, SmallVector, 3> &ImmChecks) { - // Perform all the immediate checks for this builtin call. +bool SemaARM::CheckImmediateArg(CallExpr *Th

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-09-06 Thread Owen Pan via cfe-commits
@@ -27981,6 +27981,118 @@ TEST_F(FormatTest, BreakBinaryOperations) { Style); } +TEST_F(FormatTest, ShortNamespacesOption) { + FormatStyle Style = getLLVMStyle(); + Style.AllowShortNamespacesOnASingleLine = true; + Style.FixNamespaceComments = false; + + //

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-09-06 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/105597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-09-06 Thread Owen Pan via cfe-commits
@@ -27981,6 +27981,118 @@ TEST_F(FormatTest, BreakBinaryOperations) { Style); } +TEST_F(FormatTest, ShortNamespacesOption) { + FormatStyle Style = getLLVMStyle(); + Style.AllowShortNamespacesOnASingleLine = true; + Style.FixNamespaceComments = false; + + //

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-09-06 Thread Owen Pan via cfe-commits
@@ -27981,6 +27981,118 @@ TEST_F(FormatTest, BreakBinaryOperations) { Style); } +TEST_F(FormatTest, ShortNamespacesOption) { + FormatStyle Style = getLLVMStyle(); + Style.AllowShortNamespacesOnASingleLine = true; + Style.FixNamespaceComments = false; + + //

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-09-06 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: The following are missing: - Run `dump_format_style.py`. - Add a `ConfigParseTest` for the new option. How does the new option interact with `CompactNamespaces`? For example: - `AllowShortNamespacesOnASingleLine: true` and `CompactNamespaces: false` ``` names

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-09-06 Thread Owen Pan via cfe-commits
@@ -27981,6 +27981,118 @@ TEST_F(FormatTest, BreakBinaryOperations) { Style); } +TEST_F(FormatTest, ShortNamespacesOption) { + FormatStyle Style = getLLVMStyle(); owenca wrote: ```suggestion auto Style = getLLVMStyle(); ``` https://github.c

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-06 Thread Lu Weining via cfe-commits
SixWeining wrote: cc @xen0n @xry111 https://github.com/llvm/llvm-project/pull/107664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-rhel` running on `ppc64le-clang-rhel-test` while building `clang,llvm` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/1671 Here is the releva

[clang] [clang][bytecode] Only visit local variables if they have constant init (PR #107576)

2024-09-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/107576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eef8116 - [clang][bytecode] Only visit local variables if they have constant init (#107576)

2024-09-06 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-07T06:36:21+02:00 New Revision: eef8116be169de2a7a55b2a9b003efd2c7ee0be0 URL: https://github.com/llvm/llvm-project/commit/eef8116be169de2a7a55b2a9b003efd2c7ee0be0 DIFF: https://github.com/llvm/llvm-project/commit/eef8116be169de2a7a55b2a9b003efd2c7ee0be0.diff L

[clang] [clang][bytecode] Only visit local variables if they have constant init (PR #107576)

2024-09-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/107576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix reinterpret casts of two non-primitive types (PR #107564)

2024-09-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/107564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 60eb9b2 - [clang][bytecode] Fix reinterpret casts of two non-primitive types (#107564)

2024-09-06 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-07T06:16:02+02:00 New Revision: 60eb9b214cdcf482069ac4d5da9490b3bbd81b6a URL: https://github.com/llvm/llvm-project/commit/60eb9b214cdcf482069ac4d5da9490b3bbd81b6a DIFF: https://github.com/llvm/llvm-project/commit/60eb9b214cdcf482069ac4d5da9490b3bbd81b6a.diff L

[clang] [clang-tools-extra] [llvm] [clang-format] Add support for BasedOnStyle referencing an arbitrary file (PR #107312)

2024-09-06 Thread Owen Pan via cfe-commits
owenca wrote: @jediry, can you open a github issue for this? We probably should continue the discussion on your [RFC](https://discourse.llvm.org/t/rfc-clang-format-option-to-include-another-configuration-file/74891) before getting into the details of the implementation. At the very least, I n

[clang] [llvm] Fix build errors with a `LLVM_ENABLE_MODULES=ON` build (PR #107654)

2024-09-06 Thread Argyrios Kyrtzidis via cfe-commits
https://github.com/akyrtzi closed https://github.com/llvm/llvm-project/pull/107654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9a84afe - Fix build errors with a `LLVM_ENABLE_MODULES=ON` build (#107654)

2024-09-06 Thread via cfe-commits
Author: Argyrios Kyrtzidis Date: 2024-09-06T19:57:39-07:00 New Revision: 9a84afefa1ab98c5315ad2e7a78e8cdc6372e153 URL: https://github.com/llvm/llvm-project/commit/9a84afefa1ab98c5315ad2e7a78e8cdc6372e153 DIFF: https://github.com/llvm/llvm-project/commit/9a84afefa1ab98c5315ad2e7a78e8cdc6372e153.

[clang] [clang][docs] Add clang-tutor to ExternalClangExamples. (PR #107665)

2024-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (c8ef) Changes Closes #107584. --- Full diff: https://github.com/llvm/llvm-project/pull/107665.diff 1 Files Affected: - (modified) clang/docs/ExternalClangExamples.rst (+3) ``diff diff --git a/clang/docs/ExternalClangExa

[clang] [clang][docs] Add clang-tutor to ExternalClangExamples. (PR #107665)

2024-09-06 Thread via cfe-commits
https://github.com/c8ef edited https://github.com/llvm/llvm-project/pull/107665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Add clang-tutor to ExternalClangExamples. (PR #107665)

2024-09-06 Thread via cfe-commits
https://github.com/c8ef created https://github.com/llvm/llvm-project/pull/107665 None >From 441667c1113c7c65c485e4a66fade8c529dca949 Mon Sep 17 00:00:00 2001 From: c8ef Date: Sat, 7 Sep 2024 10:39:25 +0800 Subject: [PATCH] Update ExternalClangExamples.rst --- clang/docs/ExternalClangExamples.

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2024-09-06 Thread Matt Arsenault via cfe-commits
@@ -45,7 +45,7 @@ void test3(packedfloat3 *p) { *p = (packedfloat3) { 3.2f, 2.3f, 0.1f }; } // CHECK: @test3( -// CHECK: store <4 x float> {{.*}}, align 4 +// CHECK: store <3 x float> {{.*}}, align 4 arsenm wrote: I'd expect this to be in terms of type, not

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-06 Thread Alex Rønne Petersen via cfe-commits
https://github.com/alexrp updated https://github.com/llvm/llvm-project/pull/107664 From 51cf8d01f32462348c5614070c12ed66c170f698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 7 Sep 2024 03:54:04 +0200 Subject: [PATCH] [llvm][Triple] Add Environment members a

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff f93114d7004ebf6443dd2b6e557b57209fd58852 1dd981af8521bcf6c12e412493bb00de2e20ef73 --e

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-loongarch @llvm/pr-subscribers-clang Author: Alex Rønne Petersen (alexrp) Changes This adds support for: * `muslabin32` (MIPS N32) * `muslabi64` (MIPS N64) * `muslf32` (LoongArch ILP32F/LP64F) * `muslsf` (LoongArch ILP32S/LP64S) As we start add

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Alex Rønne Petersen (alexrp) Changes This adds support for: * `muslabin32` (MIPS N32) * `muslabi64` (MIPS N64) * `muslf32` (LoongArch ILP32F/LP64F) * `muslsf` (LoongArch ILP32S/LP64S) As we start adding glibc/musl cross-compilation

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-06 Thread Alex Rønne Petersen via cfe-commits
https://github.com/alexrp created https://github.com/llvm/llvm-project/pull/107664 This adds support for: * `muslabin32` (MIPS N32) * `muslabi64` (MIPS N64) * `muslf32` (LoongArch ILP32F/LP64F) * `muslsf` (LoongArch ILP32S/LP64S) As we start adding glibc/musl cross-compilation support for thes

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-06 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/107129 >From 3e0cd3c450eb4aa28742c4879733987e9e2692e7 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 28 Aug 2024 01:44:35 + Subject: [PATCH 1/9] implement select intrinsic --- clang/include/clang/Basic/Built

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-ppc64le-linux` running on `ppc64le-sanitizer` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/3042 Here is the relevant piece of t

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/2103 Here is the r

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-06 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: The unused variable error is fixed in https://github.com/llvm/llvm-project/commit/a7f152f59b1d64c6e1698fc6840c4911e11a https://github.com/llvm/llvm-project/pull/107471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] [llvm][support] Implement tracing virtual file system (PR #88326)

2024-09-06 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,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/8147 Her

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot7` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/3481 Here is the relevant piece o

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-06 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs deleted https://github.com/llvm/llvm-project/pull/100278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,189 @@ +//===--- Mustache.h -*- 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-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -39,20 +41,27 @@ class Token { Comment, }; - Token(std::string Str); + Token(StringRef Str); - Token(std::string Str, char Identifier); + Token(StringRef RawBody, StringRef Str, char Identifier); - std::string getTokenBody() const { return TokenBody; }; + St

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: Overall a good start, but I think we can tighten up the implementation in a few places, and improve the documentation here quite a bit. I'd also like to see a somewhat expanded comment block in the header, describing the overall design of the library. This

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,189 @@ +//===--- Mustache.h -*- 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-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,446 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-06 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/105893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ppc64le-lld-multistage-test` running on `ppc64le-lld-multistage-test` while building `clang,llvm` at step 12 "build-stage2-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/3029

[clang] [llvm] Fix build errors with a `LLVM_ENABLE_MODULES=ON` build (PR #107654)

2024-09-06 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai approved this pull request. Thanks for fixing these! https://github.com/llvm/llvm-project/pull/107654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (PR #107657)

2024-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Julian Schmidt (5chmidti) Changes A `const &` parameter can also be returned via a conditional operator: `c ? a : b`. This change adds support for diagnosing returning these parameters with conditional operators. --- Full diff

[clang-tools-extra] [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (PR #107657)

2024-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Julian Schmidt (5chmidti) Changes A `const &` parameter can also be returned via a conditional operator: `c ? a : b`. This change adds support for diagnosing returning these parameters with conditional operators. --- Full diff: https

[clang-tools-extra] [clang-tidy] support `return c ? a : b;` in bugprone-return-const-ref-from-parameter (PR #107657)

2024-09-06 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/107657 A `const &` parameter can also be returned via a conditional operator: `c ? a : b`. This change adds support for diagnosing returning these parameters with conditional operators. >From 4c18d0963656c286a76f0af6

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-06 Thread Jon Roelofs via cfe-commits
@@ -404,142 +370,174 @@ enum ArmSMEState : unsigned { ArmZT0Mask = 0b11 << 2 }; -bool SemaARM::ParseSVEImmChecks( -CallExpr *TheCall, SmallVector, 3> &ImmChecks) { - // Perform all the immediate checks for this builtin call. +bool SemaARM::CheckImmediateArg(CallExpr *Th

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-06 Thread Jon Roelofs via cfe-commits
@@ -216,6 +216,36 @@ namespace clang { } bool isUnsigned() const { return (Flags & UnsignedFlag) != 0; } bool isQuad() const { return (Flags & QuadFlag) != 0; } +unsigned getEltSizeInBits() const { + switch (getEltType()) { + case Int8: + case Pol

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-06 Thread Jon Roelofs via cfe-commits
@@ -216,6 +216,36 @@ namespace clang { } bool isUnsigned() const { return (Flags & UnsignedFlag) != 0; } bool isQuad() const { return (Flags & QuadFlag) != 0; } +unsigned getEltSizeInBits() const { + switch (getEltType()) { + case Int8: + case Pol

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-06 Thread Jon Roelofs via cfe-commits
@@ -404,142 +370,174 @@ enum ArmSMEState : unsigned { ArmZT0Mask = 0b11 << 2 }; -bool SemaARM::ParseSVEImmChecks( -CallExpr *TheCall, SmallVector, 3> &ImmChecks) { - // Perform all the immediate checks for this builtin call. +bool SemaARM::CheckImmediateArg(CallExpr *Th

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-06 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 closed https://github.com/llvm/llvm-project/pull/107471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d4ddf06 - [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (#107471)

2024-09-06 Thread via cfe-commits
Author: Mingming Liu Date: 2024-09-06T16:38:17-07:00 New Revision: d4ddf06b0c7f38612f334db71ef1d7a58a3cc8e0 URL: https://github.com/llvm/llvm-project/commit/d4ddf06b0c7f38612f334db71ef1d7a58a3cc8e0 DIFF: https://github.com/llvm/llvm-project/commit/d4ddf06b0c7f38612f334db71ef1d7a58a3cc8e0.diff

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-06 Thread Farzon Lotfi via cfe-commits
@@ -387,6 +387,23 @@ float3 asin(float3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin) float4 asin(float4); +//===--===// +// asuint builtins +//===--

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-06 Thread Justin Bogner via cfe-commits
@@ -387,6 +387,23 @@ float3 asin(float3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin) float4 asin(float4); +//===--===// +// asuint builtins +//===--

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-06 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-06 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-06 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-06 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [llvm] Fix build errors with a `LLVM_ENABLE_MODULES=ON` build (PR #107654)

2024-09-06 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. https://github.com/llvm/llvm-project/pull/107654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 15fa3ba547bc3ee04af5c32b8f723a97e3feefd8 44685a3cf034a9e5d7166b93b8021724bd8fd146 --e

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/107129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][Docs] Update function calls docs (PR #106860)

2024-09-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/106860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] only diagnose definitions in readability-enum-initial-value (PR #107652)

2024-09-06 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/107652 >From e4c4a9954c59ec19ecb0c368e22e62404682370a Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 7 Sep 2024 00:37:57 +0200 Subject: [PATCH 1/3] [clang-tidy] only diagnose definitions in readability-enum

[clang] [llvm] Add step builtins and step HLSL function to DirectX and SPIR-V backend (PR #106471)

2024-09-06 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,79 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefix=CHECK +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s --check-prefix=CHECK + +; Make sure dxil operation function calls for step are generate

[clang] [llvm] Add step builtins and step HLSL function to DirectX and SPIR-V backend (PR #106471)

2024-09-06 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,100 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ +// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ +// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ +// RUN: --check-prefixes=CHECK,DXIL_CHECK,DXIL_NATIVE_HALF,NATIVE_

[clang] [llvm] Add step builtins and step HLSL function to DirectX and SPIR-V backend (PR #106471)

2024-09-06 Thread Justin Bogner via cfe-commits
@@ -320,6 +321,28 @@ static Value *expandPowIntrinsic(CallInst *Orig) { return Exp2Call; } +static Value *expandStepIntrinsic(CallInst *Orig) { + + Value *X = Orig->getOperand(0); + Value *Y = Orig->getOperand(1); + Type *Ty = X->getType(); + IRBuilder<> Builder(Orig); +

[clang] [llvm] Add step builtins and step HLSL function to DirectX and SPIR-V backend (PR #106471)

2024-09-06 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,33 @@ +; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; Make sure SPIRV operation function calls for step are lowered correctly. + +; CHECK-D

[clang] [llvm] Fix build errors with a `LLVM_ENABLE_MODULES=ON` build (PR #107654)

2024-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Argyrios Kyrtzidis (akyrtzi) Changes The errors fixed were: * llvm-project/llvm/include/llvm/Analysis/SyntheticCountsUtils.h:33:22: error: missing '#include <__fwd/vector.h>'; default argument of 'vector' must be defined before it is used

[clang] [llvm] Fix build errors with a `LLVM_ENABLE_MODULES=ON` build (PR #107654)

2024-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis Author: Argyrios Kyrtzidis (akyrtzi) Changes The errors fixed were: * llvm-project/llvm/include/llvm/Analysis/SyntheticCountsUtils.h:33:22: error: missing '#include <__fwd/vector.h>'; default argument of 'vector' must be defined before it

[clang] [llvm] Fix build errors with a `LLVM_ENABLE_MODULES=ON` build (PR #107654)

2024-09-06 Thread Argyrios Kyrtzidis via cfe-commits
https://github.com/akyrtzi created https://github.com/llvm/llvm-project/pull/107654 The errors fixed were: * llvm-project/llvm/include/llvm/Analysis/SyntheticCountsUtils.h:33:22: error: missing '#include <__fwd/vector.h>'; default argument of 'vector' must be defined before it is used * llvm-p

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-06 Thread Justin Bogner via cfe-commits
@@ -879,6 +879,10 @@ static TargetTypeInfo getTargetTypeInfo(const TargetExtType *Ty) { ScalableVectorType::get(Type::getInt8Ty(C), TotalNumElts)); } + // DirectX intangible types + if (Name.starts_with("dx.")) +return TargetTypeInfo(PointerType::get(C, 0), Ta

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-06 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s + +void foo(__hlsl_resource_t res); + +// CHECK: define void @"?bar@@YAXU__hlsl_resource_t@@@Z"(target("dx.TypedBuffer", <4 x float>, 1, 0,

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-06 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,52 @@ +//===- DirectX.cpp-===// +// +// 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] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-06 Thread Justin Bogner via cfe-commits
@@ -879,6 +879,10 @@ static TargetTypeInfo getTargetTypeInfo(const TargetExtType *Ty) { ScalableVectorType::get(Type::getInt8Ty(C), TotalNumElts)); } + // DirectX intangible types + if (Name.starts_with("dx.")) bogner wrote: Yeah, it's definitely

[clang-tools-extra] [clang-tidy] only diagnose definitions in readability-enum-initial-value (PR #107652)

2024-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Julian Schmidt (5chmidti) Changes With the `isDefinition` matcher, the analysis and diagnostics will be constrained to definitions only. Previously forward declarations were diagnosed as well. Fi

[clang-tools-extra] [clang-tidy] only diagnose definitions in readability-enum-initial-value (PR #107652)

2024-09-06 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/107652 With the `isDefinition` matcher, the analysis and diagnostics will be constrained to definitions only. Previously forward declarations were diagnosed as well. Fixes #107590 >From e4c4a9954c59ec19ecb0c368e22e6

[clang] [HLSL] Implement support for HLSL intrinsic - select (PR #107129)

2024-09-06 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/107129 >From 3e0cd3c450eb4aa28742c4879733987e9e2692e7 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 28 Aug 2024 01:44:35 + Subject: [PATCH 1/8] implement select intrinsic --- clang/include/clang/Basic/Built

[clang] [llvm] [NFCI]Remove EntryCount from FunctionSummary and clean up surrounding synthetic count passes. (PR #107471)

2024-09-06 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/107471 >From a18e042a0d03321d3ffca9ede92e976343a1b4c7 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Thu, 5 Sep 2024 14:36:28 -0700 Subject: [PATCH 1/6] [NFCI]Clean up synthetic count --- clang/docs/tools/clang-f

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-06 Thread Yeoul Na via cfe-commits
@@ -14,12 +16,26 @@ void Func() { auto NODEREF auto_i2 = i; // expected-warning{{'noderef' can only be used on an array or pointer type}} } +// The diagnostic message is hard-coded as 'noderef' so using a system macro doesn't change the behavior +void Func_system_macro() {

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-06 Thread Richard Smith via cfe-commits
@@ -14,12 +16,26 @@ void Func() { auto NODEREF auto_i2 = i; // expected-warning{{'noderef' can only be used on an array or pointer type}} } +// The diagnostic message is hard-coded as 'noderef' so using a system macro doesn't change the behavior +void Func_system_macro() {

[clang-tools-extra] [clang-tidy] fix false positive in modernize-min-max-use-initializer-list (PR #107649)

2024-09-06 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/107649 ___ 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 positive in modernize-min-max-use-initializer-list (PR #107649)

2024-09-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Julian Schmidt (5chmidti) Changes Previously, whenever a replacement was generated by the analysis, a diagnostic was generated. This became an issue when a call to `std::min` or `std::max` consist

[clang] [clang-tools-extra] thread-safety: Support the new capability-based names for all related attributes. (PR #99919)

2024-09-06 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: You should also adapt the warning message for `warn_thread_attribute_not_on_capability_member` and the test `SemaCXX/warn-thread-safety-parsing.cpp`. https://github.com/llvm/llvm-project/pull/99919 ___ cfe-commits mailing list cfe

[clang-tools-extra] [clang-tidy] fix false positive in modernize-min-max-use-initializer-list (PR #107649)

2024-09-06 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/107649 Previously, whenever a replacement was generated by the analysis, a diagnostic was generated. This became an issue when a call to `std::min` or `std::max` consisted only of an initializer list with at least one

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-06 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/107619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-06 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/107619 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-06 Thread Yeoul Na via cfe-commits
@@ -14,12 +16,26 @@ void Func() { auto NODEREF auto_i2 = i; // expected-warning{{'noderef' can only be used on an array or pointer type}} } +// The diagnostic message is hard-coded as 'noderef' so using a system macro doesn't change the behavior +void Func_system_macro() {

[clang] Fix implicit conversion rank ordering (PR #106811)

2024-09-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/106811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Allow truncation to scalar (PR #104844)

2024-09-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Just a few style nitpicks. LG! https://github.com/llvm/llvm-project/pull/104844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Allow truncation to scalar (PR #104844)

2024-09-06 Thread Justin Bogner via cfe-commits
@@ -4828,18 +4830,23 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, } case ICK_HLSL_Vector_Truncation: { // Note: HLSL built-in vectors are ExtVectors. Since this truncates a - // vector to a smaller vector, this can only operate on argument

  1   2   3   4   5   6   >