[clang] [llvm] [TargetParser] Fix flaky installs of generated headers (PR #137853)

2025-04-29 Thread Shoaib Meenai via cfe-commits
https://github.com/smeenai created https://github.com/llvm/llvm-project/pull/137853 The `llvm-headers` target wasn't depending on the generated TargetParser headers, so they'd be flakily installed or not installed depending on which order the build steps ran in. Add an explicit dependency to fix

[clang] [llvm] [RISCV] Xqccmp v0.3 (PR #137854)

2025-04-29 Thread Sam Elliott via cfe-commits
https://github.com/lenary created https://github.com/llvm/llvm-project/pull/137854 All the changes for v0.2 and v0.3 are either already implemented, or irrelevant to the compiler implementation. >From f156620203b61fbe48c80b4b45c451f9a6c6eed9 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Tu

[clang] [llvm] [RISCV] Xqccmp v0.3 (PR #137854)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: Sam Elliott (lenary) Changes All the changes for v0.2 and v0.3 are either already implemented, or irrelevant to the compiler implementation. --- Full diff: https://github.com/llvm/llvm-project/pull/1378

[clang] [Clang] Bypass TAD during overload resolution if a perfect match exists (PR #136018)

2025-04-29 Thread Florian Mayer via cfe-commits
fmayer wrote: clang now fails an assertion on this ``` class a { template < typename b > void c(); void c(int (a::*)(int, int)); template < typename b > b d(b , b) { c(&::d); } }; ``` ``` #0 0x55bc6cac8e58 llvm::sys::PrintStackTrace(l

[clang] [llvm] [PowerPC] frontend get target feature from backend with cpu name (PR #137670)

2025-04-29 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/137670 >From 97f10e6a0fb4c158359e79e24650f8fdf4d23ef2 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 25 Apr 2025 13:09:47 + Subject: [PATCH 1/2] implement getting target features from backend for clang fronte

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-29 Thread Marco Elver via cfe-commits
@@ -271,26 +271,32 @@ class CFGWalker { // translateAttrExpr needs it, but that should be moved too. class CapabilityExpr { private: - /// The capability expression and whether it's negated. - llvm::PointerIntPair CapExpr; + /// The capability expression and flags. + llvm::

[clang] 3f80359 - [driver] return immediately in `addArchSpecificRPath` and `getArchSpecificLibPaths` on AIX (#134520)

2025-04-29 Thread via cfe-commits
Author: Daniel Chen Date: 2025-04-29T10:39:52-04:00 New Revision: 3f8035961f08d160851c40f7ac1f6e441149183c URL: https://github.com/llvm/llvm-project/commit/3f8035961f08d160851c40f7ac1f6e441149183c DIFF: https://github.com/llvm/llvm-project/commit/3f8035961f08d160851c40f7ac1f6e441149183c.diff L

[clang] 9d1f1c4 - [CIR] Upstream initial support for switch statements (#137106)

2025-04-29 Thread via cfe-commits
Author: Andres-Salamanca Date: 2025-04-29T08:43:44-07:00 New Revision: 9d1f1c4c8b5e96dfdbde37cb2cf906afdce5ef30 URL: https://github.com/llvm/llvm-project/commit/9d1f1c4c8b5e96dfdbde37cb2cf906afdce5ef30 DIFF: https://github.com/llvm/llvm-project/commit/9d1f1c4c8b5e96dfdbde37cb2cf906afdce5ef30.di

[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-04-29 Thread Victor Lomuller via cfe-commits
@@ -35,8 +35,10 @@ static constexpr Builtin::Info BuiltinInfos[] = { static_assert(std::size(BuiltinInfos) == NumBuiltins); llvm::SmallVector -SPIRVTargetInfo::getTargetBuiltins() const { - return {{&BuiltinStrings, BuiltinInfos}}; +BaseSPIRTargetInfo::getTargetBuiltins() con

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-04-29 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/134522 >From ccab3dc1f18ffeda9acb07c0bd5f80f65cc788b9 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Sun, 6 Apr 2025 15:06:56 +0800 Subject: [PATCH 1/3] Handle invalid variable template specialization whose type depend

[libclc] [libclc] Avoid casting NANs & literals to 'gentype' (PR #137824)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/137824 >From abb52892c044ca1883cc41d97c3edf08aafc9746 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 29 Apr 2025 16:05:19 +0100 Subject: [PATCH] [libclc] Avoid casting NANs & literals to 'gentype' By hav

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-29 Thread Marco Elver via cfe-commits
@@ -388,7 +395,7 @@ class SExprBuilder { til::LiteralPtr *createVariable(const VarDecl *VD); // Create placeholder for this: we don't know the VarDecl on construction yet. - std::pair + std::pair melver wrote: I think this code is just more complex tha

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-04-29 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/134522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-29 Thread Marco Elver via cfe-commits
@@ -81,26 +81,25 @@ static bool isCalleeArrow(const Expr *E) { return ME ? ME->isArrow() : false; } -static StringRef ClassifyDiagnostic(const CapabilityAttr *A) { - return A->getName(); -} - -static StringRef ClassifyDiagnostic(QualType VDT) { +static CapabilityExpr makeCa

[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)

2025-04-29 Thread Sean McBride via cfe-commits
@@ -105,9 +105,6 @@ void errno_getcwd(char *Buf, size_t Sz) { clang_analyzer_eval(errno != 0); // expected-warning{{TRUE}} clang_analyzer_eval(Path == NULL); // expected-warning{{TRUE}} if (errno) {} // no warning - } else if (Path == NULL) {

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/137106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for compound assignment statements (PR #137740)

2025-04-29 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/137740 >From 17ac341126dd9110a9e1f7cdd3c4197f2a04268b Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Mon, 28 Apr 2025 16:26:34 -0700 Subject: [PATCH] [CIR] Add support for compound assignment statements Compound

[clang] [llvm] [clang][amdgpu] Add builtins for raw/struct buffer lds load (PR #137678)

2025-04-29 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu tahiti -S -verify -o - %s +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu bonaire -S -verify -o - %s +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu carrizo -S -verify

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes This introduces three things related to intialization like: char buf[3] = "foo"; where the array does not declare enough space for the null terminator but otherwise can represent the array contents ex

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/137829 This introduces three things related to intialization like: char buf[3] = "foo"; where the array does not declare enough space for the null terminator but otherwise can represent the array contents exactl

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-04-29 Thread Joseph Huber via cfe-commits
@@ -299,6 +310,18 @@ elseif (FLANG_RT_GCC_RESOURCE_DIR) endif () endif () + + +if (CMAKE_C_BYTE_ORDER STREQUAL "BIG_ENDIAN") jhuber6 wrote: I was hoping I got rid of needing to detect endianness in CMake, since it makes cross-compiling a pain. Not eager to

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-04-29 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/137828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-04-29 Thread Joseph Huber via cfe-commits
@@ -102,6 +102,10 @@ ToolChain::ToolChain(const Driver &D, const llvm::Triple &T, getFilePaths().push_back(*Path); for (const auto &Path : getArchSpecificLibPaths()) addIfExists(getFilePaths(), Path); + + if (D.IsFlangMode()) { +getIntrinsicModulePaths().append(

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-04-29 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: What's the main limitation here? If this is just a file dependency it should be identical to how all the OpenMP tests depend on `omp.h` being in the resource directory. IMHO this is trivial if we do a runtimes build, since we can just require that `openmp;

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-04-29 Thread Joseph Huber via cfe-commits
@@ -157,6 +157,9 @@ class ToolChain { /// The list of toolchain specific path prefixes to search for programs. path_list ProgramPaths; +path_list ModulePaths; +path_list IntrinsicModulePaths; jhuber6 wrote: Format. https://github.com/llvm/llv

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-04-29 Thread Joseph Huber via cfe-commits
@@ -3979,6 +3979,16 @@ def fsyntax_only : Flag<["-"], "fsyntax-only">, Visibility<[ClangOption, CLOption, DXCOption, CC1Option, FC1Option, FlangOption]>, Group, HelpText<"Run the preprocessor, parser and semantic analysis stages">; + + +def fno_builtin_modules : Flag<["-

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread Erich Keane via cfe-commits
@@ -9294,3 +9294,18 @@ Declares that a function potentially allocates heap memory, and prevents any pot of ``nonallocating`` by the compiler. }]; } + +def NonStringDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``nonstring`` attribute can be ap

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread Erich Keane via cfe-commits
@@ -3804,6 +3804,9 @@ def err_attribute_weakref_without_alias : Error< "weakref declaration of %0 must also have an alias attribute">; def err_alias_not_supported_on_darwin : Error < "aliases are not supported on darwin">; +def warn_attribute_non_character_array : Warning<

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread Erich Keane via cfe-commits
@@ -4907,6 +4907,20 @@ void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI, D->addAttr(::new (Context) ModeAttr(Context, CI, Name)); } +static void handleNonStringAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + // This only applies to fields and variable declara

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread Erich Keane via cfe-commits
@@ -3804,6 +3804,9 @@ def err_attribute_weakref_without_alias : Error< "weakref declaration of %0 must also have an alias attribute">; def err_alias_not_supported_on_darwin : Error < "aliases are not supported on darwin">; +def warn_attribute_non_character_array : Warning<

[clang] [llvm] [clang][amdgpu] Add builtins for raw/struct buffer lds load (PR #137678)

2025-04-29 Thread Jon Chesterfield via cfe-commits
@@ -163,7 +163,10 @@ BUILTIN(__builtin_amdgcn_raw_buffer_load_b64, "V2UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b96, "V3UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b128, "V4UiQbiiIi", "n") +TARGET_BUILTIN(__builtin_amdgcn_raw_buffer_load_lds, "vV4U

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-04-29 Thread via cfe-commits
macurtis-amd wrote: @nikic ping ping Are you okay with the latest revision? (Thanks for reviewing this. Apologies if I'm being annoying). https://github.com/llvm/llvm-project/pull/133301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-04-29 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/134522 >From ccab3dc1f18ffeda9acb07c0bd5f80f65cc788b9 Mon Sep 17 00:00:00 2001 From: Yanzuo Liu Date: Sun, 6 Apr 2025 15:06:56 +0800 Subject: [PATCH 1/3] Handle invalid variable template specialization whose type depend

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread Aaron Ballman via cfe-commits
@@ -4907,6 +4907,20 @@ void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI, D->addAttr(::new (Context) ModeAttr(Context, CI, Name)); } +static void handleNonStringAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + // This only applies to fields and variable declara

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-29 Thread Aaron Ballman via cfe-commits
@@ -3804,6 +3804,9 @@ def err_attribute_weakref_without_alias : Error< "weakref declaration of %0 must also have an alias attribute">; def err_alias_not_supported_on_darwin : Error < "aliases are not supported on darwin">; +def warn_attribute_non_character_array : Warning<

[clang] [clang][modules][deps] Optimize in-process timestamping of PCMs (PR #137363)

2025-04-29 Thread Jan Svoboda via cfe-commits
@@ -59,19 +60,46 @@ class InProcessModuleCache : public ModuleCache { InMemoryModuleCache InMemory; public: - InProcessModuleCache(ModuleCacheMutexes &Mutexes) : Mutexes(Mutexes) {} + InProcessModuleCache(ModuleCacheEntries &Entries) : Entries(Entries) {} void prepare

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Paul Walker via cfe-commits
@@ -1168,6 +1168,15 @@ bool Function::nullPointerIsDefined() const { return hasFnAttribute(Attribute::NullPointerIsValid); } +unsigned Function::getVScaleValue() const { + Attribute Attr = getFnAttribute(Attribute::VScaleRange); + if (!Attr.isValid()) +return 0; + + u

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Paul Walker via cfe-commits
@@ -554,6 +554,22 @@ class VectorType : public Type { return VectorType::get(VTy->getElementType(), EltCnt * 2); } + /// This static method returns a VectorType with the same size-in-bits as + /// SizeTy but with an element type that matches the scalar type of EltTy. +

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Paul Walker via cfe-commits
@@ -554,6 +554,22 @@ class VectorType : public Type { return VectorType::get(VTy->getElementType(), EltCnt * 2); } + /// This static method returns a VectorType with the same size-in-bits as + /// SizeTy but with an element type that matches the scalar type of EltTy. -

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Paul Walker via cfe-commits
@@ -80,7 +80,9 @@ fixed_bool32_t from_vbool32_t(vbool32_t type) { // // CHECK-128-LABEL: @to_vbool32_t( // CHECK-128-NEXT: entry: -// CHECK-128-NEXT:ret [[TYPE_COERCE:%.*]] +// CHECK-128-NEXT:[[SAVED_VALUE:%.*]] = alloca <1 x i8>, align 1 +// CHECK-128-NEXT: [[SAV

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/130973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [X86][APX] Suppress EGPR/NDD instructions for relocations (PR #136660)

2025-04-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-global-isel` running on `linaro-clang-aarch64-global-isel` while building `llvm` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/125/builds/7219 Here is the r

[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-04-29 Thread Victor Lomuller via cfe-commits
@@ -5837,12 +5838,13 @@ static void handleBuiltinAliasAttr(Sema &S, Decl *D, const ParsedAttr &AL) { bool IsAArch64 = S.Context.getTargetInfo().getTriple().isAArch64(); bool IsARM = S.Context.getTargetInfo().getTriple().isARM(); bool IsRISCV = S.Context.getTargetInfo().g

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-04-29 Thread Alexey Bataev via cfe-commits
@@ -1660,6 +1660,10 @@ def err_omp_expected_colon : Error<"missing ':' in %0">; def err_omp_missing_comma : Error< "missing ',' after %0">; def err_omp_expected_context_selector : Error<"expected valid context selector in %0">; +def err_omp_unknown_clause +: Error<"expe

[clang] [CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail() (PR #136133)

2025-04-29 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/136133 From 2136a05f0b8a0f2db0f9506a78ebf8f41c0f4d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Thu, 17 Apr 2025 13:41:55 +0200 Subject: [PATCH] [CUDA][HIP] Add a __devi

[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-04-29 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl deleted https://github.com/llvm/llvm-project/pull/137805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][SROA] Teach SROA how to "bitcast" between fixed and scalable vectors. (PR #130973)

2025-04-29 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/130973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][amdgpu] Add builtins for raw/struct buffer lds load (PR #137678)

2025-04-29 Thread Jon Chesterfield via cfe-commits
@@ -163,7 +163,10 @@ BUILTIN(__builtin_amdgcn_raw_buffer_load_b64, "V2UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b96, "V3UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b128, "V4UiQbiiIi", "n") +TARGET_BUILTIN(__builtin_amdgcn_raw_buffer_load_lds, "vV4U

[clang] [llvm] [clang][amdgpu] Add builtins for raw/struct buffer lds load (PR #137678)

2025-04-29 Thread Jon Chesterfield via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu tahiti -S -verify -o - %s +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu bonaire -S -verify -o - %s +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu carrizo -S -verify

[clang] [clang][SPIRV] Add builtin for OpGenericCastToPtrExplicit and its SPIR-V friendly binding (PR #137805)

2025-04-29 Thread Farzon Lotfi via cfe-commits
@@ -35,8 +35,10 @@ static constexpr Builtin::Info BuiltinInfos[] = { static_assert(std::size(BuiltinInfos) == NumBuiltins); llvm::SmallVector -SPIRVTargetInfo::getTargetBuiltins() const { - return {{&BuiltinStrings, BuiltinInfos}}; +BaseSPIRTargetInfo::getTargetBuiltins() con

[clang] [HLSL] Resource initialization by constructors (PR #135120)

2025-04-29 Thread Justin Bogner via cfe-commits
https://github.com/bogner commented: A minor comment on naming of the builtins but this generally looks good https://github.com/llvm/llvm-project/pull/135120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [HLSL] Resource initialization by constructors (PR #135120)

2025-04-29 Thread Justin Bogner via cfe-commits
@@ -1,34 +1,117 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DXIL +// RUN: %clang_cc1 -Wno-hlsl-implicit-binding -triple dxil-pc-shadermodel6.3-library -emit-llvm -disabl

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer created https://github.com/llvm/llvm-project/pull/137840 Sorting by stem gives nicer results when various header file names are substrings of other header file names, for example, a CLI application with a main header named analyze.h and a analyze-xxx.h header for

[clang] [HLSL] Resource initialization by constructors (PR #135120)

2025-04-29 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/135120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Resource initialization by constructors (PR #135120)

2025-04-29 Thread Justin Bogner via cfe-commits
@@ -4801,6 +4801,18 @@ def HLSLResourceGetPointer : LangBuiltin<"HLSL_LANG"> { let Prototype = "void(...)"; } +def HLSLResourceCreatePoisonHandle : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_resource_createpoisonhandle"]; + let Attributes = [NoThrow]; +

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer edited https://github.com/llvm/llvm-project/pull/137840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer edited https://github.com/llvm/llvm-project/pull/137840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Daan De Meyer (DaanDeMeyer) Changes Sorting by stem gives nicer results when various header file names are substrings of other header file names, for example, a CLI application with a main header named analyze.h and a analyze-xxx.h

[libclc] 694a42f - [libclc] Avoid casting NANs & literals to 'gentype' (#137824)

2025-04-29 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-04-29T17:33:21+01:00 New Revision: 694a42f018d0847005e6b6ad1aa2f22a64f1f482 URL: https://github.com/llvm/llvm-project/commit/694a42f018d0847005e6b6ad1aa2f22a64f1f482 DIFF: https://github.com/llvm/llvm-project/commit/694a42f018d0847005e6b6ad1aa2f22a64f1f482.diff

[libclc] [libclc] Avoid casting NANs & literals to 'gentype' (PR #137824)

2025-04-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix emiision of nested unused enum types with -fno-eliminate-unused-d… (PR #137818)

2025-04-29 Thread via cfe-commits
https://github.com/ykhatav edited https://github.com/llvm/llvm-project/pull/137818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Retain type information for nested unused enum (PR #137682)

2025-04-29 Thread via cfe-commits
https://github.com/ykhatav closed https://github.com/llvm/llvm-project/pull/137682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Remove duplicate extensions from tt-ascalon-d8 CPU (PR #137865)

2025-04-29 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave edited https://github.com/llvm/llvm-project/pull/137865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][NFC] Remove duplicate extensions from tt-ascalon-d8 CPU (PR #137865)

2025-04-29 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave edited https://github.com/llvm/llvm-project/pull/137865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][NFC] Remove duplicate extensions from tt-ascalon-d8 CPU (PR #137865)

2025-04-29 Thread Min-Yih Hsu via cfe-commits
mshockwave wrote: > If the `"-target-feature" "+sscofpmf"` was already present in the test > output, just not looked for, then I think you should just mark this as > `[NFC]`. Agree. It's updated now. https://github.com/llvm/llvm-project/pull/137865

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137840 >From 4747e31443d9dc273f875782f32e2e47ca9c2cbf Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 29 Apr 2025 18:26:36 +0200 Subject: [PATCH] clang-format: Sort includes by stem rather than full filenam

[clang] [NFC][clang] No sharedlibs for UEFI (PR #137872)

2025-04-29 Thread Prabhu Rajasekaran via cfe-commits
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/137872 There is no support for shared libraries for UEFI target. Remove the incorrect -dll flag set from UEFI toolchain. >From 60473fc01469167d742cee1fcdc1b05b93482f94 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Tu

[clang] [NFC][clang] No sharedlibs for UEFI (PR #137872)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Prabhu Rajasekaran (Prabhuk) Changes There is no support for shared libraries for UEFI target. Remove the incorrect -dll flag set from UEFI toolchain. --- Full diff: https://github.com/llvm/llvm-project/pull/137872.diff 2 Files Affected

[clang] [llvm] [TargetParser] Fix flaky installs of generated headers (PR #137853)

2025-04-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-windows` running on `linaro-armv8-windows-msvc-05` while building `clang,llvm` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/141/builds/8317 Here is the relevant piec

[clang] [nfc][clang] Rename function (PR #137874)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Prabhu Rajasekaran (Prabhuk) Changes Rename function to meet the coding guidelines. I am working on a similar function in a subsequent PR. Landing this as NFC first to isolate this change. --- Full diff: https://github.com/llvm/llvm-proje

[clang] [nfc][clang] Rename function (PR #137874)

2025-04-29 Thread Prabhu Rajasekaran via cfe-commits
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/137874 Rename function to meet the coding guidelines. I am working on a similar function in a subsequent PR. Landing this as NFC first to isolate this change. >From 45778ad1a6cd0d7ce6333f6e8b69d4f4138b962e Mon Sep 17

[clang] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output (PR #135876)

2025-04-29 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: I guess another way about it, is to require me to copy in all dependent DLLs into the built `bin` directory next to `clang.exe` etc. But that's an extra step that hasn't been needed so far... https://github.com/llvm/llvm-project/pull/135876 _

[clang] [HLSL] Overloads for `lerp` with a scalar weight (PR #137877)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Bogner (bogner) Changes This adds overloads for the `lerp` function that accept a scalar for the weight parameter by splatting it into the appropriate vector. Fixes #137827 --- Full diff: https://github.com/llvm/llvm-project/pull/

[clang] [nfc][clang] Rename function (PR #137874)

2025-04-29 Thread Prabhu Rajasekaran via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/137874 >From 45778ad1a6cd0d7ce6333f6e8b69d4f4138b962e Mon Sep 17 00:00:00 2001 From: prabhukr Date: Tue, 29 Apr 2025 13:43:32 -0700 Subject: [PATCH] [nfc][clang] Rename function Rename function to meet the coding guid

[clang] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output (PR #135876)

2025-04-29 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: These tests that run `env PATH="" %clang_dxc ...` are problematic for my setup for running tests on Windows. In my builds, I'm building with a dynamically linked `libc++.dll` provided by my toolchain, which is available in `$PATH`, so the built `bin/clang.exe` requires finding

[clang] [HLSL] Overloads for `lerp` with a scalar weight (PR #137877)

2025-04-29 Thread Justin Bogner via cfe-commits
https://github.com/bogner created https://github.com/llvm/llvm-project/pull/137877 This adds overloads for the `lerp` function that accept a scalar for the weight parameter by splatting it into the appropriate vector. Fixes #137827 >From 64cc675721623a793d06a1208089dc9431409835 Mon Sep 17 00:

[clang] [CIR] Upstream global initialization for VectorType (PR #137511)

2025-04-29 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/137511 >From 98eaaf0a64dc811481aab37da0939fa0d374a4f6 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 26 Apr 2025 18:43:00 +0200 Subject: [PATCH 1/3] [CIR] Upstream global initialization for VectorType ---

[clang] [CIR] Upstream global initialization for VectorType (PR #137511)

2025-04-29 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/137511 >From 153f0c0daa33b1c71ced4a0f050d49656e72f505 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 26 Apr 2025 18:43:00 +0200 Subject: [PATCH 1/3] [CIR] Upstream global initialization for VectorType ---

[clang-tools-extra] [clang-doc] Add start and end line numbers (PR #137732)

2025-04-29 Thread Paul Kirth via cfe-commits
@@ -795,43 +787,52 @@ emitInfo(const CXXMethodDecl *D, const FullComment *FC, int LineNumber, } std::pair, std::unique_ptr> -emitInfo(const TypedefDecl *D, const FullComment *FC, int LineNumber, - StringRef File, bool IsFileInRootDir, bool PublicOnly) { - TypedefInfo

[clang] [CIR] Upstream global initialization for VectorType (PR #137511)

2025-04-29 Thread Amr Hesham via cfe-commits
@@ -215,6 +215,37 @@ def ConstArrayAttr : CIR_Attr<"ConstArray", "const_array", [TypedAttrInterface]> }]; } +//===--===// +// ConstVectorAttr +//===--

[clang] [HLSL] Resource initialization by constructors (PR #135120)

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

[clang] clang-format: Sort includes by stem rather than full filename (PR #137840)

2025-04-29 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137840 >From ce0cb8586871f30f7e0883209f4bd30bf63471c5 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 29 Apr 2025 18:26:36 +0200 Subject: [PATCH] clang-format: Sort includes by stem rather than full filenam

[clang] [CIR] Upstream global initialization for VectorType (PR #137511)

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

[clang] [llvm] [RISCV] Add processor definition for SiFive P870 (PR #137725)

2025-04-29 Thread Craig Topper via cfe-commits
@@ -365,6 +365,32 @@ def SIFIVE_P670 : RISCVProcessorModel<"sifive-p670", SiFiveP600Model, TuneVXRMPipelineFlush, TunePostRAScheduler]>; +def SIFIVE_P870 : RISCVProcessorModel<"sifive-p870", NoSched

[clang] [llvm] [RISCV] Add processor definition for SiFive P870 (PR #137725)

2025-04-29 Thread Craig Topper via cfe-commits
@@ -365,6 +365,32 @@ def SIFIVE_P670 : RISCVProcessorModel<"sifive-p670", SiFiveP600Model, TuneVXRMPipelineFlush, TunePostRAScheduler]>; +def SIFIVE_P870 : RISCVProcessorModel<"sifive-p870", NoSched

[clang] [clang] Mark constructors with invalid initializers as invalid (PR #137773)

2025-04-29 Thread Eli Friedman via cfe-commits
@@ -2,16 +2,20 @@ // RUN: %clang_cc1 -Wreorder -fsyntax-only -verify -std=c++98 %s // RUN: %clang_cc1 -Wreorder -fsyntax-only -verify -std=c++11 %s -class A { +class A { + // expected-note@-1 {{candidate constructor}} +#if __cplusplus >= 201103L // C++11 or later + // expec

[clang] [llvm] [RISCV][NFC] Remove duplicate extensions from tt-ascalon-d8 CPU (PR #137865)

2025-04-29 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. https://github.com/llvm/llvm-project/pull/137865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Implement JSON formatted -ftime-report (PR #137737)

2025-04-29 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: The buildkite failure can be ignored; the offending test (Unwind/split-machine-functions.test) also fails on `main` (or rather the parent commit of this PR's branch). https://github.com/llvm/llvm-project/pull/137737 ___ cfe-commits m

[clang] [Clang][counted_by] Support casting the array to a different type (PR #136239)

2025-04-29 Thread Bill Wendling via cfe-commits
bwendling wrote: Friendly ping. https://github.com/llvm/llvm-project/pull/136239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Add lexing support for floating points (PR #137720)

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

[clang] 74593f6 - [RISCV][NFC] Remove duplicate extensions from tt-ascalon-d8 CPU (#137865)

2025-04-29 Thread via cfe-commits
Author: Min-Yih Hsu Date: 2025-04-29T14:19:51-07:00 New Revision: 74593f667823025580e046e56d48d7a9899b8956 URL: https://github.com/llvm/llvm-project/commit/74593f667823025580e046e56d48d7a9899b8956 DIFF: https://github.com/llvm/llvm-project/commit/74593f667823025580e046e56d48d7a9899b8956.diff L

[clang] [llvm] [RISCV][NFC] Remove duplicate extensions from tt-ascalon-d8 CPU (PR #137865)

2025-04-29 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave closed https://github.com/llvm/llvm-project/pull/137865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage] Support -fprofile-list for cold function coverage (PR #136333)

2025-04-29 Thread Lei Wang via cfe-commits
wlei-llvm wrote: ping:) https://github.com/llvm/llvm-project/pull/136333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-29 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/137690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-29 Thread Justin Bogner via cfe-commits
https://github.com/bogner commented: A couple of minor comments. The direction seems reasonable to me, but it'd be good to get someone more familiar with the Parser and AST to weigh in. https://github.com/llvm/llvm-project/pull/137690 ___ cfe-commits

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-29 Thread Justin Bogner via cfe-commits
@@ -5209,6 +5211,92 @@ void Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) { } } +void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs) { + assert(Tok.is(tok::identifier) && "Not a Microsoft attribute list"); + IdentifierInfo *R

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-29 Thread Justin Bogner via cfe-commits
@@ -5209,6 +5211,92 @@ void Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) { } } +void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs) { + assert(Tok.is(tok::identifier) && "Not a Microsoft attribute list"); + IdentifierInfo *R

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-29 Thread Justin Bogner via cfe-commits
@@ -5209,6 +5211,92 @@ void Parser::ParseMicrosoftUuidAttributeArgs(ParsedAttributes &Attrs) { } } +void Parser::ParseMicrosoftRootSignatureAttributeArgs(ParsedAttributes &Attrs) { + assert(Tok.is(tok::identifier) && "Not a Microsoft attribute list"); + IdentifierInfo *R

[clang] Fix crash when an attribute is applied to pragma attribute/pragma dump (PR #137880)

2025-04-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes These two don't result in a statement, so the attempt to apply the attributes to them was crashing. This patch correctly prohibits the use of attributes on these clauses. Fixes: #137861 --- Full diff: h

[clang] Fix crash when an attribute is applied to pragma attribute/pragma dump (PR #137880)

2025-04-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/137880 These two don't result in a statement, so the attempt to apply the attributes to them was crashing. This patch correctly prohibits the use of attributes on these clauses. Fixes: #137861 >From be6d7e3fcf4e

<    1   2   3   4   5   >