[clang] [clang-repl] Delegate CodeGen related operations for PTU to IncrementalParser (PR #137458)

2025-08-25 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/137458 >From 1d773dea825579e43485b99d57931c6fa19f1768 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Sat, 26 Apr 2025 18:56:38 +0530 Subject: [PATCH 1/2] Delegate CodeGen related operations for PTU to IncrementalP

[clang] [Clang] fix crash in codegen caused by deferred asm diagnostics under -fopenmp (PR #147163)

2025-08-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: My understanding of deferred diagnostics is that the primary use is to allow including headers that contain inline functions, and don't properly mark device vs. host. So when you parse the function, it's unknown whether the function is actually going to be used, which wou

[clang] [C++20][Modules] Use `MultiOnDiskHashTable` to improve the performance of header search algorithm. (PR #155350)

2025-08-25 Thread Chuanqi Xu via cfe-commits
@@ -157,15 +163,34 @@ template class MultiOnDiskHashTable { // FIXME: Don't rely on the OnDiskHashTable format here. auto L = InfoObj.ReadKeyDataLength(LocalPtr); const internal_key_type &Key = InfoObj.ReadKey(LocalPtr, L.first); -data_type_build

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

2025-08-25 Thread via cfe-commits
@@ -3558,6 +3558,74 @@ struct FormatStyle { /// \version 9 std::vector NamespaceMacros; + /// Control over each component in a numeric literal. + enum NumericLiteralComponentStyle : int8_t { +/// Leave this component of the literal as is. +NLCS_Leave, +/// Fo

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

2025-08-25 Thread via cfe-commits
@@ -14,6 +14,7 @@ add_clang_library(clangFormat MatchFilePath.cpp NamespaceEndCommentsFixer.cpp NumericLiteralInfo.cpp + NumericLiteralCaseFixer.cpp owenca wrote: Sort. https://github.com/llvm/llvm-project/pull/151590 __

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

2025-08-25 Thread via cfe-commits
@@ -3558,6 +3558,74 @@ struct FormatStyle { /// \version 9 std::vector NamespaceMacros; + /// Control over each component in a numeric literal. + enum NumericLiteralComponentStyle : int8_t { +/// Leave this component of the literal as is. +NLCS_Leave, +/// Fo

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

2025-08-25 Thread via cfe-commits
@@ -0,0 +1,174 @@ +//===--- NumericLiteralCaseFixer.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-08-25 Thread via cfe-commits
@@ -4001,8 +4030,8 @@ reformat(const FormatStyle &Style, StringRef Code, if (Style.QualifierAlignment != FormatStyle::QAS_Leave) { // Don't make replacements that replace nothing. QualifierAlignment can -// produce them if one of its early passes changes e.g. `const

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

2025-08-25 Thread via cfe-commits
@@ -472,6 +473,25 @@ struct ScalarEnumerationTraits { } }; +template <> +struct ScalarEnumerationTraits { + static void enumeration(IO &IO, + FormatStyle::NumericLiteralComponentStyle &Value) { +IO.enumCase(Value, "Leave", FormatStyle::NLCS_Lea

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

2025-08-25 Thread via cfe-commits
@@ -0,0 +1,174 @@ +//===--- NumericLiteralCaseFixer.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-08-25 Thread via cfe-commits
@@ -3558,6 +3558,74 @@ struct FormatStyle { /// \version 9 std::vector NamespaceMacros; + /// Control over each component in a numeric literal. + enum NumericLiteralComponentStyle : int8_t { +/// Leave this component of the literal as is. +NLCS_Leave, +/// Fo

[clang] Improve HeuristicResolver further so it can replace most of getApproximateType() in SemaCodeComplete (PR #151643)

2025-08-25 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/151643 >From 82f95113d5133c8d8579f6445981ad20dce1881a Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 24 Aug 2025 23:03:40 -0400 Subject: [PATCH 1/2] [clang][Sema] Implement additional heuristics from Se

[clang] [clang][bytecode] Support remaining add_sat like X86 builtins (PR #155358)

2025-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Timm Baeder (tbaederr) Changes Checking CI with the RUN lines. They won't be pushed though because of a signed integer overflow reported by ubsan that seems to happen on unsigned types. --- Full diff: https://github.com/llvm/llvm-pr

[clang] [clang][bytecode] Support remaining add_sat like X86 builtins (PR #155358)

2025-08-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/155358 Checking CI with the RUN lines. They won't be pushed though because of a signed integer overflow reported by ubsan that seems to happen on unsigned types. >From 182c16a85d3a0d7961696fa5a2e387bf85a32e20 Mon Sep

[clang] [C++20][Modules] Use `MultiOnDiskHashTable` to improve the performance of header search algorithm. (PR #155350)

2025-08-25 Thread Chuanqi Xu via cfe-commits
@@ -157,15 +163,34 @@ template class MultiOnDiskHashTable { // FIXME: Don't rely on the OnDiskHashTable format here. auto L = InfoObj.ReadKeyDataLength(LocalPtr); const internal_key_type &Key = InfoObj.ReadKey(LocalPtr, L.first); -data_type_build

[clang] [C++20][Modules] Use `MultiOnDiskHashTable` to improve the performance of header search algorithm. (PR #155350)

2025-08-25 Thread Chuanqi Xu via cfe-commits
@@ -373,6 +373,9 @@ class HeaderFileInfoTrait { ModuleFile &M; public: + // Maximum number of lookup tables we allow before condensing the tables. + static const int MaxTables = 64; ChuanqiXu9 wrote: Out of curiosity, is this tuned? Or is it set randomly?

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-08-25 Thread via cfe-commits
@@ -1632,21 +1632,34 @@ QualType CallExpr::getCallReturnType(const ASTContext &Ctx) const { std::pair Expr::getUnusedResultAttrImpl(const Decl *Callee, QualType ReturnType) { - // If the callee is marked nodiscard, return that attribute - if (Callee != nullptr) + // If the

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-08-25 Thread via cfe-commits
@@ -3646,6 +3646,14 @@ def Unavailable : InheritableAttr { let MeaningfulToClassTemplateDefinition = 1; } +def CanDiscard : InheritableAttr { + let Spellings = [CXX11<"clang", "candiscard">, + GCC<"candiscard">]; + let Subjects = SubjectList<[ObjCMethod,

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-08-25 Thread via cfe-commits
https://github.com/halbi2 updated https://github.com/llvm/llvm-project/pull/154943 >From bb04ff2cf154b1c5547f7d5236e8fe769b9a54dd Mon Sep 17 00:00:00 2001 From: halbi2 Date: Fri, 22 Aug 2025 09:13:17 -0400 Subject: [PATCH 1/4] [clang] Add the candiscard attribute to suppress nodiscard Fulfill

[clang-tools-extra] d8709ae - [clangd] [C++20 Modules] Add --debug-modules-builder to not remove built module files on exit

2025-08-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-08-26T13:03:16+08:00 New Revision: d8709ae859e5dcf628a9bcb23c916e24611ab8bc URL: https://github.com/llvm/llvm-project/commit/d8709ae859e5dcf628a9bcb23c916e24611ab8bc DIFF: https://github.com/llvm/llvm-project/commit/d8709ae859e5dcf628a9bcb23c916e24611ab8bc.diff LO

[clang] [clang-format] allow short function body on a single line (PR #151428)

2025-08-25 Thread Lidong Yan via cfe-commits
brandb97 wrote: @owenca That's totally fine, I will try to simplify my code. https://github.com/llvm/llvm-project/pull/151428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] allow short function body on a single line (PR #151428)

2025-08-25 Thread Lidong Yan via cfe-commits
@@ -510,27 +515,50 @@ class LineJoiner { // Try to merge a function block with left brace wrapped. if (NextLine.First->is(TT_FunctionLBrace) && -Style.BraceWrapping.AfterFunction) { +(Style.BraceWrapping.AfterFunction || + Style.AllowShortBlocks

[clang] [clang][bytecode] Don't call getIndex() on one-past-end pointers (PR #155173)

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

[clang] 97b3cb2 - [clang][bytecode] Don't call getIndex() on one-past-end pointers (#155173)

2025-08-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-26T06:33:24+02:00 New Revision: 97b3cb223907f636730c1ab8c3c716b27a02084a URL: https://github.com/llvm/llvm-project/commit/97b3cb223907f636730c1ab8c3c716b27a02084a DIFF: https://github.com/llvm/llvm-project/commit/97b3cb223907f636730c1ab8c3c716b27a02084a.diff L

[clang] [clang][bytecode] Error if calls have fewer arguments than parameters (PR #155151)

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

[clang] 1739a0e - [clang][bytecode] Error if calls have fewer arguments than parameters (#155151)

2025-08-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-26T06:17:39+02:00 New Revision: 1739a0e5fba4b2af820a95db0fb3fda4cc054a09 URL: https://github.com/llvm/llvm-project/commit/1739a0e5fba4b2af820a95db0fb3fda4cc054a09 DIFF: https://github.com/llvm/llvm-project/commit/1739a0e5fba4b2af820a95db0fb3fda4cc054a09.diff L

[clang] [llvm] [AMDGPU] Refactor insertWaveSizeFeature (PR #154850)

2025-08-25 Thread Yaxun Liu via cfe-commits
@@ -197,7 +197,7 @@ bool AMDGPUTargetInfo::initFeatureMap( const std::vector &FeatureVec) const { using namespace llvm::AMDGPU; - fillAMDGPUFeatureMap(CPU, getTriple(), Features); + yxsamliu wrote: I am a bit concerned moving fillAMDGPUFeatureMap from

[clang] [clang][bytecode] Don't call getIndex() on one-past-end pointers (PR #155173)

2025-08-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/155173 >From 448ee9a9b416b3c78d6134bc649f6a4b2e4b2391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 24 Aug 2025 16:47:01 +0200 Subject: [PATCH] [clang][bytecode] Don't call getIndex() on one-

[clang] [clang][bytecode] Simplify Pointer (PR #155170)

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

[clang] 9cc89bb - [clang][bytecode] Simplify Pointer (#155170)

2025-08-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-26T06:01:06+02:00 New Revision: 9cc89bb23883e7aba07dbeaf5e00a3acb8bb3e67 URL: https://github.com/llvm/llvm-project/commit/9cc89bb23883e7aba07dbeaf5e00a3acb8bb3e67 DIFF: https://github.com/llvm/llvm-project/commit/9cc89bb23883e7aba07dbeaf5e00a3acb8bb3e67.diff L

[clang] [clang] Post-commit review for #150028 (PR #155351)

2025-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes 1) Return `std::nullopt` instead of `{}`. 2) Rename the new function to evaluate*, it's not a simple getter. --- Full diff: https://github.com/llvm/llvm-project/pull/155351.diff 4 Files Affected: - (modi

[clang] [clang] Post-commit review for #150028 (PR #155351)

2025-08-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/155351 1) Return `std::nullopt` instead of `{}`. 2) Rename the new function to evaluate*, it's not a simple getter. >From dfee9351513fae7272b9aafd8ebd5d717bd07d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3

[clang] [clang-format] Use proper flags for git diff-tree (PR #155247)

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

[clang] [clang][bytecode] Error if calls have fewer arguments than parameters (PR #155151)

2025-08-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/155151 >From 6e9e9659ce2014d56780de5ed67697753ee6ad70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 26 Aug 2025 05:53:58 +0200 Subject: [PATCH] Fixup --- clang/lib/AST/ByteCode/Compiler.cpp

[clang] [C++20][Modules] Use `MultiOnDiskHashTable` to improve the performance of header search algorithm. (PR #155350)

2025-08-25 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/155350 >From d6f05e6602ac33d61d279e1f35f92ca8ebeaefe0 Mon Sep 17 00:00:00 2001 From: Michael Park Date: Thu, 21 Aug 2025 21:14:21 -0700 Subject: [PATCH 1/2] Move `mergeHeaderFileInfo` into `HeaderFileInfo::merge`. ---

[clang] 0a675f5 - [clang] fix uniquing of some TagTypes created from the injected class name (#155347)

2025-08-25 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-08-26T00:26:04-03:00 New Revision: 0a675f553caf7e4babcdcbfa5a5e36f4233c1ad4 URL: https://github.com/llvm/llvm-project/commit/0a675f553caf7e4babcdcbfa5a5e36f4233c1ad4 DIFF: https://github.com/llvm/llvm-project/commit/0a675f553caf7e4babcdcbfa5a5e36f4233c1ad4.dif

[clang] [C++20][Modules] Use `MultiOnDiskHashTable` to improve the performance of header search algorithm. (PR #155350)

2025-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules Author: Michael Park (mpark) Changes This is a second attempt to solve https://github.com/llvm/llvm-project/issues/140860, and supersedes the attempt in https://github.com/llvm/llvm-project/pull/140867. In this

[clang] [C++20][Modules] Use `MultiOnDiskHashTable` to improve the performance of header search algorithm. (PR #155350)

2025-08-25 Thread Michael Park via cfe-commits
https://github.com/mpark created https://github.com/llvm/llvm-project/pull/155350 This is a second attempt to solve https://github.com/llvm/llvm-project/issues/140860, and supersedes the attempt in https://github.com/llvm/llvm-project/pull/140867. In this approach, we introduce an instance of

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-25 Thread Matheus Izvekov via cfe-commits
@@ -5254,153 +5253,297 @@ ASTContext::getPredefinedSugarType(PredefinedSugarType::Kind KD) const { return QualType(New, 0); } -#ifndef NDEBUG -static bool NeedsInjectedClassNameType(const RecordDecl *D) { - if (!isa(D)) return false; - const auto *RD = cast(D); - if (isa

[clang] [Headers][X86] Update FMA3/FMA4 scalar intrinsics to use __builtin_elementwise_fma and support constexpr (PR #154731)

2025-08-25 Thread Phoebe Wang via cfe-commits
@@ -40,16 +40,16 @@ _mm_macc_pd(__m128d __A, __m128d __B, __m128d __C) { (__v2df)__C); } -static __inline__ __m128 __DEFAULT_FN_ATTRS128 +static __inline__ __m128 __DEFAULT_FN_ATTRS128_CONSTEXPR _mm_macc_ss(__m128 __A, __m128 __B, _

[clang] [clang] fix uniquing of some TagTypes created from the injected class name (PR #155347)

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

[clang] [clang][bytecode] Simplify Pointer (PR #155170)

2025-08-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/155170 >From a4f94a5792aa3108e160f691c49dbfc161a78b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 24 Aug 2025 16:36:17 +0200 Subject: [PATCH] [clang][bytecode] Simplify Pointer Now that we

[clang] [WIP][C++20][Modules] Lazily, but fully load 'HeaderFileInfo' table into memory. (PR #140867)

2025-08-25 Thread Michael Park via cfe-commits
https://github.com/mpark closed https://github.com/llvm/llvm-project/pull/140867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][C++20][Modules] Lazily, but fully load 'HeaderFileInfo' table into memory. (PR #140867)

2025-08-25 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/140867 >From a82059f4e0953e327353f383c9728ef4a7a6eaac Mon Sep 17 00:00:00 2001 From: Michael Park Date: Tue, 20 May 2025 17:18:36 -0700 Subject: [PATCH] Lazily, but fully load 'HeaderFileInfo' table into memory. --- cl

[clang] Reapply "[clang][bytecode] Fix incorrect offset in elem() (#155157)" (PR #155276)

2025-08-25 Thread Timm Baeder via cfe-commits
tbaederr wrote: I tested this on a big-endian host, but even the previous attempt worked just fine. It seems to be a problem with 32-bit hosts? I can't test that easily though, I'll merge this and try. https://github.com/llvm/llvm-project/pull/155276 ___

[clang] Reapply "[clang][bytecode] Fix incorrect offset in elem() (#155157)" (PR #155276)

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

[clang] 07b2ba2 - Reapply "[clang][bytecode] Fix incorrect offset in elem() (#155157)" (#155276)

2025-08-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-26T05:24:18+02:00 New Revision: 07b2ba260041479fd35cb4dd5687779006402dc4 URL: https://github.com/llvm/llvm-project/commit/07b2ba260041479fd35cb4dd5687779006402dc4 DIFF: https://github.com/llvm/llvm-project/commit/07b2ba260041479fd35cb4dd5687779006402dc4.diff L

[clang] [Clang] Enable constexpr handling for builtin elementwise fshl/fshr (PR #153572)

2025-08-25 Thread Timm Baeder via cfe-commits
@@ -2817,6 +2817,81 @@ static bool interp__builtin_select(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_elementwise_fsh(InterpState &S, CodePtr OpPC, +const CallExpr *Call, +

[clang] [Clang] Enable constexpr handling for builtin elementwise fshl/fshr (PR #153572)

2025-08-25 Thread Timm Baeder via cfe-commits
@@ -2817,6 +2817,81 @@ static bool interp__builtin_select(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_elementwise_fsh(InterpState &S, CodePtr OpPC, +const CallExpr *Call, +

[clang] [clang][bytecode] Reject dependent RequiresExprs (PR #155230)

2025-08-25 Thread Timm Baeder via cfe-commits
tbaederr wrote: > Do you know which clause causes clang to choose to reject this, looks like we > are the only one: https://godbolt.org/z/KhfeP5W6d > > CC @hokein looks like came in w/ > [bd4662c](https://github.com/llvm/llvm-project/commit/bd4662cd3f3743e08699e6bab976d9e7b163ece0) No clue. T

[clang] [Clang] Enable constexpr handling for builtin elementwise fshl/fshr (PR #153572)

2025-08-25 Thread Timm Baeder via cfe-commits
@@ -2817,6 +2817,82 @@ static bool interp__builtin_select(InterpState &S, CodePtr OpPC, return true; } +static bool interp__builtin_elementwise_fsh(InterpState &S, CodePtr OpPC, +const CallExpr *Call, +

[clang] [clang] fix TemplateName Subst* nodes transform (PR #155342)

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

[clang] 89ce871 - [clang] fix TemplateName Subst* nodes transform (#155342)

2025-08-25 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-08-26T00:08:41-03:00 New Revision: 89ce8718be80ead58ef5942d2d5052a528e79fee URL: https://github.com/llvm/llvm-project/commit/89ce8718be80ead58ef5942d2d5052a528e79fee DIFF: https://github.com/llvm/llvm-project/commit/89ce8718be80ead58ef5942d2d5052a528e79fee.dif

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-25 Thread Matheus Izvekov via cfe-commits
@@ -5254,153 +5253,297 @@ ASTContext::getPredefinedSugarType(PredefinedSugarType::Kind KD) const { return QualType(New, 0); } -#ifndef NDEBUG -static bool NeedsInjectedClassNameType(const RecordDecl *D) { - if (!isa(D)) return false; - const auto *RD = cast(D); - if (isa

[clang] [clang] fix uniquing of some TagTypes created from the injected class name (PR #155347)

2025-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This fixes a bug in the fast path for the creation of TagTypes from injected class names. The creation of TagTypes has a fast path which, when there is no elaboration, uses storage in the declaration it

[clang] [clang] fix uniquing of some TagTypes created from the injected class name (PR #155347)

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

[clang] [clang] fix uniquing of some TagTypes created from the injected class name (PR #155347)

2025-08-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/155347 This fixes a bug in the fast path for the creation of TagTypes from injected class names. The creation of TagTypes has a fast path which, when there is no elaboration, uses storage in the declaration itself f

[clang] [clang-format] Fix a bug in SkipMacroDefinitionBody (PR #154787)

2025-08-25 Thread via cfe-commits
owenca wrote: See #155346. https://github.com/llvm/llvm-project/pull/154787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Move AlignAfterOpenBracket tests (PR #154978)

2025-08-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-rhel` running on `ppc64le-clang-rhel-test` while building `clang` at step 6 "test-build-unified-tree-check-runtimes". Full details are available at: https://lab.llvm.org/buildbot/#/builders/145/builds/9321 Her

[clang] [Headers][X86] Use `__builtin_elementwise_ctlz` instead of avx512cd intrinsics. (PR #155089)

2025-08-25 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > > Convert _mm_lzcnt_epi32 etc. (inc mask/maskz variants) to use > > __builtin_elementwise_ctlz > > It's not obvious to me how the mask/maskz variants (e.g. > `_mm_maskz_lzcnt_epi32`) can be refactored to use > `__builtin_elementwise_ctlz`. > > Is it enough to replace this

[clang] [Headers][X86] Use `__builtin_elementwise_ctlz` instead of avx512cd intrinsics. (PR #155089)

2025-08-25 Thread Phoebe Wang via cfe-commits
@@ -42,35 +43,41 @@ __m512i test_mm512_maskz_conflict_epi32(__mmask16 __U, __m512i __A) { } __m512i test_mm512_lzcnt_epi32(__m512i __A) { // CHECK-LABEL: test_mm512_lzcnt_epi32 - // CHECK: call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %{{.*}}, i1 false) + // CHECK: call <16

[clang] [clang] fix TemplateName Subst* nodes transform (PR #155342)

2025-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This makes sure NestedNameSpecifierLocs don't apply to the replacement TemplateName of SubstTemplate* nodes. Also removes improper name qualification over these Subst Nodes, causing some canonical Templ

[clang] [clang] fix TemplateName Subst* nodes transform (PR #155342)

2025-08-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/155342 This makes sure NestedNameSpecifierLocs don't apply to the replacement TemplateName of SubstTemplate* nodes. Also removes improper name qualification over these Subst Nodes, causing some canonical TemplateNam

[clang] [RISCV] Refactor RVV builtin code generation for reduce compilation time [NFC] (PR #154906)

2025-08-25 Thread Kito Cheng via cfe-commits
https://github.com/kito-cheng closed https://github.com/llvm/llvm-project/pull/154906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9db7e8d - [RISCV] Refactor RVV builtin code generation for reduce compilation time [NFC] (#154906)

2025-08-25 Thread via cfe-commits
Author: Kito Cheng Date: 2025-08-26T08:57:11+08:00 New Revision: 9db7e8d070f2180c19564cd77f724b2732b489d0 URL: https://github.com/llvm/llvm-project/commit/9db7e8d070f2180c19564cd77f724b2732b489d0 DIFF: https://github.com/llvm/llvm-project/commit/9db7e8d070f2180c19564cd77f724b2732b489d0.diff LO

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-25 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @michaelrj-google > ``` >::sapi::v::IntBase v_type__(type__); > ``` > > which clang errors on. And that enum type, is that created by Sema, or is that synthesized by code from within your project? If you are creating that type as a canonical type, or that type is being c

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-25 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @aeubanks can you get us a reproducer? 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][bytecode] Reject dependent RequiresExprs (PR #155230)

2025-08-25 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Do you know which clause causes clang to choose to reject this, looks like we are the only one: https://godbolt.org/z/KhfeP5W6d CC @hokein looks like came in w/ bd4662cd3f374 https://github.com/llvm/llvm-project/pull/155230 _

[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-08-25 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/148914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-08-25 Thread Justin Stitt via cfe-commits
@@ -14308,6 +14455,12 @@ static QualType getCommonNonSugarTypeNode(const ASTContext &Ctx, const Type *X, getCommonTypeKeyword(NX, NY, /*IsSame=*/true), getCommonQualifier(Ctx, NX, NY, /*IsSame=*/true), NX->getIdentifier()); } + case Type::OverflowBehavior: {

[clang] [llvm] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows platforms (PR #138187)

2025-08-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/138187 >From 7e23666e3366101d635648faf95aaf7245643b4e Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 30 Apr 2025 16:32:32 -0700 Subject: [PATCH 1/7] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows pla

[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-08-25 Thread Justin Stitt via cfe-commits
@@ -11710,6 +11809,48 @@ QualType ASTContext::mergeTagDefinitions(QualType LHS, QualType RHS) { return Ctx.IsEquivalent(LHS, RHS) ? LHS : QualType{}; } +std::optional ASTContext::tryMergeOverflowBehaviorTypes( +QualType LHS, QualType RHS, bool OfBlockPointer, bool Unqua

[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-08-25 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt edited https://github.com/llvm/llvm-project/pull/148914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-08-25 Thread Justin Stitt via cfe-commits
@@ -5776,6 +5826,51 @@ QualType ASTContext::getBTFTagAttributedType(const BTFTypeTagAttr *BTFAttr, return QualType(Ty, 0); } +QualType ASTContext::getOverflowBehaviorType(const OverflowBehaviorAttr *Attr, + QualType Underlying) co

[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-08-25 Thread Justin Stitt via cfe-commits
@@ -2844,6 +2872,8 @@ inline T TypeLoc::getAsAdjusted() const { Cur = ATL.getModifiedLoc(); else if (auto ATL = Cur.getAs()) Cur = ATL.getWrappedLoc(); +// else if (auto ATL = Cur.getAs()) +// Cur = ATL.getWrappedLoc(); JustinStitt wro

[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-08-25 Thread Justin Stitt via cfe-commits
@@ -9120,6 +9191,8 @@ template const T *Type::getAsAdjusted() const { Ty = A->getModifiedType().getTypePtr(); else if (const auto *A = dyn_cast(Ty)) Ty = A->getWrappedType().getTypePtr(); +// else if (const auto *A = dyn_cast(Ty)) +// Ty = A->getWrap

[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-08-25 Thread Justin Stitt via cfe-commits
@@ -8976,7 +9043,7 @@ inline bool Type::isScalarType() const { isa(CanonicalType) || isa(CanonicalType) || isa(CanonicalType) || - isBitIntType(); + isa(CanonicalType) || isBitIntType(); JustinStitt wrote: fixed with

[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-08-25 Thread Justin Stitt via cfe-commits
@@ -8914,6 +8975,12 @@ inline bool Type::isIntegerType() const { return IsEnumDeclComplete(ET->getOriginalDecl()) && !IsEnumDeclScoped(ET->getOriginalDecl()); } + + if (isOverflowBehaviorType()) +return cast(CanonicalType) +->getUnderlyingType() +

[clang] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-08-25 Thread Justin Stitt via cfe-commits
@@ -6660,6 +6672,51 @@ class BTFTagAttributedType : public Type, public llvm::FoldingSetNode { } }; +class OverflowBehaviorType : public Type, public llvm::FoldingSetNode { +public: + enum OverflowBehaviorKind { Wrap, NoWrap }; + +private: + friend class ASTContext; // AS

[clang] [llvm] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows platforms (PR #138187)

2025-08-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/138187 >From 7e23666e3366101d635648faf95aaf7245643b4e Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 30 Apr 2025 16:32:32 -0700 Subject: [PATCH 1/6] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows pla

[clang] [HLSL] Codegen for indexing of sub-arrays of multi-dimensional resource arrays (PR #154248)

2025-08-25 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/154248 >From 75a7511da94a609d7b2c944d3719a60057f9fa53 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 14 Aug 2025 23:32:05 -0700 Subject: [PATCH 1/2] [HLSL] Codegen for indexing of sub-arrays of multi-dimensiona

[clang] [clang-tools-extra] [clang]: Support `analyzer_noreturn` attribute in `CFG` (PR #150952)

2025-08-25 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/150952 >From 417b4e465744f9a1d1704c87da4587626c9f5411 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Mon, 28 Jul 2025 16:23:21 +0300 Subject: [PATCH 1/2] Initial implementation --- .../bugprone/unchecked-optional

[clang-tools-extra] [clang-tidy][test] Make check_clang_tidy.py work with very long file paths (PR #155318)

2025-08-25 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > This is fine, but IMHO we should also rename the test to something shorter. > Long paths are a pain in explorer.exe and other places too. the test name is kinda long, but the thing that's actually failing is the generated file name inside the test [here](https://github.com/l

[clang] [llvm] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows platforms (PR #138187)

2025-08-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/138187 >From 7e23666e3366101d635648faf95aaf7245643b4e Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 30 Apr 2025 16:32:32 -0700 Subject: [PATCH 1/5] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows pla

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-25 Thread Brad King via cfe-commits
@@ -5254,153 +5253,297 @@ ASTContext::getPredefinedSugarType(PredefinedSugarType::Kind KD) const { return QualType(New, 0); } -#ifndef NDEBUG -static bool NeedsInjectedClassNameType(const RecordDecl *D) { - if (!isa(D)) return false; - const auto *RD = cast(D); - if (isa

[clang] [llvm] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows platforms (PR #138187)

2025-08-25 Thread Reid Kleckner via cfe-commits
rnk wrote: > What about LLVM_TOOL_LLVM_DRIVER_BUILD? Maybe consider enabling it by default > on non-Windows platforms? The driver build is great and useful, but for reasons discussed in the RFC, I don't think it makes a great default build configuration. It only solves the static linking scal

[clang] [llvm] [llvm] Enable LLVM_LINK_LLVM_DYLIB by default on non-Windows platforms (PR #138187)

2025-08-25 Thread Reid Kleckner via cfe-commits
@@ -20,7 +20,6 @@ target_link_libraries(CoreTests LLVMBOLTRewrite LLVMBOLTProfile LLVMBOLTUtils - LLVMTestingSupport ) rnk wrote: Will do https://github.com/llvm/llvm-project/pull/138187 ___ cfe-commits ma

[clang] [PAC] Fix codegen for polymorphic class variables with consteval constructors (PR #154858)

2025-08-25 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#155319 https://github.com/llvm/llvm-project/pull/154858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][test] Make check_clang_tidy.py work with very long file paths (PR #155318)

2025-08-25 Thread Nico Weber via cfe-commits
nico wrote: This is fine, but IMHO we should also rename the test to something shorter. Long paths are a pain in explorer.exe and other places too. https://github.com/llvm/llvm-project/pull/155318 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang-tools-extra] [clang-tidy][test] Make check_clang_tidy.py work with very long file paths (PR #155318)

2025-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Arthur Eubanks (aeubanks) Changes http://github.com/llvm/llvm-project/pull/95220 added a test with a very long file path, which can fail if run on Windows with a long directory path. On Windows, there are file path length limi

[clang-tools-extra] [clang-tidy][test] Make check_clang_tidy.py work with very long file paths (PR #155318)

2025-08-25 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/155318 http://github.com/llvm/llvm-project/pull/95220 added a test with a very long file path, which can fail if run on Windows with a long directory path. On Windows, there are file path length limits, which can be

[clang] [HLSL][RootSignature] Introduce `HLSLFrontendAction` to implement `rootsig-define` (PR #154639)

2025-08-25 Thread Deric C. via cfe-commits
@@ -7534,6 +7534,9 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { getContext().getCanonicalTagType(cast(D))); break; +// Will be handled by attached function + case Decl::HLSLRootSignature: +break; Icohedron wrote: super nit: ```s

[clang] [HLSL][RootSignature] Introduce `HLSLFrontendAction` to implement `rootsig-define` (PR #154639)

2025-08-25 Thread Deric C. via cfe-commits
https://github.com/Icohedron approved this pull request. Looks good https://github.com/llvm/llvm-project/pull/154639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Fix codegen for polymorphic class variables with consteval constructors (PR #154858)

2025-08-25 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: /cherry-pick e612f37f2c110987ec43f8aa4fe8e86d6f64186f https://github.com/llvm/llvm-project/pull/154858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] NFC: change more places to use Type::getAsTagDecl and friends (PR #155313)

2025-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Matheus Izvekov (mizvekov) Changes This changes a bunch of places which use getAs, including derived types, just to obtain the tag definition. This is preparation for #155028, offloading all the changes that PR used to int

[clang] [clang-tools-extra] [clang] NFC: change more places to use Type::getAsTagDecl and friends (PR #155313)

2025-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Matheus Izvekov (mizvekov) Changes This changes a bunch of places which use getAs, including derived types, just to obtain the tag definition. This is preparation for #155028, offloading all the changes that PR used to

[clang] [clang-tools-extra] [clang] NFC: change more places to use Type::getAsTagDecl and friends (PR #155313)

2025-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Matheus Izvekov (mizvekov) Changes This changes a bunch of places which use getAs, including derived types, just to obtain the tag definition. This is preparation for #155028, offloading all the changes that PR used to

[clang] [clang-tools-extra] [clang] NFC: change more places to use Type::getAsTagDecl and friends (PR #155313)

2025-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clangir Author: Matheus Izvekov (mizvekov) Changes This changes a bunch of places which use getAs, including derived types, just to obtain the tag definition. This is preparation for #155028, offloading a

[clang] [clang-tools-extra] [clang] NFC: change more places to use Type::getAsTagDecl and friends (PR #155313)

2025-08-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Matheus Izvekov (mizvekov) Changes This changes a bunch of places which use getAs, including derived types, just to obtain the tag definition. This is preparation for #155028, offloading all the changes that PR used to introduce

[clang] [HLSL] Add implicit binding attribute to resource arrays (PR #152452)

2025-08-25 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/152452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >