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

2024-10-12 Thread Owen Pan via cfe-commits
@@ -616,6 +626,62 @@ class LineJoiner { return 1; } + unsigned tryMergeNamespace(SmallVectorImpl::const_iterator I, + SmallVectorImpl::const_iterator E, + unsigned Limit) { +if (Limit == 0) + return 0; +

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

2024-10-12 Thread Owen Pan via cfe-commits
@@ -616,6 +627,62 @@ class LineJoiner { return 1; } + unsigned tryMergeNamespace(SmallVectorImpl::const_iterator I, + SmallVectorImpl::const_iterator E, + unsigned Limit) { +if (Limit == 0) + return 0; +

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

2024-10-12 Thread Owen Pan via cfe-commits
@@ -27981,6 +27981,132 @@ TEST_F(FormatTest, BreakBinaryOperations) { Style); } +TEST_F(FormatTest, ShortNamespacesOption) { + auto BaseStyle = getLLVMStyle(); + BaseStyle.AllowShortNamespacesOnASingleLine = true; + BaseStyle.FixNamespaceComments = false; + +

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

2024-10-12 Thread Owen Pan via cfe-commits
@@ -972,6 +972,11 @@ struct FormatStyle { /// \version 3.7 bool AllowShortLoopsOnASingleLine; + /// If ``true``, ``namespace a { class b; }`` can be put on a single a single + /// line. owenca wrote: You need to rerun `dump_format_style.py`. https://gi

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

2024-10-12 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-10-12 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: Please update the release notes. 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-10-12 Thread Owen Pan via cfe-commits
owenca wrote: > > 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

[clang] [clang][docs][OpenMP] Move tracing interface to OpenMP 5.0 (PR #112125)

2024-10-12 Thread Luke Marzen via cfe-commits
lmarzen wrote: @jdoerfert, @AndreyChurbanov https://github.com/llvm/llvm-project/pull/112125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs][OpenMP] Move tracing interface to OpenMP 5.0 (PR #112125)

2024-10-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Luke Marzen (lmarzen) Changes The OMPT Device Tracing Interface was introduced in the OpenMP 5.0 specification (see section 4.6.2). https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5.0.pdf --- Full diff: https://github.

[clang] [clang][docs][OpenMP] Move tracing interface to OpenMP 5.0 (PR #112125)

2024-10-12 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] [clang][docs][OpenMP] Move tracing interface to OpenMP 5.0 (PR #112125)

2024-10-12 Thread Luke Marzen via cfe-commits
https://github.com/lmarzen created https://github.com/llvm/llvm-project/pull/112125 The OMPT Device Tracing Interface was introduced in the OpenMP 5.0 specification (see section 4.6.2). https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5.0.pdf >From 41e3caa489f5607b3b292f5a75

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,137 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++17 -fsyntax-only -fsycl-is-device -verify %s tahonermann wrote: Those tests are included with the diagnostic work that will be in the next PR. See [here](https://github.com/tahonermann/llvm

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -14296,6 +14296,31 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, + CanQualType KernelNameType, +

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -14296,6 +14296,31 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, + CanQualType KernelNameType, +

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -14296,6 +14296,31 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, + CanQualType KernelNameType, +

[clang] [lld] [llvm] [WebAssembly] Define a new "Trail1" CPU (PR #112035)

2024-10-12 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/112035 >From b8f33cd68d11759ad774e16b4d25491a1c9fc3e4 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH 1/4] [WebAssembly] Define a new "Trail1" CPU First, define some

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute specifies that a function defini

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute specifies that a function defini

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute specifies that a function defini

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute specifies that a function defini

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute specifies that a function defini

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute specifies that a function defini

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,47 @@ +//===--- SYCLKernelInfo.h --- Information about SYCL kernels --===// +// +// 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] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-12 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,47 @@ +//===--- SYCLKernelInfo.h --- Information about SYCL kernels --===// +// +// 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] [mlir] [polly] [NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (PR #111752)

2024-10-12 Thread Rahul Joshi via cfe-commits
jurahul wrote: I will add getDeclaration back and mark it deprecated. What’s the timeframe for deprecation thought? A couple of weeks? Because I do want to add back the getDeclaration with different semantics. Unless we go with @nikic’s recommendation of getDeclarationIfExists. I am going to wait

[clang-tools-extra] [clang-tidy] insert ``static`` keyword in correct position for misc-use-internal-linkage (PR #108792)

2024-10-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/108792 >From 795b3ae677210ff50f7710a0cf73d435889b68ae Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 16 Sep 2024 13:47:10 +0800 Subject: [PATCH 1/2] [clang-tidy] insert ``static`` keyword in correct positi

[clang] [llvm] [mlir] [polly] [NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (PR #111752)

2024-10-12 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > TBH I am wondering if we should revert this rename. I don't think it's a good > idea to reuse getDeclaration with substantially different semantics, and if > we're not reusing it, then there's not much point to rename... > > Instead of having getOrInsertDeclaration + getDeclar

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread Nicolas van Kempen via cfe-commits
@@ -9,8 +9,10 @@ #include "UseStartsEndsWithCheck.h" #include "../utils/ASTUtils.h" -#include "../utils/OptionsUtils.h" +#include "../utils/Matchers.h" +#include "clang/ASTMatchers/ASTMatchers.h" #include "clang/Lex/Lexer.h" +#include "llvm/ADT/ArrayRef.h" ni

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/112101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank approved this pull request. Very nice improvement, LGTM, thanks!!! https://github.com/llvm/llvm-project/pull/112101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang-tools-extra] [clang-tidy][readability-identifier-naming] Support namespace aliases (PR #112112)

2024-10-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Keith Smiley (keith) Changes Fixes: https://github.com/llvm/llvm-project/issues/109385 --- Full diff: https://github.com/llvm/llvm-project/pull/112112.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/Id

[clang-tools-extra] [clang-tidy][readability-identifier-naming] Support namespace aliases (PR #112112)

2024-10-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Keith Smiley (keith) Changes Fixes: https://github.com/llvm/llvm-project/issues/109385 --- Full diff: https://github.com/llvm/llvm-project/pull/112112.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/readabi

[clang-tools-extra] [clang-tidy][readability-identifier-naming] Support namespace aliases (PR #112112)

2024-10-12 Thread Keith Smiley via cfe-commits
https://github.com/keith created https://github.com/llvm/llvm-project/pull/112112 Fixes: https://github.com/llvm/llvm-project/issues/109385 >From b74b4fec46c871c5981422a7779fdf39c215487c Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Sat, 12 Oct 2024 13:38:36 -0700 Subject: [PATCH] [clang-

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andrew Sukach (sookach) Changes Fixes #111594. The crash is caused by the following call https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/ComputeDependence.cpp#L81-L82 We already check for a null TypeInfo when creating a UnaryE

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-12 Thread Andrew Sukach via cfe-commits
https://github.com/sookach created https://github.com/llvm/llvm-project/pull/112111 Fixes #111594. The crash is caused by the following call https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/ComputeDependence.cpp#L81-L82 We already check for a null TypeInfo when creating a UnaryExprO

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/112101 >From cd6de859501e8c0102aa1c1e57341ecc35266ed1 Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 12 Oct 2024 18:07:38 +0200 Subject: [PATCH 1/2] [clang-tidy] rewrite matchers in modernize-use-starts-end

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-12 Thread Nikita Popov via cfe-commits
@@ -1391,22 +1412,65 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { -// Check if the underlying value for the parameter is an argum

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-12 Thread Nikita Popov via cfe-commits
@@ -1391,22 +1412,65 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { -// Check if the underlying value for the parameter is an argum

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-12 Thread Nikita Popov via cfe-commits
@@ -1391,22 +1412,65 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { -// Check if the underlying value for the parameter is an argum

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-12 Thread Nikita Popov via cfe-commits
@@ -1391,22 +1412,65 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { -// Check if the underlying value for the parameter is an argum

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-12 Thread Nikita Popov via cfe-commits
@@ -1358,18 +1360,37 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, auto &Context = CalledFunction->getContext(); // Collect valid attributes for all params. - SmallVector ValidParamAttrs; + SmallVector ValidObjParamAttrs, ValidExactParamAttrs; bool

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-12 Thread Nikita Popov via cfe-commits
@@ -1391,22 +1412,65 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, AttributeList AL = NewInnerCB->getAttributes(); for (unsigned I = 0, E = InnerCB->arg_size(); I < E; ++I) { -// Check if the underlying value for the parameter is an argum

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-12 Thread Nikita Popov via cfe-commits
@@ -373,6 +373,13 @@ FPClassTest CallBase::getParamNoFPClass(unsigned i) const { return Mask; } +std::optional CallBase::getParamRange(unsigned ArgNo) const { nikic wrote: I don't think this API is used? https://github.com/llvm/llvm-project/pull/91101

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-10-12 Thread Nikita Popov via cfe-commits
@@ -787,6 +787,11 @@ class AttributeList { [[nodiscard]] AttributeList addRangeRetAttr(LLVMContext &C, const ConstantRange &CR) const; + /// Add the range attribute to the attribute set at the given arg index. + /// Returns a n

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread Nicolas van Kempen via cfe-commits
@@ -82,34 +84,25 @@ UseStartsEndsWithCheck::UseStartsEndsWithCheck(StringRef Name, void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { const auto ZeroLiteral = integerLiteral(equals(0)); - const auto HasStartsWithMethodWithName = [](const std::string &Name

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread Nicolas van Kempen via cfe-commits
@@ -150,8 +150,8 @@ void test(std::string s, std::string_view sv, sub_string ss, sub_sub_string sss, // CHECK-FIXES: puv.starts_with("a"); puvf.find("a") == 0; - // CHECK-MESSAGES: :[[@LINE-1]]:{{[0-9]+}}: warning: use starts_with - // CHECK-FIXES: puvf.starts_with("a")

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread Nicolas van Kempen via cfe-commits
@@ -82,34 +84,25 @@ UseStartsEndsWithCheck::UseStartsEndsWithCheck(StringRef Name, void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { const auto ZeroLiteral = integerLiteral(equals(0)); - const auto HasStartsWithMethodWithName = [](const std::string &Name

[clang] [clang][GNU] Pass -t through to the linker (PR #112106)

2024-10-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Keith Smiley (keith) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/112106.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/Gnu.cpp (+1-1) - (modified) clang/test/Driver/Xlinker-args.c (+2-2)

[clang] [clang][GNU] Pass -t through to the linker (PR #112106)

2024-10-12 Thread Keith Smiley via cfe-commits
https://github.com/keith created https://github.com/llvm/llvm-project/pull/112106 None >From becf5f4848e1482ef440ce5e04af6a5b715031ed Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Sat, 12 Oct 2024 18:08:33 + Subject: [PATCH] [clang][GNU] Pass -t through to the linker --- clang/lib/Dr

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/112101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Note that his is not an NFC due to the change in what method may be found first, but given that it's quite out there to have 2+ of `{'starts_with', 'startsWith', 'startswith'}` in one class hierarchy, which is how the non-NFC part could be observed. Because of this I think thi

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Julian Schmidt (5chmidti) Changes Rewrite the AST matchers for slightly more composability and performance. Furthermore, check that the `starts_with` and `ends_with` functions return a `bool`. There is one behavioral change, in that th

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Julian Schmidt (5chmidti) Changes Rewrite the AST matchers for slightly more composability and performance. Furthermore, check that the `starts_with` and `ends_with` functions return a `bool`. There is one behavioral change, in

[clang-tools-extra] [clang-tidy] rewrite matchers in modernize-use-starts-ends-with (PR #112101)

2024-10-12 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/112101 Rewrite the AST matchers for slightly more composability and performance. Furthermore, check that the `starts_with` and `ends_with` functions return a `bool`. There is one behavioral change, in that the methods

[clang] [lld] [llvm] [WebAssembly] Define a new "Trail1" CPU (PR #112035)

2024-10-12 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 14705a912f6296700cef4d2aa7eb100f71dfbd0a 24e58550483c0569e48f9b1e11edaee5acb1ac1e --e

[clang] [lld] [llvm] [WebAssembly] Define a new "Trail1" CPU (PR #112035)

2024-10-12 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/112035 >From b8f33cd68d11759ad774e16b4d25491a1c9fc3e4 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH 1/3] [WebAssembly] Define a new "Trail1" CPU First, define some

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-12 Thread Thorsten Schütt via cfe-commits
tschuett wrote: > Hello - any additional feedback on this? The house rule is to ping: If you have received no comments on your patch for a week, you can request a review by ‘ping’ing the GitHub PR with “Ping”. The common courtesy ‘ping’ rate is once a week. Please remember that you are asking

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #112074)

2024-10-12 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/112074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 571354e - [clang-tidy] Avoid repeated hash lookups (NFC) (#112074)

2024-10-12 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-10-12T08:04:17-07:00 New Revision: 571354e25130b213146c26d05524fcd215fbd061 URL: https://github.com/llvm/llvm-project/commit/571354e25130b213146c26d05524fcd215fbd061 DIFF: https://github.com/llvm/llvm-project/commit/571354e25130b213146c26d05524fcd215fbd061.diff L

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #112071)

2024-10-12 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/112071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9c2fc17 - [Sema] Avoid repeated hash lookups (NFC) (#112071)

2024-10-12 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-10-12T08:00:31-07:00 New Revision: 9c2fc17ee79eea7e18964d3d1b910dd8c1d7e733 URL: https://github.com/llvm/llvm-project/commit/9c2fc17ee79eea7e18964d3d1b910dd8c1d7e733 DIFF: https://github.com/llvm/llvm-project/commit/9c2fc17ee79eea7e18964d3d1b910dd8c1d7e733.diff L

[clang] Clang: Support minimumnum and maximumnum intrinsics (PR #96281)

2024-10-12 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa updated https://github.com/llvm/llvm-project/pull/96281 >From c08b0a8d34107dc4563c434485ba5f326ab8df93 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Fri, 21 Jun 2024 14:28:42 +0800 Subject: [PATCH 01/11] Clang: Support minimumnum and maximumnum intrinsics We just

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-12 Thread Joseph Huber via cfe-commits
jhuber6 wrote: @petrhosek Can someone explain why the clang executable in these tests is called `llvm` on the Fuchsia bots? https://github.com/llvm/llvm-project/pull/112041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-12 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` at step 12 "build-stage2-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/4368 He

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-a-1` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/6522 Here is the relevant p

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot1` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/4845 Here is the relevant piece of the b

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-12 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` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/5057 Here is the relevant piece of the

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-12 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` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/4269 Here is the relevant piece of the bu

[clang] 6a6af02 - [Clang] Remove unused TC variable

2024-10-12 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-10-12T07:09:03-05:00 New Revision: 6a6af0246bd2d68291582e9aefc0543e5c6102fe URL: https://github.com/llvm/llvm-project/commit/6a6af0246bd2d68291582e9aefc0543e5c6102fe DIFF: https://github.com/llvm/llvm-project/commit/6a6af0246bd2d68291582e9aefc0543e5c6102fe.diff

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-12 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` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/3148 Here is the releva

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-12 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` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/2444 Here is the relevant pi

[clang] [HIP] Replace use of `llvm-mc` with `clang` (PR #112041)

2024-10-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/112041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3acb0e9 - [HIP] Replace use of `llvm-mc` with `clang` (#112041)

2024-10-12 Thread via cfe-commits
Author: Joseph Huber Date: 2024-10-12T07:03:28-05:00 New Revision: 3acb0e9e600cbe3668b7db3956238a592ebadc0a URL: https://github.com/llvm/llvm-project/commit/3acb0e9e600cbe3668b7db3956238a592ebadc0a DIFF: https://github.com/llvm/llvm-project/commit/3acb0e9e600cbe3668b7db3956238a592ebadc0a.diff

[clang] [Clang] fix range calculation for conditionals with throw expressions (PR #112081)

2024-10-12 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/112081 >From 67c41612085489a2a17eec49f98dbfa0e5bb97cf Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 12 Oct 2024 08:27:51 +0300 Subject: [PATCH] [Clang] fix range calculation for conditionals with throw expr

[clang-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)

2024-10-12 Thread Julian Schmidt via cfe-commits
@@ -352,21 +352,30 @@ void good13(void) { int Buffer[BufferSize]; int *P = &Buffer[0]; - while (P < (Buffer + sizeof(Buffer) / sizeof(int))) { + while (P < Buffer + sizeof(Buffer) / sizeof(int)) { // NO-WARNING: Calculating the element count of the buffer here, whic

[clang-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)

2024-10-12 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/78 ___ 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 insertion location for function pointers in cppcoreguidelines-init-variables (PR #112091)

2024-10-12 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/112091 >From 6398453039602d28294cbb46e853576c9988a7d6 Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 12 Oct 2024 12:34:13 +0200 Subject: [PATCH 1/2] [clang-tidy] fix insertion location for function pointers

[clang] [clang-tools-extra] [clangd] Support parsing comments without ASTContext (PR #78491)

2024-10-12 Thread Diogo Behrens via cfe-commits
db7 wrote: > > What's "ping PR"? Do you mean pinging the LLVM organization? > > It just means posting a comment on the PR that says "ping", as a reminder for > reviewers. > > (But please only do that if you're the patch author, or, in the case of a > patch author who's not active any more, if

[clang-tools-extra] [clang-tidy] fix insertion location for function pointers in cppcoreguidelines-init-variables (PR #112091)

2024-10-12 Thread Julian Schmidt via cfe-commits
@@ -185,9 +189,9 @@ Changes in existing checks false positive for C++23 deducing this. - Improved :doc:`modernize-avoid-c-arrays - ` check to suggest using ``std::span`` - as a replacement for parameters of incomplete C array type in C++20 and - ``std::array`` or ``std:

[clang-tools-extra] [clang-tidy] fix insertion location for function pointers in cppcoreguidelines-init-variables (PR #112091)

2024-10-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Julian Schmidt (5chmidti) Changes Previously, the insertion location for the `= nullptr` fix would be after the variable name. However, if the variable is of type function pointer that is not an alias, then the insertion would h

[clang-tools-extra] [clang-tidy] fix insertion location for function pointers in cppcoreguidelines-init-variables (PR #112091)

2024-10-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Julian Schmidt (5chmidti) Changes Previously, the insertion location for the `= nullptr` fix would be after the variable name. However, if the variable is of type function pointer that is not an alias, then the insertion would happen i

[clang-tools-extra] [clang-tidy] fix insertion location for function pointers in cppcoreguidelines-init-variables (PR #112091)

2024-10-12 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/112091 Previously, the insertion location for the `= nullptr` fix would be after the variable name. However, if the variable is of type function pointer that is not an alias, then the insertion would happen inside the

[clang] [clang-tools-extra] [llvm] Add code completion for C++20 keywords. (PR #107982)

2024-10-12 Thread via cfe-commits
@@ -460,6 +460,18 @@ Decl *Parser::ParseExportDeclaration() { assert(Tok.is(tok::kw_export)); SourceLocation ExportLoc = ConsumeToken(); + if (Tok.is(tok::code_completion)) { +cutOffParsing(); +SemaCodeCompletion::ParserCompletionContext PCC; +if (PP.isIncreme

[clang] [clang-tools-extra] [llvm] Add code completion for C++20 keywords. (PR #107982)

2024-10-12 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/107982 >From fedea9e4fd57b618fe341e0c30982bff0f098c52 Mon Sep 17 00:00:00 2001 From: ykiko Date: Tue, 10 Sep 2024 14:59:10 +0800 Subject: [PATCH 01/16] add co_return, co_await, co_yield, consteval, constinit, conc

[clang] [clang-tools-extra] [llvm] Add code completion for C++20 keywords. (PR #107982)

2024-10-12 Thread Younan Zhang via cfe-commits
@@ -460,6 +460,18 @@ Decl *Parser::ParseExportDeclaration() { assert(Tok.is(tok::kw_export)); SourceLocation ExportLoc = ConsumeToken(); + if (Tok.is(tok::code_completion)) { +cutOffParsing(); +SemaCodeCompletion::ParserCompletionContext PCC; +if (PP.isIncreme

[clang] [clang-tools-extra] [llvm] Add code completion for C++20 keywords. (PR #107982)

2024-10-12 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/107982 >From fedea9e4fd57b618fe341e0c30982bff0f098c52 Mon Sep 17 00:00:00 2001 From: ykiko Date: Tue, 10 Sep 2024 14:59:10 +0800 Subject: [PATCH 01/15] add co_return, co_await, co_yield, consteval, constinit, conc

[clang] [clang-tools-extra] [llvm] Add code completion for C++20 keywords. (PR #107982)

2024-10-12 Thread via cfe-commits
@@ -2186,6 +2197,45 @@ AddOrdinaryNameResults(SemaCodeCompletion::ParserCompletionContext CCC, } else { Results.AddResult(Result("template", CodeCompletionResult::RK_Keyword)); } + + if (SemaRef.getLangOpts().CPlusPlus20 && + SemaRef.getLangO

[clang] [clang-tools-extra] [llvm] Add code completion for C++20 keywords. (PR #107982)

2024-10-12 Thread via cfe-commits
https://github.com/16bit-ykiko updated https://github.com/llvm/llvm-project/pull/107982 >From fedea9e4fd57b618fe341e0c30982bff0f098c52 Mon Sep 17 00:00:00 2001 From: ykiko Date: Tue, 10 Sep 2024 14:59:10 +0800 Subject: [PATCH 01/14] add co_return, co_await, co_yield, consteval, constinit, conc

[clang] [llvm] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (PR #112084)

2024-10-12 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: This looks technically fine, but I'm having trouble finding a normative reference for this. Is there an ABI specification for N32/N64 somewhere? Also, what alignment does clang use for o32 with ForceEnableInt128? https://github.com/llvm/llvm-project/blob/cb2

[clang-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)

2024-10-12 Thread via cfe-commits
https://github.com/whisperity updated https://github.com/llvm/llvm-project/pull/78 >From 4415aaf903635d11cce7afc232e1768ad32e8592 Mon Sep 17 00:00:00 2001 From: Whisperity Date: Fri, 4 Oct 2024 17:30:41 +0200 Subject: [PATCH 1/4] feat(clang-tidy): Make `P + BS / sizeof(*P)` opt-outable ---

[clang-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)

2024-10-12 Thread via cfe-commits
@@ -352,21 +352,30 @@ void good13(void) { int Buffer[BufferSize]; int *P = &Buffer[0]; - while (P < (Buffer + sizeof(Buffer) / sizeof(int))) { + while (P < Buffer + sizeof(Buffer) / sizeof(int)) { // NO-WARNING: Calculating the element count of the buffer here, whic

[clang] [llvm] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (PR #112084)

2024-10-12 Thread via cfe-commits
@@ -75,6 +75,14 @@ TEST(DataLayoutUpgradeTest, ValidDataLayoutUpgrade) { EXPECT_EQ(UpgradeDataLayoutString("E-m:e-i64:64-n32:64-S128", "sparcv9"), "E-m:e-i64:64-i128:128-n32:64-S128"); + // Check that SPARC targets add -i128:128. yingopq wrote:

[clang] [llvm] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (PR #112084)

2024-10-12 Thread via cfe-commits
https://github.com/yingopq updated https://github.com/llvm/llvm-project/pull/112084 >From 956c8622fc120db71cc2ed7ab4e2269cbadf9d95 Mon Sep 17 00:00:00 2001 From: Ying Huang Date: Sat, 12 Oct 2024 03:12:44 -0400 Subject: [PATCH] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 F

[clang] [llvm] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (PR #112084)

2024-10-12 Thread Brad Smith via cfe-commits
@@ -75,6 +75,14 @@ TEST(DataLayoutUpgradeTest, ValidDataLayoutUpgrade) { EXPECT_EQ(UpgradeDataLayoutString("E-m:e-i64:64-n32:64-S128", "sparcv9"), "E-m:e-i64:64-i128:128-n32:64-S128"); + // Check that SPARC targets add -i128:128. brad0 wrote: S

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-10-12 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: While the libc++ checks are in the same tree as clang-tidy itself we (libc++) don't actually consider them in-tree, since they are compiled as a plugin against a clang-tidy that's already installed on the system. https://github.com/llvm/llvm-project/pull/90634 ___

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

2024-10-12 Thread via cfe-commits
@@ -0,0 +1,713 @@ +//===-- 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-10-12 Thread via cfe-commits
@@ -0,0 +1,713 @@ +//===-- 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-10-12 Thread via cfe-commits
@@ -0,0 +1,713 @@ +//===-- 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-10-12 Thread via cfe-commits
@@ -0,0 +1,713 @@ +//===-- 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-10-12 Thread via cfe-commits
@@ -0,0 +1,713 @@ +//===-- 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

  1   2   >