[clang] [REAPPLY][Clang-Repl] Add support for out-of-process execution. #110418 (PR #144064)

2025-06-15 Thread via cfe-commits
SahilPatidar wrote: > Is there a reason to be a draft? Just to make sure there were no build failures. https://github.com/llvm/llvm-project/pull/144064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-15 Thread Shamshura Egor via cfe-commits
@@ -55,6 +55,7 @@ void test() { // expected-error-re@*:* {{static assertion failed {{.*}}The result of f(value()) must be a specialization of std::expected}} // expected-error-re@*:* .*}}cannot be used prior to '::' because it has no members}} // expecte

[clang] [CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail() (PR #136133)

2025-06-15 Thread Juan Manuel Martinez CaamaƱo via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/136133 From 29463adcd2869c9a6777d54d3521f0d435e3d38c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 17 Apr 2025 13:41:55 +0200 Subject: [PATCH] [CUDA][HIP] Add a __devi

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

2025-06-15 Thread via cfe-commits
@@ -497,6 +497,12 @@ bool fromJSON(const llvm::json::Value &Params, ClientCapabilities &R, if (auto Cancel = StaleRequestSupport->getBoolean("cancel")) R.CancelsStaleRequests = *Cancel; } +if (auto *OffsetEncoding = General->get("positionEncodings")) { +

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,111 @@ +//===--- QueryCheck.cpp - clang-tidy --===// +// +// 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] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -53,6 +53,11 @@ LLVM_INSTANTIATE_REGISTRY(clang::tidy::ClangTidyModuleRegistry) namespace clang::tidy { +namespace custom { +extern void registerCustomChecks(ClangTidyOptions const &O, vbvictor wrote: ```suggestion extern void registerCustomChecks(const

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,111 @@ +//===--- QueryCheck.cpp - clang-tidy --===// +// +// 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] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,111 @@ +//===--- QueryCheck.cpp - clang-tidy --===// +// +// 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] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,50 @@ +#include "../ClangTidy.h" +#include "../ClangTidyModule.h" +#include "../ClangTidyModuleRegistry.h" +#include "../ClangTidyOptions.h" +#include "QueryCheck.h" +#include "llvm/ADT/SmallSet.h" +#include "llvm/ADT/SmallString.h" +#include "llvm/ADT/StringRef.h" +#in

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,111 @@ +//===--- QueryCheck.cpp - clang-tidy --===// +// +// 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] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -62,6 +62,8 @@ class ClangTidyCheckFactories { }); } + void erase(llvm::StringRef CheckName) { Factories.erase(CheckName); } vbvictor wrote: ```suggestion void eraseCheck(llvm::StringRef CheckName) { Factories.erase(CheckName)

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -104,7 +104,14 @@ Improvements to clang-tidy clauses. Added a ``--match-partial-fixes`` option to keep previous behavior on specific tests. This may break tests for users with custom out-of-tree checks who use :program:`check_clang_tidy.py` as-is. - +- :program:`clang

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,111 @@ +//===--- QueryCheck.cpp - clang-tidy --===// +// +// 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] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -17,6 +18,7 @@ #include "llvm/Support/MemoryBufferRef.h" #include "llvm/Support/VirtualFileSystem.h" #include +#include vbvictor wrote: Is this include needed? https://github.com/llvm/llvm-project/pull/131804 _

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,111 @@ +//===--- QueryCheck.cpp - clang-tidy --===// +// +// 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] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,50 @@ +#include "../ClangTidy.h" +#include "../ClangTidyModule.h" +#include "../ClangTidyModuleRegistry.h" +#include "../ClangTidyOptions.h" +#include "QueryCheck.h" +#include "llvm/ADT/SmallSet.h" +#include "llvm/ADT/SmallString.h" +#include "llvm/ADT/StringRef.h" +#in

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,50 @@ +#include "../ClangTidy.h" +#include "../ClangTidyModule.h" +#include "../ClangTidyModuleRegistry.h" +#include "../ClangTidyOptions.h" +#include "QueryCheck.h" +#include "llvm/ADT/SmallSet.h" +#include "llvm/ADT/SmallString.h" +#include "llvm/ADT/StringRef.h" +#in

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,63 @@ + +Query Based Custom Clang-Tidy Checks + + +Introduction + + +This page provides examples of how to add query based custom checks for +:program:`clang-tidy`. + +Custom checks are

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

2025-06-15 Thread via cfe-commits
https://github.com/someoneinjd updated https://github.com/llvm/llvm-project/pull/142903 >From 2e106efb40c3a6183a4d0cddcd18e2f79f019361 Mon Sep 17 00:00:00 2001 From: someoneinjd Date: Thu, 5 Jun 2025 13:51:40 +0800 Subject: [PATCH] [clangd] Implement LSP 3.17 positionEncoding --- clang-tools-

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-15 Thread Shamshura Egor via cfe-commits
egorshamshura wrote: > > Hi, @AaronBallman! I noticed that the libc++ tests are not using the latest > > version of my code. How can I run them with the latest version? Thank you! > > They are being run with the current trunk, but also with older versions of > Clang, because libc++ supports ol

[clang] [clang] Check constexpr int->enum conversions consistently. (PR #143034)

2025-06-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Most likely, the user code is invalid. I was hoping we would get away without hitting any bugs in major frameworks, but I'm not surprised we hit something. If this is widespread, we can look into mitigations, but it's difficult to downgrade constant evaluation errors to w

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-15 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: For people following at home, Oliver and I discussed this offline and we both agreed that enabling of relocation of discriminated vtable was a good first approach. we could always explore ways to extend what we support later, in a way that doesn't confuse people who try to relo

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-15 Thread Corentin Jabot via cfe-commits
@@ -629,25 +629,46 @@ class ASTContext : public RefCountedBase { void setRelocationInfoForCXXRecord(const CXXRecordDecl *, CXXRecordDeclRelocationInfo); - /// Examines a given type, and returns whether the T itself + /// Examines a give

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-15 Thread Corentin Jabot via cfe-commits
@@ -629,25 +629,46 @@ class ASTContext : public RefCountedBase { void setRelocationInfoForCXXRecord(const CXXRecordDecl *, CXXRecordDeclRelocationInfo); - /// Examines a given type, and returns whether the T itself + /// Examines a give

[clang] [clang-tools-extra] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-06-15 Thread via cfe-commits
https://github.com/YexuanXiao edited https://github.com/llvm/llvm-project/pull/143653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4f9e6ba - [clang][bytecode] Fix calling operator new with nothrow/align parameter (#144271)

2025-06-15 Thread via cfe-commits
Author: Timm Baeder Date: 2025-06-16T08:28:52+02:00 New Revision: 4f9e6bad8438f4440bfd68be2f0ebdca0d588d47 URL: https://github.com/llvm/llvm-project/commit/4f9e6bad8438f4440bfd68be2f0ebdca0d588d47 DIFF: https://github.com/llvm/llvm-project/commit/4f9e6bad8438f4440bfd68be2f0ebdca0d588d47.diff L

[clang] [clang][bytecode] Fix calling operator new with nothrow/align parameter (PR #144271)

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

[clang-tools-extra] [clangd] Add languages as server capabilities (PR #75633)

2025-06-15 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. (marking 'request changes' per discussion in previous comments) https://github.com/llvm/llvm-project/pull/75633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang-tools-extra] [clangd] Add languages as server capabilities (PR #75633)

2025-06-15 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > IIUC, we're trying to figure out if clangd should be used for documents for > language `X`. We need to figure this out **before** clangd's proper > initialization, so that we can decide which `documentSelector`s to provide. Thanks, that's a good point that I overlooked!

[clang] [llvm] Pass TargetMachine from from Clang to `BitcodeWriter`and `ThinLTOBitcodeWriter` pass for thin and fat LTO respectively. (PR #143692)

2025-06-15 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Gentle Ping! https://github.com/llvm/llvm-project/pull/143692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Parser] Fix crash on invalid attribute in constexpr function (PR #144286)

2025-06-15 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/144286 >From 45b05320cfe0106a54f31d7d5d5d6ed0e23faff3 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 16 Jun 2025 09:37:17 +0800 Subject: [PATCH 1/2] [clang][Parser] Fix crash on invalid attribute in con

[clang] [clang] Use StringRef in range-based for loops (NFC) (PR #144242)

2025-06-15 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/144242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement diagnostics for why `std::is_standard_layout` is false (PR #144161)

2025-06-15 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/144161 >From b33871b073e2438d0f747404d864616f49e235f6 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Fri, 13 Jun 2025 23:22:18 +0200 Subject: [PATCH 1/2] Implement diagnostics for why `std::is_standard_layout`

[clang] [REAPPLY][Clang-Repl] Add support for out-of-process execution. #110418 (PR #144064)

2025-06-15 Thread via cfe-commits
https://github.com/SahilPatidar updated https://github.com/llvm/llvm-project/pull/144064 >From 05943c9542cd89ae672ddc0f14514e0c7b1e0bd7 Mon Sep 17 00:00:00 2001 From: SahilPatidar Date: Tue, 3 Dec 2024 15:07:56 +0530 Subject: [PATCH 1/4] Re-Land: [Clang-Repl] Add support for out-of-process exe

[clang] [REAPPLY][Clang-Repl] Add support for out-of-process execution. #110418 (PR #144064)

2025-06-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (SahilPatidar) Changes This PR introduces out-of-process (OOP) execution support for Clang-Repl. With this enhancement, two new flags, oop-executor and oop-executor-connect, are added to the Clang-Repl interface. These flags enable t

[clang] [REAPPLY][Clang-Repl] Add support for out-of-process execution. #110418 (PR #144064)

2025-06-15 Thread via cfe-commits
https://github.com/SahilPatidar ready_for_review https://github.com/llvm/llvm-project/pull/144064 ___ 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 query based custom check (PR #131804)

2025-06-15 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ping @PiotrZSL @vbvictor @carlosgalvezp I have updated the PR according to comment and updated the description, could you review it again? https://github.com/llvm/llvm-project/pull/131804 ___ cfe-commits mailing list cfe-commits@li

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-06-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/131804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Parser] Fix crash on invalid attribute in constexpr function (PR #144286)

2025-06-15 Thread Iris Shi via cfe-commits
el-ev wrote: Added. https://github.com/llvm/llvm-project/pull/144286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Parser] Fix crash on invalid attribute in constexpr function (PR #144286)

2025-06-15 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/144286 >From 45b05320cfe0106a54f31d7d5d5d6ed0e23faff3 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 16 Jun 2025 09:37:17 +0800 Subject: [PATCH 1/2] [clang][Parser] Fix crash on invalid attribute in con

[clang] [llvm] [RISCV] Fix incorrect predicates for fp16 permutation intrinsics (PR #144063)

2025-06-15 Thread Jim Lin via cfe-commits
https://github.com/tclin914 closed https://github.com/llvm/llvm-project/pull/144063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e2afda6 - [RISCV] Fix incorrect predicates for fp16 permutation intrinsics (#144063)

2025-06-15 Thread via cfe-commits
Author: Jim Lin Date: 2025-06-16T12:15:30+08:00 New Revision: e2afda6fc95ef63b54d449fc1a9eb13cd0ff3639 URL: https://github.com/llvm/llvm-project/commit/e2afda6fc95ef63b54d449fc1a9eb13cd0ff3639 DIFF: https://github.com/llvm/llvm-project/commit/e2afda6fc95ef63b54d449fc1a9eb13cd0ff3639.diff LOG:

[clang] [clang][Parser] Fix crash on invalid attribute in constexpr function (PR #144286)

2025-06-15 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Please add a release note. https://github.com/llvm/llvm-project/pull/144286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c015321 - [clang] Remove unused includes (NFC) (#144285)

2025-06-15 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-06-15T21:00:36-07:00 New Revision: c01532177ff61a768d5dc1ea541f9a8d986497fa URL: https://github.com/llvm/llvm-project/commit/c01532177ff61a768d5dc1ea541f9a8d986497fa DIFF: https://github.com/llvm/llvm-project/commit/c01532177ff61a768d5dc1ea541f9a8d986497fa.diff L

[clang] [clang] Remove unused includes (NFC) (PR #144285)

2025-06-15 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/144285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f71fb2d - [clang] Use StringRef in range-based for loops (NFC) (#144242)

2025-06-15 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-06-15T21:00:22-07:00 New Revision: f71fb2dc01e117481f56e040c25391883d43c1c5 URL: https://github.com/llvm/llvm-project/commit/f71fb2dc01e117481f56e040c25391883d43c1c5 DIFF: https://github.com/llvm/llvm-project/commit/f71fb2dc01e117481f56e040c25391883d43c1c5.diff L

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/144220 >From 30935f3d8a910646d50f27202611deebfbae95bf Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Fri, 13 Jun 2025 19:48:52 + Subject: [PATCH 1/5] Revert "Revert "[Clang] Added explanation why `is_co

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/144220 >From 30935f3d8a910646d50f27202611deebfbae95bf Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Fri, 13 Jun 2025 19:48:52 + Subject: [PATCH 1/4] Revert "Revert "[Clang] Added explanation why `is_co

[clang] [libcxx] [libc++][Clang] Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura updated https://github.com/llvm/llvm-project/pull/144220 >From 30935f3d8a910646d50f27202611deebfbae95bf Mon Sep 17 00:00:00 2001 From: Shamshura Egor Date: Fri, 13 Jun 2025 19:48:52 + Subject: [PATCH 1/3] Revert "Revert "[Clang] Added explanation why `is_co

[clang] [Clang] Added explanation why ```is_trivially_copyable``` evaluated to false. (PR #142341)

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/142341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why ```is_trivial_copyable``` evaluated to false. (PR #142341)

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/142341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why ```is trivial copyable``` evaluated to false. (PR #142341)

2025-06-15 Thread Shamshura Egor via cfe-commits
https://github.com/egorshamshura edited https://github.com/llvm/llvm-project/pull/142341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Fix incorrect predicates for fp16 permutation intrinsics (PR #144063)

2025-06-15 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/144063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Parser] Fix crash on invalid attribute in constexpr function (PR #144286)

2025-06-15 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/144286 >From 4c2a77216656c90ea157403f1fba026f81c4d328 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 16 Jun 2025 09:37:17 +0800 Subject: [PATCH] [clang][Parser] Fix crash on invalid attribute in constexp

[clang] [clang-format] Stop moving lambda to new line only to indent it more. (PR #141576)

2025-06-15 Thread Owen Pan via cfe-commits
@@ -325,13 +325,30 @@ bool ContinuationIndenter::canBreak(const LineState &State) { if (Current.isMemberAccess() && CurrentState.ContainsUnwrappedBuilder) return false; - // Don't create a 'hanging' indent if there are multiple blocks in a single - // statement and we

[clang] [clang][Parser] Fix crash on invalid attribute in constexpr function (PR #144286)

2025-06-15 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 HEAD~1 HEAD --extensions cpp -- clang/test/Parser/cxx-invalid-attr-in-constexpr-crash

[clang] [clang][Parser] Fix crash on invalid attribute in constexpr function (PR #144286)

2025-06-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Iris Shi (el-ev) Changes - Closes #144264 --- Full diff: https://github.com/llvm/llvm-project/pull/144286.diff 2 Files Affected: - (modified) clang/lib/Parse/ParseDeclCXX.cpp (+4) - (added) clang/test/Parser/cxx-invalid-attr-in-constex

[clang] [clang][Parser] Fix crash on invalid attribute in constexpr function (PR #144286)

2025-06-15 Thread Iris Shi via cfe-commits
https://github.com/el-ev created https://github.com/llvm/llvm-project/pull/144286 - Closes #144264 >From 70b7c4140e8991a56275782a282a7a9d9b3be155 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Mon, 16 Jun 2025 09:37:17 +0800 Subject: [PATCH] [clang][Parser] Fix crash on invalid att

[clang] [clang] Use StringRef in range-based for loops (NFC) (PR #144242)

2025-06-15 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/144242 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1506ba9 - [clang-format][NFC] Clean up DisallowLineBreaks lambda (#144255)

2025-06-15 Thread via cfe-commits
Author: Owen Pan Date: 2025-06-15T18:28:06-07:00 New Revision: 1506ba95d7c3dca1abff0190550945f6cc263a99 URL: https://github.com/llvm/llvm-project/commit/1506ba95d7c3dca1abff0190550945f6cc263a99 DIFF: https://github.com/llvm/llvm-project/commit/1506ba95d7c3dca1abff0190550945f6cc263a99.diff LOG:

[clang] [clang-format][NFC] Clean up DisallowLineBreaks lambda (PR #144255)

2025-06-15 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/144255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AVR] Add many new AVR MCU model definitions (PR #144229)

2025-06-15 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/144229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ad94f77 - [AVR] Add many new AVR MCU model definitions (#144229)

2025-06-15 Thread via cfe-commits
Author: Tom Vijlbrief Date: 2025-06-16T09:25:40+08:00 New Revision: ad94f77a6a0c421e1f5815d1b8e5aa86d8dd2e92 URL: https://github.com/llvm/llvm-project/commit/ad94f77a6a0c421e1f5815d1b8e5aa86d8dd2e92 DIFF: https://github.com/llvm/llvm-project/commit/ad94f77a6a0c421e1f5815d1b8e5aa86d8dd2e92.diff

[clang] [clang-format][NFC] Upgrade IndentBraces option to a struct (PR #143663)

2025-06-15 Thread Owen Pan via cfe-commits
owenca wrote: > I don't understand this fix, it needs tests to show what you are doing See https://github.com/llvm/llvm-project/pull/143249#discussion_r2136966951 and https://github.com/llvm/llvm-project/pull/143249#issuecomment-2957775336. IMO, the current `BraceWrapping.IndentBraces` boolean

[clang] [llvm] [AVR] Add many new AVR MCU model definitions (PR #144229)

2025-06-15 Thread Ben Shi via cfe-commits
https://github.com/benshi001 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/144229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AVR] Add many new AVR MCU model definitions (PR #144229)

2025-06-15 Thread Ben Shi via cfe-commits
benshi001 wrote: > For future reference, the avr16/avr32 devices do have SPM and SPMX features, > but the current xmega3 definition has not. > > Xmega3 is also used for modern attiny series which do not have SPM(X), so > that is correct. > > The avr64 devices use xmega2 which has SPM(X) defin

[clang] [llvm] [AVR] Add many new AVR MCU model definitions (PR #144229)

2025-06-15 Thread Ben Shi via cfe-commits
benshi001 wrote: > @tomtor @benshi001 I just tried your latest revision on the top of tree, and > both `check-llvm` and `check-clang` passed. Thanks for your help ! https://github.com/llvm/llvm-project/pull/144229 ___ cfe-commits mailing list cfe-com

[clang-tools-extra] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-15 Thread via cfe-commits
@@ -0,0 +1,42 @@ +.. title:: clang-tidy - performance-bool-bitwise-operation + +performance-bool-bitwise-operation +== + +Finds potentially inefficient use of bitwise operators such as ``&``, ``|`` +and their compound analogues on Boolean values w

[clang] [clang] Remove unused includes (NFC) (PR #144285)

2025-06-15 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. CI will tell us whether this is broken or not. :-) https://github.com/llvm/llvm-project/pull/144285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang-format][NFC] Clean up DisallowLineBreaks lambda (PR #144255)

2025-06-15 Thread Owen Pan via cfe-commits
@@ -706,42 +706,48 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, const FormatToken &Previous = *State.NextToken->Previous; auto &CurrentState = State.Stack.back(); - bool DisallowLineBreaksOnThisLine = - Style.LambdaBodyIndentati

[clang] [clang-format][NFC] Clean up DisallowLineBreaks lambda (PR #144255)

2025-06-15 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/144255 >From e959ae809abb119effd17534c199f1e6c174d749 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 15 Jun 2025 01:42:20 -0700 Subject: [PATCH 1/2] [clang-format][NFC] Clean up DisallowLineBreaks lambda See also h

[clang-tools-extra] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-15 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,208 @@ +//===--- BoolBitwiseOperationCheck.cpp - clang-tidy ---===// +// +// 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] [clang] Remove unused includes (NFC) (PR #144285)

2025-06-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-risc-v Author: Kazu Hirata (kazutakahirata) Changes These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which l

[clang] [clang] Remove unused includes (NFC) (PR #144285)

2025-06-15 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/144285 These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-spec

[clang] [scan-build] Use python3 instead of python in scripts. (PR #80977)

2025-06-15 Thread Collin Funk via cfe-commits
https://github.com/collinfunk closed https://github.com/llvm/llvm-project/pull/80977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-15 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,403 @@ +// RUN: %check_clang_tidy %s performance-bool-bitwise-operation %t + +bool& normal() { +int a = 100, b = 200; + +a | b; +a & b; +a |= b; +a &= b; + +static bool st = false; +return st; +} + +bool bad() noexcept __attribute__((pure)) {

[clang-tools-extra] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-15 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,208 @@ +//===--- BoolBitwiseOperationCheck.cpp - clang-tidy ---===// +// +// 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] [clang-reorder-fields] Use expanded location for macros (PR #142147)

2025-06-15 Thread via cfe-commits
github-actions[bot] wrote: @vvuksanovic Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a bu

[clang-tools-extra] [clang-reorder-fields] Use expanded location for macros (PR #142147)

2025-06-15 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov closed https://github.com/llvm/llvm-project/pull/142147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 34c85ed - [clang-reorder-fields] Use expanded location for macros (#142147)

2025-06-15 Thread via cfe-commits
Author: Vladimir Vuksanovic Date: 2025-06-15T18:07:51-04:00 New Revision: 34c85ed2bc1adfa375745db6de7f62d350a8f768 URL: https://github.com/llvm/llvm-project/commit/34c85ed2bc1adfa375745db6de7f62d350a8f768 DIFF: https://github.com/llvm/llvm-project/commit/34c85ed2bc1adfa375745db6de7f62d350a8f768

[clang-tools-extra] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-15 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,208 @@ +//===--- BoolBitwiseOperationCheck.cpp - clang-tidy ---===// +// +// 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] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-15 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,208 @@ +//===--- BoolBitwiseOperationCheck.cpp - clang-tidy ---===// +// +// 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] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-15 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,208 @@ +//===--- BoolBitwiseOperationCheck.cpp - clang-tidy ---===// +// +// 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] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-15 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,208 @@ +//===--- BoolBitwiseOperationCheck.cpp - clang-tidy ---===// +// +// 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] [clang-tidy] Add performance-bool-bitwise-operation check (PR #142324)

2025-06-15 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,208 @@ +//===--- BoolBitwiseOperationCheck.cpp - clang-tidy ---===// +// +// 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] [llvm] [RISCV] Remove B and Zbc extension from Andes series cpus. (PR #144022)

2025-06-15 Thread Craig Topper via cfe-commits
topperc wrote: > > > Not related to this PR, but I'd like to raise the question here: > > > > For configurable cores, what is the best way to specify the features? > > > `-mcpu` is meant to support the base configuration, but how can we > > > specify the additional optional extensions? Apparen

[clang] [clang][bytecode] Fix calling operator new with nothrow/align parameter (PR #144271)

2025-06-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt approved this pull request. Looks reasonable to me -- I spent a bunch of time trying to induce some case where this would do the wrong thing and I couldn't come up with anything as all the failure modes that would be possible outside of constexpr already fail in const

[clang] [Clang] Improve diagnostics for 'placement new' with const storage argument (PR #144270)

2025-06-15 Thread Oliver Hunt via cfe-commits
@@ -2753,10 +2753,18 @@ static bool resolveAllocationOverloadInterior( if (Diagnose) { // If this is an allocation of the form 'new (p) X' for some object // pointer p (or an expression that will decay to such a pointer), - // diagnose the missing inclusion

[clang] [Clang] Improve diagnostics for 'placement new' with const storage argument (PR #144270)

2025-06-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt requested changes to this pull request. https://github.com/llvm/llvm-project/pull/144270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add 'IgnoreMarcos' option to 'avoid-goto' check (PR #143554)

2025-06-15 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/143554 >From 5c975c6b59c02b0464a9bfc1b424b89b4d7dd662 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 10 Jun 2025 18:27:12 +0300 Subject: [PATCH 1/3] [clang-tidy] add 'IgnoreMarcos' option to 'avoid-goto' ch

[clang] [Clang] Improve diagnostics for 'placement new' with const storage argument (PR #144270)

2025-06-15 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/144270 >From 07392e16740d3d89700da43e22b4d90197bb4d4a Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sun, 15 Jun 2025 19:56:05 +0300 Subject: [PATCH 1/2] [Clang] Improve diagnostics when 'placement new' was call

[clang] [Clang] Improve diagnostics for 'placement new' with const storage argument (PR #144270)

2025-06-15 Thread Oliver Hunt via cfe-commits
@@ -2753,10 +2753,18 @@ static bool resolveAllocationOverloadInterior( if (Diagnose) { // If this is an allocation of the form 'new (p) X' for some object // pointer p (or an expression that will decay to such a pointer), - // diagnose the missing inclusion

[clang] [Clang] Fix typo in is_replaceable diagnostic (PR #144247)

2025-06-15 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Sure thing :D https://github.com/llvm/llvm-project/pull/144247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d3e9e2d - [Clang] Fix typo in is_replaceable diagnostic (#144247)

2025-06-15 Thread via cfe-commits
Author: Ross Kirsling Date: 2025-06-15T22:45:08+03:00 New Revision: d3e9e2d433a666d6620afb00a1533ef4937c667f URL: https://github.com/llvm/llvm-project/commit/d3e9e2d433a666d6620afb00a1533ef4937c667f DIFF: https://github.com/llvm/llvm-project/commit/d3e9e2d433a666d6620afb00a1533ef4937c667f.diff

[clang] [Clang] Fix typo in is_replaceable diagnostic (PR #144247)

2025-06-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt closed https://github.com/llvm/llvm-project/pull/144247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add 'IgnoreMarcos' option to 'avoid-goto' check (PR #143554)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -132,8 +133,41 @@ void jump_out_backwards() { for (int j = 0; j < 10; ++j) { if (i * j > 80) goto before_the_loop; - // CHECK-NOTES: [[@LINE-1]]:9: warning: avoid using 'goto' for flow control - // CHECK-NOTES: [[@LINE-8]]:1: note: label defined

[clang-tools-extra] [clang-tidy] add 'IgnoreMarcos' option to 'avoid-goto' check (PR #143554)

2025-06-15 Thread Baranov Victor via cfe-commits
@@ -50,3 +50,12 @@ Modern C++ needs ``goto`` only to jump out of nested loops. some_operation(); All other uses of ``goto`` are diagnosed in `C++`. + + +Options +--- + +.. option:: IgnoreMacros + + If set to `true`, the check will not warn if both label and ``goto`` +

[clang] [Clang] Fix typo in is_replaceable diagnostic (PR #144247)

2025-06-15 Thread Ross Kirsling via cfe-commits
rkirsling wrote: @ojhunt Thanks! Could you hit the green button for me as well? https://github.com/llvm/llvm-project/pull/144247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Remove B and Zbc extension from Andes series cpus. (PR #144022)

2025-06-15 Thread Sam Elliott via cfe-commits
lenary wrote: > > Not related to this PR, but I'd like to raise the question here: > > For configurable cores, what is the best way to specify the features? > > `-mcpu` is meant to support the base configuration, but how can we specify > > the additional optional extensions? Apparently, failing

[clang] [Clang] Fix typo in is_replaceable diagnostic (PR #144247)

2025-06-15 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/144247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   >