[clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dmitry Chestnykh (chestnykh) Changes If clang is invoked with `-r` (relocatable linking) then we shouldn't construct sanitizer arguments and then pass sanitizer runtime libs to the linker GCC simply ignores `-fsanitize=...` if `-r` is also

[clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Dmitry Chestnykh (chestnykh) Changes If clang is invoked with `-r` (relocatable linking) then we shouldn't construct sanitizer arguments and then pass sanitizer runtime libs to the linker GCC simply ignores `-fsanitize=...` if `-r`

[clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-10 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh created https://github.com/llvm/llvm-project/pull/147905 If clang is invoked with `-r` (relocatable linking) then we shouldn't construct sanitizer arguments and then pass sanitizer runtime libs to the linker GCC simply ignores `-fsanitize=...` if `-r` is also here

[clang] [clang][bytecode] Allocate Record Fields and bases via Program (PR #147909)

2025-07-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/147909 >From b23c75ff781875da10baa9e6f033ed5358c0cf02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 10 Jul 2025 09:21:57 +0200 Subject: [PATCH] [clang][bytecode] Allocate Record Fields and ba

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/147766 From f8dc303029c68762cdbd19b217730192d26f6fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Wed, 9 Jul 2025 16:55:07 +0200 Subject: [PATCH 1/2] [clang][analyzer] Add C standard stream

[libclc] [libclc] Add generic implementation of some atomic functions in OpenCL spec section 6.15.12.7 (PR #146814)

2025-07-10 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,24 @@ +//===--===// +// +// 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: Apac

[clang] [clang][ObjC][PAC] Add ptrauth protections to objective-c (PR #147899)

2025-07-10 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/147899 >From 3b0a91c3d4a4ae8ec7980d2201d94f59746fb769 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Wed, 9 Jul 2025 17:30:48 -0700 Subject: [PATCH] [clang][ObjC][PAC] Add ptrauth protections to objective-c This PR i

[clang] [Clang][AArch64] Relax SVE bf16 requirement for opaque builtins. (PR #147795)

2025-07-10 Thread Paul Walker via cfe-commits
@@ -1,87 +0,0 @@ -// REQUIRES: aarch64-registered-target - -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -verify -verify-ignore-unexpected=error,note -emit-llvm -o - %s - -#include - -void test_bfloat(svbool_t pg, uint64_t u64, int64_t i64, const bfloat

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-10 Thread Corentin Jabot via cfe-commits
@@ -59,7 +59,7 @@ constexpr bool test() { { // bidi -int buffer[2] = {1, 2}; +int buffer[3] = {1, 2, 3}; cor3ntin wrote: It was doing an out-of-bounds read, which was not previously diagnosed https://github.com/llvm/llvm-project/pull/143667 _

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-10 Thread Corentin Jabot via cfe-commits
@@ -265,7 +265,7 @@ namespace const_modify { namespace null { constexpr int test(int *p) { -return *p = 123; // expected-note {{assignment to dereferenced null pointer}} +return *p = 123; // expected-note {{read of dereferenced null pointer}} cor3nt

[clang] [clang][bytecode][NFC] Move Pointer::StorageKind above the union (PR #147942)

2025-07-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/147942 This is easier to read in debuggers and more common. >From c2f5d0eb65d0f6b291ccfa41603f9800fda6a756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 10 Jul 2025 13:52:10 +0200 Subject: [

[clang] [clang][bytecode][NFC] Move Pointer::StorageKind above the union (PR #147942)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This is easier to read in debuggers and more common. --- Full diff: https://github.com/llvm/llvm-project/pull/147942.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Pointer.h (+1-1) `

[clang] [Clang][AArch64] Relax SVE bf16 requirement for opaque builtins. (PR #147795)

2025-07-10 Thread Paul Walker via cfe-commits
@@ -1,12 +1,12 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target -// RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64 -target-feature +sve -target-feature +bf16 -disable-O0-optnone -Werror -Wall -emi

[clang] [clang] Use SmallString in CommentBriefParser to reduce heap allocs (PR #147853)

2025-07-10 Thread Bogdan Vetrenko via cfe-commits
b0gdnv wrote: Thanks for your review. Yes, I ran micro-benchmarks to check performance implications. ### Benchmark results (mean) | Benchmark | Metric | New| Baseline | Δ (%) | |--|--|||-| | BM_Parse_Tiny

[clang-tools-extra] Add clang tidy check performance constexpr non static in scope (PR #147809)

2025-07-10 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: @PiotrZSL Here's some examples discussing the performance implications https://youtu.be/IDQ0ng8RIqs?si=fDUuTFK9GiGCB-Po https://github.com/llvm/llvm-project/pull/147809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang-tools-extra] Add clang tidy check performance constexpr non static in scope (PR #147809)

2025-07-10 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > bellow specific size Like I mentioned in the other patch I think this is brittle and leads to poor UX, because you add 1 field to a struct in a header file and suddenly you have to change all clients. I'd be preferred to have the user specify which types to warn on. Ma

[clang] [llvm] [OpenMP][clang] 6.0: parsing/sema for message/severity for parallel (PR #146093)

2025-07-10 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/146093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Erich Keane via cfe-commits
erichkeane wrote: > > > avior due to the silent stripping. Given that an atomic type is not the > > > same as its underlying type (in terms of ABI or semantics) I think we > > > should diagnose the behavior with at least a warning. I could even be > > > convinced it should be a warning which d

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -76,6 +80,43 @@ class VoidType : public Type { static bool classof(const Type *T) { return T->getKind() == TypeKind::Void; } }; +class ComplexType : public Type { +public: + ComplexType(const Type *ElementType, uint64_t SizeInBits, Align Alignment) + : Type(TypeKind

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,523 @@ +//===- X86.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -76,6 +80,43 @@ class VoidType : public Type { static bool classof(const Type *T) { return T->getKind() == TypeKind::Void; } }; +class ComplexType : public Type { +public: + ComplexType(const Type *ElementType, uint64_t SizeInBits, Align Alignment) + : Type(TypeKind

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -229,6 +231,7 @@ QualTypeMapper::convertCXXRecordType(const CXXRecordDecl *RD) { 8; Fields.emplace_back(BaseType, BaseOffset); +BaseClasses.emplace_back(BaseType, BaseOffset); nikic wrote: Looks like this adds base types *both* to BaseClas

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,523 @@ +//===- X86.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,523 @@ +//===- X86.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,523 @@ +//===- X86.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,523 @@ +//===- X86.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,523 @@ +//===- X86.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,523 @@ +//===- X86.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Multilib] Extend the Multilib system to support an IncludepPath field. (PR #146651)

2025-07-10 Thread Simi Pallipurath via cfe-commits
https://github.com/simpal01 ready_for_review https://github.com/llvm/llvm-project/pull/146651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,523 @@ +//===- X86.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-07-10 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,523 @@ +//===- X86.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-10 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,510 @@ +//===- LifetimeSafety.cpp - C++ Lifetime Safety Analysis -*- 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] 54ec521 - [CIR] Upstream __builtin_cimag for ComplexType (#147808)

2025-07-10 Thread via cfe-commits
Author: Amr Hesham Date: 2025-07-10T18:19:24+02:00 New Revision: 54ec5217a07ed7389c5ee3c744cc1aa2534c URL: https://github.com/llvm/llvm-project/commit/54ec5217a07ed7389c5ee3c744cc1aa2534c DIFF: https://github.com/llvm/llvm-project/commit/54ec5217a07ed7389c5ee3c744cc1aa2534c.diff LO

[clang-tools-extra] [clang-tidy][NFC] add '.clang-tidy' config for clang-tidy project (PR #147793)

2025-07-10 Thread Baranov Victor via cfe-commits
vbvictor wrote: Based on [carlosgalvezp](https://github.com/carlosgalvezp)'s comment in https://github.com/llvm/llvm-project/pull/147902#pullrequestreview-3005674950 changed `Checks: []` to `Checks: >` to comply with older version of `clang-tidy`. https://github.com/llvm/llvm-project/pull/147

[clang-tools-extra] [clang-tidy][readability-named-parameter] Add an option to print names without comment (PR #147953)

2025-07-10 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin updated https://github.com/llvm/llvm-project/pull/147953 >From 0f6d49539df0269daed67af2c7c054f3501fcc0b Mon Sep 17 00:00:00 2001 From: Dmitry Polukhin Date: Thu, 10 Jul 2025 05:26:11 -0700 Subject: [PATCH 1/3] [clang-tidy][readability-named-parameter] Add an option

[clang-tools-extra] [clang-tidy][NFC] add '.clang-tidy' config for clang-tidy project (PR #147793)

2025-07-10 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/147793 >From c4466d677619e6eb8ca65ed943bfb103207527c9 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 9 Jul 2025 21:00:30 +0300 Subject: [PATCH 1/4] [clang-tidy][NFC] add '.clang-tidy' config for clang-tidy

[clang] [CIR] Upstream __builtin_cimag for ComplexType (PR #147808)

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

[clang] [clang][deps] Stop lexing if hit a failure while loading a PCH/module in a submodule. (PR #146976)

2025-07-10 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > Seems like this should have a release note? What is the bar for a change to be release noted? This change is pretty much "make clang-scan-deps less likely to crash" and personally I don't think it deserves a release note. https://github.com/llvm/llvm-project/pull/146976 _

[clang] [CIR] Implement AddOp for ComplexType (PR #147578)

2025-07-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147578 >From d91ac481a20e71275b441a9b9a7712aa9dfd270b Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 8 Jul 2025 20:00:08 +0200 Subject: [PATCH 1/4] [CIR] Implement AddOp for ComplexType --- clang/include

[clang] Add necessary linker flags when -static-pie is enabled in BareMetal Toolchain (PR #147589)

2025-07-10 Thread Sam Elliott via cfe-commits
@@ -599,11 +599,18 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, const Driver &D = getToolChain().getDriver(); const llvm::Triple::ArchType Arch = TC.getArch(); const llvm::Triple &Triple = getToolChain().getEffectiveTriple(); + const bool

[clang] [Clang] Fix a crash when diagnosing wrong conversion to explicit object parameter (PR #147996)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Corentin Jabot (cor3ntin) Changes When an overload is invalid, we try to initialize each conversion sequence for the purpose of diagmostics, but we failed to initialize explicit objects, leading to a crash Fixes #147121 --- Full diff: h

[clang] [Clang] Fix a crash when diagnosing wrong conversion to explicit object parameter (PR #147996)

2025-07-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/147996 When an overload is invalid, we try to initialize each conversion sequence for the purpose of recovery, but we failed to initialize explicit objects, leading to a crash Fixes #147121 >From 6d3df177b7061cb71b

[clang] [Clang] Fix a crash when diagnosing wrong conversion to explicit object parameter (PR #147996)

2025-07-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/147996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-07-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/144235 >From acab11ee6a8e8041dab689c5518229e358d4f5a1 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 7 Jul 2025 20:52:33 +0200 Subject: [PATCH 1/2] [CIR] Upstream ComplexRealPtrOp for ComplexType --- cla

[clang] [Clang][Driver] Emit warning when -fsanitize-trap=undefined is passed without -fsanitize=undefined (PR #147997)

2025-07-10 Thread Anthony Tran via cfe-commits
https://github.com/anthonyhatran created https://github.com/llvm/llvm-project/pull/147997 Part of a GSoC 2025 Project >From eadf3e52072fbae01e8de8f7f59883aec1b2c9bc Mon Sep 17 00:00:00 2001 From: Anthony Tran Date: Thu, 10 Jul 2025 09:18:50 -0700 Subject: [PATCH] Added warning and warning gro

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/147797 From fc638a1d7d56becbe7e8350b46b75ade51718f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 20 May 2025 15:51:48 +0200 Subject: [PATCH 1/6] [analyzer] Prettify checker registration an

[clang] [Clang][Driver] Emit warning when -fsanitize-trap=undefined is passed without -fsanitize=undefined (PR #147997)

2025-07-10 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][Driver] Emit warning when -fsanitize-trap=undefined is passed without -fsanitize=undefined (PR #147997)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Anthony Tran (anthonyhatran) Changes Part of a GSoC 2025 Project --- Full diff: https://github.com/llvm/llvm-project/pull/147997.diff 2 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticDriverKinds.td (+5) - (modified)

[clang] [Clang] Fix a crash when diagnosing wrong conversion to explicit object parameter (PR #147996)

2025-07-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/147996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/147797 From fc638a1d7d56becbe7e8350b46b75ade51718f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 20 May 2025 15:51:48 +0200 Subject: [PATCH 1/7] [analyzer] Prettify checker registration an

[clang] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/147802 >From e65fa6bdd251ceef52e11ff8ee856058e8e3c47a Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 9 Jul 2025 14:40:00 -0400 Subject: [PATCH 1/7] [C23] Accept an _Atomic underlying type The underlying

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with

[clang-tools-extra] [clang-tidy][NFC] add '.clang-tidy' config for clang-tidy project (PR #147793)

2025-07-10 Thread Baranov Victor via cfe-commits
vbvictor wrote: > One last thing I'm missing: can you update the clang-tidy contributors guide, > to explain that we expect people to run clang-tidy as well (and what command > to run)? Since it's not currently enforced in CI. I will add it in a separate PR. Don't feel right to make kind-of un

[clang] [llvm] [NFC][PowerPC] Add test case for lockdown of vector compare greater than support for Zero vector comparisons (PR #147246)

2025-07-10 Thread Tony Varghese via cfe-commits
https://github.com/tonykuttai closed https://github.com/llvm/llvm-project/pull/147246 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][C++][Modules] Refine test/CXX/basic.link/p3.cpp with split-file (PR #147945)

2025-07-10 Thread via cfe-commits
@@ -51,4 +39,71 @@ template module module_var_template; // This is a variable named 'import' that shadows the type 'import' above. struct X {} import; -#endif + +//--- ImportError1.cppm +module; + +struct import { struct inner {}; }; +struct module { struct inner {}; }; + +con

[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

2025-07-10 Thread via cfe-commits
dyung wrote: > I am part of a toolchain team at Google and we are seeing clang test failures > in our toolchain builders from this PR. > > ``` > Exit Code: 1 > > Command Output (stderr): > -- > /b/s/w/ir/x/w/llvm_build/bin/clang -cc1 -internal-isystem > /b/s/w/ir/x/w/llvm_build/lib/clang/21/i

[clang] [clang] Fix a crash when dynamic_cast-ing to a `final` class (PR #148088)

2025-07-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/148088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix isConstantInitializer handling of transparent init lists. (PR #148030)

2025-07-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. Can you add a release note? LGTM otherwise https://github.com/llvm/llvm-project/pull/148030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Clang] Ignore invalid base classes (PR #147213)

2025-07-10 Thread Corentin Jabot via cfe-commits
@@ -2252,7 +2252,7 @@ void Parser::ParseBaseClause(Decl *ClassDecl) { while (true) { // Parse a base-specifier. BaseResult Result = ParseBaseSpecifier(ClassDecl); -if (Result.isInvalid()) { +if (!Result.isUsable()) { cor3ntin wrote: Result ca

[clang] [clang][bytecode] Keep a list of initializing blocks in InterpState (PR #148120)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes So we can know what blocks we're currently running constructors or destructors for. --- Full diff: https://github.com/llvm/llvm-project/pull/148120.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCo

[clang] [clang] Build argument string for clang::warn_unused_result (PR #148090)

2025-07-10 Thread via cfe-commits
https://github.com/zebullax updated https://github.com/llvm/llvm-project/pull/148090 >From 11909560ed6cb4e56192fbbfe4d8b1cdf58e1cb1 Mon Sep 17 00:00:00 2001 From: zebullax Date: Fri, 11 Jul 2025 09:12:44 +0900 Subject: [PATCH 1/2] Build argument string for clang::warn_unused_result Preserve th

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Cristian Assaiante via cfe-commits
https://github.com/cristianassaiante updated https://github.com/llvm/llvm-project/pull/145059 >From ab6063493744ef5a1ee92fd249bf8d86b7299fad Mon Sep 17 00:00:00 2001 From: Cristian Assaiante Date: Fri, 20 Jun 2025 16:56:23 +0200 Subject: [PATCH 01/10] Adding -opt-disable and a test for it ---

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Cristian Assaiante via cfe-commits
@@ -37,6 +42,18 @@ static cl::opt OptBisectVerbose( cl::desc("Show verbose output when opt-bisect-limit is set"), cl::Hidden, cl::init(true), cl::Optional); +static cl::list OptDisablePasses( +"opt-disable", cl::Hidden, cl::CommaSeparated, cl::Optional, +cl::cb

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: Can you please undo the unrelated formatting changes? It's hard to see what actually changed, especially inside StandardInstrumentations.cpp. https://github.com/llvm/llvm-project/pull/145059 ___ cfe-commits mailing

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Cristian Assaiante via cfe-commits
https://github.com/cristianassaiante updated https://github.com/llvm/llvm-project/pull/145059 >From ab6063493744ef5a1ee92fd249bf8d86b7299fad Mon Sep 17 00:00:00 2001 From: Cristian Assaiante Date: Fri, 20 Jun 2025 16:56:23 +0200 Subject: [PATCH 01/11] Adding -opt-disable and a test for it ---

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Cristian Assaiante via cfe-commits
@@ -0,0 +1,13 @@ +// REQUIRES: x86-registered-target + +// Make sure opt-bisect works through both pass managers +// +// RUN: %clang_cc1 -triple x86_64-linux-gnu -O1 %s -mllvm -opt-disable="inlinerpass,SROAPass,machine code sinking" -mllvm -opt-disable-verbose -emit-obj -o /dev/

[clang] [llvm] [OptBisect][IR] Adding a new OptPassGate for disabling passes via name (PR #145059)

2025-07-10 Thread Cristian Assaiante via cfe-commits
cristianassaiante wrote: > Can you please undo the unrelated formatting changes? It's hard to see what > actually changed, especially inside StandardInstrumentations.cpp. Sure, sorry about that. https://github.com/llvm/llvm-project/pull/145059 ___ cf

[clang] [clang] Don't pass sanitizers' rtlibs to linker with `-r` (PR #147905)

2025-07-10 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh edited https://github.com/llvm/llvm-project/pull/147905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Allocate Record Fields and bases via Program (PR #147909)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Records have Program-lifetime, but we used to allocate their fields, bases and virtual bases using llvm::SmallVector. However, after creating a Record, it doesn't change and we know all the number of element

[clang] [clang][bytecode] Allocate Record Fields and bases via Program (PR #147909)

2025-07-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/147909 Records have Program-lifetime, but we used to allocate their fields, bases and virtual bases using llvm::SmallVector. However, after creating a Record, it doesn't change and we know all the number of elements

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-10 Thread via cfe-commits
https://github.com/tyan0 created https://github.com/llvm/llvm-project/pull/147960 ...so that `libc++`, `compiler-rt`, and `libunwind` can be used by the options: `-stdlib=libc++`, `-rtlib=compiler-rt`, and `-unwindlib=libunwind` respectively. Along with this change, the test for this driver is

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: steakhal wrote: BTW wouldn't this patch break the semantics of `freopen`? That one should invalidate the file ptr, right? Could you demonstrate this? https://github.com/llvm/llvm-project/pull/147766

[clang] [Clang] fixed false positive redeclaration error for using enum in nested scopes (PR #147711)

2025-07-10 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/147711 >From 20b9d9bb16f82120cee41bf6a59d3bfa34aa0d3b Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Wed, 9 Jul 2025 15:16:45 +0300 Subject: [PATCH] [Clang] fixed false positive redeclaration error for usin

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2025-07-10 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @antangelo @hokein ping https://github.com/llvm/llvm-project/pull/98788 ___ 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 new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-10 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/146830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Erich Keane via cfe-commits
erichkeane wrote: > avior due to the silent stripping. Given that an atomic type is not the same > as its underlying type (in terms of ABI or semantics) I think we should > diagnose the behavior with at least a warning. I could even be convinced it > should be a warning which defaults to an er

[clang] Fix scope of typedefs present inside a template class (PR #146729)

2025-07-10 Thread via cfe-commits
https://github.com/ykhatav updated https://github.com/llvm/llvm-project/pull/146729 >From cfd949c1a70ae25c5c35e48d92166b45aef63654 Mon Sep 17 00:00:00 2001 From: "Khatavkar, Yashasvi" Date: Wed, 2 Jul 2025 08:23:14 -0700 Subject: [PATCH 1/3] Fix scoping of dependent typedefs --- clang/lib/Cod

[clang] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Erich Keane via cfe-commits
@@ -2022,8 +2022,14 @@ Decl *TemplateDeclInstantiator::VisitEnumDecl(EnumDecl *D) { DeclarationName()); if (!NewTI || SemaRef.CheckEnumUnderlyingType(NewTI)) Enum->setIntegerType(SemaRef.Context.IntTy); - else

[clang] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/147802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -1054,10 +1054,26 @@ const VarRegion *MemRegionManager::getVarRegion(const VarDecl *D, assert(!Ty.isNull()); if (Ty.isConstQualified()) { sReg = getGlobalsRegion(MemRegion::GlobalImmutableSpaceRegionKind); -

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -519,14 +519,53 @@ void reopen_std_stream(void) { if (!fp) return; stdout = fp; // Let's make them alias. - clang_analyzer_eval(fp == oldStdout); // expected-warning {{UNKNOWN}} - clang_analyzer_eval(fp == stdout

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -1054,10 +1054,26 @@ const VarRegion *MemRegionManager::getVarRegion(const VarDecl *D, assert(!Ty.isNull()); if (Ty.isConstQualified()) { sReg = getGlobalsRegion(MemRegion::GlobalImmutableSpaceRegionKind); -

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/147766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -1054,10 +1054,26 @@ const VarRegion *MemRegionManager::getVarRegion(const VarDecl *D, assert(!Ty.isNull()); if (Ty.isConstQualified()) { sReg = getGlobalsRegion(MemRegion::GlobalImmutableSpaceRegionKind); -

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/steakhal requested changes to this pull request. I'd suggest rephrasing the PR to something more descriptive: Preserve stdin and friends on system calls https://github.com/llvm/llvm-project/pull/147766 __

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: None (tyan0) Changes ...so that `libc++`, `compiler-rt`, and `libunwind` can be used by the options: `-stdlib=libc++`, `-rtlib=compiler-rt`, and `-unwindlib=libunwind` respectively. Along with this change, the test for this driver

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (tyan0) Changes ...so that `libc++`, `compiler-rt`, and `libunwind` can be used by the options: `-stdlib=libc++`, `-rtlib=compiler-rt`, and `-unwindlib=libunwind` respectively. Along with this change, the test for this driver is also

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-10 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-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-07-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/147835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose explicit specializations with object parameters that do not match their primary template (PR #89300)

2025-07-10 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @sdkrystian are you able to complete this? https://github.com/llvm/llvm-project/pull/89300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Erich Keane via cfe-commits
@@ -17563,6 +17573,16 @@ Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, UPPC_FixedUnderlyingType)) EnumUnderlying = Context.IntTy.getTypePtr(); + // If the underlying type is atomic, we n

[clang] fix: replace report_fatal_error with Diags and exit (PR #147959)

2025-07-10 Thread via cfe-commits
hstk30-hw wrote: Need a test case at least. https://github.com/llvm/llvm-project/pull/147959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Accept an _Atomic underlying type (PR #147802)

2025-07-10 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Would like a pair of fixmes, but this is otherwise good to me. https://github.com/llvm/llvm-project/pull/147802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-10 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/143667 >From b54f67ad5755bff3959369f8cd81022abd5dfe22 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 2 Jul 2025 15:55:41 +0200 Subject: [PATCH 1/4] Diagnose all dereferences of null pointers --- clang/docs

[clang-tools-extra] [clang-tidy] Add new check `llvm-prefer-static-over-anonymous-namespace` (PR #142839)

2025-07-10 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: I agree with the sentiment that it would be good to have one single check enforcing either one style or the other, possibly a "readability" type of check. Then llvm could be an alias with the proper config. I suppose this patch does not impede further refactoring if we wa

[clang] [llvm] [OpenMP][clang] 6.0: parsing/sema for message/severity for parallel (PR #146093)

2025-07-10 Thread Robert Imschweiler via cfe-commits
https://github.com/ro-i updated https://github.com/llvm/llvm-project/pull/146093 >From b01bdf107f80f0f023270326e4a16b1dcadd69d8 Mon Sep 17 00:00:00 2001 From: Robert Imschweiler Date: Fri, 27 Jun 2025 10:07:01 -0500 Subject: [PATCH 1/2] [OpenMP][clang] 6.0: parsing/sema for message/severity for

[clang-tools-extra] [clang-tidy] Add new check `llvm-prefer-static-over-anonymous-namespace` (PR #142839)

2025-07-10 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. https://github.com/llvm/llvm-project/pull/142839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -112,26 +112,35 @@ class CheckerRegistry { return true; } -public: - /// Adds a checker to the registry. Use this non-templated overload when your - /// checker requires custom initializatio

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy , =?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: @@ -3,12 +3,16 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" #include "clang/StaticAnalyzer/Frontend/CheckerRegistry.h" +// This simple plugin is used by clang/test/A

[clang] [analyzer] Prettify checker registration and unittest code (PR #147797)

2025-07-10 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -112,26 +112,35 @@ class CheckerRegistry { return true; } -public: - /// Adds a checker to the registry. Use this non-templated overload when your - /// checker requires custom initializatio

  1   2   3   4   5   >