[clang] [llvm] [openmp] [OpenMP] Increment kernel args version, used by runtime for detecting dyn_ptr. (PR #85363)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (dhruvachak) Changes A kernel implicit parameter (dyn_ptr) was introduced some time back. This patch increments the kernel args version for a compiler supporting dyn_ptr. The version will be used by the runtime to determine whether t

[clang] [llvm] [openmp] [OpenMP] Increment kernel args version, used by runtime for detecting dyn_ptr. (PR #85363)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp Author: None (dhruvachak) Changes A kernel implicit parameter (dyn_ptr) was introduced some time back. This patch increments the kernel args version for a compiler supporting dyn_ptr. The version will be used by the runtime to determine wh

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-14 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. LGTM from LoongArch side as GCC only have `-m[no-]strict-align`. BTW, should clang release notes be updated for this change? https://github.com/llvm/llvm-project/pull/85350 ___ cfe-commits maili

[clang] [llvm] [PowerPC] Rename symbols references by tls-local-dynamic model on AIX (PR #84132)

2024-03-14 Thread Felix via cfe-commits
https://github.com/orcguru updated https://github.com/llvm/llvm-project/pull/84132 >From 92ab84000b638e206106bf5b1e9e2e842f5bcf2b Mon Sep 17 00:00:00 2001 From: Ting Wang Date: Wed, 6 Mar 2024 02:51:40 -0500 Subject: [PATCH 1/5] [PowerPC] Rename symbols references by tls-local-dynamic model O

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-14 Thread YAMAMOTO Takashi via cfe-commits
https://github.com/yamt updated https://github.com/llvm/llvm-project/pull/84137 >From 6c1bfa0aa292d81102a9aeb86ca4264516beb634 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 9 Feb 2024 15:49:55 +0900 Subject: [PATCH 01/26] [WebAssembly] Implement an alternative translation for -wasm

[clang] [clang-format] Fix a bug in annotating FunctionDeclarationName (PR #85361)

2024-03-14 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/85361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
https://github.com/oraluben edited https://github.com/llvm/llvm-project/pull/85222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix issue on requires expression with templated base class member function (PR #85198)

2024-03-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky converted_to_draft https://github.com/llvm/llvm-project/pull/85198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISC-V] Add CSR read/write builtins (PR #85091)

2024-03-14 Thread Wang Pengcheng via cfe-commits
wangpc-pp wrote: > Should we use strings like ARM does so we can get register by name? Good point! We may provide two kinds of builtins: one by name, and another by CSR number. We should continue @lenary's proposal and discuss it in https://github.com/riscv-non-isa/riscv-toolchain-conventions

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-14 Thread YAMAMOTO Takashi via cfe-commits
https://github.com/yamt edited https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating FunctionDeclarationName (PR #85361)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes A name is not a FunctionDeclarationName if it's preceded by an Objective-C keyword. --- Full diff: https://github.com/llvm/llvm-project/pull/85361.diff 2 Files Affected: - (modified) clang/lib/Format/To

[clang] [clang-format] Fix a bug in annotating FunctionDeclarationName (PR #85361)

2024-03-14 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/85361 A name is not a FunctionDeclarationName if it's preceded by an Objective-C keyword. >From fa46932f5f0c0281d75907a3da795b2f343a8e70 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 14 Mar 2024 20:16:39 -0700 Su

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-14 Thread Owen Pan via cfe-commits
owenca wrote: Can you add lit test cases? https://github.com/llvm/llvm-project/pull/84346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (PR #85224)

2024-03-14 Thread Ella Ma via cfe-commits
@@ -1090,7 +1090,8 @@ static bool isStandardNewDelete(const FunctionDecl *FD) { // If the header for operator delete is not included, it's still defined // in an invalid source location. Check to make sure we don't crash. return !L.isValid() || - FD->getASTContext

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,24 @@ +/// attribute parsing error cases. + +// RUN: not llvm-mc -triple=hexagon -filetype=asm %s 2>&1 \ +// RUN: | FileCheck %s + + .attribute Tag_unknown_name, 0 +// CHECK: error: attribute name not recognized: Tag_unknown_name MaskRay wrote: Newe

[clang] [llvm] [PowerPC] Fix behavior of rldimi/rlwimi/rlwnm builtins (PR #85040)

2024-03-14 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/85040 >From 4977659b16a7f220e1a738a0b9841102fe9f1d07 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Wed, 13 Mar 2024 15:46:51 +0800 Subject: [PATCH 1/3] [PowerPC] Fix behavior of rldimi/rlwimi/rlwnm builtins rldim

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -251,7 +251,10 @@ StringRef llvm::object::getELFSectionTypeName(uint32_t Machine, unsigned Type) { } break; case ELF::EM_HEXAGON: -switch (Type) { STRINGIFY_ENUM_CASE(ELF, SHT_HEX_ORDERED); } +switch (Type) { + STRINGIFY_ENUM_CASE(ELF, SHT_HEX_ORDERED

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -321,9 +321,11 @@ void aarch64::getAArch64TargetFeatures(const Driver &D, } } - if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, - options::OPT_munaligned_access)) { -if (A->getOption().matches(options::OPT_mno_unalign

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -395,7 +396,8 @@ template class ELFObjectFile : public ELFObjectFileBase { for (const Elf_Shdr &Sec : *SectionsOrErr) { if (Sec.sh_type == ELF::SHT_ARM_ATTRIBUTES || - Sec.sh_type == ELF::SHT_RISCV_ATTRIBUTES) { + Sec.sh_type == ELF::SHT_RISCV_

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -652,6 +660,57 @@ bool HexagonAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, return finishBundle(IDLoc, Out); return false; } +/// parseDirectiveAttribute +/// ::= .attribute int, int +/// ::= .attribute Tag_name, int +bool HexagonAsmParser::parse

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,20 @@ +/// Enabled by default for assembly +// RUN: %clang -target hexagon-unknown-elf -### %s 2>&1 \ +// RUN:| FileCheck %s -check-prefix CHECK-ENABLED + +/// Can be forced on or off for assembly. +// RUN: %clang -target hexagon-unknown-elf -### %s 2>&1 -mno-defau

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread Fangrui Song via cfe-commits
@@ -79,7 +80,8 @@ static cl::opt ErrorNoncontigiousRegister( "merror-noncontigious-register", cl::desc("Error for register names that aren't contigious"), cl::init(false)); - +static cl::opt AddBuildAttributes("hexagon-add-build-attributes", +

[clang] [llvm] [BPF] Add support for may_goto insn (PR #85358)

2024-03-14 Thread via cfe-commits
https://github.com/4ast approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/85358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-14 Thread YunQiang Su via cfe-commits
@@ -321,9 +321,11 @@ void aarch64::getAArch64TargetFeatures(const Driver &D, } } - if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, - options::OPT_munaligned_access)) { -if (A->getOption().matches(options::OPT_mno_unalign

[clang] [llvm] [RISC-V] Add CSR read/write builtins (PR #85091)

2024-03-14 Thread Craig Topper via cfe-commits
topperc wrote: Should we use strings like ARM does so we can get register by name? https://github.com/llvm/llvm-project/pull/85091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add missing clang to the monolithic pre-merge build (PR #85354)

2024-03-14 Thread Tom Stellard via cfe-commits
https://github.com/tstellar approved this pull request. Good catch. https://github.com/llvm/llvm-project/pull/85354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-14 Thread Wang Pengcheng via cfe-commits
https://github.com/wangpc-pp approved this pull request. LGTM. cc @asb @topperc Some context of RISCV target: https://github.com/riscv-non-isa/riscv-c-api-doc/pull/62 https://github.com/llvm/llvm-project/pull/85350 ___ cfe-commits mailing list cfe-co

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-14 Thread YunQiang Su via cfe-commits
@@ -321,9 +321,11 @@ void aarch64::getAArch64TargetFeatures(const Driver &D, } } - if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access, - options::OPT_munaligned_access)) { -if (A->getOption().matches(options::OPT_mno_unalign

[clang] [NVPTX] Add `-march=general` option to mirror default configuration (PR #85222)

2024-03-14 Thread Yichen Yan via cfe-commits
https://github.com/oraluben updated https://github.com/llvm/llvm-project/pull/85222 >From 9d6fe5f8522ddedde66525e93f4b66e547ddadc6 Mon Sep 17 00:00:00 2001 From: Yichen Yan Date: Thu, 14 Mar 2024 19:43:49 +0800 Subject: [PATCH 1/4] [NVPTX] Add `-march=general` option to mirror default configur

[clang] [llvm] [RISC-V] Add CSR read/write builtins (PR #85091)

2024-03-14 Thread Wang Pengcheng via cfe-commits
wangpc-pp wrote: GCC gained its `__arm_rsr` and `__arm_wsr` support last year (October, 2023): https://gcc.gnu.org/pipermail/gcc-patches/2023-October/631855.html. So there is no stable released GCC version that supports these builtins. Clang supported these builtins about nine years ago: https

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread via cfe-commits
quic-areg wrote: @MaskRay @androm3da @SundeepKushwaha @sgundapa @shankarke https://github.com/llvm/llvm-project/pull/85359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread via cfe-commits
https://github.com/quic-areg updated https://github.com/llvm/llvm-project/pull/85359 >From b035993b477160d9ac6ef01c8d27e6681682f251 Mon Sep 17 00:00:00 2001 From: quic-areg Date: Thu, 14 Mar 2024 20:31:37 -0700 Subject: [PATCH 1/2] [Hexagon] ELF attributes for Hexagon Defines a subset of attri

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 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 c3a1eb6207d85cb37ea29306481b40c9f6402309 b035993b477160d9ac6ef01c8d27e6681682f251 --

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-objectyaml @llvm/pr-subscribers-mc @llvm/pr-subscribers-clang-driver Author: None (quic-areg) Changes Defines a subset of attributes and emits them to a section called .hexagon.attributes. The current attributes recorded are the attributes needed by ll

[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

2024-03-14 Thread via cfe-commits
https://github.com/quic-areg created https://github.com/llvm/llvm-project/pull/85359 Defines a subset of attributes and emits them to a section called .hexagon.attributes. The current attributes recorded are the attributes needed by llvm-objdump to automatically determine target features and

[clang] [llvm] [BPF] Add support for may_goto insn (PR #85358)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yonghong-song) Changes Alexei added may_goto insn in [1]. The asm syntax for may_goto looks like may_goto

[clang] [llvm] [BPF] Add support for may_goto insn (PR #85358)

2024-03-14 Thread via cfe-commits
yonghong-song wrote: cc @anakryiko @jemarch https://github.com/llvm/llvm-project/pull/85358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Add support for may_goto insn (PR #85358)

2024-03-14 Thread via cfe-commits
https://github.com/yonghong-song created https://github.com/llvm/llvm-project/pull/85358 Alexei added may_goto insn in [1]. The asm syntax for may_goto looks like may_goto The instruction represents a conditional branch but the condition is implicit. Later in bpf kernel verifier, the 'may_g

[clang] [llvm] [PowerPC] Fix behavior of rldimi/rlwimi/rlwnm builtins (PR #85040)

2024-03-14 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/85040 >From 4977659b16a7f220e1a738a0b9841102fe9f1d07 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Wed, 13 Mar 2024 15:46:51 +0800 Subject: [PATCH 1/2] [PowerPC] Fix behavior of rldimi/rlwimi/rlwnm builtins rldim

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: William Junda Huang (huangjd) Changes Such expression does not correspond to a variable in the source code thus does not have a debug location. When the user collects perf data on the program, if the intermediate memory load instr

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: William Junda Huang (huangjd) Changes Such expression does not correspond to a variable in the source code thus does not have a debug location. When the user collects perf data on the program, if the intermediate memory load inst

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo @llvm/pr-subscribers-llvm-ir Author: William Junda Huang (huangjd) Changes Such expression does not correspond to a variable in the source code thus does not have a debug location. When the user collects perf data on the program, if the inte

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: William Junda Huang (huangjd) Changes Such expression does not correspond to a variable in the source code thus does not have a debug location. When the user collects perf data on the program, if the intermediate memory load instruction

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-14 Thread William Junda Huang via cfe-commits
https://github.com/huangjd ready_for_review https://github.com/llvm/llvm-project/pull/81545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-14 Thread William Junda Huang via cfe-commits
https://github.com/huangjd updated https://github.com/llvm/llvm-project/pull/81545 >From f2c82758e1cba7773e41d941d2812c829c339675 Mon Sep 17 00:00:00 2001 From: William Huang Date: Mon, 12 Feb 2024 02:27:13 -0500 Subject: [PATCH 1/5] Add option to generate additional info for expression contai

[clang] [clang] Fix Clang language extension documentation markup for __builtin_arm_trap. (PR #85310)

2024-03-14 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. Thank you, and sorry for piling on extra errors... https://github.com/llvm/llvm-project/pull/85310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [llvm] Add missing clang to the monolithic pre-merge build (PR #85354)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mehdi Amini (joker-eph) Changes Clang has a custom separate pipeline integrated with libc++ that only runs in release mode. It means that changes which touches only clang won't run the clang tests in the configuration used by LLVM premerg

[clang] [llvm] Add missing clang to the monolithic pre-merge build (PR #85354)

2024-03-14 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph created https://github.com/llvm/llvm-project/pull/85354 Clang has a custom separate pipeline integrated with libc++ that only runs in release mode. It means that changes which touches only clang won't run the clang tests in the configuration used by LLVM premerge a

[clang] c3a1eb6 - Reland [clang-format][NFC] Eliminate the IsCpp parameter in all functions (#84599)

2024-03-14 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-03-14T19:44:40-07:00 New Revision: c3a1eb6207d85cb37ea29306481b40c9f6402309 URL: https://github.com/llvm/llvm-project/commit/c3a1eb6207d85cb37ea29306481b40c9f6402309 DIFF: https://github.com/llvm/llvm-project/commit/c3a1eb6207d85cb37ea29306481b40c9f6402309.diff LOG:

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-loongarch Author: Fangrui Song (MaskRay) Changes GCC ports only supports one of the options, with -mstrict-align preferred by newer ports. And they reject adding such aliases (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555). We should not s

[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

2024-03-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/85350 GCC ports only supports one of the options, with -mstrict-align preferred by newer ports. And they reject adding such aliases (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555). We should not support aliases,

[clang] [llvm] [Clang][BPF] Allow sign extension for call parameters with int types (PR #84874)

2024-03-14 Thread Pu Lehui via cfe-commits
pulehui wrote: > @pulehui I will not merge this patch now since it does not really solve the > whole riscv issue. As @4ast commented above, the verifier made btf_func_model > to jit. > [snip] > So you will know whether it is a struct or signed or not. If you feel you > need explicit UNSIGNED f

[clang] [clang-format][NFC] Eliminate the IsCpp parameter in all functions (PR #84599)

2024-03-14 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/84599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0c07102 - [clang-format][NFC] Eliminate the IsCpp parameter in all functions (#84599)

2024-03-14 Thread via cfe-commits
Author: Owen Pan Date: 2024-03-14T18:56:24-07:00 New Revision: 0c07102927869f9cd23889e0666774f6298e824f URL: https://github.com/llvm/llvm-project/commit/0c07102927869f9cd23889e0666774f6298e824f DIFF: https://github.com/llvm/llvm-project/commit/0c07102927869f9cd23889e0666774f6298e824f.diff LOG:

[clang] [llvm] [Clang][BPF] Allow sign extension for call parameters with int types (PR #84874)

2024-03-14 Thread Pu Lehui via cfe-commits
pulehui wrote: > The `r1` would be zero extended, while to be ABI conformant it has to be sign > extended, as for RV64 the 31-st bit should be the same as upper 32 bits. The > fact that decision to zero or sign extend the argument depends on the > architecture means that this extension has to

[clang] [flang] [llvm] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2024-03-14 Thread via cfe-commits
Prabhuk wrote: > I am debugging an assertion failure regression in one of our projects that > uses the FlatMap data structure implemented here: > > https://pigweed.googlesource.com/pigweed/pigweed/+/refs/heads/main/pw_containers/public/pw_containers/flat_map.h#180 > > The regression was that t

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-03-14 Thread via cfe-commits
Sirraide wrote: List of issues that may be fixed by this: - #71858 https://github.com/llvm/llvm-project/pull/84934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
Sirraide wrote: Seeing as there are now two places where we want to adjust function types but also preserve sugar, I’ve gone ahead and added a generic `adjustType()` function that handles all of the sugar and takes a `function_ref` to perform the actual adjustment. The intent here is that, i

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/85325 >From 907210a3ad3d829a8e49a5c976d129f8653801bf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 14 Mar 2024 18:24:37 +0100 Subject: [PATCH 01/11] [Clang] Add `dump()` method for `Attr` --- clang/include/clan

[clang] nolock/noalloc attributes (PR #84983)

2024-03-14 Thread via cfe-commits
Sirraide wrote: > Just tried. In C mode, it works to do nothing about effect changes in > isFunctionConversion (!). I would maybe try going with that then for now (and maybe add a comment about that too); I’m not sure my function pointer example is really the same situation, but I remember fi

[clang] nolock/noalloc attributes (PR #84983)

2024-03-14 Thread Doug Wyatt via cfe-commits
dougsonos wrote: > > have you tried maybe simply not setting `Changed` to `true` (perhaps only > > in C mode)? Just tried. In C mode, it works to do nothing about effect changes in isFunctionConversion (!). https://github.com/llvm/llvm-project/pull/84983 __

[clang] nolock/noalloc attributes (PR #84983)

2024-03-14 Thread via cfe-commits
Sirraide wrote: > Adapted from `test/Sema/initialize-noreturn.c` Seeing as that test does check that we’re issuing an error for this, and seeing that this seems to be handled in `isFunctionConversion()`, it really just seems like that function is supposed to error if there is a conversion (i.e

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
@@ -20,48 +20,180 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/Progra

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
@@ -20,48 +20,180 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h" #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" +#include "clang/StaticAnalyzer/Core/PathSensitive/Progra

[clang] [clang][analyzer] Improve BlockInCriticalSectionsChecker (PR #80029)

2024-03-14 Thread Endre Fülöp via cfe-commits
@@ -70,73 +202,121 @@ class BlockInCriticalSectionChecker : public Checker { } // end anonymous namespace -REGISTER_TRAIT_WITH_PROGRAMSTATE(MutexCounter, unsigned) +REGISTER_LIST_WITH_PROGRAMSTATE(ActiveCritSections, CritSectionMarker) -void BlockInCriticalSectionChecker::

[clang] nolock/noalloc attributes (PR #84983)

2024-03-14 Thread via cfe-commits
Sirraide wrote: > > I was testing with `noreturn` earlier. It's hard to compare, because (at > least in C23): > > ``` > ../clang/test/Sema/attr-nolock-wip.cpp:15:19: error: 'noreturn' attribute > cannot be applied to types >15 | void noret(int) [[noreturn]]; > | ^

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread Jordan Rupprecht via cfe-commits
rupprecht wrote: Thanks! Sorry about the delay, we should get the bzl tree setup for automatic assignment to reviewers. https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] nolock/noalloc attributes (PR #84983)

2024-03-14 Thread Doug Wyatt via cfe-commits
dougsonos wrote: > > have you tried maybe simply not setting `Changed` to `true` (perhaps only > > in C mode)? > > It’s worth pointing out that C also warns (and C23 straight-up _errors_) if > you replace `nolock` w/ `noreturn` iirc, so either that’s also a bug or > that’s intended; I think I

[clang] nolock/noalloc attributes (PR #84983)

2024-03-14 Thread via cfe-commits
Sirraide wrote: > swapping the two didn’t seem to change anything In one specific place where this is called in C mode, that is. From what I could see, the ordering seems to be correct for other calls to this function. https://github.com/llvm/llvm-project/pull/84983 ___

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread via cfe-commits
github-actions[bot] wrote: @josh11b Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht closed https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [bazel] Add clangd as a library support (PR #81556)

2024-03-14 Thread Jordan Rupprecht via cfe-commits
https://github.com/rupprecht approved this pull request. https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nolock/noalloc attributes (PR #84983)

2024-03-14 Thread via cfe-commits
Sirraide wrote: > have you tried maybe simply not setting `Changed` to `true` (perhaps only in > C mode)? It’s worth pointing out that C also warns (and C23 straight-up *errors*) if you replace `nolock` w/ `noreturn` iirc, so either that’s also a bug or that’s intended; I think I was going to

[clang] nolock/noalloc attributes (PR #84983)

2024-03-14 Thread via cfe-commits
Sirraide wrote: > the naming of "From" and "To" seems backwards. I noticed that as well; as I recall, swapping the two didn’t seem to change anything. I might open a pr or issue about this to either fix this or at least get some clarification as to whether that was really intended. I got a bit

[clang] nolock/noalloc attributes (PR #84983)

2024-03-14 Thread via cfe-commits
Sirraide wrote: > I've probably been staring at this way too long, but here's what's going on. > My test is: My bad, I remember looking into this yesterday or the day before; from what I could tell, it seems I may have forgotten to share what I found here: I think the problem is that the code

[clang] nolock/noalloc attributes (PR #84983)

2024-03-14 Thread Doug Wyatt via cfe-commits
dougsonos wrote: > > * Conversions between functions / function pointers with and without the > > attribute work in C++ but not in C and I'm a bit lost (there's a bunch of > > debug logging around this e.g. Sema::IsFunctionConversion and > > Sema::ImpCastExprToType) I've probably been staring

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/84526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] de1a97d - [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (#84526)

2024-03-14 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-03-14T20:25:57-04:00 New Revision: de1a97db3948608822a6d099cc3460690132e1cb URL: https://github.com/llvm/llvm-project/commit/de1a97db3948608822a6d099cc3460690132e1cb DIFF: https://github.com/llvm/llvm-project/commit/de1a97db3948608822a6d099cc3460690132e1cb.diff

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-14 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/85340 >From 3cdcfa4e63550b9677c8ffe2f33eab85899b2c45 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 14 Mar 2024 17:04:12 -0700 Subject: [PATCH 1/2] add test --- .../clang/Basic/DiagnosticDriverKinds.td

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos edited https://github.com/llvm/llvm-project/pull/85325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread Doug Wyatt via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Joshua Batista (bob80905) Changes Previously, the clang compiler with the dxc driver would accept the -enable-16bit-types flag without checking to see if the required conditions are met for proper process

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-14 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/85340 Previously, the clang compiler with the dxc driver would accept the -enable-16bit-types flag without checking to see if the required conditions are met for proper processing of the flag. Specifically, -enable-

[clang] [HLSL] Add diagnostic for enabling 16 bit types (PR #84537)

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

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-03-14 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/85316 >From 474d15b0454ecfef5ce4802b2df071daa136122c Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 14 Mar 2024 17:34:16 -0400 Subject: [PATCH] Resolve FIXME: Use class method when receiver is reference to class

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-03-14 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/85316 >From ea3a9ee76249bd1216bc6aa16dcec6008f12a19b Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 14 Mar 2024 17:34:16 -0400 Subject: [PATCH] Resolve FIXME: Use class method when receiver is reference to class

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-03-14 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/85316 >From 10d544d35261a6ee6719ea38c22f3117ca8bf422 Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 14 Mar 2024 17:34:16 -0400 Subject: [PATCH] Resolve FIXME: Use class method when receiver is reference to class

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-03-14 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/85316 >From 7a88cbf69e455434d4433e52eff9230780ede065 Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 14 Mar 2024 17:34:16 -0400 Subject: [PATCH] Resolve FIXME: Use class method when receiver is reference to class

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/84526 >From 3f515637fc87a41db1df4ea7627679c7dd75503a Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 14 Mar 2024 18:53:33 -0400 Subject: [PATCH 1/3] [DXIL] exp, any, lerp, & rcp Intrinsic Lowering This change i

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/85325 >From 907210a3ad3d829a8e49a5c976d129f8653801bf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 14 Mar 2024 18:24:37 +0100 Subject: [PATCH 01/10] [Clang] Add `dump()` method for `Attr` --- clang/include/clan

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 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 bde7a6b791872b63456cb4e50e63046728a65196 d6a57b5a5aa123cf38ce3657b764c74c4c5a86f7 --

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/85325 >From 907210a3ad3d829a8e49a5c976d129f8653801bf Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 14 Mar 2024 18:24:37 +0100 Subject: [PATCH 1/9] [Clang] Add `dump()` method for `Attr` --- clang/include/clang/

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #72417)

2024-03-14 Thread David Pagan via cfe-commits
@@ -1537,6 +1537,12 @@ class CodeGenModule : public CodeGenTypeCache { void printPostfixForExternalizedDecl(llvm::raw_ostream &OS, const Decl *D) const; + /// Under debug mode, print status of target teams loop transformation, + /// w

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #72417)

2024-03-14 Thread David Pagan via cfe-commits
@@ -11311,6 +11311,10 @@ class Sema final { OpenMPDirectiveKind &Kind, OpenMPDirectiveKind &PrevMappedDirective); + /// [target] teams loop is equivalent to parallel for if associated loop + /// nest meets certain critera. + b

[clang] [Clang] Bugfixes and improved support for `AttributedType`s in lambdas (PR #85325)

2024-03-14 Thread via cfe-commits
@@ -3140,13 +3140,35 @@ const FunctionType *ASTContext::adjustFunctionType(const FunctionType *T, return cast(Result.getTypePtr()); } +QualType ASTContext::adjustFunctionResultType(QualType FunctionType, + QualType ResultType) {

  1   2   3   4   5   >