[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-18 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: I am kind of confused now. So the situation here is that RVIOS has already implemented these vendor extensions in cores and RVIOS is also trying to make these extensions official RVI standards, right? https://github.com/llvm/llvm-project/pull/127694 ___

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I notice that there are four fields in the Symbol struct that are only > relevant for symbols indexed for completion. Presumably these would be > candidates for such an extension block? I think that depends on what proportion of symbols are indexed for completion. I wa

[clang-tools-extra] [clangd] Avoid round-trip from SourceLocation to clangd::Range and back in SymbolCollector::handleMacros() (PR #127757)

2025-02-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Noticed this while looking at https://github.com/llvm/llvm-project/issues/120175. The range information originates as a `CharSourceRange` in `MacroOccurrence::toRange()`, then it's converted to `clangd::Range` using `halfOpenToRange()`. Then we convert it back to a `Sour

[clang] [clang] fix use after free in clang/tools/c-index-test/c-index-test.c (PR #127063)

2025-02-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-ppc64le-linux` running on `ppc64le-sanitizer` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/8367 Here is the relevant piece of the bu

[clang] [clang][bytecode] Fix three-way unordered non-pointer comparisions (PR #127759)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This _can_ happen with non-pointers, but we shouldn't diagnose it in that case. --- Full diff: https://github.com/llvm/llvm-project/pull/127759.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/In

[clang] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-18 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem created https://github.com/llvm/llvm-project/pull/127653 Parameters to a coroutine get copied (moved) to coroutine-local instances which code inside the coroutine then uses. The original parameters should not be part of the frame. Normally CoroSplit figures that out

[clang] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines Author: Hans Wennborg (zmodem) Changes Parameters to a coroutine get copied (moved) to coroutine-local instances which code inside the coroutine then uses. The original parameters should not be part of the frame. Normally CoroSplit figures

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-18 Thread Baranov Victor via cfe-commits
vbvictor wrote: > 1. Please place value check in ast matcher part, match all integer will cost > lots of cpu and ram to store temporary results. Code in _clang-tools-extra\clang-tidy\bugprone\StringConstructorCheck.cpp_ maybe helpful since it shows work with numbers and have matcher `isBiggerT

[clang] [clang] Lower non-builtin sincos[f|l] calls to llvm.sincos.* when -fno-math-errno is set (PR #121763)

2025-02-18 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/121763 >From 42b096396f36adc6f1ad34de263a80dd7e4e0960 Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Mon, 6 Jan 2025 11:49:48 + Subject: [PATCH 1/5] [clang] Lower non-builtin sincos[f|l] calls to llvm.sincos

[clang] [llvm] Template as type (PR #127654)

2025-02-18 Thread via cfe-commits
https://github.com/ykhatav created https://github.com/llvm/llvm-project/pull/127654 None >From 2714184615ef06027941c7bccee3a2453d76c24b Mon Sep 17 00:00:00 2001 From: "Khatavkar, Yashasvi" Date: Tue, 18 Feb 2025 06:44:49 -0800 Subject: [PATCH 1/2] Support template as type --- clang/include/c

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-18 Thread Brandon Wu via cfe-commits
@@ -385,23 +580,50 @@ ABIArgInfo RISCVABIInfo::coerceVLSVector(QualType Ty) const { NumElts *= 8; break; default: -assert(VT->getVectorKind() == VectorKind::RVVFixedLengthData && +assert((VT->getVectorKind() == VectorKind::Generic || +VT->getVecto

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-18 Thread Brandon Wu via cfe-commits
@@ -385,23 +580,50 @@ ABIArgInfo RISCVABIInfo::coerceVLSVector(QualType Ty) const { NumElts *= 8; break; default: -assert(VT->getVectorKind() == VectorKind::RVVFixedLengthData && +assert((VT->getVectorKind() == VectorKind::Generic || +VT->getVecto

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-18 Thread Tarun Prabhu via cfe-commits
@@ -957,6 +957,32 @@ static bool parseDialectArgs(CompilerInvocation &res, llvm::opt::ArgList &args, clang::DiagnosticsEngine &diags) { unsigned numErrorsBefore = diags.getNumErrors(); + // -fd-lines-as-code + if (args.hasArg(clang::driver::op

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-18 Thread Tarun Prabhu via cfe-commits
@@ -957,6 +957,32 @@ static bool parseDialectArgs(CompilerInvocation &res, llvm::opt::ArgList &args, clang::DiagnosticsEngine &diags) { unsigned numErrorsBefore = diags.getNumErrors(); + // -fd-lines-as-code + if (args.hasArg(clang::driver::op

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-18 Thread Tarun Prabhu via cfe-commits
@@ -6747,8 +6747,18 @@ defm backtrace : BooleanFFlag<"backtrace">, Group; defm bounds_check : BooleanFFlag<"bounds-check">, Group; defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group; defm cray_pointer : BooleanFFlag<"cray-pointer">, Group; -defm d_l

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-18 Thread Tarun Prabhu via cfe-commits
@@ -6747,8 +6747,18 @@ defm backtrace : BooleanFFlag<"backtrace">, Group; defm bounds_check : BooleanFFlag<"bounds-check">, Group; defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group; defm cray_pointer : BooleanFFlag<"cray-pointer">, Group; -defm d_l

[clang] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi created https://github.com/llvm/llvm-project/pull/127674 Enable ClangIR generation for very simple functions. The functions have to return `void` or an integral type, contain only compound statements or `return` statements, and `return` statement expressions can

[clang] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Olsen (dkolsen-pgi) Changes Enable ClangIR generation for very simple functions. The functions have to return `void` or an integral type, contain only compound statements or `return` statements, and `return` statement expressions ca

[clang] [HLSL] Bug fix crash using Array Parameters when De-sugaring is the same as canonicalizing (PR #127670)

2025-02-18 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron approved this pull request. https://github.com/llvm/llvm-project/pull/127670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] [MLIR][OpenMP] Add LLVM translation support for OpenMP UserDefinedMappers (PR #124746)

2025-02-18 Thread Akash Banerjee via cfe-commits
https://github.com/TIFitis edited https://github.com/llvm/llvm-project/pull/124746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement statement printer for EmbedExpr (PR #117770)

2025-02-18 Thread via cfe-commits
https://github.com/circl-lastname closed https://github.com/llvm/llvm-project/pull/117770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][doc] -ffp-contract options and standard compliance (PR #127621)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -1681,19 +1681,25 @@ for more details. permitted to produce more precise results than performing the same operations separately. - The C standard permits intermediate floating-point results within an + The C/C++ standard permits intermediate floating-point results

[clang] [Clang][doc] -ffp-contract options and standard compliance (PR #127621)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -1681,19 +1681,25 @@ for more details. permitted to produce more precise results than performing the same operations separately. - The C standard permits intermediate floating-point results within an + The C/C++ standard permits intermediate floating-point results

[clang] [Clang][doc] -ffp-contract options and standard compliance (PR #127621)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -1681,19 +1681,25 @@ for more details. permitted to produce more precise results than performing the same operations separately. - The C standard permits intermediate floating-point results within an + The C/C++ standard permits intermediate floating-point results

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-18 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/127602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-18 Thread Donát Nagy via cfe-commits
@@ -483,6 +483,14 @@ ANALYZER_OPTION( "behavior, set the option to 0.", 5) +ANALYZER_OPTION( +unsigned, RegionStoreMaxBindingFanOut, "region-store-max-binding-fanout", +"This option limits how many sub-bindings a single binding operation can " +"scatter int

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-18 Thread Donát Nagy via cfe-commits
@@ -2782,6 +2865,8 @@ RegionBindingsRef RegionStoreManager::bindStruct(RegionBindingsConstRef B, if (VI == VE) break; + if (NewB.hasExhaustedBindingLimit()) +return NewB.escapeValues(VI, VE); NagyDonat wrote: This is confusing to r

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-18 Thread Donát Nagy via cfe-commits
@@ -176,31 +177,59 @@ class RegionBindingsRef : public llvm::ImmutableMapRefpush_back(V); +return *this; + } + RegionBindingsRef escapeValues(nonloc::CompoundVal::iterator Begin, + nonloc::CompoundVal::iterator End) const { +for (SVal V :

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-18 Thread Katherine Whitlock via cfe-commits
https://github.com/stellar-aria updated https://github.com/llvm/llvm-project/pull/127430 >From ba0eef9808b42b01e356cd5c87745f7477e07c68 Mon Sep 17 00:00:00 2001 From: Katherine Whitlock Date: Sun, 16 Feb 2025 22:45:06 -0500 Subject: [PATCH 1/6] [clang-tidy] Add new check `readability-use-numer

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-18 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/127602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-18 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: I'm really happy that you managed to track down and fix these slow corner cases, and overall I like the code changes, but I there were a few places where the code was difficult to understand for me (although this may be also related to the fact that I di

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-18 Thread Katherine Whitlock via cfe-commits
@@ -0,0 +1,41 @@ +//===--- UseNumericLimitsCheck.h - clang-tidy ---*- 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: Apa

[clang] [HLSL] Implement the 'and' HLSL function (PR #127098)

2025-02-18 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/127098 >From 5b093ca42fdc24f89bfccac25e6f2e17155432f6 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Wed, 12 Feb 2025 21:24:00 + Subject: [PATCH 1/6] Implement the 'and' HLSL function --- clang/include/clang/Ba

[clang] ca0c84d - [NFC] [clang] make isFlexibleArrayMemberLike Ctx const (#126656)

2025-02-18 Thread via cfe-commits
Author: Florian Mayer Date: 2025-02-18T09:02:28-08:00 New Revision: ca0c84dbfd22ef060abe62ce34a51a6e6c2ceedb URL: https://github.com/llvm/llvm-project/commit/ca0c84dbfd22ef060abe62ce34a51a6e6c2ceedb DIFF: https://github.com/llvm/llvm-project/commit/ca0c84dbfd22ef060abe62ce34a51a6e6c2ceedb.diff

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-02-18 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,146 @@ +//===--- SmartptrResetAmbiguousCallCheck.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] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. Yeah, I agree we should be warning on this. However, AnalysisBasedWarnings isn’t really the right place for this, because that’s all about emitting warnings based on control-flow analysis, but whether a function is a coroutine

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-18 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/100346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [clang] make isFlexibleArrayMemberLike Ctx const (PR #126656)

2025-02-18 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/126656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
Sirraide wrote: > I'm not sure if that's reasonable, or if the first warning should be omitted. Hmm, I suspect that not doing that in analysis-based warnings might help with that. https://github.com/llvm/llvm-project/pull/127623 ___ cfe-commits maili

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-18 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/127137 >From 4fae5642c6e8e305cdc687b4968ba5eabaa44b50 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Mon, 27 Jan 2025 11:18:09 -0800 Subject: [PATCH 1/5] Add the AddUint64 HLSL builtin function - Defines the AddUint

[clang] [HLSL] Bug fix crash using Array Parameters when De-sugaring is the same as canonicalizing (PR #127670)

2025-02-18 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/127670 Fixes this crash: https://hlsl.godbolt.org/z/9aP74s4bP Which happens because the de-sugared type is the same as the canonicalized type. Check if the de-sugared type is canonical before getting the ArrayParameterT

[clang] [HLSL] Bug fix crash using Array Parameters when De-sugaring is the same as canonicalizing (PR #127670)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sarah Spall (spall) Changes Fixes this crash: https://hlsl.godbolt.org/z/9aP74s4bP Which happens because the de-sugared type is the same as the canonicalized type. Check if the de-sugared type is canonical before getting the ArrayParamete

[clang] [llvm] [mlir] [AMDGPU] Generalize amdgcn.make.buffer.rsrc to fat pointers (PR #126828)

2025-02-18 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 updated https://github.com/llvm/llvm-project/pull/126828 >From f125444bb53e1e10b40b352e9cf7fd3ad052bfbf Mon Sep 17 00:00:00 2001 From: Krzysztof Drewniak Date: Tue, 11 Feb 2025 23:55:36 + Subject: [PATCH 1/2] [AMDGPU] Generalize amdgcn.make.buffer.rsrc to fat po

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
https://github.com/Sirraide commented: Ah, thanks for the cleanup. I’m doing something related to this at the moment and this definitely helps with that ;Þ I think this might be a good candidate for the new `%enum_select` thingy that @erichkeane added recently (see https://clang.llvm.org/docs

[clang] [HLSL] Fix resource wrapper declaration (PR #125718)

2025-02-18 Thread Steven Perron via cfe-commits
s-perron wrote: > 2\. It feels wrong to do this in CodeGen. It seems like we should be > identifying an appropriate storage class in Sema such that we assign the > correct linkage automatically. If we change the storage class in Sema, then codegen is not able to distinguish between: ``` stat

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-02-18 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/124706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-02-18 Thread Sam Elliott via cfe-commits
https://github.com/lenary commented: Thanks for the comments Craig! https://github.com/llvm/llvm-project/pull/124706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-02-18 Thread Sam Elliott via cfe-commits
@@ -34,6 +34,21 @@ def uimm11 : RISCVUImmLeafOp<11>; def simm26 : RISCVSImmLeafOp<26>; +// 32-bit Immediate, used by RV32 Instructions in 32-bit operations, so no +// sign-/zero-extension. This is represented internally as a signed 32-bit value. +def imm32 : RISCVOp { + let

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-02-18 Thread Sam Elliott via cfe-commits
@@ -1046,6 +1046,20 @@ struct RISCVOperand final : public MCParsedAsmOperand { isInt<26>(fixImmediateForRV32(Imm, isRV64Imm())); } + bool isImm32() const { +int64_t Imm; +RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None; +if (!isImm()) +

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-18 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman updated https://github.com/llvm/llvm-project/pull/127109 >From d335931b8923005d2ffc580c5195b7fa997f3649 Mon Sep 17 00:00:00 2001 From: David Goldman Date: Thu, 13 Feb 2025 13:51:05 -0500 Subject: [PATCH 1/5] [clangd] Update XRefs to support overriden ObjC methods

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-02-18 Thread via cfe-commits
foxtran wrote: I juts found this PR. Thank you, @Sirraide! I made a corresponding proposal for C language (C2y) to have a restriction at standard level rather than in compiler level: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3483.pdf I think (and not only me) that the same proposal shou

[clang] [Clang] Warn about `[[noreturn]]` on coroutines (PR #127623)

2025-02-18 Thread via cfe-commits
https://github.com/Nerixyz edited https://github.com/llvm/llvm-project/pull/127623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-18 Thread David Goldman via cfe-commits
DavidGoldman wrote: > i am not sure if it does, e.g. > https://github.com/llvm/llvm-project/blob/main/clang/lib/AST/DeclObjC.cpp#L1268-L1273 > stops at the first overridden method. > > maybe you can add some unittests for this as well ? Done, you're right, so fixed that as well. > i think us

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
https://github.com/foxtran edited https://github.com/llvm/llvm-project/pull/127546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -78,16 +82,37 @@ class CIRGenModule : public CIRGenTypeCache { void emitTopLevelDecl(clang::Decl *decl); + /// Return the address of the given function. If funcType is non-null, then + /// this function will use the specified type if it has to create it. + // TODO: th

[clang] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,128 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,128 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,134 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,203 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,134 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -11,8 +11,8 @@ /// //===--===// -#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIROPS -#define LLVM_CLANG_CIR_DIALECT_IR_CIROPS +#ifndef CLANG_CIR_DIALECT_IR_CIROPS_TD andykaylor wrote: Why is the LL

[clang] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,134 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,134 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,134 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,203 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,203 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,134 @@ +//===--===// +// +// 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] [CIR] Add additional frontend actions (PR #127249)

2025-02-18 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/127249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Update XRefs to support overriden ObjC methods (PR #127109)

2025-02-18 Thread David Goldman via cfe-commits
@@ -430,6 +439,22 @@ locateASTReferent(SourceLocation CurLoc, const syntax::Token *TouchedIdentifier, continue; } } +// Special case: - (void)^method; should jump to all overrides. Note that an +// Objective-C method can override a parent class or pr

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Alexander Richardson via cfe-commits
@@ -381,24 +381,22 @@ typename A::pint_t DwarfInstructions::evaluateExpression(pint_t expression, A &addressSpace, const R ®isters, pint_t initialStackValue) { - const bool log = false;

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: This looks like a nice improvement. Some minor questions inline https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Alexander Richardson via cfe-commits
@@ -223,6 +221,41 @@ } while (0) #endif +#define _LIBUNWIND_TRACING_COMPACT_UNWIND (0) +#if !_LIBUNWIND_TRACING_COMPACT_UNWIND +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0(msg) +#define _LIBUNWIND_TRACE_COMPACT_UNWIND(msg, ...) +#else +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0

[clang] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread Andy Kaylor via cfe-commits
@@ -61,6 +64,13 @@ class CIRGenTypes { /// Convert a Clang type into a mlir::Type. mlir::Type convertType(clang::QualType type); + + /// Convert type T into an mlir::Type. This differs from convertType in that + /// it is used to convert to the memory representation for

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Alexander Richardson via cfe-commits
@@ -223,6 +221,41 @@ } while (0) #endif +#define _LIBUNWIND_TRACING_COMPACT_UNWIND (0) +#if !_LIBUNWIND_TRACING_COMPACT_UNWIND +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0(msg) +#define _LIBUNWIND_TRACE_COMPACT_UNWIND(msg, ...) +#else +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-02-18 Thread Brandon Wu via cfe-commits
@@ -111,9 +115,51 @@ void RISCVABIInfo::appendAttributeMangling(StringRef AttrStr, } void RISCVABIInfo::computeInfo(CGFunctionInfo &FI) const { + unsigned ABIVLen; + switch (FI.getExtInfo().getCC()) { + default: +ABIVLen = 0; +break; + case CallingConv::CC_RISCVVL

[clang] [HLSL] Allow arrays to copy-initialize (PR #127557)

2025-02-18 Thread Sarah Spall via cfe-commits
@@ -6585,6 +6585,18 @@ void InitializationSequence::InitializeFrom(Sema &S, } } +if (S.getLangOpts().HLSL && Initializer && isa(DestAT)) { spall wrote: Would be nice to consolidate this if statement with the one below, unless HLSL Arrays can a

[clang] [WIP][clang]: Implement a conditional lifetimebound_if builtin. (PR #125520)

2025-02-18 Thread via cfe-commits
higher-performance wrote: Just a friendly bump to figure out how to proceed here. Does the `clang::lifetimebound_like` idea sound like a decent middle ground to move forward with? And if so, what do we anticipate the timeline for implementing it to be like? This would affect whether we move fo

[clang] [HLSL] Allow arrays to copy-initialize (PR #127557)

2025-02-18 Thread Sarah Spall via cfe-commits
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/127557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Allow arrays to copy-initialize (PR #127557)

2025-02-18 Thread Sarah Spall via cfe-commits
https://github.com/spall approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/127557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve diagnostics for vector builtins (PR #125673)

2025-02-18 Thread Fraser Cormack via cfe-commits
@@ -12411,16 +12411,13 @@ def err_builtin_is_within_lifetime_invalid_arg : Error< "%select{non-|function }0pointer argument to '__builtin_is_within_lifetime' " "is not allowed">; -def err_builtin_invalid_arg_type: Error < - "%ordinal0 argument must be " - "%select{a vec

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-18 Thread Katherine Whitlock via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - readability-use-numeric-limits + +readability-use-numeric-limits +== + + Replaces certain integer literals with equivalent calls to + ``std::numeric_limits::min()`` or ``std::numeric_limits::max()``. + +Before:

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-18 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/127602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [AMDGPU] Generalize amdgcn.make.buffer.rsrc to fat pointers (PR #126828)

2025-02-18 Thread Matt Arsenault via cfe-commits
@@ -692,7 +692,7 @@ def ROCDL_CvtScaleF32PkFp8F32: attr-dict $srcA `,` $srcB `,` $scale `->` $old `[` $wordSel `]` `:` type($res) }]; } - arsenm wrote: Drop whitespace changes https://github.com/llvm/llvm-project/pull/126828 __

[clang] [llvm] [mlir] [AMDGPU] Generalize amdgcn.make.buffer.rsrc to fat pointers (PR #126828)

2025-02-18 Thread Matt Arsenault via cfe-commits
@@ -29,6 +29,7 @@ #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Intrinsics.h" #include "llvm/IR/IntrinsicsAArch64.h" +#include "llvm/IR/IntrinsicsAMDGPU.h" arsenm wrote: New dead include https://github.com/llvm/llvm-project/pull/126828 ___

[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)

2025-02-18 Thread via cfe-commits
@@ -588,42 +579,26 @@ struct CheckFallThroughDiagnostics { static CheckFallThroughDiagnostics MakeForCoroutine(const Decl *Func) { CheckFallThroughDiagnostics D; D.FuncLoc = Func->getLocation(); -D.diag_MaybeFallThrough_HasNoReturn = 0; -D.diag_MaybeFallThroug

[clang] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-18 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem updated https://github.com/llvm/llvm-project/pull/127653 >From cde82a27139c39406a9afb5b471fa527e52e5bca Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 18 Feb 2025 15:27:37 +0100 Subject: [PATCH 1/2] [Coroutines] Mark parameter allocas with coro.outside.frame

[clang] [HLSL] Bug fix crash using Array Parameters when De-sugaring is the same as canonicalizing (PR #127670)

2025-02-18 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/127670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add optional extensions enabled on Grace (PR #127620)

2025-02-18 Thread Sjoerd Meijer via cfe-commits
@@ -92,7 +92,7 @@ // COBALT-100: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "neoverse-n2" // RUN: %clang --target=aarch64 -mcpu=grace -### -c %s 2>&1 | FileCheck -check-prefix=GRACE %s -// GRACE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "neoverse-v2" --

[clang] [clang][X86] Only define __CET__ macro for X86 targets (PR #127616)

2025-02-18 Thread Fangrui Song via cfe-commits
MaskRay wrote: Can you update the description to mention which PR makes RISCV targets inspect -fcf-protection=? https://github.com/llvm/llvm-project/pull/127616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-18 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan commented: Some high level comments: * Should we just call it distributedLTO, or DLTO? Feel like we can drop the thin part for less typing, and from the user's point of view, using thinLTO infrastructure is just implementation details. * Are you going to imple

[clang] [HLSL] Bug fix crash using Array Parameters when De-sugaring is the same as canonicalizing (PR #127670)

2025-02-18 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron commented: Looks fine to me, but this change doesn't only affect HLSL does it? The function `getArrayParameterType` in `ASTContext.cpp` doesn't look like it is HLSL-specific. I wonder if a similar bug occurs within C/C++. https://github.com/llvm/llvm-project/pull/1

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-18 Thread Abhinav Kumar via cfe-commits
kr-2003 wrote: > My theory with limited testing: The crash is caused by assertion failure at > https://github.com/llvm/llvm-project/blob/eb7c947272952d40d3235d89652a10da52cb2b4d/clang/lib/AST/DeclBase.cpp#L1757C1-L1758C54. > So if we disable assertions it does not crash, and crashes otherwise.

[clang] [clang][X86] Only define __CET__ macro for X86 targets (PR #127616)

2025-02-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/127616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Bug fix crash using Array Parameters when De-sugaring is the same as canonicalizing (PR #127670)

2025-02-18 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/127670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-18 Thread Donát Nagy via cfe-commits
NagyDonat wrote: (I'm writing a review right now, please wait a bit -- a few hours -- before merging.) https://github.com/llvm/llvm-project/pull/127602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-18 Thread Hans Wennborg via cfe-commits
zmodem wrote: I think this is a better fix than #127524. Please take a look. https://github.com/llvm/llvm-project/pull/127653 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-18 Thread Balazs Benics via cfe-commits
steakhal wrote: > (I'm writing a review right now, please wait a bit -- at most a few hours -- > before merging.) No worries. I wouldnt have merged tgis without your approval too. https://github.com/llvm/llvm-project/pull/127602 ___ cfe-commits maili

[clang] e61deef - [Clang] Add 'instantiated_from' for enums in TextNodeDumper (#124409)

2025-02-18 Thread via cfe-commits
Author: André Brand Date: 2025-02-18T17:07:03+01:00 New Revision: e61deef8fe0e94be7a309dc53436f70dc69491cf URL: https://github.com/llvm/llvm-project/commit/e61deef8fe0e94be7a309dc53436f70dc69491cf DIFF: https://github.com/llvm/llvm-project/commit/e61deef8fe0e94be7a309dc53436f70dc69491cf.diff L

[clang] [clang] Add 'instantiated_from' for enums to the output of TextNodeDumper (PR #124409)

2025-02-18 Thread via cfe-commits
=?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand , =?utf-8?q?André?= Brand Message-ID: In-Reply-To: https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/124409 ___ cfe-commits mailing list cfe-commit

<    1   2   3   4   5   6   >