[clang] [LifetimeSafety] Avoid adding already present items in sets/maps (PR #159582)

2025-09-20 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: * **#159582** https://app.graphite.dev/github/pr/llvm/llvm-project/159582?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/159582

[clang] [clang][ExprConst] Assert that EvaluateAsInitializer has non-null VD (PR #159274)

2025-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Both the expression (the initializer) as well as the VarDecl can't be null here. Assert that. --- Full diff: https://github.com/llvm/llvm-project/pull/159274.diff 2 Files Affected: - (modified) clang/lib/

[clang] [clang-repl] Disable out of process JIT tests on non-unix platforms (PR #159404)

2025-09-20 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/159404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Relax AVX ABI warning on internal functions (PR #157570)

2025-09-20 Thread Joseph Huber via cfe-commits
@@ -1513,12 +1513,17 @@ static void initFeatureMaps(const ASTContext &Ctx, static bool checkAVXParamFeature(DiagnosticsEngine &Diag, SourceLocation CallLoc, + const FunctionDecl &Callee,

[clang] [clang-format] Fix for BreakTemplateDeclarations and RequiresClausePosition (PR #159277)

2025-09-20 Thread NagaChaitanya Vellanki via cfe-commits
https://github.com/chaitanyav updated https://github.com/llvm/llvm-project/pull/159277 >From bee11d34f36de3f2a9071bbb413b6fbbbec5ae52 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Wed, 17 Sep 2025 00:04:24 -0700 Subject: [PATCH] [clang-format] Fix for BreakTemplateDeclarations and

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-20 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast commented: A user-defined string literal is not a _string-literal_: ```cpp // expected-no-diagnostics #define STR(X) # X const char *s = STR( import "hello"_world; ); ``` https://github.com/llvm/llvm-project/pull/107168 __

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

2025-09-20 Thread via cfe-commits
@@ -154,6 +156,38 @@ class RefSlab { llvm::DenseSet Entries; }; + /// RefSlab::Builder is a mutable container that can 'freeze' to RefSlab. + /// This variant is optimized to receive unique symbols + /// Use this when reading symbols which where previously written in

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

2025-09-20 Thread JJ Marr via cfe-commits
@@ -0,0 +1,260 @@ +//===--- 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] [clang][BufferUsage] Fix a StringRef lifetime issue (PR #159109)

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

[clang] [CIR] Implement CXX new for ComplexType with init (PR #159973)

2025-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change implements CXX new for ComplexType with init Issue: https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/159

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-20 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/107168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add -f[no-]atomic-backward-compatible and refine atomic codegen (PR #157672)

2025-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Yaxun (Sam) Liu (yxsamliu) Changes Clang recently introduced `-f[no]atomic-` options and `[[clang::atomic]]` attributes to give better control over atomic codegen. The default assumed no remote memory and no fine-grained memory to

[clang] [CIR] Upstream support Agg init with lvalue ComplexType (PR #159974)

2025-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Upstream the support of Agg init with lvalue ComplexType Issue: https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/159974.diff 2 Files Affected:

[clang] [CIR] Upstream support Agg init with lvalue ComplexType (PR #159974)

2025-09-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/159974 Upstream the support of Agg init with lvalue ComplexType Issue: https://github.com/llvm/llvm-project/issues/141365 >From 62c9484e43b14314c4bd3ceae5b41ca30c4cf5c6 Mon Sep 17 00:00:00 2001 From: AmrDeveloper

[clang] [CIR] Upstream support Agg init with lvalue ComplexType (PR #159974)

2025-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes Upstream the support of Agg init with lvalue ComplexType Issue: https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/159974.diff 2 Files Affected

[clang] Disable -gsplit-dwarf as it is unsupported at the moment on AIX (PR #158199)

2025-09-20 Thread Aditya Chaudhary via cfe-commits
https://github.com/adityankit edited https://github.com/llvm/llvm-project/pull/158199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Allow __builtin_fma/fmaf/fmal to be used in a constant expression (PR #158048)

2025-09-20 Thread Nikolas Klauser via cfe-commits
@@ -194,11 +194,19 @@ int main(int, char**) { ASSERT_NOT_CONSTEXPR_CXX23(std::fminf(1.0f, 0.0f) == 0.0f); ASSERT_NOT_CONSTEXPR_CXX23(std::fminl(1.0L, 0.0L) == 0.0L); +#if !__has_constexpr_builtin(__builtin_fma) ASSERT_NOT_CONSTEXPR_CXX23(std::fma(1.0f, 1.0f, 1.0f) == 2.

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-structured-binding + +modernize-use-structured-binding + + +Suggests using C++17 structured bindings to decompose pairs. vbvictor wrote: ```suggestion Finds places where struc

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-20 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,419 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [analyzer] Correct crash in Z3 wrapper (PR #158276)

2025-09-20 Thread via cfe-commits
https://github.com/vabridgers created https://github.com/llvm/llvm-project/pull/158276 If a UnarySymExpr with an arithmetic negation of a logical operation to obtain a SMTRefExpr, the Z3 engine will crash. Since an arithmetic negation of a logical operation makes no sense and has no effect, th

[clang] Add unique_ptr accesses to -Wunsafe-buffer-usage (PR #156773)

2025-09-20 Thread via cfe-commits
https://github.com/shreya-jain updated https://github.com/llvm/llvm-project/pull/156773 >From 927b2f61b8f5e0163c065ee4cbbf7ebb6956c34b Mon Sep 17 00:00:00 2001 From: shreya-jain Date: Wed, 3 Sep 2025 00:36:02 -0700 Subject: [PATCH 1/9] Update UnsafeBufferUsage.h --- clang/include/clang/Analys

[clang] [llvm] [clang] Remove shell requirements from tests (PR #156905)

2025-09-20 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 closed https://github.com/llvm/llvm-project/pull/156905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Fix recursive capability alias resolution (PR #159921)

2025-09-20 Thread Marco Elver via cfe-commits
https://github.com/melver created https://github.com/llvm/llvm-project/pull/159921 Fix a false positive in thread safety alias analysis caused by incorrect late resolution of aliases. The analysis previously failed to distinguish between an alias and its defining expression; reassigning a vari

[clang] 5f7b9f6 - [NFC][analyzer] Fix copypaste error in security.VAList docs (#157440)

2025-09-20 Thread via cfe-commits
Author: Donát Nagy Date: 2025-09-08T14:46:59+02:00 New Revision: 5f7b9f6f4a44f9c25e79c7166a6cabe8b376dd05 URL: https://github.com/llvm/llvm-project/commit/5f7b9f6f4a44f9c25e79c7166a6cabe8b376dd05 DIFF: https://github.com/llvm/llvm-project/commit/5f7b9f6f4a44f9c25e79c7166a6cabe8b376dd05.diff LO

[clang] [llvm] [clang][DebugInfo] Emit unified (Itanium) mangled name to structor declarations (PR #154142)

2025-09-20 Thread Michael Buch via cfe-commits
Michael137 wrote: I'll merge this with the LLDB test failure because it'll be fixed by the final PR in the patch series https://github.com/llvm/llvm-project/pull/149827 https://github.com/llvm/llvm-project/pull/154142 ___ cfe-commits mailing list cfe-

[clang] [docs][OpenMP] Remove "unclaimed" from language-specific items (PR #157481)

2025-09-20 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/157481 Things like C23 or Fortran 2023 had "unclaimed" entries in the column for the language that they don't apply to. Leave these fields blank instead. >From dc8e7279b8b66ae9402ca5be49b80e193747619e Mon Sep 17 00:0

[clang] [clang][bytecode] Improve error detection in BitCastPrim op (PR #158575)

2025-09-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/158575 >From 09216705f6869f3b50038a7adb82d55e791d704e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 15 Sep 2025 10:31:07 +0200 Subject: [PATCH] [clang][bytecode] Improve error detection in Bi

[clang-tools-extra] [llvm] [clangd] Add code action to generate getter and setter for a field in a C++ class (PR #157727)

2025-09-20 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] Issue157712 avx extract (PR #158853)

2025-09-20 Thread via cfe-commits
https://github.com/SeongjaeP created https://github.com/llvm/llvm-project/pull/158853 [clang][WIP] Constant evaluation for AVX extract intrinsics This patch adds initial constant evaluation support in ExprConstant.cpp for a subset of AVX/AVX2/AVX-512 extract intrinsics. Implemented cases inclu

[clang] [clang][sema][NFC] Clean up builtin arg checking functions (PR #158615)

2025-09-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/158615 >From e6be0335f0cc2370ccb1a93c5994843e23db96a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 15 Sep 2025 13:45:54 +0200 Subject: [PATCH] Cleanup --- clang/include/clang/Sema/Sema.h |

[clang] [LifetimeSafety] Add support for GSL Pointer types (PR #154009)

2025-09-20 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: (Landing atm with the approvals in place. Happy to address any more comments post-commit). https://github.com/llvm/llvm-project/pull/154009 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] 3a76747 - [X86] Allow XOP rotate intrinsics to be used in constexpr (#157643)

2025-09-20 Thread via cfe-commits
Author: Simon Pilgrim Date: 2025-09-09T11:17:32Z New Revision: 3a767473b7eb1012d495b18fd475ff77f4f8afc2 URL: https://github.com/llvm/llvm-project/commit/3a767473b7eb1012d495b18fd475ff77f4f8afc2 DIFF: https://github.com/llvm/llvm-project/commit/3a767473b7eb1012d495b18fd475ff77f4f8afc2.diff LOG:

[clang] [clang][Headers][lit] Fix test arm-acle-no-direct-include.c on Mac (PR #158677)

2025-09-20 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex ready_for_review https://github.com/llvm/llvm-project/pull/158677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add atomic exchange operation (PR #158089)

2025-09-20 Thread Bruno Cardoso Lopes via cfe-commits
@@ -4033,6 +4033,47 @@ def CIR_ThrowOp : CIR_Op<"throw"> { // Atomic operations //===--===// +def CIR_AtomicXchg : CIR_Op<"atomic.xchg", [ bcardosolopes wrote: Please add CIR to CIR tests fo

[clang] db8cad0 - [clang][Mangle] Inject structor type into mangled name when mangling for LLDB JIT expressions (#155485)

2025-09-20 Thread via cfe-commits
Author: Michael Buch Date: 2025-09-09T09:08:50+01:00 New Revision: db8cad0c8d00a691d1365e9b2962a7f2f4ff0890 URL: https://github.com/llvm/llvm-project/commit/db8cad0c8d00a691d1365e9b2962a7f2f4ff0890 DIFF: https://github.com/llvm/llvm-project/commit/db8cad0c8d00a691d1365e9b2962a7f2f4ff0890.diff

[clang] Fix crash in 'malloc' referring to function without a argument (PR #159371)

2025-09-20 Thread Sergei Barannikov via cfe-commits
@@ -347,6 +347,9 @@ Bug Fixes in This Version ``-Wshadow`` and show uncaptured-local warnings with ``-Wshadow-all``. (#GH68605) - Fixed a failed assertion with a negative limit parameter value inside of ``__has_embed``. (#GH157842) +- Fixed an assertion when an improper us

[clang] 94d5c54 - [clang][bytecode] Don't update temporary in InitGlobalTemp* (#158022)

2025-09-20 Thread via cfe-commits
Author: Timm Baeder Date: 2025-09-11T12:32:58+02:00 New Revision: 94d5c54a4f63636b6ea2c49c385928dcfc08dd6d URL: https://github.com/llvm/llvm-project/commit/94d5c54a4f63636b6ea2c49c385928dcfc08dd6d DIFF: https://github.com/llvm/llvm-project/commit/94d5c54a4f63636b6ea2c49c385928dcfc08dd6d.diff L

[clang] [llvm] [mlir] [Flang][OpenMP] Enable no-loop kernels (PR #155818)

2025-09-20 Thread Dominik Adamski via cfe-commits
@@ -5003,16 +5003,17 @@ static void createTargetLoopWorkshareCall(OpenMPIRBuilder *OMPBuilder, RealArgs.push_back(ConstantInt::get(TripCountTy, 0)); if (LoopType == WorksharingLoopType::DistributeForStaticLoop) { RealArgs.push_back(ConstantInt::get(TripCountTy, 0)); -

[clang] [WebKit checkers] Treat NULL, 0, and nil like nullptr (PR #157700)

2025-09-20 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/157700 This PR makes WebKit checkers treat NULL, 0, and nil like nullptr in various places. >From 8c8c20cf6d3ea822d098bfb97b8426cf8d8eef85 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Tue, 9 Sep 2025 09:13:47 -070

[clang] [libcxx] [Clang] Normalize constraints before checking for satisfaction (PR #141776)

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

[clang] [analyzer] Improve messaging in security.VAList (PR #157846)

2025-09-20 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -101,8 +101,8 @@ void recopy(int fst, ...) { va_list va, va2; va_start(va, fst); va_copy(va2, va); // expected-note{{Initialized va_list}} - va_copy(va2, va); // expected-warning{{Initialized va_list 'va2' is initial

[clang] [llvm] Implements isnan() HLSL intrinsic for DXIL and SPIR-V targets. (PR #157733)

2025-09-20 Thread Farzon Lotfi via cfe-commits
@@ -1024,6 +1025,9 @@ static bool expandIntrinsic(Function &F, CallInst *Orig) { case Intrinsic::dx_isinf: Result = expand16BitIsInf(Orig); break; + case Intrinsic::dx_isnan: +Result = expand16BitIsInf(Orig); farzonl wrote: this is the wrong exp

[clang-tools-extra] [clang-tidy][mlir] Expand to cover pointer of builder (PR #159423)

2025-09-20 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/159423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][mlir] Expand to cover pointer of builder (PR #159423)

2025-09-20 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/159423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore DeclRefExpr to a lambda in an no-escape argument (PR #155025)

2025-09-20 Thread Ryosuke Niwa via cfe-commits
@@ -232,14 +232,19 @@ class RawPtrRefLambdaCapturesChecker if (!Init) return nullptr; if (auto *Lambda = dyn_cast(Init)) { + DeclRefExprsToIgnore.insert(DRE); updateIgnoreList(); return Lambda; } TempExp

[clang] [llvm] Add metadata for const C/C++ scalar types to track initial values of escaped alloca (PR #157676)

2025-09-20 Thread Vladislav Belov via cfe-commits
https://github.com/vbe-sc created https://github.com/llvm/llvm-project/pull/157676 According to the 9.2.9.2.4 bullet of the C++ standard: > Any attempt to modify (7.6.19, 7.6.1.6, 7.6.2.3) a const object (6.8.5) > during its lifetime (6.7.3) results in undefined behavior. and 6.7.4.7 bullet of

[clang-tools-extra] [clang-tidy][NFC] Construct map at compile time (PR #158166)

2025-09-20 Thread Victor Chernyakin via cfe-commits
@@ -39,31 +32,17 @@ truncateIfIntegral(const FloatingLiteral &FloatLiteral) { const std::pair & getDurationInverseForScale(DurationScale Scale) { - static const llvm::IndexedMap, -DurationScale2IndexFunctor> - InverseMap = []() { -

[clang] [LifetimeSafety] Add support for GSL Pointer types (PR #154009)

2025-09-20 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 auto_merge_enabled https://github.com/llvm/llvm-project/pull/154009 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] 6.0: Add defaultmap implicit-behavior 'storage' (PR #158336)

2025-09-20 Thread Alexey Bataev via cfe-commits
@@ -3748,6 +3749,7 @@ getMapClauseKindFromModifier(OpenMPDefaultmapClauseModifier M, OpenMPMapClauseKind Kind = OMPC_MAP_unknown; switch (M) { case OMPC_DEFAULTMAP_MODIFIER_alloc: alexey-bataev wrote: Should be alloc disabled for 6.0 and above? https:/

[clang] Fix crash in 'malloc' referring to function without a argument (PR #159371)

2025-09-20 Thread Erich Keane via cfe-commits
@@ -347,6 +347,9 @@ Bug Fixes in This Version ``-Wshadow`` and show uncaptured-local warnings with ``-Wshadow-all``. (#GH68605) - Fixed a failed assertion with a negative limit parameter value inside of ``__has_embed``. (#GH157842) +- Fixed an assertion when an improper us

[clang] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-20 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/153049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] d263150 - [clang-tidy][NFC] add comment in llvm-use-ranges for add_new_check.py (#159927)

2025-09-20 Thread via cfe-commits
Author: Congcong Cai Date: 2025-09-21T09:36:29+08:00 New Revision: d263150db59281473a38abcc5fe2c15be2f776b7 URL: https://github.com/llvm/llvm-project/commit/d263150db59281473a38abcc5fe2c15be2f776b7 DIFF: https://github.com/llvm/llvm-project/commit/d263150db59281473a38abcc5fe2c15be2f776b7.diff

[clang-tools-extra] [clang-tidy][NFC] add comment in llvm-use-ranges for add_new_check.py (PR #159927)

2025-09-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/159927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-20 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast commented: The treatment of keywords should be different from that of the alternative tokens. ```cpptypedef int import; import extern x; // expected-error {{}} ``` https://github.com/llvm/llvm-project/pull/107168 ___

[libclc] libclc: Remove HAVE_LLVM version macros (PR #158257)

2025-09-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/158257 This doesn't need to pretend to support multiple versions of llvm and these are old anyway. >From 34e55fceed99df44d587d27ab4478e3b8500dd2b Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 12 Sep 2025 18:

[clang] [llvm] [Offload] Change ELF machine type for SPIR-V OpenMP image (PR #159623)

2025-09-20 Thread Joseph Huber via cfe-commits
@@ -423,9 +423,10 @@ Error offloading::intel::containerizeOpenMPSPIRVImage( Header.Class = ELF::ELFCLASS64; Header.Data = ELF::ELFDATA2LSB; Header.Type = ELF::ET_DYN; - // Use an existing Intel machine type as there is not one specifically for - // Intel GPUs. - Header

[clang] [llvm] [mlir] Revert "Reapply "[Coroutines] Add llvm.coro.is_in_ramp and drop return value of llvm.coro.end #153404"" (PR #159236)

2025-09-20 Thread Weibo He via cfe-commits
https://github.com/NewSigma closed https://github.com/llvm/llvm-project/pull/159236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 06d202b - [clang][DebugInfo] Emit unified (Itanium) mangled name to structor declarations (#154142)

2025-09-20 Thread via cfe-commits
Author: Michael Buch Date: 2025-09-09T09:50:11+01:00 New Revision: 06d202b6cb13b38165af03dbf12a3beaac0b38ea URL: https://github.com/llvm/llvm-project/commit/06d202b6cb13b38165af03dbf12a3beaac0b38ea DIFF: https://github.com/llvm/llvm-project/commit/06d202b6cb13b38165af03dbf12a3beaac0b38ea.diff

[clang] [llvm] [X86][KCFI] Do not emit a type prefix for nocf_check functions (PR #158133)

2025-09-20 Thread Sami Tolvanen via cfe-commits
samitolvanen wrote: > > Looking at this a bit closer, the `nocf_check` attribute also applies to > > function pointers with `-fcf-protection`, and disables tracking for > > indirect branches. > > Wait, like, as variable/struct-member attribute? For function pointer types, specifically. Perfor

[clang] [llvm] [Driver][AMDGPU][HIP][SPIRV] Disable optimizations for AMDGCN SPIR-V (PR #154765)

2025-09-20 Thread Alex Voicu via cfe-commits
AlexVlx wrote: We've had some internal discussion around this, we will rely on this mechanism whilst we implement support for what we want in Clang. https://github.com/llvm/llvm-project/pull/154765 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-20 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/158462 >From a1941312179171a8752c27f886158ce4fd90db33 Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 14 Sep 2025 14:33:59 +0800 Subject: [PATCH 1/4] [clang-tidy] Add new check `modernize-use-structured-binding` --

[clang] [Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow AVX/AVX512 subvector insertion intrinsics to be used in constexpr #157709 (PR #158778)

2025-09-20 Thread Timm Baeder via cfe-commits
@@ -2937,6 +2937,50 @@ static bool interp__builtin_elementwise_triop( return true; } +static bool interp__builtin_x86_insert_subvector(InterpState &S, CodePtr OpPC, + const CallExpr *Call, +

[clang] [Sema] Fix missing warnings for unused args with invalid printf specs. (PR #158514)

2025-09-20 Thread via cfe-commits
lakreite wrote: Thank you for the feedback. I think there's a bug, because... With invalid conversion specifiers clang emits a warning: ```c main.cpp:5:17: warning: invalid conversion specifier 'k' [-Wformat-invalid-specifier] 5 | printf("%d %k", 1, 1); |~^ main.cpp

[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)

2025-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (kgerlich) Changes … macro This adds a new configuration option SpaceBeforeUnderscoreParens to control spacing between underscore and opening parenthesis. This is specifically designed for the gettext internationalization mac

[clang] [clang-tools-extra] [lldb] [clang] AST: remove DependentTemplateSpecializationType (PR #158109)

2025-09-20 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/158109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Show element count in ArrayBound underflow reports (PR #158639)

2025-09-20 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/158639 From db0723ca737ec4613d186ff1137c7405c480baf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Mon, 15 Sep 2025 15:48:12 +0200 Subject: [PATCH 1/5] [analyzer] Show element count in ArrayBound

[clang] [clang-tools-extra] [lldb] [clang] AST: remove DependentTemplateSpecializationType (PR #158109)

2025-09-20 Thread Corentin Jabot via cfe-commits
@@ -222,7 +222,6 @@ RegistryMaps::RegistryMaps() { REGISTER_MATCHER(declRefExpr); REGISTER_MATCHER(dependentNameType); REGISTER_MATCHER(dependentScopeDeclRefExpr); - REGISTER_MATCHER(dependentTemplateSpecializationType); cor3ntin wrote: I'm happy with t

[clang-tools-extra] [Clangd] [NFC] Fix dereference of null value (PR #159566)

2025-09-20 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/159566 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] add array out-of-bounds access constraints using llvm.assume (PR #159046)

2025-09-20 Thread Sebastian Pop via cfe-commits
https://github.com/sebpop edited https://github.com/llvm/llvm-project/pull/159046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] mark v21 as released (PR #158629)

2025-09-20 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/158629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Support -gdwarf-N option. (PR #158314)

2025-09-20 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj commented: Hi @abidh , Thank you for the change. LGTM except the default visibility change. However, merging this change alone would mean flang would be accepting this option without any indication that it is not handled. It would be nice if - In Flang.cpp, you can

[clang] [X86] Add F16C f16 -> f32 constexpr support (PR #158142)

2025-09-20 Thread Simon Pilgrim via cfe-commits
@@ -41,15 +51,18 @@ __m256 test_mm256_cvtph_ps(__m128i a) { // CHECK: fpext <8 x half> %{{.*}} to <8 x float> return _mm256_cvtph_ps(a); } +TEST_CONSTEXPR(match_m256( +_mm256_cvtph_ps(_mm_setr_epi16(0x3C00, 0x4000, 0x4200, 0x4400, 0x4500, 0x3800, 0xC000, 0x)), +

[clang] [clang][Parse] Use consistent Scope::ScopeFlags enum values (NFC) (PR #159275)

2025-09-20 Thread Bruno De Fraine via cfe-commits
https://github.com/brunodf-snps edited https://github.com/llvm/llvm-project/pull/159275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Match the FoldingSetNodeID computed before and after creating TypedefType (PR #157662)

2025-09-20 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh closed https://github.com/llvm/llvm-project/pull/157662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] diagnose invalid std::tuple_size sizes (PR #159677)

2025-09-20 Thread Erich Keane via cfe-commits
@@ -1222,6 +1222,16 @@ static IsTupleLike isTupleLike(Sema &S, SourceLocation Loc, QualType T, if (E.isInvalid()) return IsTupleLike::Error; + if (Size < 0 || Size >= UINT_MAX) { +llvm::SmallVector Str; +Size.toString(Str); erichkeane wrote: W

[clang] [clang][Driver] Clean up UEFI linker argument handling (PR #159639)

2025-09-20 Thread Roland McGrath via cfe-commits
frobtech wrote: > Is there any particular reason for using the `/option:value` syntax over > `-option:value` given that `lld-link` supports both? It's the common convention for the tool syntax that `lld-link` is emulating. It's consistent with the MSVC driver in Clang. That makes it easier to

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-20 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-tools-extra] [clang-tidy][custom-check][NFC] fix test when `CLANG_TIDY_ENABLE_QUERY_BASED_CUSTOM_CHECKS` disable (#159809) (PR #159809)

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

[clang] [AST] Match the FoldingSetNodeID computed before and after creating TypedefType (PR #157662)

2025-09-20 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov created https://github.com/llvm/llvm-project/pull/157662 At some point the call to static `TypedefType::Profile` inside `ASTContext::getTypedefType` got out-of-sync with the non-static `TypedefType::Profile`. This seem to cause some bad performance patterns

[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

2025-09-20 Thread via cfe-commits
github-actions[bot] wrote: @tynasello 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]: prevent assertion on empty filename arg in __has_embed (PR #159928)

2025-09-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/159928 Fixes #159898 --- This PR addresses the issue of Clang asserting when `__has_embed` is used with an empty filename ```c #if __has_embed("") #endif ``` >From 26d565a311f0d0c5de2675e6d1bd2dd2a27e6064 Mon

[clang] Fix perf-helper.py (PR #159745)

2025-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Konrad Kleine (kwk) Changes When build with assertions, there will be an output like the following that needs to be filtered out, similar to the other ones. `'Build config: +assertions'` --- Full diff: https://github.com/llvm/llvm-projec

[clang] [clang][bytecode][X86] Allow AVX512 funnel shift by scalar immediate intrinsics to be used in constexpr (PR #157681)

2025-09-20 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/157681 >From d690a70f21e7ac309ca5acab843e75b54e71c4a4 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 9 Sep 2025 15:25:54 +0100 Subject: [PATCH] [clang][bytecode][X86] Allow AVX512 funnel shift by scalar immed

[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-20 Thread Ivan Murashko via cfe-commits
https://github.com/ivanmurashko closed https://github.com/llvm/llvm-project/pull/157667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Allow AVX512 funnel shift intrinsics to be used in constexpr (PR #157668)

2025-09-20 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/157668 Now that they wrap the __builtin_elementwise_fshl/fshr builtin intrinsics this is pretty trivial. Just one more step towards #153152 - just VBMI2 funnel shifts by immediate >From e16db4cb34c179f8cbecc8990d9399

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2025-09-20 Thread Andrew Savonichev via cfe-commits
@@ -5296,6 +5296,106 @@ void llvm::UpgradeFunctionAttributes(Function &F) { } } +// Check if the module attribute is present and set to one. +static bool isModuleAttributeOne(Module &M, const StringRef &ModAttr) { + const auto *Attr = + mdconst::extract_or_null(M.getMo

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2025-09-20 Thread Andrew Savonichev via cfe-commits
@@ -7070,6 +7070,8 @@ Error BitcodeReader::materializeModule() { UpgradeARCRuntime(*TheModule); + CopyModuleAttrToFunctions(*TheModule); asavonic wrote: I wonder if we need to do this here, or in [BitcodeReader::globalCleanup](https://github.com/llvm/llv

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2025-09-20 Thread Andrew Savonichev via cfe-commits
https://github.com/asavonic commented: LGTM overall. It is good that we address uncertainty of what these module flags actually mean. They went from "apply to all functions" to "only used to set an ELF flag", and it was impossible to tell which one it is. https://github.com/llvm/llvm-project/p

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2025-09-20 Thread Andrew Savonichev via cfe-commits
https://github.com/asavonic edited https://github.com/llvm/llvm-project/pull/86212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Align within the level with Cpp11BracedListStyle disabled (PR #159140)

2025-09-20 Thread via cfe-commits
@@ -279,20 +280,19 @@ void WhitespaceManager::calculateLineBreakInformation() { } // Align a single sequence of tokens, see AlignTokens below. -// Column - The token for which Matches returns true is moved to this column. +// Column - The tokens indexed in Matches are moved to

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-20 Thread Anatoly Trosinenko via cfe-commits
https://github.com/atrosinenko commented: It would be probably useful to explicitly list the configurations that we would like to support at the end of the day. Some combinations are probably unsupported or not planned for the first version of the patch. I have already left similar comments be

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-20 Thread Anatoly Trosinenko via cfe-commits
@@ -30,6 +30,51 @@ EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT, _Unwind_Personality_Fn); #endif +#if __has_feature(ptrauth_calls) +#include + +#if __has_feature(ptrauth_restricted_intptr_qualifie

[clang] [CIR] Implement Unary real & imag on scalar expr (PR #159916)

2025-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change implements Unary real & imag on scalar expr Issue: https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/159916.diff 2 Files Affected:

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-20 Thread Anatoly Trosinenko via cfe-commits
https://github.com/atrosinenko edited https://github.com/llvm/llvm-project/pull/143230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-09-20 Thread Sebastian Proell via cfe-commits
https://github.com/sebproell updated https://github.com/llvm/llvm-project/pull/156199 >From ce6fb88dadbfa996fe07ea381e3ffca94330af43 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_abstract is false -

[clang] 56a5619 - [CIR] Implement Type promotion for VectorType (#158715)

2025-09-20 Thread via cfe-commits
Author: Amr Hesham Date: 2025-09-20T12:05:12+02:00 New Revision: 56a561920a31381d38ee9f123669df45da569427 URL: https://github.com/llvm/llvm-project/commit/56a561920a31381d38ee9f123669df45da569427 DIFF: https://github.com/llvm/llvm-project/commit/56a561920a31381d38ee9f123669df45da569427.diff LO

[clang] [CIR] Implement Type promotion for VectorType (PR #158715)

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

[clang] [CIR] Implement UnaryExtension support for ComplexType (PR #159913)

2025-09-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/159913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement Unary real & imag on scalar expr (PR #159916)

2025-09-20 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/159916 This change implements Unary real & imag on scalar expr Issue: https://github.com/llvm/llvm-project/issues/141365 >From c63f5c8a2d60e3ba0645933653c273abb9043323 Mon Sep 17 00:00:00 2001 From: AmrDeveloper

[clang] [Clang][Doc] Modify HLSL semantics documentation (PR #157841)

2025-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Gauër (Keenuts) Changes HLSL semantics are split between system semantics with some kind of spelling, and user semantics with no actual spelling. Those have been documented as normal function attributes, but they'd benefit from a c

  1   2   3   4   5   >