[clang] [llvm] [AArch64] Disable FEAT_RNG on Neoverse V2. (PR #166387)

2025-11-05 Thread David Green via cfe-commits
https://github.com/davemgreen commented: This should be left on. People can use -mcpu=neoverse-v2+norng if they don't have it. Lots of features can be disabled for many different reasons. If Grace doesn't have it then maybe that should apply just to Grace, and we split the configs into two? T

[clang] [Headers][X86] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow PALIGNR byte shift intrinsics to be used in constexpr (PR #162005)

2025-11-05 Thread Ye Tian via cfe-commits
https://github.com/TianYe717 updated https://github.com/llvm/llvm-project/pull/162005 >From 28819c6782e4d6b351b617460b79e4436cc2644a Mon Sep 17 00:00:00 2001 From: Ye Tian <[email protected]> Date: Sun, 2 Nov 2025 21:45:55 +0800 Subject: [PATCH 1/4] [Headers][X86] Improve PALIGNR helper: unify a

[clang] [AMDGPU] Modifies builtin def to take _Float16 for HIP/C++ and __fp16 for openCL (PR #166720)

2025-11-05 Thread Rana Pratap Reddy via cfe-commits
https://github.com/ranapratap55 created https://github.com/llvm/llvm-project/pull/166720 None >From 039276238f48949ab7254a05dbe851507ebf107c Mon Sep 17 00:00:00 2001 From: N Rana Pratap Reddy Date: Thu, 6 Nov 2025 12:10:50 +0530 Subject: [PATCH] [AMDGPU] Modifies builtin def to take _Float16 f

[clang-tools-extra] [clang-tidy] Rename `cert-flp30-c` to `bugprone-avoid-float-loop-counter` (PR #166571)

2025-11-05 Thread via cfe-commits
https://github.com/zeyi2 updated https://github.com/llvm/llvm-project/pull/166571 >From 7b24432b9ec88c5a5dd66fcc2179356ffb0a8db7 Mon Sep 17 00:00:00 2001 From: mtx Date: Wed, 5 Nov 2025 22:28:54 +0800 Subject: [PATCH 1/4] [clang-tidy] Rename `cert-flp30-c` to `bugprone-avoid-float-loop-counter

[clang-tools-extra] [clangd] Find better insertion locations in DefineOutline tweak (PR #128164)

2025-11-05 Thread Nathan Ridge via cfe-commits
@@ -470,10 +490,164 @@ TEST_F(DefineOutlineTest, InCppFile) { } } )cpp"}, + + // Criterion 1: Distance + { + R"cpp( +struct Foo { +void ignored1(); // Too far away +void ignored2(

[clang-tools-extra] [clangd] Find better insertion locations in DefineOutline tweak (PR #128164)

2025-11-05 Thread Nathan Ridge via cfe-commits
@@ -548,59 +601,193 @@ class DefineOutline : public Tweak { return std::move(*Effect); } - // Returns the most natural insertion point for \p QualifiedName in \p - // Contents. This currently cares about only the namespace proximity, but in - // feature it should also

[clang-tools-extra] [clangd] Find better insertion locations in DefineOutline tweak (PR #128164)

2025-11-05 Thread Nathan Ridge via cfe-commits
@@ -548,59 +601,193 @@ class DefineOutline : public Tweak { return std::move(*Effect); } - // Returns the most natural insertion point for \p QualifiedName in \p - // Contents. This currently cares about only the namespace proximity, but in - // feature it should also

[clang-tools-extra] [clangd] Find better insertion locations in DefineOutline tweak (PR #128164)

2025-11-05 Thread Nathan Ridge via cfe-commits
@@ -548,59 +601,193 @@ class DefineOutline : public Tweak { return std::move(*Effect); } - // Returns the most natural insertion point for \p QualifiedName in \p - // Contents. This currently cares about only the namespace proximity, but in - // feature it should also

[clang-tools-extra] [clangd] Find better insertion locations in DefineOutline tweak (PR #128164)

2025-11-05 Thread Nathan Ridge via cfe-commits
@@ -548,59 +601,193 @@ class DefineOutline : public Tweak { return std::move(*Effect); } - // Returns the most natural insertion point for \p QualifiedName in \p - // Contents. This currently cares about only the namespace proximity, but in - // feature it should also

[clang-tools-extra] [clangd] Find better insertion locations in DefineOutline tweak (PR #128164)

2025-11-05 Thread Nathan Ridge via cfe-commits
@@ -548,59 +601,193 @@ class DefineOutline : public Tweak { return std::move(*Effect); } - // Returns the most natural insertion point for \p QualifiedName in \p - // Contents. This currently cares about only the namespace proximity, but in - // feature it should also

[clang-tools-extra] [clangd] Find better insertion locations in DefineOutline tweak (PR #128164)

2025-11-05 Thread Nathan Ridge via cfe-commits
@@ -309,6 +309,9 @@ EligibleRegion getEligiblePoints(llvm::StringRef Code, llvm::StringRef FullyQualifiedName, const LangOptions &LangOpts); +std::string getNamespaceAtPosition(llvm::StringRef Code, const Positi

[clang-tools-extra] [clangd] Find better insertion locations in DefineOutline tweak (PR #128164)

2025-11-05 Thread Nathan Ridge via cfe-commits
@@ -548,59 +601,193 @@ class DefineOutline : public Tweak { return std::move(*Effect); } - // Returns the most natural insertion point for \p QualifiedName in \p - // Contents. This currently cares about only the namespace proximity, but in - // feature it should also

[clang-tools-extra] [clangd] Find better insertion locations in DefineOutline tweak (PR #128164)

2025-11-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Thanks for working on this nice improvement, and once again apologies for the long turnaround time on this review. https://github.com/llvm/llvm-project/pull/128164 ___ cfe-commi

[clang-tools-extra] [clangd] Find better insertion locations in DefineOutline tweak (PR #128164)

2025-11-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/128164 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename `cert-flp30-c` to `bugprone-avoid-float-loop-counter` (PR #166571)

2025-11-05 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook approved this pull request. https://github.com/llvm/llvm-project/pull/166571 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename `cert-flp30-c` to `bugprone-avoid-float-loop-counter` (PR #166571)

2025-11-05 Thread Victor Chernyakin via cfe-commits
@@ -3,8 +3,9 @@ cert-flp30-c -This check flags ``for`` loops where the induction expression has a -floating-point type. +The `cert-flp30-c` check is an aliaes, please see localspook wrote: ```suggestion The `cert-flp30-c` check is an alias, pleas

[clang] [X86][Clang] Allow constexpr evaluation of F16C CVTPS2PH intrinsics (PR #162295)

2025-11-05 Thread Eric Xu via cfe-commits
ericxu233 wrote: > I just meant the AVX512F/VL variants vcvtps2ph_mask / vcvtps2ph256_mask / > __builtin_ia32_vcvtps2ph512_mask - those should just require additional > handling for the getNumArgs() == 4 masked variant. > > But I'm happy for this just to focus on the F16C cases if you prefer t

[clang] [clang] Remove redundant declarations (NFC) (PR #166711)

2025-11-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes In C++17, static constexpr members are implicitly inline, so they no longer require an out-of-line definition. Identified with readability-redundant-declaration. --- Full diff: https://github.com/llvm

[clang] [clang] Remove redundant declarations (NFC) (PR #166711)

2025-11-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/166711 In C++17, static constexpr members are implicitly inline, so they no longer require an out-of-line definition. Identified with readability-redundant-declaration. >From 59c55943831637e2da8fc6aafa9b2d5689

[clang] [Clang] Use ExtWarn for static local variable in extern inline function (fixes #39524) (PR #166332)

2025-11-05 Thread V S Susi Krishna via cfe-commits
https://github.com/Susikrishna updated https://github.com/llvm/llvm-project/pull/166332 >From 16414b96e0ca5ee44b0332bc387ecbd0046eacd4 Mon Sep 17 00:00:00 2001 From: Susikrishna Date: Tue, 4 Nov 2025 12:49:38 +0530 Subject: [PATCH 1/6] [Clang] Use ExtWarn for static local variable in extern in

[clang] [clang] [Serialization] No transitive change for MacroID and PreprocessedEntityID (PR #166346)

2025-11-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Also, can you please compile real-world modules (e.g. libc++) and show how > this affects the PCM size? In my simple test, it didn't affect the PCM size. It makes sense in the theory too. Since on the one hand, the number of MacroID and PreprocessedEntityID is much less th

[clang] [clang] [Serialization] No transitive change for MacroID and PreprocessedEntityID (PR #166346)

2025-11-05 Thread Chuanqi Xu via cfe-commits
@@ -151,14 +151,14 @@ struct UnsafeQualTypeDenseMapInfo { }; /// An ID number that refers to a macro in an AST file. -using MacroID = uint32_t; +using MacroID = uint64_t; ChuanqiXu9 wrote: Previously I did this for DeclID and TypeIdx since they are used most.

[clang] [Headers][X86] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow PALIGNR byte shift intrinsics to be used in constexpr (PR #162005)

2025-11-05 Thread Ye Tian via cfe-commits
https://github.com/TianYe717 updated https://github.com/llvm/llvm-project/pull/162005 >From 28819c6782e4d6b351b617460b79e4436cc2644a Mon Sep 17 00:00:00 2001 From: Ye Tian <[email protected]> Date: Sun, 2 Nov 2025 21:45:55 +0800 Subject: [PATCH 1/3] [Headers][X86] Improve PALIGNR helper: unify a

[clang] [clang] [Serialization] No transitive change for MacroID and PreprocessedEntityID (PR #166346)

2025-11-05 Thread Chuanqi Xu via cfe-commits
@@ -8956,7 +8948,7 @@ LLVM_DUMP_METHOD void ASTReader::dump() { llvm::errs() << "*** PCH/ModuleFile Remappings:\n"; dumpModuleIDMap("Global bit offset map", GlobalBitOffsetsMap); dumpModuleIDMap("Global source location entry map", GlobalSLocEntryMap); - dumpModuleIDMap("

[clang] [clang] [Serialization] No transitive change for MacroID and PreprocessedEntityID (PR #166346)

2025-11-05 Thread Chuanqi Xu via cfe-commits
@@ -9748,36 +9755,40 @@ MacroInfo *ASTReader::getMacro(MacroID ID) { return nullptr; } - ID -= NUM_PREDEF_MACRO_IDS; - if (!MacrosLoaded[ID]) { -GlobalMacroMapType::iterator I - = GlobalMacroMap.find(ID + NUM_PREDEF_MACRO_IDS); -assert(I != GlobalMacroMap.

[clang] [clang] [Serialization] No transitive change for MacroID and PreprocessedEntityID (PR #166346)

2025-11-05 Thread Chuanqi Xu via cfe-commits
@@ -6718,11 +6698,23 @@ SourceRange ASTReader::ReadSkippedRange(unsigned GlobalIndex) { return Range; } +unsigned +ASTReader::translatePreprocessedEntityIDToIndex(PreprocessedEntityID ID) const { + unsigned ModuleFileIndex = ID >> 32; + assert(ModuleFileIndex && "not tra

[clang] [clang] [Serialization] No transitive change for MacroID and PreprocessedEntityID (PR #166346)

2025-11-05 Thread Chuanqi Xu via cfe-commits
@@ -2261,16 +2262,22 @@ MacroInfo *ASTReader::ReadMacroRecord(ModuleFile &F, uint64_t Offset) { PreprocessedEntityID ASTReader::getGlobalPreprocessedEntityID(ModuleFile &M, - unsigned LocalID) const { +

[clang] [clang] [Serialization] No transitive change for MacroID and PreprocessedEntityID (PR #166346)

2025-11-05 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/166346 >From 09f3de8c2f1b3cef99a6834d1df0674b48b95511 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 4 Nov 2025 17:41:04 +0800 Subject: [PATCH] [clang] [Serialization] No transitive change for MacroID and Pre

[clang] [llvm] [RegisterCoalescer] Improve register allocation for return values by limiting rematerialization (PR #163047)

2025-11-05 Thread guan jian via cfe-commits
rez5427 wrote: I think register coalescer is pretty much the same thing as gcc's early_remat. The llvm's register coalescer decide to remat this, because the return register is been used. And gcc's early_remat decide not to remat this. I put part of the gcc's log in here: cast_and_load_1.c.31

[clang-tools-extra] [clang-tidy] Rename `cert-flp30-c` to `bugprone-avoid-float-loop-counter` (PR #166571)

2025-11-05 Thread via cfe-commits
https://github.com/zeyi2 updated https://github.com/llvm/llvm-project/pull/166571 >From 7b24432b9ec88c5a5dd66fcc2179356ffb0a8db7 Mon Sep 17 00:00:00 2001 From: mtx Date: Wed, 5 Nov 2025 22:28:54 +0800 Subject: [PATCH 1/3] [clang-tidy] Rename `cert-flp30-c` to `bugprone-avoid-float-loop-counter

[clang] [clang] Unify -mspeculative-load-hardening as a benign compiler option (PR #166640)

2025-11-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/166640 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e700f15 - [clang] Unify -mspeculative-load-hardening as a benign compiler option (#166640)

2025-11-05 Thread via cfe-commits
Author: Cyndy Ishida Date: 2025-11-05T20:38:09-08:00 New Revision: e700f157026bf8b4d58f936c5db8f152e269d77f URL: https://github.com/llvm/llvm-project/commit/e700f157026bf8b4d58f936c5db8f152e269d77f DIFF: https://github.com/llvm/llvm-project/commit/e700f157026bf8b4d58f936c5db8f152e269d77f.diff

[clang] [CUDA] Add device-side kernel launch support (PR #165519)

2025-11-05 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/165519 >From d1ca8b3a8868e3197685966f7b110332366e3d27 Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Sat, 18 Oct 2025 19:46:39 -0400 Subject: [PATCH] [CUDA] Add device-side kernel launch support - CUDA's dynamic p

[clang] [llvm] [GlobalOpt] Add TTI interface useFastCCForInternalCall for FASTCC (PR #164768)

2025-11-05 Thread Craig Topper via cfe-commits
topperc wrote: > 2 only happens when users use __attribute__((target(""))), but user > cannot use a if it doesn't exist at all. As long as we define a new > fastcc implementation together when defining the new feature, there won't be > a problem. It can also happen in LTO if differen

[clang] [LifetimeSafety] Detect use-after-return (PR #165370)

2025-11-05 Thread Utkarsh Saxena via cfe-commits
@@ -396,6 +396,118 @@ void loan_from_previous_iteration(MyObj safe, bool condition) { } // expected-note {{destroyed here}} } +//===--===// +// Basic Definite Use-After-Return (Return-Stack-Addr

[clang] [LifetimeSafety] Detect use-after-return (PR #165370)

2025-11-05 Thread Utkarsh Saxena via cfe-commits
@@ -1202,5 +1202,242 @@ TEST_F(LifetimeAnalysisTest, LivenessOutsideLoop) { EXPECT_THAT(Origins({"p"}), MaybeLiveAt("p1")); } +TEST_F(LifetimeAnalysisTest, SimpleReturnStackAddress) { + SetupTest(R"( +MyObj* target() { + MyObj s; + MyObj* p = &s; + POINT(

[clang] [LifetimeSafety] Detect use-after-return (PR #165370)

2025-11-05 Thread Utkarsh Saxena via cfe-commits
@@ -396,6 +396,118 @@ void loan_from_previous_iteration(MyObj safe, bool condition) { } // expected-note {{destroyed here}} } +//===--===// +// Basic Definite Use-After-Return (Return-Stack-Addr

[clang] [LifetimeSafety] Detect use-after-return (PR #165370)

2025-11-05 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 commented: Took an initial cursory look. Will look again soon. https://github.com/llvm/llvm-project/pull/165370 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Detect use-after-return (PR #165370)

2025-11-05 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/165370 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Enable TLSDESC by default (PR #166540)

2025-11-05 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: > I was under the impression glibc doesn't even support this yet. Patches were > posted but they didn't land as of when I last checked a few months ago. Oops, I just checked that, you are right. We need to wait for that. https://github.com/llvm/llvm-project/pull/166540 ___

[clang] [llvm] [RISCV] Enable TLSDESC by default (PR #166540)

2025-11-05 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp converted_to_draft https://github.com/llvm/llvm-project/pull/166540 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Set __GCC_CONSTRUCTIVE_SIZE/__GCC_DESTRUCTIVE_SIZE to 64 for riscv64 (PR #162986)

2025-11-05 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: > Reverse ping - I'd like to see this move forward. I don't know if we have a consensus about the value here, is it OK to set values to 64 for both RV32 and RV64? https://github.com/llvm/llvm-project/pull/162986 ___ cfe-commits maili

[clang] [clang][Sema] Add fortify warnings for `unistd.h` (PR #161737)

2025-11-05 Thread Colin Kinloch via cfe-commits
https://github.com/ColinKinloch updated https://github.com/llvm/llvm-project/pull/161737 >From 98912f07d2b6f3a1d8c79d2e38407dc1d9ba2905 Mon Sep 17 00:00:00 2001 From: Colin Kinloch Date: Thu, 2 Oct 2025 22:01:40 +0100 Subject: [PATCH 1/7] [clang][Sema] Add fortify warnings for `unistd.h` Defin

[clang] [compiler-rt] [llvm] [InstrProf] Fix frontend generated function hash (PR #165358)

2025-11-05 Thread Stephen Senran Zhang via cfe-commits
zsrkmyn wrote: @ellishg @evodius96 All check has passed now. Could you help merge it? many thanks! https://github.com/llvm/llvm-project/pull/165358 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [CMake][Fuchsia] Build libclang_rt.builtins for arm-fuchsia (PR #166686)

2025-11-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Roland McGrath (frobtech) Changes No other runtimes can yet be built for the arm-fuchsia target, but this one can be. There is no OS-specific code in the arm builtins needed for Fuchsia. --- Full diff: https://github.com/llvm/llvm-projec

[clang] [CMake][Fuchsia] Build libclang_rt.builtins for arm-fuchsia (PR #166686)

2025-11-05 Thread Roland McGrath via cfe-commits
https://github.com/frobtech ready_for_review https://github.com/llvm/llvm-project/pull/166686 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][Fuchsia] Build libclang_rt.builtins for arm-fuchsia (PR #166686)

2025-11-05 Thread Roland McGrath via cfe-commits
https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/166686 No other runtimes can yet be built for the arm-fuchsia target, but this one can be. There is no OS-specific code in the arm builtins needed for Fuchsia. >From b06c985167de498a18f1363c0c49dd55c180d022 Mon Sep

[clang-tools-extra] [clang-doc] remove indentation for preformatted text (PR #166672)

2025-11-05 Thread Erick Velez via cfe-commits
evelez7 wrote: > do you have an example where its wrong in that case? It's fixed there. See this link where you can see the indentation for all the classes in the global namespace. https://erickvelez.com/clang-doc-mustache-output/pr164314/ https://github.com/llvm/llvm-project/pull/166672

[clang-tools-extra] [clang-doc] remove indentation for preformatted text (PR #166672)

2025-11-05 Thread Paul Kirth via cfe-commits
ilovepi wrote: > See https://erickvelez.com/clang-doc-mustache-output/pr166672/ for display > diff. The doc entities in the namespace page are no longer indented. What am I supposed to be looking at that is wrong? Are you saying there is extra indentation? The page looks OK to me. Or is that a

[clang] [Clang][Sema] Allow counted_by on void* as GNU extension (PR #164737)

2025-11-05 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna edited https://github.com/llvm/llvm-project/pull/164737 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Assertion failure with coroutine body (PR #165650)

2025-11-05 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/165650 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fix false-positive lambda shadow diagnostics in explicit object member functions (PR #165919)

2025-11-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/165919 >From 2b9ad0f1609fa7926448451750eccfcfa080b520 Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Fri, 31 Oct 2025 22:54:53 +0200 Subject: [PATCH 1/3] [Clang] fix false-positive lambda shadow diagnostics

[clang] [Clang] fix confusing diagnostics for lambdas with init-captures inside braced initializers (PR #166180)

2025-11-05 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/166180 >From b97e99f73cddc4ca5c525dbd9e781679902adaec Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 3 Nov 2025 17:21:38 +0200 Subject: [PATCH 1/2] [Clang] fix confusing diagnostics for lambdas with i

[clang-tools-extra] [clang-doc] remove FullName from serialization (PR #166595)

2025-11-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. Surprised this is dead. I thought the HTML still used it, but if tests are passing, then its probably OK. https://github.com/llvm/llvm-project/pull/166595 ___ cfe-commits mailing list cfe-commits@

[clang] [Clang][Sema] Allow counted_by on void* as GNU extension (PR #164737)

2025-11-05 Thread Yeoul Na via cfe-commits
@@ -272,6 +286,11 @@ GetCountedByAttrOnIncompletePointee(QualType Ty, NamedDecl **ND) { if (!PointeeTy->isIncompleteType(ND)) return {}; + // If counted_by is on void*, it was already validated at declaration time + // as a GNU extension. No need to re-check GNU mode

[clang] [clang][sema] Add nonnull attribute to builtin format functions (PR #160988)

2025-11-05 Thread Nikolas Klauser via cfe-commits
Radovan =?utf-8?q?Božić?= , Radovan =?utf-8?q?Božić?= , Radovan =?utf-8?q?Božić?= Message-ID: In-Reply-To: philnik777 wrote: > I believe it is intentionally not defined. It's relying on `CHECK_FILE` which > is defined as: > > ``` > #ifdef IO_DEBUG > # define CHECK_FILE(FILE, RET) do {

[clang] [CIR] Upstream overflow builtins (PR #166643)

2025-11-05 Thread Henrich Lauko via cfe-commits
@@ -58,6 +58,52 @@ static RValue emitBuiltinBitOp(CIRGenFunction &cgf, const CallExpr *e, return RValue::get(result); } +namespace { +struct WidthAndSignedness { + unsigned Width; + bool Signed; +}; +} // namespace + +static WidthAndSignedness +getIntegerWidthAndSignednes

[clang] [CIR] Upstream overflow builtins (PR #166643)

2025-11-05 Thread Henrich Lauko via cfe-commits
@@ -2503,6 +2503,118 @@ mlir::LogicalResult CIRToLLVMCmpOpLowering::matchAndRewrite( return cmpOp.emitError() << "unsupported type for CmpOp: " << type; } +mlir::LogicalResult CIRToLLVMBinOpOverflowOpLowering::matchAndRewrite( +cir::BinOpOverflowOp op, OpAdaptor adaptor

[clang] [CIR] Upstream overflow builtins (PR #166643)

2025-11-05 Thread Henrich Lauko via cfe-commits
xlauko wrote: Update to follow test structure of other CIR tests: - add LLVM check of expected LLVM - add OGCG checks of expected llvm output of original codegen that should match through CIR produced LLVM https://github.com/llvm/llvm-project/pull/166643 _

[clang] [CIR] Upstream overflow builtins (PR #166643)

2025-11-05 Thread Henrich Lauko via cfe-commits
@@ -58,6 +58,52 @@ static RValue emitBuiltinBitOp(CIRGenFunction &cgf, const CallExpr *e, return RValue::get(result); } +namespace { +struct WidthAndSignedness { + unsigned Width; + bool Signed; +}; +} // namespace + +static WidthAndSignedness +getIntegerWidthAndSignednes

[clang] [CIR] Upstream overflow builtins (PR #166643)

2025-11-05 Thread Henrich Lauko via cfe-commits
@@ -2503,6 +2503,118 @@ mlir::LogicalResult CIRToLLVMCmpOpLowering::matchAndRewrite( return cmpOp.emitError() << "unsupported type for CmpOp: " << type; } +mlir::LogicalResult CIRToLLVMBinOpOverflowOpLowering::matchAndRewrite( +cir::BinOpOverflowOp op, OpAdaptor adaptor

[clang] [llvm] [clang] Add regalloc PBQP for all targets in clang (PR #166645)

2025-11-05 Thread Ivan Shumakov via cfe-commits
Zararest wrote: @lhames could you, please, review these changes or give a hint who I should tag (My tag is based on a mention in the llvm discussion from the first comment of this PR) https://github.com/llvm/llvm-project/pull/166645 ___ cfe-commits ma

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-05 Thread Amr Hesham via cfe-commits
@@ -382,5 +410,279 @@ void CIRGenFunction::exitCXXTryStmt(const CXXTryStmt &s, bool isFnTryBlock) { return; } - cgm.errorNYI("exitCXXTryStmt: Required catch"); + // Emit the structure of the EH dispatch for this catch. + emitCatchDispatchBlock(*this, catchScope, tryO

[clang] [CIR] Upstream overflow builtins (PR #166643)

2025-11-05 Thread via cfe-commits
https://github.com/adams381 edited https://github.com/llvm/llvm-project/pull/166643 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] enable Wconversion by default for HLSL (PR #166617)

2025-11-05 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/166617 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] Reland [MS][clang] Add support for vector deleting destructors (PR #165598)

2025-11-05 Thread Eli Friedman via cfe-commits
@@ -8281,3 +8281,53 @@ void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx); } + +bool CodeGenModule::classNeedsVectorDestructor(const CXXRecordDecl *RD) { + if (!Context.getTargetInfo().emitVectorDe

[clang] [HLSL] enable Wconversion by default for HLSL (PR #166617)

2025-11-05 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/166617 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] Reland [MS][clang] Add support for vector deleting destructors (PR #165598)

2025-11-05 Thread Eli Friedman via cfe-commits
@@ -8281,3 +8281,53 @@ void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx); } + +bool CodeGenModule::classNeedsVectorDestructor(const CXXRecordDecl *RD) { + if (!Context.getTargetInfo().emitVectorDe

[clang] [lldb] Reland [MS][clang] Add support for vector deleting destructors (PR #165598)

2025-11-05 Thread Eli Friedman via cfe-commits
@@ -150,7 +150,7 @@ class VTableComponent { bool isRTTIKind() const { return isRTTIKind(getKind()); } - GlobalDecl getGlobalDecl() const { + GlobalDecl getGlobalDecl(bool HasVectorDeletingDtors) const { efriedma-quic wrote: Oh, I see. I guess this is ok

[clang] [lldb] Reland [MS][clang] Add support for vector deleting destructors (PR #165598)

2025-11-05 Thread Eli Friedman via cfe-commits
@@ -3146,7 +3198,8 @@ bool CXXDestructorDecl::isCalledByDelete(const FunctionDecl *OpDel) const { // delete operator, as that destructor is never called, unless the // destructor is virtual (see [expr.delete]p8.1) because then the // selected operator depends on the dyna

[clang] [lldb] Reland [MS][clang] Add support for vector deleting destructors (PR #165598)

2025-11-05 Thread Eli Friedman via cfe-commits
@@ -1206,6 +1206,9 @@ void CodeGenFunction::EmitNewArrayInitializer( EmitCXXAggrConstructorCall(Ctor, NumElements, CurPtr, CCE, /*NewPointerIsChecked*/true, CCE->requiresZeroInitialization()); +if (CGM.getCon

[clang] [lldb] Reland [MS][clang] Add support for vector deleting destructors (PR #165598)

2025-11-05 Thread Eli Friedman via cfe-commits
@@ -370,6 +370,18 @@ class ASTContext : public RefCountedBase { mutable llvm::DenseSet DestroyingOperatorDeletes; mutable llvm::DenseSet TypeAwareOperatorNewAndDeletes; + /// Global and array operators delete are only required for MSVC deleting + /// destructors support.

[clang] [llvm] [clang] Add regalloc PBQP for all targets in clang (PR #166645)

2025-11-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ivan Shumakov (Zararest) Changes There is an issue with using PBQP register allocator in clang that doesn't have AArch64 target: https://groups.google.com/g/llvm-dev/c/ZIvatINBENo This change links PBQP regalloc to all LLVM targets. ---

[clang] [llvm] [clang] Add regalloc PBQP for all targets in clang (PR #166645)

2025-11-05 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] [llvm] [clang] Add regalloc PBQP for all targets in clang (PR #166645)

2025-11-05 Thread Ivan Shumakov via cfe-commits
https://github.com/Zararest created https://github.com/llvm/llvm-project/pull/166645 There is an issue with using PBQP register allocator in clang that doesn't have AArch64 target: https://groups.google.com/g/llvm-dev/c/ZIvatINBENo This change links PBQP regalloc to all LLVM targets. >From ae

[clang] [clang] Unify -mspeculative-load-hardening as a benign compiler option (PR #166640)

2025-11-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. https://github.com/llvm/llvm-project/pull/166640 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream overflow builtins (PR #166643)

2025-11-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: None (adams381) Changes This implements the builtins that handle overflow. --- Patch is 37.73 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/166643.diff 5 Files A

[clang] [CIR] Upstream overflow builtins (PR #166643)

2025-11-05 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] [CIR] Upstream overflow builtins (PR #166643)

2025-11-05 Thread via cfe-commits
https://github.com/adams381 created https://github.com/llvm/llvm-project/pull/166643 This implements the builtins that handle overflow. >From 7abb2167def4dfceeb96c4b231a94fd8308c6e08 Mon Sep 17 00:00:00 2001 From: Adam Smith Date: Wed, 5 Nov 2025 13:04:40 -0800 Subject: [PATCH] [CIR] Upstream

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-05 Thread Amr Hesham via cfe-commits
@@ -382,5 +410,279 @@ void CIRGenFunction::exitCXXTryStmt(const CXXTryStmt &s, bool isFnTryBlock) { return; } - cgm.errorNYI("exitCXXTryStmt: Required catch"); + // Emit the structure of the EH dispatch for this catch. + emitCatchDispatchBlock(*this, catchScope, tryO

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-05 Thread Amr Hesham via cfe-commits
@@ -382,5 +410,279 @@ void CIRGenFunction::exitCXXTryStmt(const CXXTryStmt &s, bool isFnTryBlock) { return; } - cgm.errorNYI("exitCXXTryStmt: Required catch"); + // Emit the structure of the EH dispatch for this catch. + emitCatchDispatchBlock(*this, catchScope, tryO

[clang] [clang][DependencyScanning] Implementation of `CompilerInstanceWithContext` to Improve By-Name Queries (PR #164345)

2025-11-05 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/164345 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

2025-11-05 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,110 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s arsenm wrote: This is failing on the broken v-to-s copy for the asm input. I think

[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

2025-11-05 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,85 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s + +define i32 @bcnt032_not_for_vregs(i32 %val0) { +; CHECK-LABEL: bcnt032_not_for_vregs: +; CHECK:

[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

2025-11-05 Thread Matt Arsenault via cfe-commits
@@ -264,7 +264,9 @@ def S_BREV_B64 : SOP1_64 <"s_brev_b64", } // End isReMaterializable = 1, isAsCheapAsAMove = 1 let Defs = [SCC] in { -def S_BCNT0_I32_B32 : SOP1_32 <"s_bcnt0_i32_b32">; +def S_BCNT0_I32_B32 : SOP1_32 <"s_bcnt0_i32_b32", + [(set i32:$sdst, (UniformBinFrag 32

[clang] [clang] Unify -mspeculative-load-hardening as a benign compiler option (PR #166640)

2025-11-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes Before this patch, compilations using modules & `-mspeculative-load-hardening` failed because it was not consistent whether this option impacts module compatibility. This repairs it by always treating it

[clang] [clang] Unify -mspeculative-load-hardening as a benign compiler option (PR #166640)

2025-11-05 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/166640 Before this patch, compilations using modules & `-mspeculative-load-hardening` failed because it was not consistent whether this option impacts module compatibility. This repairs it by always treating it as

[clang] [clang]Correctly handle negative line changes in PrintPreprocessedOutput::MoveToLine (PR #166631)

2025-11-05 Thread Sergej Salnikov via cfe-commits
https://github.com/SergejSalnikov edited https://github.com/llvm/llvm-project/pull/166631 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang]Correctly handle negative line changes in `MoveToLine` (PR #166631)

2025-11-05 Thread Sergej Salnikov via cfe-commits
https://github.com/SergejSalnikov edited https://github.com/llvm/llvm-project/pull/166631 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [Clang][LLDB] Refactor trap reason demangling out of LLDB and into Clang (PR #165996)

2025-11-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-test-suite` running on `ppc64le-clang-test-suite` while building `clang,lldb` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/build

[clang] Correctly handle negative line changes (PR #166631)

2025-11-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sergej Salnikov (SergejSalnikov) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/166631.diff 1 Files Affected: - (modified) clang/lib/Frontend/PrintPreprocessedOutput.cpp (+1-1) ``diff diff --git a/clang/lib

[clang] Correctly handle negative line changes (PR #166631)

2025-11-05 Thread Sergej Salnikov via cfe-commits
https://github.com/SergejSalnikov created https://github.com/llvm/llvm-project/pull/166631 None >From a53cdabdd7fcf83c2377cf78f2848c1f795c7b2c Mon Sep 17 00:00:00 2001 From: Sergej Salnikov Date: Wed, 5 Nov 2025 21:25:04 +0100 Subject: [PATCH] Correctly handle negative line changes --- clang

[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

2025-11-05 Thread Patrick Simmons via cfe-commits
linuxrocks123 wrote: @arsenm okay, comments dealt with. If you'd like to preserve the global isel error, I should revert or partially revert the last commit. Otherwise, LGTM? https://github.com/llvm/llvm-project/pull/164847 ___ cfe-commits mailing l

[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

2025-11-05 Thread Patrick Simmons via cfe-commits
https://github.com/linuxrocks123 updated https://github.com/llvm/llvm-project/pull/164847 >From 96825875e1c8bad9a9b3b28fe943a5469f94c575 Mon Sep 17 00:00:00 2001 From: Patrick Simmons Date: Thu, 23 Oct 2025 11:50:32 -0500 Subject: [PATCH 01/13] Initial work --- clang/include/clang/Basic/Built

[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

2025-11-05 Thread Patrick Simmons via cfe-commits
@@ -0,0 +1,96 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s + +define amdgpu_ps i32 @bcnt032_not_for_vregs(i64 %val) { +; CHECK-LABEL: bcnt032_not_for_vregs: +;

[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

2025-11-05 Thread Patrick Simmons via cfe-commits
@@ -0,0 +1,96 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s + +define amdgpu_ps i32 @bcnt032_not_for_vregs(i64 %val) { linuxrocks123 wrote: Don

[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

2025-11-05 Thread Patrick Simmons via cfe-commits
@@ -0,0 +1,110 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s linuxrocks123 wrote: @arsenm ```LLVM ERROR: unable to map instruction: %8:sreg_32

[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

2025-11-05 Thread Patrick Simmons via cfe-commits
@@ -0,0 +1,96 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s + +define amdgpu_ps i32 @bcnt032_not_for_vregs(i64 %val) { linuxrocks123 wrote: Don

[clang] [llvm] [X86][AVX512] rematerialize smaller predicate masks (PR #166178)

2025-11-05 Thread Ahmed Nour via cfe-commits
https://github.com/ahmednoursphinx updated https://github.com/llvm/llvm-project/pull/166178 >From 3cdf74e3eee0e206a3588acb1b4e53fd66eb9517 Mon Sep 17 00:00:00 2001 From: ahmed Date: Mon, 3 Nov 2025 17:16:29 +0200 Subject: [PATCH 01/10] fix: rematerialize smaller predicate masks --- llvm/lib/T

[clang] [llvm] [X86][AVX512] rematerialize smaller predicate masks (PR #166178)

2025-11-05 Thread Ahmed Nour via cfe-commits
https://github.com/ahmednoursphinx updated https://github.com/llvm/llvm-project/pull/166178 >From 3cdf74e3eee0e206a3588acb1b4e53fd66eb9517 Mon Sep 17 00:00:00 2001 From: ahmed Date: Mon, 3 Nov 2025 17:16:29 +0200 Subject: [PATCH 1/9] fix: rematerialize smaller predicate masks --- llvm/lib/Tar

  1   2   3   4   >