[clang] 1299af6 - [clang] create class-type injected NTTP with correct value kind (#101395)

2024-08-02 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-08-03T00:36:48-03:00 New Revision: 1299af66322aa21246b0de6204dff553e46c408c URL: https://github.com/llvm/llvm-project/commit/1299af66322aa21246b0de6204dff553e46c408c DIFF:

[clang] [clang] create class-type injected NTTP with correct value kind (PR #101395)

2024-08-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/101395 >From 9e2dc4d465f2dc3d31bace2fca95b0656538b655 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 31 Jul 2024 16:54:02 -0300 Subject: [PATCH] [clang] create class-type injected NTTP with correct value

[clang] Fix all mypy --strict errors in clang python binding (PR #101784)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (TsXor) Changes Related: https://github.com/llvm/llvm-project/issues/76664 I used metadata reflection so that we can import C library functions just by declaring annotated python functions. This makes C function types visible to

[clang] Fix all mypy --strict errors in clang python binding (PR #101784)

2024-08-02 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] [Clang][Parser] Fix name lookup of template parameters for out-of-line specializations (PR #101020)

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

[clang] [clang] create class-type injected NTTP with correct value kind (PR #101395)

2024-08-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Makes sense to me. Thanks https://github.com/llvm/llvm-project/pull/101395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-08-02 Thread Jamie Schmeiser via cfe-commits
jamieschmeiser wrote: @rnk It is just a convenience to make things easier to read and should be removed if it is causing compile time issues. I just happened to see this comment now but will be unavailable for about 2 weeks. I will take care of it when I return (I'm not ignoring this...)

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-02 Thread via cfe-commits
@@ -596,6 +600,90 @@ bool BPFMIPreEmitPeephole::adjustBranch() { return Changed; } +static const unsigned CallerSavedRegs[] = {BPF::R0, BPF::R1, BPF::R2, + BPF::R3, BPF::R4, BPF::R5}; + +struct BPFFastCall { + MachineInstr *MI; +

[clang] [Clang] Adjust `exit()` builtin impl (PR #101689)

2024-08-02 Thread Timm Baeder via cfe-commits
tbaederr wrote: In https://github.com/llvm/llvm-project/pull/74803, the question of "why" came up and was never answered. https://github.com/llvm/llvm-project/pull/101689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 400c7c7 - [clang][Interp][NFC] Simplify Pointer move/copy assignment op

2024-08-02 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-08-03T04:59:16+02:00 New Revision: 400c7c7cf2b15138aa674355983be74270de93bc URL: https://github.com/llvm/llvm-project/commit/400c7c7cf2b15138aa674355983be74270de93bc DIFF: https://github.com/llvm/llvm-project/commit/400c7c7cf2b15138aa674355983be74270de93bc.diff

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 VNNI FP16/INT8/INT16 new instructions (PR #101783)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Phoebe Wang (phoebewang) Changes Ref.: https://cdrdv2.intel.com/v1/dl/getContent/828965 --- Patch is 445.25 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/101783.diff 28 Files Affected: -

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-08-02 Thread via cfe-commits
@@ -361,6 +368,13 @@ CodeGenFunction::AddInitializerToStaticVarDecl(const VarDecl , } return GV; } + if (!getLangOpts().CPlusPlus) { +// In C, when an initializer is given, the Linux kernel relies on clang to +// zero-initialize all members not explicitly

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-02 Thread Xiang Li via cfe-commits
@@ -664,11 +664,25 @@ LinkageComputer::getLVForNamespaceScopeDecl(const NamedDecl *D, if (PrevVar->getStorageClass() == SC_Static) return LinkageInfo::internal(); } + +if (Context.getLangOpts().HLSL && +Var->hasAttr()) + return

[clang] [RISCV] Use FP type as the base type for some int->f conversions. (PR #101733)

2024-08-02 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/101733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6e70ca1 - [RISCV] Use FP type as the base type for some int->f conversions. (#101733)

2024-08-02 Thread via cfe-commits
Author: Craig Topper Date: 2024-08-02T18:44:43-07:00 New Revision: 6e70ca1e802f26b4c9cbe90c11b2c5317789ed23 URL: https://github.com/llvm/llvm-project/commit/6e70ca1e802f26b4c9cbe90c11b2c5317789ed23 DIFF: https://github.com/llvm/llvm-project/commit/6e70ca1e802f26b4c9cbe90c11b2c5317789ed23.diff

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-08-02 Thread via cfe-commits
https://github.com/yabinc updated https://github.com/llvm/llvm-project/pull/97121 >From e1d75774c554a5125428b3f3a6304a921c81c5f0 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Thu, 27 Jun 2024 17:11:52 -0700 Subject: [PATCH 1/2] [clang][CodeGen] Zero init unspecified fields in initializers in

[clang] [RISCV] Use FP type as the base type for some int->f conversions. (PR #101733)

2024-08-02 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat approved this pull request. LGTM~ https://github.com/llvm/llvm-project/pull/101733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] Reland "[X86][AVX10.2] Support AVX10.2 option and VMPSADBW/VADDP[D,H,S] new instructions (#101452)" (PR #101616)

2024-08-02 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/101616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-08-02 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 12189f800585ab459afa20b4f159db93ae474b57 e1d75774c554a5125428b3f3a6304a921c81c5f0

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-08-02 Thread via cfe-commits
https://github.com/yabinc updated https://github.com/llvm/llvm-project/pull/97121 >From e1d75774c554a5125428b3f3a6304a921c81c5f0 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Thu, 27 Jun 2024 17:11:52 -0700 Subject: [PATCH] [clang][CodeGen] Zero init unspecified fields in initializers in C

[clang] Warning Libc functions (PR #101583)

2024-08-02 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Though we probably don't need this warning anymore but this is really a great catch of wording issues! https://github.com/llvm/llvm-project/pull/101583 ___ cfe-commits mailing list

[clang] [llvm] [PPC] Implement BCD assist builtins (PR #101390)

2024-08-02 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,58 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// REQUIRES: powerpc-registered-target +// RUN: %clang_cc1 -triple powerpc64le-unknown-linux -O2 -target-cpu pwr7 \ +// RUN: -emit-llvm %s -o - | FileCheck %s

[clang] [llvm] Add length builtins and length HLSL function to DirectX Backend (PR #101256)

2024-08-02 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,10 @@ +; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s + +; DXIL operation length does not support scalar types +; CHECK: error: invalid intrinsic signature + +define noundef float @test_length_float(float noundef %p0) {

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-02 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/101433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread via cfe-commits
https://github.com/jyu2-git closed https://github.com/llvm/llvm-project/pull/101101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Ensure that the selected candidate for a member function explicit specialization is more constrained than all others (PR #101721)

2024-08-02 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Changes to the algorithm for selecting the most constrained function look correct. It's not clear to me whether it's correct to stop calling `CheckMemberSpecialization` for member templates, though -- do we still do the necessary checks somewhere else?

[clang] [Clang][Sema] Ensure that the selected candidate for a member function explicit specialization is more constrained than all others (PR #101721)

2024-08-02 Thread Richard Smith via cfe-commits
@@ -7964,8 +7964,9 @@ NamedDecl *Sema::ActOnVariableDeclarator( D.setRedeclaration(CheckVariableDeclaration(NewVD, Previous)); } else { // If this is an explicit specialization of a static data member, check it. -if (IsMemberSpecialization &&

[clang] [Clang][Sema] Ensure that the selected candidate for a member function explicit specialization is more constrained than all others (PR #101721)

2024-08-02 Thread Richard Smith via cfe-commits
@@ -10465,7 +10466,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator , DeclContext *DC, Previous)) NewFD->setInvalidDecl(); } -} else if (isMemberSpecialization && isa(NewFD)) { +} else if

[clang] [Clang][Sema] Ensure that the selected candidate for a member function explicit specialization is more constrained than all others (PR #101721)

2024-08-02 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/101721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Add GCS support for AArch64 (PR #99335)

2024-08-02 Thread via cfe-commits
https://github.com/jinge90 approved this pull request. https://github.com/llvm/llvm-project/pull/99335 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Julian Brown via cfe-commits
jtb20 wrote: Thank you for the review! Again, I do not have commit access, so please apply for me if possible. Julian https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] Add length builtins and length HLSL function to DirectX Backend (PR #101256)

2024-08-02 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,10 @@ +; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s + +; DXIL operation length does not support scalar types +; CHECK: error: invalid intrinsic signature + +define noundef float @test_length_float(float noundef %p0) {

[clang] [llvm] Add length builtins and length HLSL function to DirectX Backend (PR #101256)

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

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-02 Thread Chris B via cfe-commits
@@ -664,11 +664,25 @@ LinkageComputer::getLVForNamespaceScopeDecl(const NamedDecl *D, if (PrevVar->getStorageClass() == SC_Static) return LinkageInfo::internal(); } + +if (Context.getLangOpts().HLSL && +Var->hasAttr()) + return

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-02 Thread Chris B via cfe-commits
@@ -354,6 +354,23 @@ llvm::Value *CGHLSLRuntime::emitInputSemantic(IRBuilder<> , return nullptr; } +void CGHLSLRuntime::emitFunctionProlog(const FunctionDecl *FD, llvm-beanz wrote: I think this is poorly named. It isn't emitting a function prolog it is

[clang] [llvm] demangle function names in trace files (PR #87626)

2024-08-02 Thread Reid Kleckner via cfe-commits
rnk wrote: Are we sure we want this behavior? Demangling is really expensive. A user noticed a significant (10%) compile time regression from this change. We could skip the demangling and do it offline. It's also worth pointing out that we have to redo this work every time we optimize the

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-02 Thread Malavika Samak via cfe-commits
@@ -6763,15 +6763,18 @@ attribute requires a string literal argument to identify the handle being releas def UnsafeBufferUsageDocs : Documentation { let Category = DocCatFunction; let Content = [{ -The attribute ``[[clang::unsafe_buffer_usage]]`` should be placed on

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-02 Thread Malavika Samak via cfe-commits
@@ -927,21 +927,28 @@ class CArrayToPtrAssignmentGadget : public FixableGadget { /// over one of its pointer parameters. class UnsafeBufferUsageAttrGadget : public WarningGadget { constexpr static const char *const OpTag = "call_expr"; - const CallExpr *Op; + const Expr

[clang] [clang] Fix compile-time regression from attribute arg checking change (PR #101768)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mike Rice (mikerice1969) Changes In 2acf77f987331c05520c5bfd849326909ffce983 code was added to use the 'full' name including syntax and scope. Instead of building up a large string for each name, add syntax and scope checks to the value

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-02 Thread Malavika Samak via cfe-commits
@@ -927,21 +927,28 @@ class CArrayToPtrAssignmentGadget : public FixableGadget { /// over one of its pointer parameters. class UnsafeBufferUsageAttrGadget : public WarningGadget { constexpr static const char *const OpTag = "call_expr"; - const CallExpr *Op; + const Expr

[clang] [clang] Fix compile-time regression from attribute arg checking change (PR #101768)

2024-08-02 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 created https://github.com/llvm/llvm-project/pull/101768 In 2acf77f987331c05520c5bfd849326909ffce983 code was added to use the 'full' name including syntax and scope. Instead of building up a large string for each name, add syntax and scope checks to the value

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-02 Thread Malavika Samak via cfe-commits
@@ -927,21 +927,28 @@ class CArrayToPtrAssignmentGadget : public FixableGadget { /// over one of its pointer parameters. class UnsafeBufferUsageAttrGadget : public WarningGadget { constexpr static const char *const OpTag = "call_expr"; - const CallExpr *Op; + const Expr

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-02 Thread Malavika Samak via cfe-commits
@@ -2261,6 +2262,12 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { // note_unsafe_buffer_operation doesn't have this mode yet. assert(!IsRelatedToDecl && "Not implemented yet!"); MsgParam = 3; + } else if (isa(Operation)) {

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-02 Thread Malavika Samak via cfe-commits
@@ -0,0 +1,113 @@ +// RUN: %clang_cc1 -std=c++20 -Wunsafe-buffer-usage \ +// RUN:-fsafe-buffer-usage-suggestions -verify %s + +using size_t = __typeof(sizeof(int)); + +namespace std { + class type_info; + class bad_cast; + class bad_typeid; + + template class

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-02 Thread Malavika Samak via cfe-commits
@@ -0,0 +1,113 @@ +// RUN: %clang_cc1 -std=c++20 -Wunsafe-buffer-usage \ +// RUN:-fsafe-buffer-usage-suggestions -verify %s + +using size_t = __typeof(sizeof(int)); + +namespace std { + class type_info; + class bad_cast; + class bad_typeid; + + template class

[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

2024-08-02 Thread Kim Gräsman via cfe-commits
kimgr wrote: > The exported target is new and hasn't been in a release yet. It should be in > LLVM-19 once it's released and Debian gets updated. Of course, this is also > true of any other new thing that gets added now anyway.  > I am a little confused about what your goal is with the

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-02 Thread Malavika Samak via cfe-commits
@@ -959,12 +966,12 @@ class UnsafeBufferUsageAttrGadget : public WarningGadget { /// perform buffer operations that depend on the correctness of the parameters. class UnsafeBufferUsageCtorAttrGadget : public WarningGadget { constexpr static const char *const OpTag =

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-02 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. LGTM, but test locally w/ LLVM_ENABLE_EXPENSIVE_CHECKS=On https://llvm.org/docs/CMake.html. If that passes, then go ahead and land this, since I think the nondeterminism in output order will be accounted for.

[clang] [HIP] Fix __clang_hip_cmath.hip for ambiguity (PR #101341)

2024-08-02 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/101341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] db1d3b2 - [HIP] Fix __clang_hip_cmath.hip for ambiguity (#101341)

2024-08-02 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2024-08-02T18:37:22-04:00 New Revision: db1d3b23a37c7a57fa8b9e5bc94e1b22e278d361 URL: https://github.com/llvm/llvm-project/commit/db1d3b23a37c7a57fa8b9e5bc94e1b22e278d361 DIFF:

[clang] [CodeGen][NFCI] Don't re-implement parts of ASTContext::getIntWidth (PR #101765)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Jessica Clarke (jrtc27) Changes ASTContext::getIntWidth returns 1 if isBooleanType(), and falls back on getTypeSize in the default case, which itself just returns the Width from getTypeInfo's returned struct, so can be used in all

[clang] [CodeGen][NFCI] Don't re-implement parts of ASTContext::getIntWidth (PR #101765)

2024-08-02 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 created https://github.com/llvm/llvm-project/pull/101765 ASTContext::getIntWidth returns 1 if isBooleanType(), and falls back on getTypeSize in the default case, which itself just returns the Width from getTypeInfo's returned struct, so can be used in all cases here,

[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

2024-08-02 Thread Evan Wilde via cfe-commits
etcwilde wrote: > We can't really help you with whatever is wrong with Debian's packages unless > it is a bug caused by our build configurations. The change you're proposing > in this PR could just as easily be impacted in some distro's packages. The exported target is new and hasn't been in

[clang] Reland "[Modules] Fix using `va_list` with modules and a precompiled header. (#101752)" (PR #101762)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/101762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d9f786f - Reland "[Modules] Fix using `va_list` with modules and a precompiled header. (#100837)"

2024-08-02 Thread via cfe-commits
Author: Volodymyr Sapsai Date: 2024-08-02T19:15:47-03:00 New Revision: d9f786fd13fe03256ef0f2983ecd379d0e7e8c93 URL: https://github.com/llvm/llvm-project/commit/d9f786fd13fe03256ef0f2983ecd379d0e7e8c93 DIFF:

[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

2024-08-02 Thread Kim Gräsman via cfe-commits
kimgr wrote: @llvm-beanz Thanks for clarifying! Yeah, I no longer think this PR has anything to offer. If you think it's future-proof to assume the interface include dir of clang-resource-headers is one level down from the resource dir, that works to polish and seed it into a hardwired

[clang] Reland "[Modules] Fix using `va_list` with modules and a precompiled header. (#101752)" (PR #101762)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules Author: Volodymyr Sapsai (vsapsai) Changes Fix the false warning incompatible pointer types passing 'va_list' (aka '__builtin_va_list') to parameter of type 'struct __va_list_tag *'

[clang] Reland "[Modules] Fix using `va_list` with modules and a precompiled header. (#101752)" (PR #101762)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/101762 Fix the false warning > incompatible pointer types passing 'va_list' (aka '__builtin_va_list') to > parameter of type 'struct __va_list_tag *' [-Wincompatible-pointer-types] The warning is wrong because both

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-08-02 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/97362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] support import return with UnaryTransformType (PR #101517)

2024-08-02 Thread Matheus Izvekov via cfe-commits
@@ -3636,6 +3636,10 @@ class IsTypeDeclaredInsideVisitor return {}; } + std::optional VisitUnaryTransformType(const UnaryTransformType *T) { +return CheckType(T->getBaseType()); mizvekov wrote: Strictly speaking, you only need to visit the base

[clang] [clang][ASTImporter] support import return with UnaryTransformType (PR #101517)

2024-08-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM You can limit the amount of nodes traversed, but I don't expect this will have a significant impact. https://github.com/llvm/llvm-project/pull/101517 ___ cfe-commits mailing list

[clang] [clang][ASTImporter] support import return with UnaryTransformType (PR #101517)

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

[clang] [Driver] Restrict Ofast deprecation help message to Clang (PR #101682)

2024-08-02 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. https://github.com/llvm/llvm-project/pull/101682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread via cfe-commits
https://github.com/jyu2-git edited https://github.com/llvm/llvm-project/pull/101101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread via cfe-commits
jyu2-git wrote: > LG with a nit Thanks Alexey for the code review!! https://github.com/llvm/llvm-project/pull/101101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Protect ObjCMethodList assignment operator against self-assignment (PR #97933)

2024-08-02 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/97933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] concepts: perform parameter mapping substitution in correct context (PR #101745)

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

[clang] [Modules] Fix using `va_list` with modules and a precompiled header. (PR #100837)

2024-08-02 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: Looks like need something like `// REQUIRES: x86-registered-target` in the test. But still need to check the correct approach in other tests. https://github.com/llvm/llvm-project/pull/100837 ___ cfe-commits mailing list

[clang] [llvm] [Clang] Protect ObjCMethodList assignment operator against self-assignment (PR #97933)

2024-08-02 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97933 >From 2653b8a0ab3792a22570118ed3b90cb302879ab0 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 19:22:01 -0700 Subject: [PATCH 1/2] [Clang] Protect ObjCMethodList assignment operator against

[clang] [Clang][Sema] Ensure that the selected candidate for a member function explicit specialization is more constrained than all others (PR #101721)

2024-08-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM But please give it some time for @zygoloid to take a look in case we are missing anything else. I see there are a few diagnostics sugar regressions, but they are not the fault of this patch, the issues are unrelated.

[clang] [llvm] [LLVM][PassBuilder] Extend the function signature of callback for optimizer pipeline extension point (PR #100953)

2024-08-02 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/100953 >From 602fcdf09002ec8fc3d6be12d8f087766c2c3554 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Sun, 28 Jul 2024 15:28:09 -0400 Subject: [PATCH] [LLVM][PassBuilder] Extend the function signature of callback

[clang] [llvm] [LLVM][PassBuilder] Extend the function signature of callback for optimizer pipeline extension point (PR #100953)

2024-08-02 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/100953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Fix codegen for transparent_union function params (PR #101738)

2024-08-02 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/101738 >From f25e4ab65ed16a1e1a3bde91efe24bd0d52e0e74 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Fri, 2 Aug 2024 13:58:37 -0400 Subject: [PATCH 1/2] [PowerPC] Fix codegen for transparent_union function params

[clang] Revert "[Modules] Fix using `va_list` with modules and a precompiled header." (PR #101752)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (dyung) Changes Reverts llvm/llvm-project#100837 The test Modules/builtin-vararg.c is failing on AArch64 build bots: - https://lab.llvm.org/buildbot/#/builders/190/builds/3117 - https://lab.llvm.org/buildbot/#/builders/65/builds/2302

[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

2024-08-02 Thread Chris B via cfe-commits
llvm-beanz wrote: > So I'm thinking even if the `clang-resource-headers` target was available, it > would not give the path to the resource dir, but rather the path to the > subdir containing the builtin headers. That might be fine, i.e. I could take > that path and add it with `-isystem

[clang] Revert "[Modules] Fix using `va_list` with modules and a precompiled header." (PR #101752)

2024-08-02 Thread via cfe-commits
https://github.com/dyung closed https://github.com/llvm/llvm-project/pull/101752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 48e624d - Revert "[Modules] Fix using `va_list` with modules and a precompiled header." (#101752)

2024-08-02 Thread via cfe-commits
Author: dyung Date: 2024-08-02T14:10:59-07:00 New Revision: 48e624dc2002a4947923ff309a76a3e4deb7d39a URL: https://github.com/llvm/llvm-project/commit/48e624dc2002a4947923ff309a76a3e4deb7d39a DIFF: https://github.com/llvm/llvm-project/commit/48e624dc2002a4947923ff309a76a3e4deb7d39a.diff LOG:

[clang] Revert "[Modules] Fix using `va_list` with modules and a precompiled header." (PR #101752)

2024-08-02 Thread via cfe-commits
https://github.com/dyung created https://github.com/llvm/llvm-project/pull/101752 Reverts llvm/llvm-project#100837 The test Modules/builtin-vararg.c is failing on AArch64 build bots: - https://lab.llvm.org/buildbot/#/builders/190/builds/3117 -

[clang] [llvm] Add length builtins and length HLSL function to DirectX Backend (PR #101256)

2024-08-02 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,10 @@ +; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s + +; DXIL operation length does not support double overload type +; CHECK: LLVM ERROR: Invalid Overload + +define noundef double @test_length_double2(<2 x double>

[clang] [Clang] Use private address space for builtin_alloca return type for OpenCL (PR #95750)

2024-08-02 Thread Alexander Richardson via cfe-commits
@@ -2210,6 +,9 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, case Builtin::BI__builtin_alloca_uninitialized: Diag(TheCall->getBeginLoc(), diag::warn_alloca) << TheCall->getDirectCallee(); +if (getLangOpts().OpenCL) { +

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread via cfe-commits
https://github.com/jyu2-git updated https://github.com/llvm/llvm-project/pull/101101 >From 1f6c326c6b93ebdbb9f4b35adfc903409ab67620 Mon Sep 17 00:00:00 2001 From: Jennifer Yu Date: Mon, 29 Jul 2024 14:18:48 -0700 Subject: [PATCH 01/10] Generate implicit default mapper for mapping array

[clang] [Clang] Fix potential null pointer dereferences in Sema::AddInitializerToDecl (PR #94368)

2024-08-02 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/94368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix potential null pointer dereferences in Sema::AddInitializerToDecl (PR #94368)

2024-08-02 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/94368 >From b6d45ded3d0d1ad6a50a1292d4f8275081089150 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Tue, 4 Jun 2024 08:33:51 -0700 Subject: [PATCH 1/6] [Clang] Fix potential null pointer dereferences in

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-08-02 Thread Shilei Tian via cfe-commits
shiltian wrote: ping https://github.com/llvm/llvm-project/pull/99732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread via cfe-commits
https://github.com/jyu2-git edited https://github.com/llvm/llvm-project/pull/101101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning Libc functions (PR #101583)

2024-08-02 Thread Malavika Samak via cfe-commits
malavikasamak wrote: Consider re-wording to: "string_view construction with raw pointers does not guarantee null-termination, construct with std::string instead" https://github.com/llvm/llvm-project/pull/101583 ___

[clang] [clang] concepts: perform parameter mapping subsitution in correct context (PR #101745)

2024-08-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/101745 >From 5fa1cc61f46b14b06dc9c219add164d2f4eafe0d Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Fri, 2 Aug 2024 16:53:11 -0300 Subject: [PATCH] [clang] concepts: perform parameter mapping subsitution in

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] concepts: perform parameter mapping subsitution in correct context (PR #101745)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes Prior to this patch, during constraint normalization we could forget from which declaration an atomic constraint was normalized from. Subsequently when performing parameter mapping substitution for that

[clang] [clang] concepts: perform parameter mapping subsitution in correct context (PR #101745)

2024-08-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Matheus Izvekov (mizvekov) Changes Prior to this patch, during constraint normalization we could forget from which declaration an atomic constraint was normalized from. Subsequently when performing parameter mapping substitution

[clang] [clang] concepts: perform parameter mapping subsitution in correct context (PR #101745)

2024-08-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/101745 Prior to this patch, during constraint normalization we could forget from which declaration an atomic constraint was normalized from. Subsequently when performing parameter mapping substitution for that

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,204 @@ struct MappableVarListInfo { }; } // namespace +static DeclRefExpr *buildImplicitMap(Sema , QualType BaseType, + DSAStackTy *Stack, + SmallVectorImpl ) { + + const RecordDecl

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG with a nit https://github.com/llvm/llvm-project/pull/101101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/101101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-02 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/101433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-02 Thread Justin Bogner via cfe-commits
@@ -81,6 +81,7 @@ struct BuiltinTypeDeclBuilder { BuiltinTypeDeclBuilder & addMemberVariable(StringRef Name, QualType Type, +const llvm::SmallVector , bogner wrote: Generally you don't want to pass the `SmallVector` template to a

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-02 Thread Justin Bogner via cfe-commits
@@ -280,18 +280,22 @@ void CGHLSLRuntime::annotateHLSLResource(const VarDecl *D, GlobalVariable *GV) { const auto *RD = Ty->getAsCXXRecordDecl(); if (!RD) return; - const auto *HLSLResAttr = RD->getAttr(); - const auto *HLSLResClassAttr = RD->getAttr(); - if

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-02 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Looks good modulo a couple of nitpicks. https://github.com/llvm/llvm-project/pull/101433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-02 Thread Justin Bogner via cfe-commits
@@ -112,17 +116,13 @@ struct BuiltinTypeDeclBuilder { Ty = Record->getASTContext().getPointerType( QualType(TTD->getTypeForDecl(), 0)); } -return addMemberVariable("h", Ty, Access); - } - - BuiltinTypeDeclBuilder (ResourceClass RC, -

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-02 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/101433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    3   4   5   6   7   8   9   10   11   12   >