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

2024-03-08 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] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/84214 >From feb5bfa786d1660a7fe0b6c48ec9048cdd315800 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 6 Mar 2024 10:03:46 -0800 Subject: [PATCH 1/6] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

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

2024-03-08 Thread Heejin Ahn via cfe-commits
aheejin wrote: > In terms of getting this landed and tested, I wonder which path we should > take: > > 1. Land this now, without tests, then update emscripten then come back and > flip the default, at which point the existing tests will get updated. > 2. Duplicate/update the the existing

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/84214 >From feb5bfa786d1660a7fe0b6c48ec9048cdd315800 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 6 Mar 2024 10:03:46 -0800 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [clang-tools-extra] [llvm] [llvm][Support] Add and use errnoAsErrorCode (PR #84423)

2024-03-08 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/84423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ba13fa2 - [llvm][Support] Add and use errnoAsErrorCode (#84423)

2024-03-08 Thread via cfe-commits
Author: Michael Spencer Date: 2024-03-08T23:30:33-08:00 New Revision: ba13fa2a5d57581bff1a7e9322234af30f4882f6 URL: https://github.com/llvm/llvm-project/commit/ba13fa2a5d57581bff1a7e9322234af30f4882f6 DIFF:

[clang-tools-extra] ba13fa2 - [llvm][Support] Add and use errnoAsErrorCode (#84423)

2024-03-08 Thread via cfe-commits
Author: Michael Spencer Date: 2024-03-08T23:30:33-08:00 New Revision: ba13fa2a5d57581bff1a7e9322234af30f4882f6 URL: https://github.com/llvm/llvm-project/commit/ba13fa2a5d57581bff1a7e9322234af30f4882f6 DIFF:

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/84214 ___ 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-08 Thread Heejin Ahn via cfe-commits
@@ -999,25 +1017,43 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module ) { // 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-08 Thread Heejin Ahn via cfe-commits
@@ -1291,19 +1327,29 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runSjLjOnFunction(Function ) { Type *IntPtrTy = getAddrIntType(); Constant *size = ConstantInt::get(IntPtrTy, 40); IRB.SetInsertPoint(SetjmpTableSize); - auto *SetjmpTable = IRB.CreateMalloc(IntPtrTy,

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

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

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

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

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

2024-03-08 Thread Heejin Ahn via cfe-commits
@@ -54,6 +54,9 @@ cl::opt // setjmp/longjmp handling using wasm EH instrutions cl::opt WebAssembly::WasmEnableSjLj( "wasm-enable-sjlj", cl::desc("WebAssembly setjmp/longjmp handling")); +cl::opt WebAssembly::WasmEnableAltSjLj( +"experimental-wasm-enable-alt-sjlj", +

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

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

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

2024-03-08 Thread Heejin Ahn via cfe-commits
@@ -386,6 +386,20 @@ void WebAssembly::addClangTargetOptions(const ArgList , // Backend needs '-exception-model=wasm' to use Wasm EH instructions CC1Args.push_back("-exception-model=wasm"); } + +if (Opt.starts_with("-experimental-wasm-enable-alt-sjlj")) {

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

2024-03-08 Thread Heejin Ahn via cfe-commits
@@ -300,6 +315,7 @@ class WebAssemblyLowerEmscriptenEHSjLj final : public ModulePass { bool EnableEmEH; // Enable Emscripten exception handling bool EnableEmSjLj; // Enable Emscripten setjmp/longjmp handling bool EnableWasmSjLj; // Enable Wasm setjmp/longjmp

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

2024-03-08 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin commented: Nice work! Sorry for the late reply. I thought we needed the table because we need to distinguish two different calls from the same function, for example, if `foo` calls `setjmp` and also recursively calls `foo` again, so the same callsite can have two

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

2024-03-08 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] [C++20][Coroutines] lambda-coroutine with promise_type ctor. (PR #84519)

2024-03-08 Thread Andreas Fertig via cfe-commits
https://github.com/andreasfertig updated https://github.com/llvm/llvm-project/pull/84519 >From 3083833f9e87947c7e45c5ed5bd6a983294717c9 Mon Sep 17 00:00:00 2001 From: Andreas Fertig Date: Fri, 8 Mar 2024 17:49:15 +0100 Subject: [PATCH] [C++20][Coroutines] lambda-coroutine with promise_type

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

2024-03-08 Thread Wang Pengcheng via cfe-commits
@@ -0,0 +1,189 @@ +//===-- RISCVProfiles.td - RISC-V Profiles -*- tablegen -*-===// +// +// 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:

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/84214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-08 Thread Vitaly Buka via cfe-commits
@@ -744,6 +750,21 @@ static void addSanitizers(const Triple , // LastEP does not need GlobalsAA. PB.registerOptimizerLastEPCallback(SanitizersCallback); } + + if (ClRemoveTraps) { +// We can optimize after inliner, and PGO profile matching. The hook below +

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/84214 >From feb5bfa786d1660a7fe0b6c48ec9048cdd315800 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 6 Mar 2024 10:03:46 -0800 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-08 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/84214 >From feb5bfa786d1660a7fe0b6c48ec9048cdd315800 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 6 Mar 2024 10:03:46 -0800 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-08 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf closed https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fc0fc76 - [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (#84136)

2024-03-08 Thread via cfe-commits
Author: Freddy Ye Date: 2024-03-09T13:49:15+08:00 New Revision: fc0fc768cc2122c81fd37aa59d9f31fc0d5694d8 URL: https://github.com/llvm/llvm-project/commit/fc0fc768cc2122c81fd37aa59d9f31fc0d5694d8 DIFF: https://github.com/llvm/llvm-project/commit/fc0fc768cc2122c81fd37aa59d9f31fc0d5694d8.diff

[clang] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-08 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: > Thanks for the heads-up @RKSimon I've made suggestions for consistency with > existing practice in emmintrin.h which I've adopted in the latest revision to > #83316. > > I'm unsure how replacing a function declaration with an \fn directive will > play with our

[clang] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-08 Thread Freddy Ye via cfe-commits
@@ -4745,6 +4745,77 @@ static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_castsi128_pd(__m128i __a) { return (__m128d)__a; } +/// Compares each of the corresponding double-precision values of two +///128-bit vectors of [2 x double], using the operation specified by the

[clang] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-08 Thread Freddy Ye via cfe-commits
@@ -4745,6 +4745,77 @@ static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_castsi128_pd(__m128i __a) { return (__m128d)__a; } +/// Compares each of the corresponding double-precision values of two +///128-bit vectors of [2 x double], using the operation specified by the

[clang] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-08 Thread Freddy Ye via cfe-commits
@@ -2940,6 +2940,84 @@ _mm_movemask_ps(__m128 __a) return __builtin_ia32_movmskps((__v4sf)__a); } +/* Compare */ +#define _CMP_EQ_OQ0x00 /* Equal (ordered, non-signaling) */ +#define _CMP_LT_OS0x01 /* Less-than (ordered, signaling) */ +#define _CMP_LE_OS0x02

[clang] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-08 Thread Freddy Ye via cfe-commits
@@ -2940,6 +2940,84 @@ _mm_movemask_ps(__m128 __a) return __builtin_ia32_movmskps((__v4sf)__a); } +/* Compare */ +#define _CMP_EQ_OQ0x00 /* Equal (ordered, non-signaling) */ +#define _CMP_LT_OS0x01 /* Less-than (ordered, signaling) */ +#define _CMP_LE_OS0x02

[clang] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-08 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/84136 >From 2ba698b222fa1dc963d21850d5931562aa65533d Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Tue, 26 Sep 2023 16:44:01 +0800 Subject: [PATCH 1/6] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx

[clang-tools-extra] [clang-tidy] Add bugprone-suspicious-stringview-data-usage check (PR #83716)

2024-03-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/83716 >From d56e3336a8b4b3434c5f2d69b4ec50cafc01cd8f Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Tue, 20 Feb 2024 18:15:56 + Subject: [PATCH 1/4] [clang-tidy] Add bugprone-suspicious-stringview-data-usage

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

2024-03-08 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] [clang-format][NFC] Eliminate the IsCpp parameter in all functions

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

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Patch is 25.61 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/84599.diff 12 Files Affected: - (modified) clang/include/clang/Format/Format.h (+2) -

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

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

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

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

[clang] 0baef3b - [clang-format] Handle common C++ non-keyword types as such (#83709)

2024-03-08 Thread via cfe-commits
Author: Owen Pan Date: 2024-03-08T19:42:35-08:00 New Revision: 0baef3b18cdbbdcf9f07c10607407ad0fb541449 URL: https://github.com/llvm/llvm-project/commit/0baef3b18cdbbdcf9f07c10607407ad0fb541449 DIFF: https://github.com/llvm/llvm-project/commit/0baef3b18cdbbdcf9f07c10607407ad0fb541449.diff

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-08 Thread Owen Pan via cfe-commits
owenca wrote: > Just thinking out loud and maybe not for this patch but for a more general > solution, what we seem to never do is collect information about types local > to the file as we go; For example what if a first pass identified types from > declarations and function argument

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-08 Thread Owen Pan via cfe-commits
owenca wrote: > Can the TypeNames mechanism be prepopulated with this list of types instead? I don't see how that would work. Please note that the TypeNames option is not specific to C/C++/Objective-C. Otherwise, I could simply change `isTypeName(bool IsCpp)` to `isCppTypeName()`.

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2024-03-08 Thread Nico Weber via cfe-commits
nico wrote: Also on the official waterfall, eg here: https://lab.llvm.org/buildbot/#/builders/188/builds/42935 Can you take a look, and revert for now if it takes a while to fix? https://github.com/llvm/llvm-project/pull/74110 ___ cfe-commits

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2024-03-08 Thread Nico Weber via cfe-commits
nico wrote: Looks like the included test still makes clang crash: http://45.33.8.238/linux/132722/step_7.txt https://github.com/llvm/llvm-project/pull/74110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-03-08 Thread Craig Topper via cfe-commits
@@ -0,0 +1,189 @@ +//===-- RISCVProfiles.td - RISC-V Profiles -*- tablegen -*-===// +// +// 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:

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for assignment operator overloading (PR #84489)

2024-03-08 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/84489 >From 265db5ee772772bef4099cc97b69995cfa67b3f2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 8 Mar 2024 22:15:20 +0800 Subject: [PATCH 1/3] [clang-tidy]avoid bugprone-unused-return-value false

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

2024-03-08 Thread Kees Cook via cfe-commits
kees wrote: For historical reference, the first version of this PR is visible here now: https://github.com/kees/llvm-project/commit/ce31f1d75f060b32e5dbc5756fe41cc8eaac83a6 https://github.com/llvm/llvm-project/pull/84428 ___ cfe-commits mailing list

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/84591 >From 634b8e8285b23201d7ad852ae35044d9b89c3c63 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 9 Mar 2024 02:14:36 +0100 Subject: [PATCH] [Clang] Document some of the implementation-defined keywords

[clang] [OBJC] Allow __attribute__((NSObject)) types be used as lightweight generic specifiers (PR #84593)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: dmaclach (dmaclach) Changes As per https://clang.llvm.org/docs/AutomaticReferenceCounting.html#retainable-object-pointers, types with `__attribute__((NSObject))` are retainable, and thus should be eligible to be used as lightweight

[clang] [OBJC] Allow __attribute__((NSObject)) types be used as lightweight generic specifiers (PR #84593)

2024-03-08 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] [OBJC] Allow __attribute__((NSObject)) types be used as lightweight generic specifiers (PR #84593)

2024-03-08 Thread via cfe-commits
https://github.com/dmaclach created https://github.com/llvm/llvm-project/pull/84593 As per https://clang.llvm.org/docs/AutomaticReferenceCounting.html#retainable-object-pointers, types with `__attribute__((NSObject))` are retainable, and thus should be eligible to be used as lightweight

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikolas Klauser (philnik777) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/84591.diff 1 Files Affected: - (modified) clang/docs/LanguageExtensions.rst (+112-11) ``diff diff --git

[clang] [Clang] Document some of the implementation-defined keywords (PR #84591)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/84591 None >From 479b0dec7feb17beaccbdc029799f2333d979ce4 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 9 Mar 2024 02:14:36 +0100 Subject: [PATCH] [Clang] Document some of the implementation-defined

[clang] [clang][Sema] Refine unused-member-function diagnostic message for constructors (PR #84515)

2024-03-08 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Looks like the build failed b/c you did not run `git clang-format` https://github.com/llvm/llvm-project/pull/84515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread via cfe-commits
Kupa-Martin wrote: @shafik We dont have a dedicated cpp test for this. I can add one if you want, but clang/test/Sema/warn-compare-enum-types-mismatch.c runs clang both on C and C++ mode, so I didnt think it necessary. https://github.com/llvm/llvm-project/pull/84068

[clang] [C++20][Coroutines] lambda-coroutine with promise_type ctor. (PR #84519)

2024-03-08 Thread Shafik Yaghmour via cfe-commits
@@ -596,8 +596,21 @@ VarDecl *Sema::buildCoroutinePromise(SourceLocation Loc) { // Add implicit object parameter. if (auto *MD = dyn_cast(FD)) { -if (MD->isImplicitObjectMemberFunction() && !isLambdaCallOperator(MD)) { - ExprResult ThisExpr = ActOnCXXThis(Loc); +

[clang] [C++20][Coroutines] lambda-coroutine with promise_type ctor. (PR #84519)

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

[clang] [C++20][Coroutines] lambda-coroutine with promise_type ctor. (PR #84519)

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

[clang] [clang-tools-extra] [llvm] [llvm][Support] Add and use errnoAsErrorCode (PR #84423)

2024-03-08 Thread David Blaikie via cfe-commits
dwblaikie wrote: Cool cool - thanks for the extra context! https://github.com/llvm/llvm-project/pull/84423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Update missing varargs arg extension warnings (PR #84520)

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

[clang] [Clang] Update missing varargs arg extension warnings (PR #84520)

2024-03-08 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Just a nit here. https://github.com/llvm/llvm-project/pull/84520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Update missing varargs arg extension warnings (PR #84520)

2024-03-08 Thread Shafik Yaghmour via cfe-commits
@@ -993,11 +993,18 @@ MacroArgs *Preprocessor::ReadMacroCallArgumentList(Token , // If the macro contains the comma pasting extension, the diagnostic // is suppressed; we know we'll get another diagnostic later. if (!MI->hasCommaPasting()) { -//

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread Shafik Yaghmour via cfe-commits
@@ -6,7 +6,9 @@ typedef enum EnumA { } EnumA; enum EnumB { - B + B, shafik wrote: I think what I was asking, was do we have an equivalent C++ test that verifies in a `.cpp` file that we also do not obtain a diagnostic for this.

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > So I believe: > > ``` > typedef enum EnumA { > A > } EnumA; > > enum EnumB { > B, > B1 = 1, > B2 = A == B1 > }; > ``` > > is not an enum compare warning in C++ because `B1` doesn't have an > enumeration type due to the enumeration not being fully-defined, and is not

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
https://github.com/inclyc edited https://github.com/llvm/llvm-project/pull/84410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
@@ -0,0 +1,52 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 +; RUN: opt --bpf-check-and-opt-ir -S -mtriple=bpf-pc-linux < %s | FileCheck %s + +; Generated from the following C code: +; +; extern int __uptr *magic1(); +;

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for assignment operator overloading (PR #84489)

2024-03-08 Thread Julian Schmidt via cfe-commits
5chmidti wrote: *(Approval after fixes) https://github.com/llvm/llvm-project/pull/84489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for assignment operator overloading (PR #84489)

2024-03-08 Thread Julian Schmidt via cfe-commits
@@ -5,6 +5,8 @@ bugprone-unused-return-value Warns on unused function return values. The checked functions can be configured. +Operator overloading with assignment semantics are ignored。 5chmidti wrote: The dot at the end of this line is some character

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for assignment operator overloading (PR #84489)

2024-03-08 Thread Julian Schmidt via cfe-commits
@@ -28,6 +30,11 @@ AST_MATCHER_P(FunctionDecl, isInstantiatedFrom, Matcher, return InnerMatcher.matches(InstantiatedFrom ? *InstantiatedFrom : Node, Finder, Builder); } + +AST_MATCHER_P(CXXMethodDecl, isOperatorOverloading, +

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for assignment operator overloading (PR #84489)

2024-03-08 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/84489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for assignment operator overloading (PR #84489)

2024-03-08 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/84489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From db504f5031b11ff7e28a346db829463fd6883d98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From 73135ec6395a6d3a29725e58b30ecb42249695fe Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/73376 >From 305599596dd5914747687af23a105d2968546ca1 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 25 Nov 2023 04:00:57 +0100 Subject: [PATCH] [clang] Accept lambdas in C++03 as an extensions This is a

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/74110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] dc567a2 - [clang] Fix crash when declaring invalid lambda member (#74110)

2024-03-08 Thread via cfe-commits
Author: Nikolas Klauser Date: 2024-03-09T01:18:17+01:00 New Revision: dc567a2ec61d07e89902f73c1bdd4106dc071f3f URL: https://github.com/llvm/llvm-project/commit/dc567a2ec61d07e89902f73c1bdd4106dc071f3f DIFF:

[clang] [clang] Fix crash when declaring invalid lambda member (PR #74110)

2024-03-08 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/74110 >From 563f86bddc0ec59b63c6aeffee2342f027c09119 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 1 Dec 2023 18:16:36 +0100 Subject: [PATCH 1/2] [clang] Fix crash when declaring invalid lambda member

[clang] [Clang] [Parser] Support [[omp::assume]] (PR #84582)

2024-03-08 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/84582 >From d436f7fefb967f050220a8ede6d05c8e26f363b3 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Fri, 8 Mar 2024 23:54:14 +0100 Subject: [PATCH 1/2] [Clang] [Parser] Support [[omp::assume]] ---

[clang] [Clang] [Parser] Support [[omp::assume]] (PR #84582)

2024-03-08 Thread via cfe-commits
Sirraide wrote: Ok yeah, good, looks like that’s the right attribute to map `[[omp::assume]]` to. https://github.com/llvm/llvm-project/pull/84582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Alex Crichton via cfe-commits
alexcrichton wrote: > So the core module + metadata is kind of isomorphic with that > single-core-module-component? Sort of and sort of not. At a high level you're correct, but at a technical level this isn't correct. The subtle differences are: * Most wasm binaries today using WASI probably

[clang] [Clang] [Parser] Support [[omp::assume]] (PR #84582)

2024-03-08 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > One more thing: this is just a different spelling for what was previously > already exposed as `__attribute__((assume))`; I’m not sure if/how familiar > you are with that one, but I hope its semantics align with what > `[[omp::assume]]` is supposed to do. I’m asking

[clang] [Clang] [Parser] Support [[omp::assume]] (PR #84582)

2024-03-08 Thread via cfe-commits
Sirraide wrote: > Currently only for C++11 and higher Ok, good; that’ll make this easier. > https://www.openmp.org/wp-content/uploads/OpenMP-API-Specification-5-2.pdf, > pages 49-50 Thanks. At a glance, it looks like there are more things that also still need to be implemented in the

[clang] [Clang] [Parser] Support [[omp::assume]] (PR #84582)

2024-03-08 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > @alexey-bataev I have a few more questions about `[[omp::assume]]`: > > - Is this supported in C? Because the `[[]]` spelling is only officially > available in C23 and later (we *do* support it in earlier language modes, but > users will get a warning if `-pedantic` is

[clang] [Clang] [Parser] Support [[omp::assume]] (PR #84582)

2024-03-08 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > @alexey-bataev I have a few more questions about `[[omp::assume]]`: > > - Is this supported in C? Because the `[[]]` spelling is only officially > available in C23 and later (we *do* support it in earlier language modes, but > users will get a warning if `-pedantic` is

[clang] [Clang] [Parser] Support [[omp::assume]] (PR #84582)

2024-03-08 Thread via cfe-commits
Sirraide wrote: One more thing: this is just a different spelling for what was previously already exposed as `__attribute__((assume))`; I’m not sure if/how familiar you are with that one, but I hope its semantics align with what `[[omp::assume]]` is supposed to do. I’m asking because I’m not

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

2024-03-08 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/84537 >From 55395c5c8a5b92e200aa2f1bf06774d20ac4afd9 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 8 Mar 2024 11:03:37 -0800 Subject: [PATCH 1/3] add check for enable 16 bit types ---

[clang] [clang-tools-extra] [llvm] [llvm][Support] Add and use errnoAsErrorCode (PR #84423)

2024-03-08 Thread Michael Spencer via cfe-commits
Bigcheese wrote: The other cases of `std::system_category` were in `LLVM_ON_UNIX` (or similar) blocks that would only be used on systems where it's mostly fine to use either one, as most of the time you'll get an error that's in `std::errc`, and then there's no difference (or they just are

[clang] [Clang] [Parser] Support [[omp::assume]] (PR #84582)

2024-03-08 Thread via cfe-commits
Sirraide wrote: @alexey-bataev I have a few more questions about `[[omp::assume]]`: - Is this supported in C? Because the `[[]]` spelling is only officially available in C23 and later (we *do* support it in earlier language modes, but users will get a warning if `-pedantic` is passed) - Is

[clang] [Clang] [Parser] Support [[omp::assume]] (PR #84582)

2024-03-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-openmp Author: None (Sirraide) Changes This pr implements the `[[omp::assume]]` spelling for the `__attribute__((assume))` attribute. It does not change anything about how that attribute is handled by the rest of Clang. This pr is only *not* meant

[clang] [Clang] [Parser] Support [[omp::assume]] (PR #84582)

2024-03-08 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/84582 This pr implements the `[[omp::assume]]` spelling for the `__attribute__((assume))` attribute. It does not change anything about how that attribute is handled by the rest of Clang. This pr is only *not* meant

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
sbc100 wrote: > Currently it accepts no extra inputs, but in the future I'd expect that it'll > grow an option or two of its own I was more asking about whether the file types is accepts are anything more than object files and libraries. i.e. can you pass other core modules and have

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

2024-03-08 Thread Joshua Batista via cfe-commits
@@ -243,6 +243,20 @@ HLSLToolChain::TranslateArgs(const DerivedArgList , StringRef BoundArch, // FIXME: add validation for enable_16bit_types should be after HLSL 2018 and bob80905 wrote: Yes, I'll remove the comment.

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
sbc100 wrote: I see, so `wasm-ld` builds "core module + metadata" and then `wasm-component-ld` takes that metadata and uses it to wrap the core module into a component (with exactly that one core module inside of it). So the core module + metadata is kind of isomorphic with that

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

2024-03-08 Thread Damyan Pepper via cfe-commits
@@ -243,6 +243,20 @@ HLSLToolChain::TranslateArgs(const DerivedArgList , StringRef BoundArch, // FIXME: add validation for enable_16bit_types should be after HLSL 2018 and damyanp wrote: Is this FIXME comment outdated by this PR?

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Alex Crichton via cfe-commits
alexcrichton wrote: Currently it accepts no extra inputs, but in the future I'd expect that it'll grow an option or two of its own. Currently it [hand-codes the list of options to forward to

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
sbc100 wrote: Regarding WebAssembly/wasi-sdk and WebAssembly/wasi-libc, is there any reason why simple programs wouldn't be core modules? Won't most C/C++ programs still be build-able as just core modules? https://github.com/llvm/llvm-project/pull/84569

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-08 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 commented: Does wasm-component-ld accept any other input types other than the ones that wasm-ld accepts? Does wasm-component-ld call wasm-ld internally? Do we expect clang users to be building compound components using a single clang command? i.e. will they be

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread via cfe-commits
@@ -6,7 +6,9 @@ typedef enum EnumA { } EnumA; enum EnumB { - B + B, Kupa-Martin wrote: done https://github.com/llvm/llvm-project/pull/84068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread via cfe-commits
@@ -264,11 +264,14 @@ namespace { } QualType Expr::getEnumCoercedType(const ASTContext ) const { - if (isa(this->getType())) -return this->getType(); - else if (const auto *ECD = this->getEnumConstantDecl()) -return Ctx.getTypeDeclType(cast(ECD->getDeclContext()));

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread via cfe-commits
https://github.com/Kupa-Martin updated https://github.com/llvm/llvm-project/pull/84068 >From 4bbd5cf7eb1eeeaba8eed2ac4aba76cdbbcc671f Mon Sep 17 00:00:00 2001 From: 44-2-Kupa-Martin Date: Tue, 5 Mar 2024 17:21:02 -0300 Subject: [PATCH] [Clang][Sema] Fix type of enumerators in incomplete

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-08 Thread via cfe-commits
Kupa-Martin wrote: > not an enum compare warning in C++ because `B1` doesn't have an enumeration > type due to the enumeration not being fully-defined, and is not an enum > compare warning in C because `A` has type `int` (due to p15) and `B1` has > type `int` (due to p12). Yes, you are

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

2024-03-08 Thread Richard Smith via cfe-commits
zygoloid wrote: > I'm not opposed to the changes, though I do find it somewhat strange to add > them to UBSan given that they're not undefined behavior (even though there's > precedent). This is adding checks to `-fsanitize=implicit-conversion`, which is not part of `-fsanitize=undefined`.

  1   2   3   4   5   >