[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116331 >From 3c792216f88e87b69b3ea7415c2fd74b7f5d7469 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Fri, 25 Oct 2024 17:48:41 + Subject: [PATCH 1/9] adding comments --- clang/include/clang/Basic/Attr.td

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-20 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B created https://github.com/llvm/llvm-project/pull/117074 We do not have support for the threadsafe statics on the GPU side. However, we do sometimes end up with empty local static initializers, and those happen to trigger calls to `__cxa_guard*`, which breaks compila

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-20 Thread via cfe-commits
@@ -53,3 +53,6 @@ LLVM_FIXED_MD_KIND(MD_DIAssignID, "DIAssignID", 38) LLVM_FIXED_MD_KIND(MD_coro_outside_frame, "coro.outside.frame", 39) LLVM_FIXED_MD_KIND(MD_mmra, "mmra", 40) LLVM_FIXED_MD_KIND(MD_noalias_addrspace, "noalias.addrspace", 41) +// TODO: this will likelly be pla

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use a Worklist for some CodeGenFunctions (PR #115395)

2024-11-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: In general, it's hard to avoid recursion: an AST is fundamentally a tree, and the most natural way to walk a tree is recursive, which is why we have issues in the first place. This usually isn't an issue because people don't write deeply nested code

[clang] [webkit.UncountedLambdaCapturesChecker] Fix debug assertion failure. (PR #117090)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Only call getThisType() on an instance method. --- Full diff: https://github.com/llvm/llvm-project/pull/117090.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/

[clang] [webkit.UncountedLambdaCapturesChecker] Fix debug assertion failure. (PR #117090)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes Only call getThisType() on an instance method. --- Full diff: https://github.com/llvm/llvm-project/pull/117090.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCap

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
MatzeB wrote: Note that this has the test changes from #117091 included. https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add implicit resource element type concepts to AST (PR #116413)

2024-11-20 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/116413 >From 92ccbe72ca95ad2df5a81b76244a8a8d7cedef40 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 15 Nov 2024 09:00:15 -0800 Subject: [PATCH 1/4] update new tests --- clang/lib/Sema/HLSLExternalSemaSour

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2024-11-20 Thread Trevor Gross via cfe-commits
@@ -255,4 +255,9 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) { } setLibcallName(RTLIB::MULO_I128, nullptr); } + + if (TT.isSystemZ()) { +setLibcallName(RTLIB::FPROUND_F32_F16, "__truncsfhf2"); +setLibcallName(RTLIB::FPEXT_F16_F32, "__extendhfs

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-11-20 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: Behold, I've added a bunch of pedantic comments about the tests. I think a significant matter is that they all run an LLVM optimisation pipeline, which I believe means they cover too much of the project to be "clang" tests, they're more end-to-end or cross

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-11-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/115487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-11-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. LGTM modulo 1 nit. @mizvekov are you happy with it? https://github.com/llvm/llvm-project/pull/115487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-11-20 Thread Younan Zhang via cfe-commits
@@ -185,3 +185,46 @@ template struct S { friend void X::f(T::type); }; } + +namespace GH113324 { +template struct S1 { + friend void f1(S1, int = 0); // expected-error {{friend declaration specifying a default argument must be a definition}} + friend void f2(S1 a, S1 = de

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2024-11-20 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 %s -triple=%itanium_abi_triple -O1 -emit-llvm -fextend-lifetimes -o - | FileCheck %s +// Make sure we don't crash compiling a lambda that is not nested in a function. +// We also check that fake uses are properly issued in lambdas. + +int glo

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Artem Belevich (Artem-B) Changes We do not have support for the threadsafe statics on the GPU side. However, we do sometimes end up with empty local static initializers, and those happen to trigger calls to `__cxa_guard*`, which breaks co

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Artem Belevich (Artem-B) Changes We do not have support for the threadsafe statics on the GPU side. However, we do sometimes end up with empty local static initializers, and those happen to trigger calls to `__cxa_guard*`, which br

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-20 Thread Artem Belevich via cfe-commits
Artem-B wrote: @yxsamliu -- should I add it for HIP, too? https://github.com/llvm/llvm-project/pull/117074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
@@ -2302,6 +2302,10 @@ def err_init_list_bad_dest_type : Error< def warn_cxx20_compat_aggregate_init_with_ctors : Warning< "aggregate initialization of type %0 with user-declared constructors " "is incompatible with C++20">, DefaultIgnore, InGroup; +def warn_cxx20_compat_re

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
@@ -551,3 +551,14 @@ struct full_of_empty empty_test_2(void) { struct full_of_empty e; return e; // no-warning } + +struct with_explicit_field { higher-performance wrote: Done. https://github.com/llvm/llvm-project/pull/102040 _

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
@@ -1419,6 +1419,42 @@ is not specified. }]; } +def ExplicitInitDocs : Documentation { + let Category = DocCatField; + let Content = [{ +The ``clang::requires_explicit_initialization`` attribute indicates that the +field of an aggregate must be initialized explicitly by us

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
@@ -6919,6 +6923,9 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, case ParsedAttr::AT_NoMerge: handleNoMergeAttr(S, D, AL); break; + case ParsedAttr::AT_ExplicitInit: +handleExplicitInitAttr(S, D, AL); higher-perfo

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-20 Thread Daniel Stone via cfe-commits
fooishbar wrote: cc @karolherbst @airlied who are better contacts for CL in Mesa these days https://github.com/llvm/llvm-project/pull/115699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/115699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/113470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] skip warnings for constructors marked with the [[noreturn]] attribute (PR #115558)

2024-11-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/115558 >From f63263a1aa4873a63918649ea92352eb5cfe66eb Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 9 Nov 2024 00:41:13 +0200 Subject: [PATCH 1/3] [Clang] skip warnings for constructors marked with the [[no

[clang] Add support for aligning BlockComments in declarations (PR #109497)

2024-11-20 Thread via cfe-commits
https://github.com/JessehMSFT updated https://github.com/llvm/llvm-project/pull/109497 >From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001 From: Jesse Harvey Date: Fri, 20 Sep 2024 16:40:35 -0700 Subject: [PATCH 1/3] Add support for aligning BlockComments in declarations --

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread Aaron Ballman via cfe-commits
@@ -1419,6 +1419,42 @@ is not specified. }]; } +def ExplicitInitDocs : Documentation { + let Category = DocCatField; + let Content = [{ +The ``clang::requires_explicit_initialization`` attribute indicates that the +field of an aggregate must be initialized explicitly by us

[clang] [TBAA] Only emit pointer tbaa metedata for record types. (PR #116991)

2024-11-20 Thread John McCall via cfe-commits
https://github.com/rjmccall requested changes to this pull request. https://github.com/llvm/llvm-project/pull/116991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
@@ -1419,6 +1419,42 @@ is not specified. }]; } +def ExplicitInitDocs : Documentation { + let Category = DocCatField; + let Content = [{ +The ``clang::requires_explicit_initialization`` attribute indicates that the +field of an aggregate must be initialized explicitly by us

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-20 Thread via cfe-commits
@@ -,6 +1116,10 @@ void CXXRecordDecl::addedMember(Decl *D) { } else if (!T.isCXX98PODType(Context)) data().PlainOldData = false; +if (Field->hasAttr() && !Field->hasInClassInitializer()) { + setHasUninitializedExplicitInitFields(true); +} -

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/116847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-20 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud updated https://github.com/llvm/llvm-project/pull/114606 >From cc19550fdbaca4b77e90de57c472a31a8c3f8293 Mon Sep 17 00:00:00 2001 From: Rashmi Mudduluru Date: Fri, 1 Nov 2024 14:10:50 -0700 Subject: [PATCH 1/7] [Webkit Checkers] Introduce a Webkit checker for memory

[clang] [ASTMatchers] AST matcher support for ObjC pointers (PR #117021)

2024-11-20 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud created https://github.com/llvm/llvm-project/pull/117021 Add `ObjCInterfaceDecl` to the list of types supported by the `hasType` and `hasDeclaration` matchers, `ObjCObjectPointerType` to the list of types supported by `pointee`. >From 87ba2a10ca7435fdf6b5c47d2c1c97

[clang] 53a6a11 - [LLVM][NFC] Use `used`'s element type if available (#116804)

2024-11-20 Thread via cfe-commits
Author: Alex Voicu Date: 2024-11-20T23:57:55Z New Revision: 53a6a11e0d51229d341b8906252645cd8a5de796 URL: https://github.com/llvm/llvm-project/commit/53a6a11e0d51229d341b8906252645cd8a5de796 DIFF: https://github.com/llvm/llvm-project/commit/53a6a11e0d51229d341b8906252645cd8a5de796.diff LOG: [L

[clang] [llvm] [LLVM][NFC] Use `used`'s element type if available (PR #116804)

2024-11-20 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/116804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-20 Thread Campbell Barton via cfe-commits
ideasman42 wrote: > I don't disagree these are all potential pitfalls (and there are certainly > more), I just don't see how having the diff code in a separate project > ameliorates any of them. And as stated earlier, I think it in fact > complicates them. >From a user perspective it likely j

[clang] Reland [Clang] skip default argument instantiation for non-defining friend declarations to meet [dcl.fct.default] p4 (PR #115487)

2024-11-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/115487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][UBSan] Make sure that the implicit-conversion group is compatible with minimal runtime (PR #114865)

2024-11-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid closed https://github.com/llvm/llvm-project/pull/114865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-20 Thread Ashley Coleman via cfe-commits
@@ -17,12 +17,10 @@ double test_int_builtin(double p0) { double2 test_int_builtin_2(double2 p0) { return __builtin_hlsl_elementwise_firstbithigh(p0); - // expected-error@-1 {{1st argument must be a vector of integers - // (was 'double2' (aka 'vector'))}} + // expected-err

[clang] f710e4c - Clarify use of contractions in diagnostic messages (#116803)

2024-11-20 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-11-20T08:33:05-05:00 New Revision: f710e4c0219c97d4726742b294446b833e604819 URL: https://github.com/llvm/llvm-project/commit/f710e4c0219c97d4726742b294446b833e604819 DIFF: https://github.com/llvm/llvm-project/commit/f710e4c0219c97d4726742b294446b833e604819.diff

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-20 Thread Matt Arsenault via cfe-commits
@@ -322,22 +322,26 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) if ( ARCH STREQUAL spirv OR ARCH STREQUAL spirv64 ) set( build_flags -O0 -finline-hint-functions -DCLC_SPIRV ) - set( opt_flags ) + set( clc_opt_flags ) + # Inline CLC functions into OpenCL

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/113470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-20 Thread Eli Friedman via cfe-commits
@@ -8714,6 +8714,21 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } + // zero sized static arrays are not allowed in HIP device functions + if (LangOpts.CUDAIsDevice && LangOpts.HIP) { +if (FunctionDecl *FD = getCurFunctionDecl(); +FD && +

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/115699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/116847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-20 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,38 @@ +#include +#include +#include + +#define CLC_SIGN(TYPE, F) \ + _CLC_DEF _CLC_OVERLOAD TYPE __clc_sign(TYPE x) { \ +if (__clc_isnan(x)) {

[clang] [Clang] skip warnings for constructors marked with the [[noreturn]] attribute (PR #115558)

2024-11-20 Thread Oleksandr T. via cfe-commits
@@ -555,6 +555,8 @@ Improvements to Clang's diagnostics getS(); // Now diagnoses "Reason 2", previously diagnoses "Reason 1" } +- Clang now omits warnings for constructors marked with the ``[[noreturn]]`` attribute (#GH63009). a-tarasyuk wrote: @Si

[clang] [Clang] skip warnings for constructors marked with the [[noreturn]] attribute (PR #115558)

2024-11-20 Thread Oleksandr T. via cfe-commits
@@ -49,3 +49,15 @@ void check() { test_type(g); test_type(h); // expected-note {{instantiation}} } + +namespace GH63009 { +struct S { + [[noreturn]] S() { throw int {}; } +}; + +int test_no_return_constructor() { S(); } // ok a-tarasyuk wrote: @AaronBallm

[clang] [TBAA] Only emit pointer tbaa metedata for record types. (PR #116991)

2024-11-20 Thread John McCall via cfe-commits
@@ -206,12 +206,14 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { if (!CodeGenOpts.PointerTBAA) return AnyPtr; // Compute the depth of the pointer and generate a tag of the form "p -// ". +// ". Look through pointer and array types to

[clang] [TBAA] Only emit pointer tbaa metedata for record types. (PR #116991)

2024-11-20 Thread John McCall via cfe-commits
@@ -230,6 +232,11 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { ->getString(); TyName = Name; } else { + // Be conservative if the type a MemberPointerType. Those would require + // stripping const-qualifiers inside the typ

[clang] [TBAA] Only emit pointer tbaa metedata for record types. (PR #116991)

2024-11-20 Thread John McCall via cfe-commits
@@ -206,12 +206,14 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { if (!CodeGenOpts.PointerTBAA) return AnyPtr; // Compute the depth of the pointer and generate a tag of the form "p -// ". +// ". Look through pointer and array types to

[clang] [TBAA] Only emit pointer tbaa metedata for record types. (PR #116991)

2024-11-20 Thread John McCall via cfe-commits
@@ -206,12 +206,14 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { if (!CodeGenOpts.PointerTBAA) return AnyPtr; // Compute the depth of the pointer and generate a tag of the form "p -// ". +// ". Look through pointer and array types to

[clang] Add a testcase for riscv64-linux-android triple (PR #116892)

2024-11-20 Thread via cfe-commits
https://github.com/hiraditya updated https://github.com/llvm/llvm-project/pull/116892 >From 2974c9d52c45145de1735f79ccaa11b037269083 Mon Sep 17 00:00:00 2001 From: AdityaK Date: Tue, 19 Nov 2024 15:54:16 -0800 Subject: [PATCH] Add a testcase for riscv64-linux-android triple --- clang/test/Dri

[clang] [lld] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lld Author: Dan Gohman (sunfishcode) Changes This adds WebAssembly support for the new [Lime1 CPU]. First, this defines some new target features. These are subsets of existing features that reflect implementation concerns: - "call-indirect-overlong" -

[clang] [lld] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dan Gohman (sunfishcode) Changes This adds WebAssembly support for the new [Lime1 CPU]. First, this defines some new target features. These are subsets of existing features that reflect implementation concerns: - "call-indirect-overlong"

[clang] [lld] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-11-20 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode ready_for_review https://github.com/llvm/llvm-project/pull/112035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lld-wasm Author: Dan Gohman (sunfishcode) Changes This adds WebAssembly support for the new [Lime1 CPU]. First, this defines some new target features. These are subsets of existing features that reflect implementation concerns: - "call-indirect-overlo

[clang] [lld] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-11-20 Thread Sam Clegg via cfe-commits
@@ -854,9 +854,15 @@ and `-mbulk-memory` flags, which correspond to the [Bulk Memory Operations] and [Non-trapping float-to-int Conversions] language features, which are [widely implemented in engines]. +A new Lime1 target CPU is added, -mcpu=lime1. This CPU follows the defin

[clang] [rtsan] NFC: Update docs with customizable functions (PR #117086)

2024-11-20 Thread Chris Apple via cfe-commits
https://github.com/cjappl created https://github.com/llvm/llvm-project/pull/117086 These functions recently were helpful for a user, so I decided to add them to the official docs. Any feedback on wording or content appreciated as always >From 056fa6a787efb0721b30fee6e0bdea9843e303d4 Mon Sep

[clang] c86899d - [clang] Add support for `__declspec(no_init_all)` (#116847)

2024-11-20 Thread via cfe-commits
Author: Daniel Paoliello Date: 2024-11-20T16:48:30-08:00 New Revision: c86899d2d218e19f5a69d9f97f6ff43abc6c897c URL: https://github.com/llvm/llvm-project/commit/c86899d2d218e19f5a69d9f97f6ff43abc6c897c DIFF: https://github.com/llvm/llvm-project/commit/c86899d2d218e19f5a69d9f97f6ff43abc6c897c.di

[clang] [clang] Add support for `__declspec(no_init_all)` (PR #116847)

2024-11-20 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello closed https://github.com/llvm/llvm-project/pull/116847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2024-11-20 Thread Karol Herbst via cfe-commits
@@ -322,22 +322,26 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) if ( ARCH STREQUAL spirv OR ARCH STREQUAL spirv64 ) set( build_flags -O0 -finline-hint-functions -DCLC_SPIRV ) - set( opt_flags ) + set( clc_opt_flags ) + # Inline CLC functions into OpenCL

[clang] Add support for aligning BlockComments in declarations (PR #109497)

2024-11-20 Thread via cfe-commits
https://github.com/JessehMSFT updated https://github.com/llvm/llvm-project/pull/109497 >From 38333491868dfad9c84719d9dd8fd872a2aa7584 Mon Sep 17 00:00:00 2001 From: Jesse Harvey Date: Fri, 20 Sep 2024 16:40:35 -0700 Subject: [PATCH 1/4] Add support for aligning BlockComments in declarations --

[clang] [rtsan] NFC: Update docs with customizable functions (PR #117086)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris Apple (cjappl) Changes These functions recently were helpful for a user, so I decided to add them to the official docs. Any feedback on wording or content appreciated as always --- Full diff: https://github.com/llvm/llvm-project/p

[clang] [webkit.UncountedLambdaCapturesChecker] Fix debug assertion failure. (PR #117090)

2024-11-20 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/117090 Only call getThisType() on an instance method. >From 31481cda425206408eb3aeef844503b110dfaa4d Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 20 Nov 2024 17:23:18 -0800 Subject: [PATCH] [webkit.UncountedLa

[clang] [clang] Use a Worklist for some CodeGenFunctions (PR #115395)

2024-11-20 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: split-file %s %t +// RUN: python %t/gen.py %t/switch-overflow.c %t/tmp.c && %clang_cc1 -emit-llvm %t/tmp.c -o - | FileCheck %t/tmp.c + +//--- gen.py efriedma-quic wrote: I guess 32000 is small enough that a test won't be that expensive,

[clang] [clang] Use a Worklist for some CodeGenFunctions (PR #115395)

2024-11-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/115395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/117092 - Rework attr-target-x86 test - Allow prefer-256-bit for __attribute__((target)) >From 3bab9f901045426321d687fc36e4ba3034cc0f30 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 20 Nov 2024 17:23:56 -080

[clang] Rework attr-target-x86 test (PR #117091)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/117091 Rework the attr-target-x86 test so the CHECK lines for the attributes are next to their corresponding `__attribute__`. >From 3bab9f901045426321d687fc36e4ba3034cc0f30 Mon Sep 17 00:00:00 2001 From: Matthias Braun

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Dan Gohman via cfe-commits
sunfishcode wrote: The short answer is that's what the [Lime1 CPU calls it](https://github.com/WebAssembly/tool-conventions/blob/main/Lime.md#lime1) :smile: . > Can you explain why you want call-indirect-overlong in lime1? Is it because > you want to be able to link files compiles with multi-

[clang] Rework attr-target-x86 test (PR #117091)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB ready_for_review https://github.com/llvm/llvm-project/pull/117091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/116331 >From 3c792216f88e87b69b3ea7415c2fd74b7f5d7469 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Fri, 25 Oct 2024 17:48:41 + Subject: [PATCH 1/8] adding comments --- clang/include/clang/Basic/Attr.td

[clang] Rework attr-target-x86 test (PR #117091)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matthias Braun (MatzeB) Changes Rework the attr-target-x86 test so the CHECK lines for the attributes are next to their corresponding `__attribute__`. --- Full diff: https://github.com/llvm/llvm-project/pull/117091.diff 1 Files Affected

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Sam Clegg via cfe-commits
sbc100 wrote: > The short answer is that's what the [Lime1 CPU calls > it](https://github.com/WebAssembly/tool-conventions/blob/main/Lime.md#lime1) > 😄 . > > > Can you explain why you want call-indirect-overlong in lime1? Is it because > > you want to be able to link files compiles with multi

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB ready_for_review https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matthias Braun (MatzeB) Changes It would be useful for us to have `__attribue__((target("prefer-256-bit")))` / `__attribue__((target("no-prefer-256-bit")))` to create variants of a functions to generate AVX code with 256/512 bit vector si

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in reduce `or` and `xor` function. (PR #116976)

2024-11-20 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/116976 >From 4d13a8267dd5d0e99063bb088a85406af5266c80 Mon Sep 17 00:00:00 2001 From: c8ef Date: Wed, 20 Nov 2024 22:07:35 +0800 Subject: [PATCH 1/2] constexpr reduce or/xor --- clang/docs/ReleaseNotes.rst

[clang] [clang] constexpr built-in reduce `or` and `xor` function. (PR #116976)

2024-11-20 Thread via cfe-commits
@@ -732,6 +732,10 @@ at the end to the next power of 2. These reductions support both fixed-sized and scalable vector types. +The reduction intrinsics, including ``__builtin_reduce_add``, c8ef wrote: Added. https://github.com/llvm/llvm-project/pull/116976 _

[clang-tools-extra] [clang-tidy] ignore consteval function in `ExceptionAnalyzer` (PR #116643)

2024-11-20 Thread Julian Schmidt via cfe-commits
@@ -320,6 +320,11 @@ bool isQualificationConvertiblePointer(QualType From, QualType To, } // namespace static bool canThrow(const FunctionDecl *Func) { + // consteval specifies every call to the function must produce a compile-time + // constant. compile-time constant canno

[clang] 668f2c7 - [clang][UBSan] Make sure that the implicit-conversion group is compatible with minimal runtime (#114865)

2024-11-20 Thread via cfe-commits
Author: Axel Lundberg Date: 2024-11-20T14:57:23-08:00 New Revision: 668f2c7fab288db90d474a7f6f72b11e5a120328 URL: https://github.com/llvm/llvm-project/commit/668f2c7fab288db90d474a7f6f72b11e5a120328 DIFF: https://github.com/llvm/llvm-project/commit/668f2c7fab288db90d474a7f6f72b11e5a120328.diff

[clang] [Clang] Fix constexpr-ness on implicitly deleted destructors (PR #116359)

2024-11-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/116359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM] Emit an error when the hard-float ABI is enabled but can't be used. (PR #111334)

2024-11-20 Thread Peter Smith via cfe-commits
https://github.com/smithp35 edited https://github.com/llvm/llvm-project/pull/111334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SME] Ignore flatten for callees with mismatched streaming attributes (PR #116391)

2024-11-20 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. Oh, right, we have isInlineViable(), but attributes aren't part of it for... reasons. (I haven't tried to dig into https://discourse.llvm.org/t/rfc-avoid-inlining-alwaysinline-functions-when-they-cannot-be-inlined ; I'll believe you

[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)

2024-11-20 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/114684 >From d95d0fdb22ae2ad162f89cb211f313cea6c6474a Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 2 Nov 2024 23:54:35 +0200 Subject: [PATCH 1/6] [Clang] enhance error recovery with RecoveryExpr for traili

[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)

2024-11-20 Thread Oleksandr T. via cfe-commits
@@ -32,6 +32,26 @@ void test_invalid_call(int s) { int var = some_func(undef1); } +int some_func2(int a, int b); +void test_invalid_call_2() { + // CHECK: `-RecoveryExpr {{.*}} 'int' contains-errors + // CHECK-NEXT: |-UnresolvedLookupExpr {{.*}} '' lvalue (ADL) = 'some_

[clang] Remove Linux search paths on Windows (PR #113628)

2024-11-20 Thread David Salinas via cfe-commits
david-salinas wrote: > Is there an issue with simply using the `HostTC` for everything? I feel like > that's the solution to this mess, since the `HostTC` would always know > whether or not the target is Windows without us needing to forward a bunch of > stuff. Yes, that would work too. But

[clang] [lld] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-11-20 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/112035 >From 22c34e6c92a6fe384e409a083584c00954521861 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH] [WebAssembly] Support the new "Lime1" CPU This adds WebAssembl

[clang] [lld] [llvm] [WebAssembly] Define a new "Lime1" CPU (PR #112035)

2024-11-20 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/112035 >From 329d30a551639f6aeccdb805358c1b661d73d97c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH] [WebAssembly] Support the new "Lime1" CPU This adds WebAssembl

[clang] Add a testcase for riscv64-linux-android triple (PR #116892)

2024-11-20 Thread via cfe-commits
@@ -311,3 +311,19 @@ // CHECK-X86_64-GCC: Found candidate GCC installation: {{.*}}i686-linux-android{{[/\\]}}4.9 // CHECK-X86_64-GCC-NEXT: Found candidate GCC installation: {{.*}}x86_64-linux-android{{[/\\]}}4.9 // CHECK-X86_64-GCC-NEXT: Selected GCC installation: {{.*}}x86_

[clang] Add a testcase for riscv64-linux-android triple (PR #116892)

2024-11-20 Thread via cfe-commits
https://github.com/hiraditya edited https://github.com/llvm/llvm-project/pull/116892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] hexagon: fix link order for libc/builtins (PR #117057)

2024-11-20 Thread Brian Cain via cfe-commits
https://github.com/androm3da created https://github.com/llvm/llvm-project/pull/117057 When linking programs with qcld, we get a link error like below: Error: /inst/clang+llvm-19.1.0-cross-hexagon-unknown-linux-musl/x86_64-linux-gnu/bin/../target/hexagon-unknown-linux-musl//usr/lib/libc.a(s

[clang] [ASTMatchers] AST matcher support for ObjC pointers (PR #117021)

2024-11-20 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 approved this pull request. Neat! https://github.com/llvm/llvm-project/pull/117021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)

2024-11-20 Thread Haojian Wu via cfe-commits
@@ -32,6 +32,26 @@ void test_invalid_call(int s) { int var = some_func(undef1); } +int some_func2(int a, int b); +void test_invalid_call_2() { + // CHECK: `-RecoveryExpr {{.*}} 'int' contains-errors + // CHECK-NEXT: |-UnresolvedLookupExpr {{.*}} '' lvalue (ADL) = 'some_

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-11-20 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: We could maybe look at setting hadError less aggressively in InitListChecker, for cases where the error is unlikely to impact the overall parse. If a member has a RecoveryExpr as its initializer, it's probably reasonable to continue producing error messages. That said, I

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-20 Thread Sam Clegg via cfe-commits
sbc100 wrote: Can you explain why you want `call-indirect-overlong` in lime1? Is it because you want to be able to link files compiles with multi-table? i.e. do you want/expect type relocations at every call_indirect site? If so then perhaps a better name might be `call-indirect-relocatabl

[clang] [Clang] Fix -Wunused-private-field false negative with defaulted comparison operators (PR #116871)

2024-11-20 Thread Chris White via cfe-commits
@@ -20,6 +20,17 @@ class SpaceShipDefaultCompare { int operator<=>(const SpaceShipDefaultCompare &) const = default; }; +class UnusedConstPrivateField { + public: + UnusedConstPrivateField() : unused_(0) {} + private: + const int unused_; // expected-warning{{private field

[clang] [Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (PR #113470)

2024-11-20 Thread Vigneshwar Jayakumar via cfe-commits
@@ -8714,6 +8714,21 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } + // zero sized static arrays are not allowed in HIP device functions + if (LangOpts.CUDAIsDevice && LangOpts.HIP) { +if (FunctionDecl *FD = getCurFunctionDecl(); +FD && +

  1   2   3   4   5   6   >