[clang] [Clang][Parser] Fix assertion failure with explicit(bool) in pre-C++20 modes (PR #152896)

2025-08-09 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][Parser] Fix assertion failure with explicit(bool) in pre-C++20 modes (PR #152896)

2025-08-09 Thread Jongmyeong Choi via cfe-commits
https://github.com/jongmyeong-choi created https://github.com/llvm/llvm-project/pull/152896 ## Summary Fixes assertion failure when using `explicit(bool)` syntax in C++98 and C++11 modes. The crash occurred in `BuildConvertedConstantExpression` when parsing `explicit(true)` or `explicit

[clang] [clang][bytecode][NFC] Fix ternary operators with known IsArray values (PR #152894)

2025-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes After https://github.com/llvm/llvm-project/pull/146471, the values here are known. --- Full diff: https://github.com/llvm/llvm-project/pull/152894.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCod

[clang] [clang][bytecode][NFC] Fix ternary operators with known IsArray values (PR #152894)

2025-08-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/152894 After https://github.com/llvm/llvm-project/pull/146471, the values here are known. >From c02d17d4a21fa2c1a9fc509c7248b53ba6ee1de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 10 Aug

[clang] [clang-format] Add functionality of getting info about numeric literals (PR #152878)

2025-08-09 Thread via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/152878 >From 5f1ea996c590c07ab2da923ad1be1fbf7b7ccc8b Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 7 Aug 2025 23:18:03 -0700 Subject: [PATCH] [clang-format] Add functionality of getting info about numeric literal

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

2025-08-09 Thread via cfe-commits
https://github.com/abhijeetsharma200 updated https://github.com/llvm/llvm-project/pull/152888 >From 48d71f870d21a45c0a197d1853788a4aec80018b Mon Sep 17 00:00:00 2001 From: Abhijeet Sharma Date: Sun, 10 Aug 2025 04:49:15 +0200 Subject: [PATCH 1/2] Added explain is trivially default constructible

[clang] [CIR] Add support for __builtin_assume_aligned (PR #152152)

2025-08-09 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/21010 Here is the relevant pie

[clang] [CIR] Add support for __builtin_assume_aligned (PR #152152)

2025-08-09 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` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/14908 Here is the relevant piece of the build log f

[clang] [clang-format] Add functionality of getting info about numeric literals (PR #152878)

2025-08-09 Thread via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/152878 >From ae2eb0d42b27a869e7b8e153215c19773588d006 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 7 Aug 2025 23:18:03 -0700 Subject: [PATCH] [clang-format] Add functionality of getting info about numeric literal

[clang] [CIR] Add support for __builtin_assume_aligned (PR #152152)

2025-08-09 Thread Sirui Mu via cfe-commits
https://github.com/Lancern closed https://github.com/llvm/llvm-project/pull/152152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b2cdd80 - [CIR] Add support for __builtin_assume_aligned (#152152)

2025-08-09 Thread via cfe-commits
Author: Sirui Mu Date: 2025-08-10T12:25:45+08:00 New Revision: b2cdd80411dab7b08a7649a5043370d816dbd3f4 URL: https://github.com/llvm/llvm-project/commit/b2cdd80411dab7b08a7649a5043370d816dbd3f4 DIFF: https://github.com/llvm/llvm-project/commit/b2cdd80411dab7b08a7649a5043370d816dbd3f4.diff LOG:

[clang] [clang][KCFI] Respect -fsanitize-cfi-icall-generalize-pointers (PR #152400)

2025-08-09 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/152400 >From c66b915c61d854808da54efb5d83e63f175a08cd Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Wed, 6 Aug 2025 15:32:18 -0700 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [clang][KCFI] Respect -fsanitize-cfi-icall-generalize-pointers (PR #152400)

2025-08-09 Thread Florian Mayer via cfe-commits
fmayer wrote: Added test I forgot to `git add` before. PTAQL https://github.com/llvm/llvm-project/pull/152400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][KCFI] Respect -fsanitize-cfi-icall-generalize-pointers (PR #152400)

2025-08-09 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/152400 >From c66b915c61d854808da54efb5d83e63f175a08cd Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Wed, 6 Aug 2025 15:32:18 -0700 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [clang][dataflow] Add support for serialization and deserialization. (PR #152487)

2025-08-09 Thread Yitzhak Mandelbaum via cfe-commits
@@ -140,6 +140,15 @@ class DataflowAnalysisContext { /// Adds `Constraint` to the flow condition identified by `Token`. void addFlowConditionConstraint(Atom Token, const Formula &Constraint); + /// Adds `Deps` to the dependencies of the flow condition identified by + ///

[clang] [clang][dataflow] Add support for serialization and deserialization. (PR #152487)

2025-08-09 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand updated https://github.com/llvm/llvm-project/pull/152487 >From a39ac4fe8bdd337ca03651ca70879392b00cdfca Mon Sep 17 00:00:00 2001 From: Yitzhak Mandelbaum Date: Mon, 4 Aug 2025 18:09:28 + Subject: [PATCH 1/2] [clang][dataflow] Add support for serialization and deser

[clang] [clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-09 Thread JJ Marr via cfe-commits
https://github.com/jj-marr edited https://github.com/llvm/llvm-project/pull/146970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-09 Thread JJ Marr via cfe-commits
@@ -1,75 +1,183 @@ -// RUN: %check_clang_tidy -std=c++11-or-later %s \ +// RUN: %check_clang_tidy -std=c++20-or-later %s \ // RUN: portability-avoid-platform-specific-fundamental-types %t -- \ // RUN: -config="{CheckOptions: \ // RUN: [{key: portability-avoid-platform-specific

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-09 Thread JJ Marr via cfe-commits
@@ -0,0 +1,240 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Finds fundamental types (e.g. ``int``, ``float``) and recommends usin

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-09 Thread via cfe-commits
@@ -148,6 +148,13 @@ New checks Finds uses of ``std::lock_guard`` and suggests replacing them with C++17's alternative ``std::scoped_lock``. +- New :doc:`portability-avoid-platform-specific-fundamental-types + ` + check. + + Detects fundamental types (int, short, long

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-09 Thread JJ Marr via cfe-commits
@@ -0,0 +1,240 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Finds fundamental types (e.g. ``int``, ``float``) and recommends usin

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-09 Thread via cfe-commits
@@ -0,0 +1,240 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Finds fundamental types (e.g. ``int``, ``float``) and recommends usin

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

2025-08-09 Thread via cfe-commits
https://github.com/abhijeetsharma200 updated https://github.com/llvm/llvm-project/pull/152888 >From 48d71f870d21a45c0a197d1853788a4aec80018b Mon Sep 17 00:00:00 2001 From: Abhijeet Sharma Date: Sun, 10 Aug 2025 04:49:15 +0200 Subject: [PATCH] Added explain is trivially default constructible --

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

2025-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Abhijeet (abhijeetsharma200) Changes Expands on #141911 --- Full diff: https://github.com/llvm/llvm-project/pull/152888.diff 5 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td (+4-1) - (modified) clang/lib/

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

2025-08-09 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] Added explanation why `is_trivially default_constructible` is false (PR #152888)

2025-08-09 Thread via cfe-commits
https://github.com/abhijeetsharma200 created https://github.com/llvm/llvm-project/pull/152888 Expands on #141911 >From 48d71f870d21a45c0a197d1853788a4aec80018b Mon Sep 17 00:00:00 2001 From: Abhijeet Sharma Date: Sun, 10 Aug 2025 04:49:15 +0200 Subject: [PATCH] Added explain is trivially defau

[clang] [llvm] [Transforms] Add LifetimeMovePass (PR #144319)

2025-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Weibo He (NewSigma) Changes As suggested by @ChuanqiXu9 in #14 , I propose LifetimeMovePass, which was previously part of the CoroSplit pass, should now appear as a general pass. Lifetime markers determine whether we place a

[clang] [llvm] [Transforms] Add LifetimeMovePass (PR #144319)

2025-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines Author: Weibo He (NewSigma) Changes As suggested by @ChuanqiXu9 in #14 , I propose LifetimeMovePass, which was previously part of the CoroSplit pass, should now appear as a general pass. Lifetime markers determine whether we place alloca

[clang] [llvm] [Transforms] Add LifetimeMovePass (PR #144319)

2025-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Weibo He (NewSigma) Changes As suggested by @ChuanqiXu9 in #14 , I propose LifetimeMovePass, which was previously part of the CoroSplit pass, should now appear as a general pass. Lifetime markers determine whether we place alloca on

[clang] [llvm] [Transforms] Add LifetimeMovePass (PR #144319)

2025-08-09 Thread Weibo He via cfe-commits
https://github.com/NewSigma updated https://github.com/llvm/llvm-project/pull/144319 >From 6322fa52e33cad77a59b685bf6cf8e6f218eb7e8 Mon Sep 17 00:00:00 2001 From: NewSigma Date: Fri, 25 Jul 2025 21:13:04 +0800 Subject: [PATCH 1/2] Rebase --- clang/test/CodeGenCoroutines/pr56919.cpp | 6

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-09 Thread JJ Marr via cfe-commits
@@ -0,0 +1,69 @@ +// RUN: %check_clang_tidy -std=c++11-or-later %s portability-avoid-platform-specific-fundamental-types %t -- -config="{CheckOptions: [{key: portability-avoid-platform-specific-fundamental-types.WarnOnInts, value: false}, {key: portability-avoid-platform-spec

[libunwind] [libunwind] Use consistent indentation in `__libunwind_config.h` (PR #152861)

2025-08-09 Thread Michał Górny via cfe-commits
@@ -11,6 +11,8 @@ #define _LIBUNWIND_VERSION 15000 +// Disable clang-format as it makes the huge conditions unreadable. +// clang-format off mgorny wrote: Because it's removing all indentation completely. https://github.com/llvm/llvm-project/pull/152861 ___

[clang-tools-extra] [clang-tidy][NFC] Do less unnecessary work in `NoLintDirectiveHandler` (PR #147553)

2025-08-09 Thread Nicolas van Kempen via cfe-commits
@@ -31,8 +31,6 @@ class NoLintDirectiveHandler { public: NoLintDirectiveHandler(); ~NoLintDirectiveHandler(); nicovank wrote: This destructor being explicit also makes the class non-movable. It's `= default;` anyway. (Also needs a change in `.cpp`.) ```s

[clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-09 Thread JJ Marr via cfe-commits
@@ -0,0 +1,254 @@ +//===--- AvoidPlatformSpecificFundamentalTypesCheck.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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-09 Thread JJ Marr via cfe-commits
@@ -0,0 +1,254 @@ +//===--- AvoidPlatformSpecificFundamentalTypesCheck.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 portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-09 Thread JJ Marr via cfe-commits
@@ -0,0 +1,227 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Finds fundamental types (e.g. `int`, `float`) and recommends using ty

[clang] Fix MSVC warning in CompilerInvocation.cpp (PR #152809)

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

[clang] Fix MSVC warning in CompilerInvocation.cpp (PR #152809)

2025-08-09 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis approved this pull request. https://github.com/llvm/llvm-project/pull/152809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Inline static helper function in `Compilation.cpp` (PR #152875)

2025-08-09 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/152875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove redundant check for scoped enums in shift operators (PR #152865)

2025-08-09 Thread Timothy Choi via cfe-commits
tinnamchoi wrote: What would the tests in C look like? Scoped enums don't exist in C. Other than that, the tests to be introduced in #152698 should cover this, running locally seems fine. https://github.com/llvm/llvm-project/blob/45c8c060cc45cd3abfb3d4d4eda676ab6ce30890/clang/test/SemaCXX/enum

[clang] [Clang] Remove redundant check for scoped enums in shift operators (PR #152865)

2025-08-09 Thread Timothy Choi via cfe-commits
tinnamchoi wrote: The tests to be introduced in #152698 should cover this, running them locally seems fine. https://github.com/llvm/llvm-project/blob/45c8c060cc45cd3abfb3d4d4eda676ab6ce30890/clang/test/SemaCXX/enum-scoped.cpp#L439-L452 https://github.com/llvm/llvm-project/blob/45c8c060cc45cd3a

[clang] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

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

[clang] 4c0a7b7 - [clang] Distinguish NTTPs with deduced types in variable template partial specializations (#152864)

2025-08-09 Thread via cfe-commits
Author: keinflue Date: 2025-08-09T20:03:02-03:00 New Revision: 4c0a7b72f7fe7786e12264aec2b990177222778c URL: https://github.com/llvm/llvm-project/commit/4c0a7b72f7fe7786e12264aec2b990177222778c DIFF: https://github.com/llvm/llvm-project/commit/4c0a7b72f7fe7786e12264aec2b990177222778c.diff LOG:

[clang] [clang] missing changes to the Rewriter (PR #152845)

2025-08-09 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > Though I note that we try to test any components that are actually modified, > and this doesn't happen for the rewriter, so it gets no tests at all. We do this at the project level rather than at the level of individual options. The only exception we make is for ClangIR

[libunwind] [libunwind] Use consistent indentation in `__libunwind_config.h` (PR #152861)

2025-08-09 Thread Heejin Ahn via cfe-commits
@@ -11,6 +11,8 @@ #define _LIBUNWIND_VERSION 15000 +// Disable clang-format as it makes the huge conditions unreadable. +// clang-format off aheejin wrote: If the point is making indentations correct, why disable clang-format? https://github.com/llvm/llvm-p

[clang] [clang] Inline static helper function in `Compilation.cpp` (PR #152875)

2025-08-09 Thread Thibault Monnier via cfe-commits
Thibault-Monnier wrote: @Sirraide, I do not really know who I should ping to review. Could you please help? Thanks! https://github.com/llvm/llvm-project/pull/152875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] Fix MSVC warning in CompilerInvocation.cpp (PR #152809)

2025-08-09 Thread Daniel Paoliello via cfe-commits
dpaoliello wrote: > Can we simply change `unsigned` to `int` in Line ? What do you think? Yep, that works. https://github.com/llvm/llvm-project/pull/152809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] Fix MSVC warning in CompilerInvocation.cpp (PR #152809)

2025-08-09 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/152809 >From 5377e6907af9cbfb339a49d0a37f590cdc8f3d17 Mon Sep 17 00:00:00 2001 From: Daniel Paoliello Date: Fri, 8 Aug 2025 15:37:17 -0700 Subject: [PATCH] Fix MSVC warning in CompilerInvocation.cpp --- clang/lib/

[clang] [clang] WIP: Fix MemberPointer serialization non-determinism (PR #135434)

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

[clang] [clang] missing changes to the Rewriter (PR #152845)

2025-08-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I bypassed the rules to merge because the component is not tested at all, it would be a waste of a CI run. https://github.com/llvm/llvm-project/pull/152845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang] missing changes to the Rewriter (PR #152845)

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

[clang] 34164da - [clang] missing changes to the Rewriter (#152845)

2025-08-09 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-08-09T18:19:50-03:00 New Revision: 34164da5cd3d2bd965e1991d88bdb99fbb798090 URL: https://github.com/llvm/llvm-project/commit/34164da5cd3d2bd965e1991d88bdb99fbb798090 DIFF: https://github.com/llvm/llvm-project/commit/34164da5cd3d2bd965e1991d88bdb99fbb798090.dif

[clang] [clang] missing changes to the Rewriter (PR #152845)

2025-08-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/152845 >From 70a2c652b89a78c361b9df0dd7dc386240492886 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 9 Aug 2025 05:46:49 -0300 Subject: [PATCH] [clang] missing changes to the Rewriter This completes https:

[clang] [llvm] [clang] missing changes to the Rewriter (PR #152845)

2025-08-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Though I note that we try to test any components that are actually modified, and this doesn't happen for the rewriter, so it gets no tests at all. https://github.com/llvm/llvm-project/pull/152845 ___ cfe-commits mailing list cfe-commit

[clang] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

2025-08-09 Thread via cfe-commits
https://github.com/keinflue updated https://github.com/llvm/llvm-project/pull/152864 >From f36c8dbedace87b378d2870402eb1119a2ed253f Mon Sep 17 00:00:00 2001 From: keinflue Date: Sat, 9 Aug 2025 09:33:20 +0200 Subject: [PATCH 1/2] [clang] Distinguish NTTPs with deduced types in variable templat

[clang] [llvm] [clang] missing changes to the Rewriter (PR #152845)

2025-08-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Alright, I'll remove the CI changes so we can unblock this. https://github.com/llvm/llvm-project/pull/152845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Inline static helper function in `Compilation.cpp` (PR #152875)

2025-08-09 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. Yeah, that function really doesn’t need to exist https://github.com/llvm/llvm-project/pull/152875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

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

2025-08-09 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-09 Thread Ivan Murashko via cfe-commits
@@ -1096,6 +1098,47 @@ 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] [clang-format] Add functionality of getting info about numeric literals (PR #152878)

2025-08-09 Thread via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/152878 None >From 048ace1c2fe67b6816c8ddea1ef77d61bb49da76 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 7 Aug 2025 23:18:03 -0700 Subject: [PATCH] [clang-format] Add functionality of getting info about numeric l

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

2025-08-09 Thread Ivan Murashko via cfe-commits
@@ -1096,6 +1098,47 @@ 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] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

2025-08-09 Thread via cfe-commits
https://github.com/keinflue updated https://github.com/llvm/llvm-project/pull/152864 >From f36c8dbedace87b378d2870402eb1119a2ed253f Mon Sep 17 00:00:00 2001 From: keinflue Date: Sat, 9 Aug 2025 09:33:20 +0200 Subject: [PATCH 1/3] [clang] Distinguish NTTPs with deduced types in variable templat

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

2025-08-09 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko updated https://github.com/llvm/llvm-project/pull/152751 >From 7d1c7000c7482f8d1ec1593b77a8f4a9456082ac Mon Sep 17 00:00:00 2001 From: Ivan Murashko Date: Fri, 8 Aug 2025 10:25:26 +0100 Subject: [PATCH 1/6] [clang-analyzer] Add regression test for PR60896 --- .

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

2025-08-09 Thread Ivan Murashko via cfe-commits
@@ -3107,24 +3111,13 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } -static QualType canonicalStrip(QualType QT) { - return QT.getCanonicalType().getUnqualifiedType(); -} - -static bool isInStdNamespace(const DeclCont

[clang] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

2025-08-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Also, I do not have commit access. If you can land the PR for me, please do > so. Sure, I'll do it as soon as this has a release note. https://github.com/llvm/llvm-project/pull/152864 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

2025-08-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > @mizvekov This is not a regression, the bug has been present since the > introduction of `auto` non-type template parameters, i.e. Clang 4. Alright, then this should be mentioned in the release notes. https://github.com/llvm/llvm-project/pull/152864 __

[clang] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

2025-08-09 Thread via cfe-commits
keinflue wrote: @mizvekov This is not a regression, the bug has been present since the introduction of `auto` non-type template parameters, i.e. Clang 4. https://github.com/llvm/llvm-project/pull/152864 ___ cfe-commits mailing list cfe-commits@lists.l

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

2025-08-09 Thread Ivan Murashko via cfe-commits
@@ -52,6 +52,7 @@ #include "clang/AST/DeclTemplate.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" + ivanmurashko wrote: Applied https://github.com/llvm/llvm-project/pull/152751 ___ cfe-commits mailing

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

2025-08-09 Thread Ivan Murashko via cfe-commits
@@ -3068,11 +3111,174 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +// Use isWithinStdNamespace from CheckerHelpers.h instead of custom +// implementation + +// Allowlist of owning smart pointers we want to recognize

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

2025-08-09 Thread Ivan Murashko via cfe-commits
@@ -3068,11 +3111,174 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +// Use isWithinStdNamespace from CheckerHelpers.h instead of custom +// implementation + +// Allowlist of owning smart pointers we want to recognize

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

2025-08-09 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko updated https://github.com/llvm/llvm-project/pull/152751 >From 7d1c7000c7482f8d1ec1593b77a8f4a9456082ac Mon Sep 17 00:00:00 2001 From: Ivan Murashko Date: Fri, 8 Aug 2025 10:25:26 +0100 Subject: [PATCH 1/6] [clang-analyzer] Add regression test for PR60896 --- .

[clang] c9b6242 - [CIR] Fix build after the improved nested name specifier AST repr (91cdd35008e9)

2025-08-09 Thread Michael Liao via cfe-commits
Author: Michael Liao Date: 2025-08-09T16:38:49-04:00 New Revision: c9b62427716f41cf33b932a5622d8ef5b588f1c0 URL: https://github.com/llvm/llvm-project/commit/c9b62427716f41cf33b932a5622d8ef5b588f1c0 DIFF: https://github.com/llvm/llvm-project/commit/c9b62427716f41cf33b932a5622d8ef5b588f1c0.diff

[clang] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

2025-08-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, Thanks. These regressions were never in a released clang right? If that's the case, it's fine not to add anything to the change log. https://github.com/llvm/llvm-project/pull/152864 ___ cf

[clang] [clang-format] Add functionality of getting info about numeric literals (PR #152878)

2025-08-09 Thread via cfe-commits
owenca wrote: This is useful for #131510 and #151590. https://github.com/llvm/llvm-project/pull/152878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] missing changes to the Rewriter (PR #152845)

2025-08-09 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: If it's a waste of most user's time to enable it, it's probably a waste of premerge CI resources to test it there? Differing the configuration significantly between what people get locally by default and what runs in CI also creates a confusing user experience. Overall I

[clang] [clang-format] Add functionality of getting info about numeric literals (PR #152878)

2025-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: owenca (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/152878.diff 5 Files Affected: - (modified) clang/lib/Format/CMakeLists.txt (+1) - (added) clang/lib/Format/NumericLiteralInfo.cpp (+67) - (added)

[clang] [Clang] Fixed a crash when parsing #embed parameters with unmatched closing brackets (PR #152877)

2025-08-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #152829 --- This patch addresses the issue where the preprocessor could crash when parsing `#embed` parameters containing unmatched closing brackets ```cpp #embed "file" prefix(]) #embed "file" p

[clang] [Clang] Fixed a crash when parsing #embed parameters with unmatched closing brackets (PR #152877)

2025-08-09 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/152877 Fixes #152829 --- This patch addresses the issue where the preprocessor could crash when parsing `#embed` parameters containing unmatched closing brackets ```cpp #embed "file" prefix(]) #embed "file" pref

[clang] [clang] Inline static helper function in `Compilation.cpp` (PR #152875)

2025-08-09 Thread Thibault Monnier via cfe-commits
https://github.com/Thibault-Monnier updated https://github.com/llvm/llvm-project/pull/152875 >From 2df0db4032883750a75d5615bed4c011561c1c2c Mon Sep 17 00:00:00 2001 From: Thibault-Monnier Date: Sat, 9 Aug 2025 20:27:06 +0200 Subject: [PATCH] Inline `InputsOk` function in `clang/lib/Driver/Comp

[clang] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

2025-08-09 Thread Matheus Izvekov via cfe-commits
@@ -4126,7 +4126,11 @@ static bool isTemplateArgumentTemplateParameter(const TemplateArgument &Arg, return false; const NonTypeTemplateParmDecl *NTTP = dyn_cast(DRE->getDecl()); -return NTTP && NTTP->getDepth() == Depth && NTTP->getIndex() == Index; +

[clang] [Clang] Remove redundant check for scoped enums in shift operators (PR #152865)

2025-08-09 Thread via cfe-commits
https://github.com/Sirraide commented: Yeah, I think this is fine because we don’t treat scoped enums as integer types, but we don’t seem to have any tests for this, so could you add some to make sure that we *do* reject shifts where one (or both) operands are scoped enums (in C and C++). htt

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

2025-08-09 Thread Ivan Murashko via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,cplusplus,unix -verify %s +// expected-no-diagnostics + ivanmurashko wrote: Done https://github.com/llvm/llvm-project/pull/152751 ___ cfe-commits mail

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

2025-08-09 Thread Ivan Murashko via cfe-commits
@@ -0,0 +1,44 @@ +// RUN: %clang_analyze_cc1 -verify -analyzer-output=text %s \ +// RUN: -analyzer-checker=core \ +// RUN: -analyzer-checker=cplusplus \ +// RUN: -analyzer-checker=unix +// expected-no-diagnostics + +#include "Inputs/system-header-simulator-for-malloc.h" + +/

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

2025-08-09 Thread Ivan Murashko via cfe-commits
@@ -3068,11 +3107,217 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +static QualType canonicalStrip(QualType QT) { + return QT.getCanonicalType().getUnqualifiedType(); +} + +static bool isInStdNamespace(const DeclCon

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

2025-08-09 Thread Pavel Skripkin via cfe-commits
@@ -0,0 +1,80 @@ +// RUN: %clang_analyze_cc1 -verify -analyzer-output=text %s \ +// RUN: -analyzer-checker=core \ +// RUN: -analyzer-checker=cplusplus \ +// RUN: -analyzer-checker=unix +// expected-no-diagnostics + +#include "Inputs/system-header-simulator-for-malloc.h" + +/

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

2025-08-09 Thread Ivan Murashko via cfe-commits
@@ -3068,11 +3107,217 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +static QualType canonicalStrip(QualType QT) { + return QT.getCanonicalType().getUnqualifiedType(); +} + +static bool isInStdNamespace(const DeclCon

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

2025-08-09 Thread Pavel Skripkin via cfe-commits
@@ -3068,11 +3111,174 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +// Use isWithinStdNamespace from CheckerHelpers.h instead of custom +// implementation + +// Allowlist of owning smart pointers we want to recognize

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

2025-08-09 Thread Ivan Murashko via cfe-commits
@@ -3068,11 +3107,217 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +static QualType canonicalStrip(QualType QT) { + return QT.getCanonicalType().getUnqualifiedType(); +} + +static bool isInStdNamespace(const DeclCon

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

2025-08-09 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag commented: Thanks for your work! I am more C person, so I might be missing some CXX semantics. Except for nits left above patch LGTM. https://github.com/llvm/llvm-project/pull/152751 ___ cfe-commits mailing list cfe-commits

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

2025-08-09 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag 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-09 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko updated https://github.com/llvm/llvm-project/pull/152751 >From 7d1c7000c7482f8d1ec1593b77a8f4a9456082ac Mon Sep 17 00:00:00 2001 From: Ivan Murashko Date: Fri, 8 Aug 2025 10:25:26 +0100 Subject: [PATCH 1/5] [clang-analyzer] Add regression test for PR60896 --- .

[clang] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

2025-08-09 Thread via cfe-commits
@@ -4126,7 +4126,11 @@ static bool isTemplateArgumentTemplateParameter(const TemplateArgument &Arg, return false; const NonTypeTemplateParmDecl *NTTP = dyn_cast(DRE->getDecl()); -return NTTP && NTTP->getDepth() == Depth && NTTP->getIndex() == Index; +

[clang] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

2025-08-09 Thread Matheus Izvekov via cfe-commits
@@ -4126,7 +4126,11 @@ static bool isTemplateArgumentTemplateParameter(const TemplateArgument &Arg, return false; const NonTypeTemplateParmDecl *NTTP = dyn_cast(DRE->getDecl()); -return NTTP && NTTP->getDepth() == Depth && NTTP->getIndex() == Index; +

[clang] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

2025-08-09 Thread via cfe-commits
https://github.com/keinflue edited https://github.com/llvm/llvm-project/pull/152864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Inline static helper function in `Compilation.cpp` (PR #152875)

2025-08-09 Thread Thibault Monnier via cfe-commits
https://github.com/Thibault-Monnier edited https://github.com/llvm/llvm-project/pull/152875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Distinguish NTTPs with deduced types in variable template partial specializations (PR #152864)

2025-08-09 Thread via cfe-commits
https://github.com/keinflue edited https://github.com/llvm/llvm-project/pull/152864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Inline `InputsOk` function in `clang/lib/Driver/Compilation.cpp` (PR #152875)

2025-08-09 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] Inline static helper function in `Compilation.cpp` (PR #152875)

2025-08-09 Thread Thibault Monnier via cfe-commits
Thibault-Monnier wrote: Hey, this is my first PR on the llvm-project. I hope it respects the llvm contribution guidelines. Feedback is welcome. https://github.com/llvm/llvm-project/pull/152875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

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

2025-08-09 Thread Balazs Benics via cfe-commits
@@ -3068,11 +3111,174 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +// Use isWithinStdNamespace from CheckerHelpers.h instead of custom +// implementation + +// Allowlist of owning smart pointers we want to recognize

[clang] [clang] Inline static helper function in `Compilation.cpp` (PR #152875)

2025-08-09 Thread Thibault Monnier via cfe-commits
https://github.com/Thibault-Monnier edited https://github.com/llvm/llvm-project/pull/152875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   >