[clang] [clang][analyzer] Fix crash in loop unrolling (PR #82089)

2024-03-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/82089 >From 2802ef4b9ed88da3cacb16ab7738907ee806 Mon Sep 17 00:00:00 2001 From: huang-me Date: Sat, 17 Feb 2024 10:43:48 +0800 Subject: [PATCH 1/9] Fix crash on StaticAnalyzer loop unrolling --- clang/lib/Static

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread Balazs Benics via cfe-commits
steakhal wrote: > Hello @steakhal, I have just looked through the changes again. What is the > advantage of using checkPreCall instead of checkLocation? I would very much > appreciate some background information. Thanks for your help! Oh yes, I should have explained. So, `checkLocation` can be

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/65742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
@@ -439,82 +444,194 @@ CGRecordLowering::accumulateBitFields(RecordDecl::field_iterator Field, Members.push_back(MemberInfo(bitsToCharUnits(StartBitOffset), MemberInfo::Field, nullptr, *Field)); } -return; +return Field;

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-13 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: Thank you, the structure looks great! Mostly style and clarity comments from here. https://github.com/llvm/llvm-project/pull/65742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang][Interp] Merge ByteCodeExprGen and ByteCodeStmtGen (PR #83683)

2024-03-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: tbaederr wrote: > Sorry, I thought you were still doing some investigation. Ah, sorry, I was just trying to say that this is how far I'm going to investigate at that point. :) > I can live with either approach; the CR

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

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

[clang] 3b5e7c8 - [Clang][Sema] Fix a bug on type constraint checking (#84671)

2024-03-13 Thread via cfe-commits
Author: Qizhi Hu Date: 2024-03-14T14:24:27+08:00 New Revision: 3b5e7c83a6e226d5bd7ed2e9b67449b64812074c URL: https://github.com/llvm/llvm-project/commit/3b5e7c83a6e226d5bd7ed2e9b67449b64812074c DIFF: https://github.com/llvm/llvm-project/commit/3b5e7c83a6e226d5bd7ed2e9b67449b64812074c.diff LOG:

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -28,11 +28,26 @@ class Block; class DeadBlock; class Pointer; class Context; +template class Integral; enum PrimType : unsigned; class Pointer; inline llvm::raw_ostream &operator<<(llvm::raw_os

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-03-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: @@ -53,6 +57,10 @@ class FunctionPointer final { return toAPValue().getAsString(Ctx, Func->getDecl()->getType()); } + uint32_t getIntegerRepresentation() const { +return static_cas

[clang] [llvm] [PowerPC] Add restriction for rldimi builtin (PR #85040)

2024-03-13 Thread Chen Zheng via cfe-commits
@@ -24,13 +24,17 @@ void test_trap(void) { __tw(ia, ib, 0); //expected-error {{argument value 0 is outside the valid range [1, 31]}} } +#ifdef __PPC64__ void test_builtin_ppc_rldimi() { unsigned int shift; unsigned long long mask; unsigned long long res = __builti

[clang] [llvm] [PowerPC] Add restriction for rldimi builtin (PR #85040)

2024-03-13 Thread Chen Zheng via cfe-commits
@@ -5093,9 +5094,33 @@ bool Sema::CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, case PPC::BI__builtin_ppc_rlwnm: return SemaValueIsRunOfOnes(TheCall, 2); case PPC::BI__builtin_ppc_rlwimi: - case PPC::BI__builtin_ppc_rldimi: return SemaBuil

[clang] [llvm] [PowerPC] Add restriction for rldimi builtin (PR #85040)

2024-03-13 Thread Chen Zheng via cfe-commits
@@ -24,13 +24,17 @@ void test_trap(void) { __tw(ia, ib, 0); //expected-error {{argument value 0 is outside the valid range [1, 31]}} } +#ifdef __PPC64__ void test_builtin_ppc_rldimi() { unsigned int shift; unsigned long long mask; unsigned long long res = __builti

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

2024-03-13 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/4] [PowerPC] Rename symbols references by tls-local-dynamic model O

[clang] Rough first stab at addressing #85120 (PR #85147)

2024-03-13 Thread Doug Wyatt via cfe-commits
dougsonos wrote: > @dougsonos I may have some time to look into this since there are probably > (as always) some annoying edge cases—particularly w/ templates. Would you be > fine with me committing to this branch or would it be easier for you if I > made a separate branch for that? Either is

[clang] [llvm] Adapted MemRegion::getDescriptiveName to handle ElementRegions (PR #85104)

2024-03-13 Thread via cfe-commits
T-Gruber wrote: Hello @steakhal, I have just looked through the changes again. What is the advantage of using checkPreCall instead of checkLocation? I would very much appreciate some background information. Thanks for your help! https://github.com/llvm/llvm-project/pull/85104 _

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

2024-03-13 Thread Shafik Yaghmour via cfe-commits
@@ -4181,6 +4185,127 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +class FunctionEffect; +class FunctionEffectSet; + +// It is the user's responsibility to keep this in set form: elements are +// ordered and unique. +// We could hid

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

2024-03-13 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Quick drive by comment https://github.com/llvm/llvm-project/pull/84983 ___ 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-13 Thread Shafik Yaghmour via cfe-commits
@@ -4181,6 +4185,127 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +class FunctionEffect; +class FunctionEffectSet; + +// It is the user's responsibility to keep this in set form: elements are +// ordered and unique. +// We could hid

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

2024-03-13 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

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

[clang] 162180d - [HLSL] Add -HV option translation to clang-dxc.exe (#83938)

2024-03-13 Thread via cfe-commits
Author: Joshua Batista Date: 2024-03-13T21:55:09-07:00 New Revision: 162180decf532acd31c9aa4b876804848d1761c0 URL: https://github.com/llvm/llvm-project/commit/162180decf532acd31c9aa4b876804848d1761c0 DIFF: https://github.com/llvm/llvm-project/commit/162180decf532acd31c9aa4b876804848d1761c0.diff

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

2024-03-13 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/84599 >From 43238d58ff490073c13ff621faddceb89b05b22e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 8 Mar 2024 19:47:54 -0800 Subject: [PATCH 1/2] [clang-format][NFC] Eliminate the IsCpp parameter in all functions

[clang] [llvm] MIPS: Support -m(no-)unaligned-access for r6 (PR #85174)

2024-03-13 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 437fcc6eed99694a9f9486d29ead6a3d3275ede9 a74a9bbd2ff2c6589db4c9756cf809c22e98fa64 --

[clang] [llvm] MIPS: Support -m(no-)unaligned-access for r6 (PR #85174)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: YunQiang Su (wzssyqa) Changes MIPSr6 ISA requires normal load/store instructions support misunaligned memory access, while it is not always do so by hardware. On some microarchitectures or some corner cases it may need support by OS. Don

[clang] [llvm] MIPS: Support -m(no-)unaligned-access for r6 (PR #85174)

2024-03-13 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa created https://github.com/llvm/llvm-project/pull/85174 MIPSr6 ISA requires normal load/store instructions support misunaligned memory access, while it is not always do so by hardware. On some microarchitectures or some corner cases it may need support by OS. Don't

[clang] [DRAFT][RISCV] Emit arch string macro to facilitate ASM programming (PR #85063)

2024-03-13 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: Attributes are added automatically, unless you override it with your own .attribute arch. https://github.com/llvm/llvm-project/pull/85063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang] Define SwiftInfo for RISCVTargetCodeGenInfo (PR #82152)

2024-03-13 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: What purpose does this serve if swiftcall doesn't work? Given the tests only test that you can produce IR from Clang, that suggests that it doesn't actually do anything useful?.. (And if it does do something useful, *that* should be being tested) https://github.com/llvm/llvm-pro

[clang] [DRAFT][RISCV] Emit arch string macro to facilitate ASM programming (PR #85063)

2024-03-13 Thread Wang Pengcheng via cfe-commits
wangpc-pp wrote: I think we will add attributes automatically? ```shell ~/workspace# cat a.S .globl foo .p2align1 .type foo,@function foo: ret ~/workspace# clang -march=rv64gcv -c a.S ~/workspace# llvm-readobj -A a.o File: a.o Format: elf64-littleriscv Arch:

[clang] [clang] Define SwiftInfo for RISCVTargetCodeGenInfo (PR #82152)

2024-03-13 Thread Kuba Mracek via cfe-commits
https://github.com/kubamracek closed https://github.com/llvm/llvm-project/pull/82152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b84ce99 - [clang] Define SwiftInfo for RISCVTargetCodeGenInfo (#82152)

2024-03-13 Thread via cfe-commits
Author: Kuba (Brecka) Mracek Date: 2024-03-13T20:04:30-07:00 New Revision: b84ce9979990283aa4398ad5a654b8b283baa532 URL: https://github.com/llvm/llvm-project/commit/b84ce9979990283aa4398ad5a654b8b283baa532 DIFF: https://github.com/llvm/llvm-project/commit/b84ce9979990283aa4398ad5a654b8b283baa53

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-13 Thread Kees Cook via cfe-commits
@@ -1,13 +1,58 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only // RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility // RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compa

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-13 Thread Brandon Wu via cfe-commits
@@ -854,6 +895,30 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension, "string must be lowercase"); } + bool IsProfile = Arch.starts_with("rvi") || Arch.starts_with("rva") || + Arch.starts_with("r

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] c1c8a0c - [concepts] Preserve the FoundDecl of ConceptReference properly (#85032)

2024-03-13 Thread via cfe-commits
Author: Younan Zhang Date: 2024-03-14T10:09:47+08:00 New Revision: c1c8a0cb17468bcece489adea2b31df6920c96cb URL: https://github.com/llvm/llvm-project/commit/c1c8a0cb17468bcece489adea2b31df6920c96cb DIFF: https://github.com/llvm/llvm-project/commit/c1c8a0cb17468bcece489adea2b31df6920c96cb.diff

[clang] [clang-tools-extra] [concepts] Preserve the FoundDecl of ConceptReference properly (PR #85032)

2024-03-13 Thread Younan Zhang via cfe-commits
zyn0217 wrote: CI failure was an unrelated format issue. https://github.com/llvm/llvm-project/pull/85032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Skip the RequiresExprBodyDecls for lambda dependencies (PR #83997)

2024-03-13 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > I have a reduced test case, which is accepted by clang 18, but fails with > this patch: https://gcc.godbolt.org/z/zMbKvsf7K > A bit more compact one: https://gcc.godbolt.org/z/4rzYPKaze Your case is rejected by all mainstream compilers as of now: https://gcc.godbolt.org/z/nrMf

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-13 Thread Brandon Wu via cfe-commits
@@ -854,6 +895,30 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension, "string must be lowercase"); } + bool IsProfile = Arch.starts_with("rvi") || Arch.starts_with("rva") || + Arch.starts_with("r

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-13 Thread via cfe-commits
https://github.com/alirezamoshtaghi deleted https://github.com/llvm/llvm-project/pull/83369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-13 Thread via cfe-commits
@@ -4601,8 +4601,15 @@ SourceRange DesignatedInitExpr::getDesignatorsSourceRange() const { SourceLocation DesignatedInitExpr::getBeginLoc() const { auto *DIE = const_cast(this); Designator &First = *DIE->getDesignator(0); - if (First.isFieldDesignator()) -return GNUSy

[clang] [clang-tools-extra] [CLANGD] Do not crash on designator initialization of union (PR #83369)

2024-03-13 Thread via cfe-commits
https://github.com/alirezamoshtaghi updated https://github.com/llvm/llvm-project/pull/83369 >From 3d6afe011221ac239bb668b375ed3f6c356fc47d Mon Sep 17 00:00:00 2001 From: alirezamoshtaghi Date: Wed, 28 Feb 2024 13:55:11 -0800 Subject: [PATCH 1/4] [CLANGD] Do not crash on designator initializatio

[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

2024-03-13 Thread Charlie Barto via cfe-commits
https://github.com/barcharcraz edited https://github.com/llvm/llvm-project/pull/81677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-13 Thread Brandon Wu via cfe-commits
@@ -36,6 +36,11 @@ struct RISCVSupportedExtension { } }; +struct RISCVProfile { 4vtomat wrote: Very minor too, if you use std::pair, could you add the comments describing what the fields represent? https://github.com/llvm/llvm-project/pull/76357 _

[clang] [llvm] [BPF] rename 'arena' to 'address_space' (PR #85161)

2024-03-13 Thread via cfe-commits
@@ -517,13 +517,13 @@ bool BPFCheckAndAdjustIR::insertASpaceCasts(Module &M) { Changed |= !CastsCache.empty(); } // Merge all globals within same address space into single - // .arena. section + // .address_space. section for (GlobalVariable &G : M.globals()) {

[clang] [llvm] [BPF] rename 'arena' to 'address_space' (PR #85161)

2024-03-13 Thread via cfe-commits
https://github.com/4ast requested changes to this pull request. https://github.com/llvm/llvm-project/pull/85161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] rename 'arena' to 'address_space' (PR #85161)

2024-03-13 Thread via cfe-commits
https://github.com/4ast edited https://github.com/llvm/llvm-project/pull/85161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-13 Thread YAMAMOTO Takashi via cfe-commits
yamt wrote: > If possible, can you not force-push? It's hard to track changes between > commits with force-pushes. Thank you! i had to rebase for some unrelated reasons. i will avoid it next time. https://github.com/llvm/llvm-project/pull/84137 ___

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #83204)

2024-03-13 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 55d4816393f897054a4721920502d45c645edf1d cb86c3c12959513309ccf97592d602ba4da36d1d --

[clang] [InstallAPI] Add installapi specific options & diagnostics (PR #85100)

2024-03-13 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka approved this pull request. https://github.com/llvm/llvm-project/pull/85100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Add installapi specific options & diagnostics (PR #85100)

2024-03-13 Thread Juergen Ributzka via cfe-commits
ributzka wrote: Do you think this file is necessary? https://github.com/llvm/llvm-project/pull/85100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Add installapi specific options & diagnostics (PR #85100)

2024-03-13 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka edited https://github.com/llvm/llvm-project/pull/85100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-13 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/84671 >From 849db0cede4d0fe108ec7cf530974606a426b9db Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 10 Mar 2024 16:11:18 +0800 Subject: [PATCH] [Clang][Sema] Fix a bug on type constraint checking --- clang/docs/Rel

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-13 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,61 @@ +// RUN: %clang -fsanitize=implicit-bitfield-conversion -target x86_64-linux -S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-BITFIELD-CONVERSION efriedma-quic wrote: I'd like to see some testcases that run in C++ mode. https:

[clang] [llvm] [BPF] rename 'arena' to 'address_space' (PR #85161)

2024-03-13 Thread via cfe-commits
eddyz87 wrote: I also tested this change using [this](https://gist.github.com/eddyz87/1921247819138a9ed70d77db40db8a7c) kernel patch and arena tests are passing. https://github.com/llvm/llvm-project/pull/85161 ___ cfe-commits mailing list cfe-commits

[clang] [llvm] [BPF] rename 'arena' to 'address_space' (PR #85161)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (eddyz87) Changes There are a few places where `arena` name is used for pointers in non-zero address space in BPF backend, rename these to use a more generic `address_space`: - macro `__BPF_FEATURE_ARENA_CAST` -> `__BPF_FEATURE_ADDRE

[clang] [llvm] [BPF] rename 'arena' to 'address_space' (PR #85161)

2024-03-13 Thread via cfe-commits
https://github.com/eddyz87 created https://github.com/llvm/llvm-project/pull/85161 There are a few places where `arena` name is used for pointers in non-zero address space in BPF backend, rename these to use a more generic `address_space`: - macro `__BPF_FEATURE_ARENA_CAST` -> `__BPF_FEATURE_A

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

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -198,9 +198,18 @@ /// /// If there are calls to setjmp() /// -/// 2) and 3): The same as 2) and 3) in Emscripten SjLj. -/// (setjmpTable/setjmpTableSize initialization + setjmp callsite -/// transformation) +/// 2) In the function entry that calls setjmp, initialize +///

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

2024-03-13 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin 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] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin commented: If possible, can you not force-push? It's hard to track changes between commits with force-pushes. Thank you! https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-13 Thread Amy Huang via cfe-commits
amykhuang wrote: I looked at this a bit and the change that increases the constexpr restrictions is that `ext_defaulted_comparison_constexpr_mismatch` (which was added in https://reviews.llvm.org/D146090) became `err_incorrect_defaulted_comparison_constexpr`? https://github.com/llvm/llvm-proj

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-13 Thread Harald van Dijk via cfe-commits
@@ -1,13 +1,58 @@ -// RUN: %clang_cc1 %s -verify=c -fsyntax-only +// RUN: %clang_cc1 %s -verify -fsyntax-only // RUN: %clang_cc1 %s -verify -fsyntax-only -x c++ -// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compatibility // RUN: %clang_cc1 %s -verify -fsyntax-only -fms-compa

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

2024-03-13 Thread via cfe-commits
4ast wrote: > Just uploaded a new revision which targets 'Int' type only, i.e, v1. Looks like it's a bug in risc-v JIT. We never promised that kfunc call from bpf calling convention into native cpu calling convention will be free on all architectures. That's why we have btf_func_model and JITs

[clang] Rough first stab at addressing #85120 (PR #85147)

2024-03-13 Thread via cfe-commits
Sirraide wrote: > a subsequent crash involving lambdas There definitely is a crash involving templated lambdas on trunk: https://github.com/llvm/llvm-project/issues/85154 https://github.com/llvm/llvm-project/pull/85147 ___ cfe-commits mailing list cf

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-13 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: I don't see why removing the help text is not sufficient to handle the issue? Even if no major players are using it, I think that there are people using it. It is a fairly self-contained bit of support. https://github.com/llvm/llvm-project/pull/84121 ___

[clang] [llvm] [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0` (PR #82404)

2024-03-13 Thread via cfe-commits
https://github.com/goldsteinn closed https://github.com/llvm/llvm-project/pull/82404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d80d5b9 - [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0`

2024-03-13 Thread Noah Goldstein via cfe-commits
Author: Noah Goldstein Date: 2024-03-13T18:26:21-05:00 New Revision: d80d5b923c6f611590a12543bdb33e0c16044d44 URL: https://github.com/llvm/llvm-project/commit/d80d5b923c6f611590a12543bdb33e0c16044d44 DIFF: https://github.com/llvm/llvm-project/commit/d80d5b923c6f611590a12543bdb33e0c16044d44.diff

[clang] Rough first stab at addressing #85120 (PR #85147)

2024-03-13 Thread via cfe-commits
Sirraide wrote: @dougsonos I may have some time to look into this since there are probably (as always) some annoying edge cases—particularly w/ templates. Would you be fine with me committing to this branch or would it be easier for you if I made a separate branch for that? Either is fine by m

[clang] f9a1478 - Reapply "[Clang][C++23] Implement P2448R2 ..." (#85136) (#85145)

2024-03-13 Thread via cfe-commits
Author: Amy Huang Date: 2024-03-13T23:15:01Z New Revision: f9a14782000e6aa2c4031bc97b20c351a9f281c3 URL: https://github.com/llvm/llvm-project/commit/f9a14782000e6aa2c4031bc97b20c351a9f281c3 DIFF: https://github.com/llvm/llvm-project/commit/f9a14782000e6aa2c4031bc97b20c351a9f281c3.diff LOG: Rea

[clang] Reapply "[Clang][C++23] Implement P2448R2 ..." (#85136) (PR #85145)

2024-03-13 Thread Amy Huang via cfe-commits
https://github.com/amykhuang closed https://github.com/llvm/llvm-project/pull/85145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rough first stab at addressing #85120 (PR #85147)

2024-03-13 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 ad23127222fe23e28ac3deaa16f3ae64d13b7b6f 613f04e311f083c129acaa4598cbfd9894fe3805 --

[clang] Rough first stab at addressing #85120 (PR #85147)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Doug Wyatt (dougsonos) Changes I pointed out this issue in the review for nolock/noalloc, and @Sirraide opened #85120 Here are some (very rough) bits of code I'd written to try to address the loss of type sugar, plus a subsequent crash i

[clang] Rough first stab at addressing #85120 (PR #85147)

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

[clang] Rough first stab at addressing #85120 (PR #85147)

2024-03-13 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, it

[clang] Rough first stab at addressing #85120 (PR #85147)

2024-03-13 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos created https://github.com/llvm/llvm-project/pull/85147 I pointed out this issue in the review for nolock/noalloc, and @Sirraide opened #85120 Here are some (very rough) bits of code I'd written to try to address the loss of type sugar, plus a subsequent crash in

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

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -198,9 +198,18 @@ /// /// If there are calls to setjmp() /// -/// 2) and 3): The same as 2) and 3) in Emscripten SjLj. -/// (setjmpTable/setjmpTableSize initialization + setjmp callsite -/// transformation) +/// 2) In the function entry that calls setjmp, initialize +///

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

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -1291,19 +1327,29 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runSjLjOnFunction(Function &F) { Type *IntPtrTy = getAddrIntType(&M); Constant *size = ConstantInt::get(IntPtrTy, 40); IRB.SetInsertPoint(SetjmpTableSize); - auto *SetjmpTable = IRB.CreateMalloc(IntPtrTy, IR

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

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -1291,19 +1327,29 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runSjLjOnFunction(Function &F) { Type *IntPtrTy = getAddrIntType(&M); Constant *size = ConstantInt::get(IntPtrTy, 40); IRB.SetInsertPoint(SetjmpTableSize); - auto *SetjmpTable = IRB.CreateMalloc(IntPtrTy, IR

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

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -999,25 +1017,43 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module &M) { // Register __wasm_longjmp function, which calls __builtin_wasm_longjmp. FunctionType *FTy = FunctionType::get( IRB.getVoidTy(), {Int8PtrTy, IRB.getInt32Ty()}, false);

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

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -1738,10 +1792,16 @@ void WebAssemblyLowerEmscriptenEHSjLj::handleLongjmpableCallsForWasmSjLj( BasicBlock *ThenBB = BasicBlock::Create(C, "if.then", &F); BasicBlock *EndBB = BasicBlock::Create(C, "if.end", &F); Value *EnvP = IRB.CreateBitCast(Env, getAddrPtrType(&M),

[clang] Reapply "[Clang][C++23] Implement P2448R2 ..." (#85136) (PR #85145)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amy Huang (amykhuang) Changes This reverts commit 003e292f9895a9cf4e30688269efa668d1fcbb09 because there were dependent changes in the codebase that now fail. --- Patch is 83.76 KiB, truncated to 20.00 KiB below, full version: https://

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-13 Thread Amy Huang via cfe-commits
amykhuang wrote: Whoops, not very familiar with git pull requests, I guess. actually reapplying the commit now https://github.com/llvm/llvm-project/pull/77753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-13 Thread Eli Friedman via cfe-commits
@@ -147,6 +147,7 @@ struct ImplicitConversionData { const TypeDescriptor &FromType; const TypeDescriptor &ToType; /* ImplicitConversionCheckKind */ unsigned char Kind; + unsigned int BitfieldBits; efriedma-quic wrote: Do we have an ABI stability policy

[clang] Reapply "[Clang][C++23] Implement P2448R2 ..." (#85136) (PR #85145)

2024-03-13 Thread Amy Huang via cfe-commits
https://github.com/amykhuang created https://github.com/llvm/llvm-project/pull/85145 This reverts commit 003e292f9895a9cf4e30688269efa668d1fcbb09 because there were dependent changes in the codebase that now fail. >From d8f21288633aefd1528133ccdf46c5dc790e4f1f Mon Sep 17 00:00:00 2001 From: A

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-13 Thread via cfe-commits
dyung wrote: > Nevermind, unreverted since there appear to be newer tests that use this > patch. @amykhuang your unrevert (9bfa506d69b9177ced00b69bf94b28038b063d6d) appears to be an empty commit? Was that intended? https://github.com/llvm/llvm-project/pull/77753 __

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-03-13 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,115 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-03-13 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,92 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-03-13 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,92 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-03-13 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,92 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0

[clang] [UEFI] X86_64 UEFI Clang Driver (PR #76838)

2024-03-13 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,92 @@ +//===--- UEFI.h - UEFI ToolChain Implementations --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > Facebook was using it at one point (can't say if they are currently), I > > know that Sony had some interested users as well. > > Yes, the order matters - that was the reason that the flag was implemented > > in the first place. > > Cc @smeenai @pogo59 on whether this option

[clang] [llvm] [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0` (PR #82404)

2024-03-13 Thread Nikita Popov via cfe-commits
nikic wrote: @goldsteinn Doesn't seem worthwhile. https://github.com/llvm/llvm-project/pull/82404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-13 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited 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] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-13 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,105 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for any are generated for float and half. + +; CHECK:icmp ne i1 %{{.*}}, false farzonl wrote: That was my thinking as well, but all the other tests i

  1   2   3   4   5   >