[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-30 Thread via cfe-commits
=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina Message-ID: In-Reply-To: owenca

[clang] [clang-format] Fix TableGen nested DAGArg format (PR #155837)

2025-08-30 Thread via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/155837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-30 Thread via cfe-commits
@@ -0,0 +1,176 @@ +//===--- NumericLiteralCaseFixer.cpp *- 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] [clang-format] Fix TableGen nested DAGArg format (PR #155837)

2025-08-30 Thread Hirofumi Nakamura via cfe-commits
@@ -185,11 +185,18 @@ TEST_F(FormatTestTableGen, SimpleValue6) { " i32:$dst6,// dst6\n" " i32:$dst7 // dst7\n" " );\n" - " let DAGArgBang = (!c

[clang] [clang-format] Fix TableGen nested DAGArg format (PR #155837)

2025-08-30 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 updated https://github.com/llvm/llvm-project/pull/155837 >From 2cc33a8a0d2cb266a52483c6bb5bcc2e95564db9 Mon Sep 17 00:00:00 2001 From: hnakamura5 Date: Thu, 28 Aug 2025 22:28:56 +0900 Subject: [PATCH 1/2] [clang-format] Fix TableGen nested DAGArg format --- clang

[clang] Using type deduction to define __SIZE_TYPE__ and __PTRDIFF_TYPE__ (PR #155979)

2025-08-30 Thread via cfe-commits
YexuanXiao wrote: > ast-dump-types-json.cpp After moving the test to ast-dump-types-json.cpp, the -ast-dump-filter Test removes the extraneous information, and now the CI can pass successfully. https://github.com/llvm/llvm-project/pull/155979 ___ cfe

[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

2025-08-30 Thread via cfe-commits
@@ -34,6 +34,24 @@ latest release, please see the `Clang Web Site `_ or the Potentially Breaking Changes +- Scalar deleting destructor support has been aligned with MSVC when + targeting the MSVC ABI. Clang previously impl

[clang-tools-extra] [Clang-Tidy] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-conditionals" (PR #155982)

2025-08-30 Thread via cfe-commits
@@ -76,6 +136,16 @@ bool foo(Y *y, Z *z) { // CHECK-MESSAGES: :[[@LINE-2]]:7: warning: isa_and_nonnull<> is preferred // CHECK-FIXES: if (isa_and_nonnull(z->bar())) + if (z->bar() && cast_or_null(z->bar())) +return true; + // CHECK-MESSAGES: :[[@LINE-2]]:7: warning:

[clang-tools-extra] [clang-tidy] add option to `readability-use-concise-preprocessor-directives` to take consistency into account (PR #156220)

2025-08-30 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/156220 ___ 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 option to `readability-use-concise-preprocessor-directives` to take consistency into account (PR #156220)

2025-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Victor Chernyakin (localspook) Changes Fixes #155680. See that issue for context. The precise heuristic this PR implements is this: *none of the conditions in a chain will be shortened if any of them contains the `defined` operator b

[clang-tools-extra] [clang-tidy] add option to `readability-use-concise-preprocessor-directives` to take consistency into account (PR #156220)

2025-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Victor Chernyakin (localspook) Changes Fixes #155680. See that issue for context. The precise heuristic this PR implements is this: *none of the conditions in a chain will be shortened if any of them contains the `defined` ope

[clang-tools-extra] [clang-tidy] add option to `readability-use-concise-preprocessor-directives` to take consistency into account (PR #156220)

2025-08-30 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook created https://github.com/llvm/llvm-project/pull/156220 Fixes #155680. See that issue for context. The precise heuristic this PR implements is this: *none of the conditions in a chain will be shortened if any of them contains the `defined` operator but cannot be

[clang] Fix unique_ptr aggregate initialization false positives (PR #155131)

2025-08-30 Thread via cfe-commits
vidur2 wrote: So is it best to close this PR? https://github.com/llvm/llvm-project/pull/155131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Using type deduction to define __SIZE_TYPE__ and __PTRDIFF_TYPE__ (PR #155979)

2025-08-30 Thread via cfe-commits
https://github.com/YexuanXiao updated https://github.com/llvm/llvm-project/pull/155979 >From da3d78ad13eb53fa46f711cb295c60d9a6cebbab Mon Sep 17 00:00:00 2001 From: YexuanXiao Date: Fri, 29 Aug 2025 13:46:55 +0800 Subject: [PATCH 1/2] Using type deduction to define __SIZE_TYPE__ and __PTRDIFF_

[clang-tools-extra] [Clang-Tidy] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-conditionals" (PR #155982)

2025-08-30 Thread Yanzuo Liu via cfe-commits
@@ -76,6 +136,16 @@ bool foo(Y *y, Z *z) { // CHECK-MESSAGES: :[[@LINE-2]]:7: warning: isa_and_nonnull<> is preferred // CHECK-FIXES: if (isa_and_nonnull(z->bar())) + if (z->bar() && cast_or_null(z->bar())) +return true; + // CHECK-MESSAGES: :[[@LINE-2]]:7: warning:

[clang-tools-extra] [Clang-Tidy] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-conditionals" (PR #155982)

2025-08-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM. since you have already changing the matcher a lot. could you give more meaningful name for each locals. e.g. Any, Condition, ... https://github.com/llvm/llvm-project/pull/155982 ___ cfe-

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-30 Thread Ivan Murashko via cfe-commits
ivanmurashko wrote: Thank you very much, @NagyDonat, for the review and useful comments - especially the code pointers, which I used in 7c6ffa87d87fed8097558a9b79e9fb321903239b. I believe that I have addressed all comments, and the code is ready for the next review. Beyond resolving the comme

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-30 Thread Ivan Murashko via cfe-commits
ivanmurashko wrote: > Moreover I thought about the approach that you currently emphasize "owning" > in every name and comment where you speak about smart pointers. As this is > not a distinguishing feature of these functions (you never interact with > non-owning smart pointers) and these func

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-30 Thread Ivan Murashko via cfe-commits
@@ -3068,12 +3124,242 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +// Helper function to check if a name is a recognized smart pointer name +static bool isSmartPtrName(StringRef Name) { + return Name == "unique_ptr

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-30 Thread Ivan Murashko via cfe-commits
@@ -1096,6 +1104,54 @@ class StopTrackingCallback final : public SymbolVisitor { return true; } }; + +/// EscapeTrackedCallback - A SymbolVisitor that marks allocated symbols as +/// escaped. +/// +/// This visitor is used to suppress false positive leak reports when smar

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-30 Thread Ivan Murashko via cfe-commits
@@ -3068,12 +3124,225 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +// Helper function to check if a name is a recognized smart owning pointer name +static bool isSmartOwningPtrName(StringRef Name) { + return Name =

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-30 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko edited https://github.com/llvm/llvm-project/pull/152751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-30 Thread Ivan Murashko via cfe-commits
@@ -0,0 +1,232 @@ +// RUN: %clang_analyze_cc1 -verify -analyzer-output=text %s \ +// RUN: -analyzer-checker=core \ +// RUN: -analyzer-checker=cplusplus \ +// RUN: -analyzer-checker=unix \ +// RUN: -analyzer-checker=unix.Malloc + +#include "Inputs/system-header-simulator-fo

[clang-tools-extra] [Clang-Tidy] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-conditionals" (PR #155982)

2025-08-30 Thread via cfe-commits
@@ -76,6 +136,16 @@ bool foo(Y *y, Z *z) { // CHECK-MESSAGES: :[[@LINE-2]]:7: warning: isa_and_nonnull<> is preferred // CHECK-FIXES: if (isa_and_nonnull(z->bar())) + if (z->bar() && cast_or_null(z->bar())) +return true; + // CHECK-MESSAGES: :[[@LINE-2]]:7: warning:

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-30 Thread Ivan Murashko via cfe-commits
@@ -3194,7 +3480,6 @@ void MallocChecker::checkEscapeOnReturn(const ReturnStmt *S, if (!Sym) // If we are returning a field of the allocated struct or an array element, // the callee could still free the memory. -// TODO: This logic should be a part of generic sy

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. LGTM, thanks! Since the patch is making some minor changes to libTooling, I'm going to wait a couple of days before merging, in case anyone else has comments. https://github.com/llvm/llvm-project/pull/155561

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-30 Thread Mythreya Kuricheti via cfe-commits
@@ -42,6 +62,11 @@ template ResolveFn, const InputMatcher &IM, const OutputMatchers &...OMS) { auto TU = tooling::buildASTFromCodeWithArgs(Code, {"-std=c++23"}); MythreyaK wrote: omg totally forgot about this, sorry! https://github.co

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-30 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK updated https://github.com/llvm/llvm-project/pull/155561 >From b0c182fc416a5fa1cd64ef3a95cd4fd05b0c8eef Mon Sep 17 00:00:00 2001 From: Mythreya Kuricheti Date: Thu, 28 Aug 2025 01:27:22 -0700 Subject: [PATCH 1/4] Add `CaptureDiagsKind` to `buildASTFromCodeWithArgs`

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-30 Thread Nathan Ridge via cfe-commits
@@ -644,9 +644,13 @@ namespace { class ASTBuilderAction : public ToolAction { std::vector> &ASTs; + CaptureDiagsKind CaptureKinds; HighCommander4 wrote: nit: `CaptureKind` or `CaptureDiags` (`Kinds`, as in "more than one kind", does not make sense here)

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-30 Thread Nathan Ridge via cfe-commits
@@ -42,6 +62,11 @@ template ResolveFn, const InputMatcher &IM, const OutputMatchers &...OMS) { auto TU = tooling::buildASTFromCodeWithArgs(Code, {"-std=c++23"}); HighCommander4 wrote: We need to be actually passing `CaptureDiagsKind::Al

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Starting to look pretty good! https://github.com/llvm/llvm-project/pull/155561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/155561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add error check for HeuristicResolver (PR #155561)

2025-08-30 Thread Nathan Ridge via cfe-commits
@@ -31,6 +33,24 @@ template using ResolveFnT = std::function( const HeuristicResolver *, InputNode)>; +std::string format_error(const clang::StoredDiagnostic &D) { + std::ostringstream Msg{}; + if (D.getLevel() == DiagnosticsEngine::Level::Ignored) High

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-30 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/156137 >From 2acfa1ad795eac48ea106ae2d0af2a398c9b3eb5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 29 Aug 2025 13:56:48 -0700 Subject: [PATCH 1/4] [ADT] Refactor StringMap iterators (NFC) StringMap has

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-30 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 origin/main HEAD --extensions h,cpp -- clang-tools-extra/clang-tidy/fuchsia/MultipleI

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-30 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: @kuhar I've added a few more tests on iterator traits. Also, I've corrected a bug where `value_type` was a const value type in `const_iterator`. IIUC, `value_type` is always a non-const value type. https://github.com/llvm/llvm-project/pull/156137 ___

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-30 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/156137 >From 2acfa1ad795eac48ea106ae2d0af2a398c9b3eb5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 29 Aug 2025 13:56:48 -0700 Subject: [PATCH 1/3] [ADT] Refactor StringMap iterators (NFC) StringMap has

[clang] [llvm] [UBSan] make ubsantrap `inaccessiblemem: write` (PR #156100)

2025-08-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM, assuming the intended usage model for these does not include introspection of memory at the time of trap. https://github.com/llvm/llvm-project/pull/156100 ___ cfe-commits mailing list cfe-comm

[clang] Fixup test added in #155573 to work when the compiler defaults to C++20. (PR #156166)

2025-08-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-remote-linux-ubuntu` running on `as-builder-9` while building `clang` at step 16 "test-check-lldb-api". Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/13978 Here is the relevant piec

[clang] [Clang] Add diagnostic for why std::is_abstract is false (PR #156199)

2025-08-30 Thread Sebastian Proell via cfe-commits
sebproell wrote: cc @cor3ntin https://github.com/llvm/llvm-project/pull/156199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixup test added in #155573 to work when the compiler defaults to C++20. (PR #156166)

2025-08-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/21997 Here is the relevant pie

[clang] [Clang] Add diagnostic for why std::is_abstract is false (PR #156199)

2025-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sebastian Proell (sebproell) Changes Adds onto #141911 --- Full diff: https://github.com/llvm/llvm-project/pull/156199.diff 4 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td (+6-2) - (modified) clang/lib/

[clang] [Clang] Add diagnostic for why std::is_abstract is false (PR #156199)

2025-08-30 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] Add diagnostic for why std::is_abstract is false (PR #156199)

2025-08-30 Thread Sebastian Proell via cfe-commits
https://github.com/sebproell created https://github.com/llvm/llvm-project/pull/156199 Adds onto #141911 >From d86aa58c30c784e99cc28cd2b90bd0d667b78ab6 Mon Sep 17 00:00:00 2001 From: Sebastian Proell Date: Sat, 30 Aug 2025 14:46:25 +0200 Subject: [PATCH] [Clang] Add diagnostic for why std::is_

[clang] Fixup test added in #155573 to work when the compiler defaults to C++20. (PR #156166)

2025-08-30 Thread via cfe-commits
https://github.com/dyung closed https://github.com/llvm/llvm-project/pull/156166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5d74c04 - Fixup test added in #155573 to work when the compiler defaults to C++20. (#156166)

2025-08-30 Thread via cfe-commits
Author: dyung Date: 2025-08-30T12:12:33-07:00 New Revision: 5d74c045eddc1ba00846ce6ef7df3584d439b007 URL: https://github.com/llvm/llvm-project/commit/5d74c045eddc1ba00846ce6ef7df3584d439b007 DIFF: https://github.com/llvm/llvm-project/commit/5d74c045eddc1ba00846ce6ef7df3584d439b007.diff LOG: Fi

[clang] Using type deduction to define __SIZE_TYPE__ and __PTRDIFF_TYPE__ (PR #155979)

2025-08-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > @mizvekov The ast-dump test I added passes locally, but the CI is failing to > match the string. How do I resolve this? I would guess that kind of problem is due to line ending differences. But in any case, I was thinking more about doing text-mode ast-dump tests. If you wan

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #156187)

2025-08-30 Thread via cfe-commits
https://github.com/moorabbit updated https://github.com/llvm/llvm-project/pull/156187 >From ec107663cee5ba1d3f8792d46e99d925e3971c04 Mon Sep 17 00:00:00 2001 From: moorabbit Date: Thu, 28 Aug 2025 15:29:40 -0400 Subject: [PATCH 1/3] [Headers][X86] Add constexpr support for some AVX[512] intrin

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-30 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: > Maybe we could add some tests with `is_same_v` to check that the types are as > expected, e.g., that dereferencing const iterator give you the right const > reference etc? @kuhar Good idea! I've added a couple of tests about iterator types. Please take a look. Thank

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-30 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/156137 >From 2acfa1ad795eac48ea106ae2d0af2a398c9b3eb5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 29 Aug 2025 13:56:48 -0700 Subject: [PATCH 1/2] [ADT] Refactor StringMap iterators (NFC) StringMap has

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #156187)

2025-08-30 Thread via cfe-commits
https://github.com/moorabbit updated https://github.com/llvm/llvm-project/pull/156187 >From ec107663cee5ba1d3f8792d46e99d925e3971c04 Mon Sep 17 00:00:00 2001 From: moorabbit Date: Thu, 28 Aug 2025 15:29:40 -0400 Subject: [PATCH 1/2] [Headers][X86] Add constexpr support for some AVX[512] intrin

[clang-tools-extra] [llvm] [Clangd] Add AST search capabilities from clang-query (PR #156090)

2025-08-30 Thread Fabian Keßler-Schulz via cfe-commits
https://github.com/Febbe updated https://github.com/llvm/llvm-project/pull/156090 From 6ed1d5446c11b5d3436d71fa1eb58648633bcb9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Ke=C3=9Fler?= Date: Wed, 2 Oct 2024 16:33:22 +0200 Subject: [PATCH 1/4] WIP --- clang-tools-extra/clangd/CMakeLists

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #156187)

2025-08-30 Thread via cfe-commits
https://github.com/moorabbit updated https://github.com/llvm/llvm-project/pull/156187 >From ec107663cee5ba1d3f8792d46e99d925e3971c04 Mon Sep 17 00:00:00 2001 From: moorabbit Date: Thu, 28 Aug 2025 15:29:40 -0400 Subject: [PATCH] [Headers][X86] Add constexpr support for some AVX[512] intrinsics

[clang] [clang][analyzer] Add plist macro formatting (PR #156046)

2025-08-30 Thread via cfe-commits
ankurkraj wrote: Can't find any unit tests for methods in PlistDiagnostics.cpp So adding the unit test in `clang/unittests/Analysis/MacroExpansionContextTest.cpp` Since it contains some similar MacroExpansionContextTest functionality tests. Also, since the newly defined function `getFormatte

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-30 Thread Jakub Kuderski via cfe-commits
kuhar wrote: Maybe we could add some tests with `is_same_v` to check that the types are as expected, e.g., that dereferencing const iterator give you the right const reference etc? https://github.com/llvm/llvm-project/pull/156137 ___ cfe-commits mail

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-30 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: > Do we have dedicated unit tests for these iterators? I wouldn't say `llvm/unittests/ADT/StringMapTest.cpp` is dedicated to iterators only, but it covers: - the empty map - the single-element map - `for` loop over the map - `erase(iterator)` - `insert` return value - ` k

[clang] [clang][bytecode] Fix ignoring comparisons in C (PR #156180)

2025-08-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/20801 Here is the relevant piece of the build lo

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-08-30 Thread via cfe-commits
@@ -306,7 +316,45 @@ void CIRRecordLowering::fillOutputFields() { RecordDecl::field_iterator CIRRecordLowering::accumulateBitFields(RecordDecl::field_iterator field, RecordDecl::field_iterator fieldEnd) { - assert(!cir::MissingFeatures::i

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-08-30 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/156085 >From 53489d45f4db238dde537b0b91dc385e4baf1b16 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Fri, 29 Aug 2025 13:44:22 -0500 Subject: [PATCH 1/3] [CIR] Add support for discrete bit-field ABI --

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

2025-08-30 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/156092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e78ac80 - [CIR] Implement VAArgExpr for ComplexType (#156092)

2025-08-30 Thread via cfe-commits
Author: Amr Hesham Date: 2025-08-30T18:18:32+02:00 New Revision: e78ac808d586ae0df8cba2394f2bc04ed61d03f9 URL: https://github.com/llvm/llvm-project/commit/e78ac808d586ae0df8cba2394f2bc04ed61d03f9 DIFF: https://github.com/llvm/llvm-project/commit/e78ac808d586ae0df8cba2394f2bc04ed61d03f9.diff LO

[clang] [CIR] Add support for discrete bit-field (PR #156085)

2025-08-30 Thread via cfe-commits
@@ -0,0 +1,65 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mms-bitfields -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mms-bitfields -fclangir -emit-llvm %s -o %t-ci

[clang] [Driver] Enable outline atomics for NetBSD/aarch64 (PR #156143)

2025-08-30 Thread Michał Górny via cfe-commits
mgorny wrote: I'm sorry but I'm not doing NetBSD anymore, and I don't think I can contribute any useful feedback to this. I think you need someone who understands toolchain better than I do. https://github.com/llvm/llvm-project/pull/156143 ___ cfe-co

[clang-tools-extra] [Clang-Tidy] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-conditionals" (PR #155982)

2025-08-30 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/155982 >From 426caa9f66cddd1deac23b397baf75f6809f6f52 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Fri, 29 Aug 2025 15:15:24 +0800 Subject: [PATCH 1/3] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-

[clang] [llvm] [RISC-V] Added the mips extension instructions like ehb,ihb and pause etc for MIPS RV64 P8700. (PR #155747)

2025-08-30 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/155747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-08-30 Thread Tomáš Slanina via cfe-commits
https://github.com/itzexpoexpo updated https://github.com/llvm/llvm-project/pull/154580 From 3a8be59bd1fb94102d446cdb8fdf1b266123c613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Slanina?= Date: Wed, 20 Aug 2025 19:28:23 +0200 Subject: [PATCH 1/8] [clang-format] Add option AllowSh

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #156187)

2025-08-30 Thread via cfe-commits
https://github.com/moorabbit created https://github.com/llvm/llvm-project/pull/156187 The following AVX[512] intrinsics are now constexpr: - `_mm256_cvtepi32_pd` - `_mm256_cvtepi32_ps` - `_mm256_cvtps_pd` - `_mm512_cvtepi32_ps` - `_mm512_mask_cvtepi32_ps` - `_mm512_maskz_cvtepi32_ps` - `_mm512_c

[clang] 1bbac05 - [clang][bytecode] Fix ignoring comparisons in C (#156180)

2025-08-30 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-30T17:41:08+02:00 New Revision: 1bbac057f6de10db683e70c8c966809ad576b93e URL: https://github.com/llvm/llvm-project/commit/1bbac057f6de10db683e70c8c966809ad576b93e DIFF: https://github.com/llvm/llvm-project/commit/1bbac057f6de10db683e70c8c966809ad576b93e.diff L

[clang] [clang][bytecode] Fix ignoring comparisons in C (PR #156180)

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

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #156187)

2025-08-30 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 origin/main HEAD --extensions h,c -- clang/lib/Headers/avx512fintrin.h clang/lib/Head

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #156187)

2025-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: None (moorabbit) Changes The following AVX[512] intrinsics are now constexpr: - `_mm256_cvtepi32_pd` - `_mm256_cvtepi32_ps` - `_mm256_cvtps_pd` - `_mm512_cvtepi32_ps` - `_mm512_mask_cvtepi32_ps` - `_mm512_maskz_cvtepi32_ps` - `_mm512_

[clang-tools-extra] Improve loading speed of indexes used by clangd (PR #156185)

2025-08-30 Thread via cfe-commits
https://github.com/JVApen created https://github.com/llvm/llvm-project/pull/156185 Fixes clangd/clangd#2122 Use an alternative builder implementation in cases were no duplicate entries are expected. In practice, this is when loading a previously created index as the deduplicaton happened whil

[clang-tools-extra] Improve loading speed of indexes used by clangd (PR #156185)

2025-08-30 Thread via cfe-commits
https://github.com/JVApen updated https://github.com/llvm/llvm-project/pull/156185 >From 14eed6410c1183f67974c62cf9ca0674e0a477af Mon Sep 17 00:00:00 2001 From: JVApen Date: Sat, 30 Aug 2025 16:29:54 +0200 Subject: [PATCH 1/2] Fixes clangd/clangd#2122 Use an alternative builder implementation

[clang-tools-extra] Improve loading speed of indexes used by clangd (PR #156185)

2025-08-30 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 origin/main HEAD --extensions h,cpp -- clang-tools-extra/clangd/index/FileIndex.cpp

[clang] [llvm] [WPD]: Apply speculative WPD in non-lto mode. (PR #145031)

2025-08-30 Thread Teresa Johnson via cfe-commits
teresajohnson wrote: > Polite ping @teresajohnson @pcc Sorry for the slowness. I have been out of office much of this past month due to travels and some illness, and am still trying to catch up. I plan to review sometime over the next week. https://github.com/llvm/llvm-project/pull/145031 ___

[clang-tools-extra] Improve loading speed of indexes used by clangd (PR #156185)

2025-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (JVApen) Changes Fixes clangd/clangd#2122 Use an alternative builder implementation in cases were no duplicate entries are expected. In practice, this is when loading a previously created index as the deduplicaton happen

[clang-tools-extra] Improve loading speed of indexes used by clangd (PR #156185)

2025-08-30 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-format] Add an option to format integer and float literal case (PR #151590)

2025-08-30 Thread Björn Schäpers via cfe-commits
@@ -0,0 +1,176 @@ +//===--- NumericLiteralCaseFixer.cpp *- 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] [Clang-Tidy] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-conditionals" (PR #155982)

2025-08-30 Thread Yanzuo Liu via cfe-commits
zwuis wrote: > Did you try running on LLVM code to check for any miscodegen/FP? > https://clang.llvm.org/extra/clang-tidy/#running-clang-tidy-in-parallel I just finished checking using `compile_commands.json` generated with `-DLLVM_ENABLE_PROJECTS=bolt;clang;clang-tools-extra;lld;lldb:mlir;pol

[clang-tools-extra] [Clang-Tidy] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-conditionals" (PR #155982)

2025-08-30 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/155982 >From 426caa9f66cddd1deac23b397baf75f6809f6f52 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Fri, 29 Aug 2025 15:15:24 +0800 Subject: [PATCH 1/2] Handle nested-name-specifier in "llvm-prefer-isa-or-dyn-cast-in-

[clang] [libunwind] [llvm] [wasm] Toolchain support for `wasm32-wali-linux-musl` target (PR #156087)

2025-08-30 Thread Arjun Ramesh via cfe-commits
arjunr2 wrote: @carlocab Where should i be adding tests? And is it primarily for parsing of the target? Also it's unclear to me from the CI logs why the libcxx build is failing. Says it received a user-cancelled signal -- was it manually aborted? https://github.com/llvm/llvm-project/pull/1560

[clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

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

[clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

2025-08-30 Thread via cfe-commits
github-actions[bot] wrote: @GameRoMan 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 buil

[clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

2025-08-30 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed https://github.com/llvm/llvm-project/pull/144368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 912ce26 - [NFC] Fix typos 'seperate' -> 'separate' (#144368)

2025-08-30 Thread via cfe-commits
Author: Roman Date: 2025-08-30T13:41:25Z New Revision: 912ce2631ff397660236a7dc35247f390b1d7818 URL: https://github.com/llvm/llvm-project/commit/912ce2631ff397660236a7dc35247f390b1d7818 DIFF: https://github.com/llvm/llvm-project/commit/912ce2631ff397660236a7dc35247f390b1d7818.diff LOG: [NFC] F

[clang] Using type deduction to define __SIZE_TYPE__ and __PTRDIFF_TYPE__ (PR #155979)

2025-08-30 Thread via cfe-commits
YexuanXiao wrote: @mizvekov The ast-dump test I added passes locally, but the CI is failing to match the string. How do I resolve this? https://github.com/llvm/llvm-project/pull/155979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clang][bytecode] Fix ignoring comparisons in C (PR #156180)

2025-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Our comparison ops always return bool, and we do the pop before the conversion to in in C. Fixes #156178 --- Full diff: https://github.com/llvm/llvm-project/pull/156180.diff 2 Files Affected: - (modified

[clang] [clang][bytecode] Fix ignoring comparisons in C (PR #156180)

2025-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/156180 Our comparison ops always return bool, and we do the pop before the conversion to in in C. Fixes #156178 >From a8c9f87454c4ecb382e465b4cfc6ccd6a7787130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4d

[clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

2025-08-30 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/144368 >From 2b50682f230efa03c3b9a1f5c5e48e708734bf4d Mon Sep 17 00:00:00 2001 From: Roman A <121314722+gamero...@users.noreply.github.com> Date: Mon, 16 Jun 2025 15:59:01 +0100 Subject: [PATCH] A couple of grammar fixes

[clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

2025-08-30 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue approved this pull request. LGTM, will merge if CI passes https://github.com/llvm/llvm-project/pull/144368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

2025-08-30 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue auto_merge_enabled https://github.com/llvm/llvm-project/pull/144368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [ADT] Refactor StringMap iterators (NFC) (PR #156137)

2025-08-30 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar commented: Do we have dedicated unit tests for these iterators? https://github.com/llvm/llvm-project/pull/156137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] Fixup test added in #155573 to work when the compiler defaults to C++20. (PR #156166)

2025-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/156166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

2025-08-30 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/156092 >From 5ec1b3bd422be52857c10fc16d9f1dc7268a18c8 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 29 Aug 2025 21:58:35 +0200 Subject: [PATCH 1/2] [CIR] Implement VAArgExpr for ComplexType --- clang/li

[clang] [Driver] Enable outline atomics for NetBSD/aarch64 (PR #156143)

2025-08-30 Thread Benny Siegert via cfe-commits
bsiegert wrote: I can test this. How do I find out if it works? Would it just fail to compile if not? https://github.com/llvm/llvm-project/pull/156143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang][analyzer] Add plist macro formatting (PR #156046)

2025-08-30 Thread via cfe-commits
https://github.com/ankurkraj updated https://github.com/llvm/llvm-project/pull/156046 >From 52d10bccd7e348ecfbdf1a5c25950d9e7f74a381 Mon Sep 17 00:00:00 2001 From: ankurkraj Date: Fri, 29 Aug 2025 20:49:27 +0530 Subject: [PATCH 1/2] Add plist macro formatting --- clang/include/clang/Analysis/

[clang-tools-extra] [clang-tidy][NFC] Enable 'readability-redundant-declaration' check in clang-tidy config (PR #156164)

2025-08-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-hwasan` running on `sanitizer-buildbot12` while building `clang-tools-extra` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/16473 He

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-08-30 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > > Ok, that's progress at least. I will then land the PR with the fix some > > time soon and we can take that item off the list. > > How can we make sure the new reported errors are not triggered by #154158? https://github.com/llvm/llvm-project/pull/154158 "relaxes" a check so t

[clang] [Driver] Enable outline atomics for NetBSD/aarch64 (PR #156143)

2025-08-30 Thread Brad Smith via cfe-commits
brad0 wrote: > I am not running an aarch64 machine, but I've asked for testers on the > mailing list: https://mail-index.netbsd.org/port-arm/2025/08/30/msg009377.html Thanks. Just looking for testing and feedback. https://github.com/llvm/llvm-project/pull/156143 ___

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

2025-08-30 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 origin/main HEAD --extensions cpp,h -- clang-tools-extra/clang-tidy/custom/CustomTidy

  1   2   >