[clang] Support C++20 Modules in clang-repl (PR #79261)

2024-01-24 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Hi @ChuanqiXu9, the test you added is failing on the PS4 bot because for the > PS4 target, it requires an external linker which is not present/available. > Can the test be rewritten to not require linking? > > https://lab.llvm.org/buildbot/#/builders/139/builds/57928 > > `

[clang] c125965 - [NFC] Add more requirement to clang/test/Interpreter/cxx20-modules.cppm

2024-01-24 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-24T16:10:49+08:00 New Revision: c1259650e742e7b3053f6520729b4c1f44c27814 URL: https://github.com/llvm/llvm-project/commit/c1259650e742e7b3053f6520729b4c1f44c27814 DIFF: https://github.com/llvm/llvm-project/commit/c1259650e742e7b3053f6520729b4c1f44c27814.diff LO

[clang] [llvm] [mlir] [AMDGPU] Add GFX12 WMMA and SWMMAC instructions (PR #77795)

2024-01-24 Thread Piotr Sobczak via cfe-commits
@@ -2601,67 +2601,73 @@ def int_amdgcn_ds_bvh_stack_rtn : [ImmArg>, IntrWillReturn, IntrNoCallback, IntrNoFree] >; +def int_amdgcn_s_wait_event_export_ready : + ClangBuiltin<"__builtin_amdgcn_s_wait_event_export_ready">, + Intrinsic<[], [], [IntrNoMem, IntrHasSideEffec

[clang] bae1ada - [docs] [C++20] [Modules] Document how to import modules in clang-repl

2024-01-24 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-24T16:14:14+08:00 New Revision: bae1adae1c7cdf3b0bd618fc9cd5af251dc901ed URL: https://github.com/llvm/llvm-project/commit/bae1adae1c7cdf3b0bd618fc9cd5af251dc901ed DIFF: https://github.com/llvm/llvm-project/commit/bae1adae1c7cdf3b0bd618fc9cd5af251dc901ed.diff LO

[clang] 5404a37 - [Driver] Use StringRef::consume_front (NFC)

2024-01-24 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-01-24T00:27:33-08:00 New Revision: 5404a3792ed58b94b938bbf5cfe6eeb23c664efc URL: https://github.com/llvm/llvm-project/commit/5404a3792ed58b94b938bbf5cfe6eeb23c664efc DIFF: https://github.com/llvm/llvm-project/commit/5404a3792ed58b94b938bbf5cfe6eeb23c664efc.diff L

[clang] [llvm] [mlir] [AArch64] Replace LLVM IR function attributes for PSTATE.ZA. (PR #79166)

2024-01-24 Thread Cullen Rhodes via cfe-commits
https://github.com/c-rhodes edited https://github.com/llvm/llvm-project/pull/79166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [AArch64] Replace LLVM IR function attributes for PSTATE.ZA. (PR #79166)

2024-01-24 Thread Cullen Rhodes via cfe-commits
@@ -1098,11 +1098,15 @@ LogicalResult ModuleTranslation::convertOneFunction(LLVMFuncOp func) { llvmFunc->addFnAttr("aarch64_pstate_sm_compatible"); if (func.getArmNewZa()) -llvmFunc->addFnAttr("aarch64_pstate_za_new"); - else if (func.getArmSharedZa()) -llvmFun

[mlir] [clang] [llvm] [AArch64] Replace LLVM IR function attributes for PSTATE.ZA. (PR #79166)

2024-01-24 Thread Cullen Rhodes via cfe-commits
https://github.com/c-rhodes commented: MLIR changes LGTM cheers, just left one comment for something I missed when the preserved attr was added recently. Also, in the commit message the LLVM IR attributes are prefixed with `arm`, should be `aarch64`. https://github.com/llvm/llvm-project/pull/

[llvm] [mlir] [clang] [AArch64] Replace LLVM IR function attributes for PSTATE.ZA. (PR #79166)

2024-01-24 Thread Cullen Rhodes via cfe-commits
@@ -22,26 +22,32 @@ Below we describe the LLVM IR attributes and their relation to the C/C++ level ACLE attributes: ``aarch64_pstate_sm_enabled`` -is used for functions with ``__attribute__((arm_streaming))`` +is used for functions with ``__arm_streaming`` ``aarch6

[pstl] [lldb] [llvm] [openmp] [clang-tools-extra] [libcxx] [lld] [mlir] [clang] [ELF] Don't resolve relocations referencing SHN_ABS to tombstone in non-SHF_ALLOC sections (PR #79238)

2024-01-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/79238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [llvm] [mlir] [pstl] [libcxx] [openmp] [lldb] [clang-tools-extra] [ELF] Don't resolve relocations referencing SHN_ABS to tombstone in non-SHF_ALLOC sections (PR #79238)

2024-01-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/79238 >From 97b500a7061041b5478b6b1b1094e76140e3d9c3 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 23 Jan 2024 17:53:31 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF

[compiler-rt] [lld] [clang] [llvm] [libc] [libcxx] [lldb] [flang] [clang-tools-extra] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > CheckConstexprFunctionDefinition will return false for a destructor if > defaultedDestructorIsConstexpr returns false (unless we want to emit a > diagnostic)` I see. So defaulted special members now *actually* constexpr. I've made that change. I confused everything with fun

[flang] [libc] [lldb] [compiler-rt] [llvm] [clang-tools-extra] [libcxx] [lld] [clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread Mariya Podchishchaeva via cfe-commits
@@ -356,14 +356,7 @@ C++23 implementation status Relaxing some constexpr restrictions https://wg21.link/P2448R2";>P2448R2 - -Clang 17 (Partial) - We do not support outside of defaulted special memeber functions the change that constexpr f

[flang] [libc] [lldb] [compiler-rt] [llvm] [clang-tools-extra] [libcxx] [lld] [clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread Mariya Podchishchaeva via cfe-commits
@@ -9108,7 +9123,8 @@ bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, // declaration, it is implicitly considered to be constexpr. // FIXME: Only applying this to the first declaration seems problematic, as // simple reorderings can affect the

[clang] [clang][Interp] Handle casts between complex types (PR #79269)

2024-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/79269 Just handle this like two primtive casts. >From ecc963e4fbcfe1cd1c1f40c642c1c0fbf916a8c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 24 Jan 2024 10:04:50 +0100 Subject: [PATCH] [clan

[clang] [clang][Interp] Handle casts between complex types (PR #79269)

2024-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Just handle this like two primtive casts. --- Full diff: https://github.com/llvm/llvm-project/pull/79269.diff 3 Files Affected: - (modified) clang/lib/AST/Interp/ByteCodeExprGen.cpp (+57) - (modified) cla

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-01-24 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 230c13d59d0843c3b738920b85c341cc78a61fa9...a7729911df5e852ecc8718ddb2882d9b7d0928da clang

[clang-tools-extra] [llvm] [clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-24 Thread via cfe-commits
mikaelholmen wrote: Hello, It seems like with this change it warns like ``` w.c:1:10: warning: use of infinity via a macro is undefined behavior due to the currently enabled floating-point options [-Wnan-infinity-disabled] 1 | # ifndef INFINITY | ^ 1 warning generated. ``` wi

[compiler-rt] [clang] [llvm] [libc] [libcxx] [flang] [clang-tools-extra] Reland: [libc++][format] P2637R3: Member visit (std::basic_format_arg) #76449 (PR #79032)

2024-01-24 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/79032 >From e03452fda84a5284420bba1913299b68caabb6cd Mon Sep 17 00:00:00 2001 From: Zingam Date: Mon, 22 Jan 2024 20:35:00 +0200 Subject: [PATCH 1/2] Revert "Revert "[libc++][format] P2637R3: Member `visit` (`std:

[llvm] [pstl] [clang] [mlir] [libcxx] [clang-tools-extra] [lld] [openmp] [lldb] [ELF] Don't resolve relocations referencing SHN_ABS to tombstone in non-SHF_ALLOC sections (PR #79238)

2024-01-24 Thread Bevin Hansson via cfe-commits
https://github.com/bevin-hansson commented: This looks good to me, but someone else should probably chime in as well to approve. https://github.com/llvm/llvm-project/pull/79238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[llvm] [clang] [flang] [compiler-rt] [libcxx] [clang-tools-extra] [libc] Reland: [libc++][format] P2637R3: Member visit (std::basic_format_arg) #76449 (PR #79032)

2024-01-24 Thread Hristo Hristov via cfe-commits
H-G-Hristov wrote: > @H-G-Hristov Would it be possible to update your branch? I sent it to our > Windows builders but Clang is segfaulting while building runtimes. Thank you for taking a look. I updated the branch. Please note that pre-release Clang 18 used to have a bug related to "deducing t

[llvm] [clang] [clang-tools-extra] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-24 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Is this expected and wanted? Good catch! I would not expect that diagnostic; we should silence the diagnostic if it's used in a `#ifdef`, `#elifdef`, or `defined` because the value isn't necessary. Perhaps we should also silence something like `sizeof(INFINITY)` because

[lldb] [flang] [clang-tools-extra] [libcxx] [clang] [lld] [llvm] [compiler-rt] [libc] [AMDGPU][GFX12] VOP encoding and codegen - add support for v_cvt fp8/… (PR #78414)

2024-01-24 Thread Mariusz Sikora via cfe-commits
Mirko =?utf-8?q?Brkušanin?= , Mirko =?utf-8?q?Brkušanin?= ,Mirko Brkusanin ,Mariusz Sikora Message-ID: In-Reply-To: @@ -8770,6 +8781,22 @@ void AMDGPUAsmParser::cvtVOP3DPP(MCInst &Inst, const OperandVector &Operands, } } +int VdstInIdx = AMDGPU::getNamedOper

[clang] [AMDGPU][GFX12] Add tests for unsupported builtins (PR #78729)

2024-01-24 Thread Mariusz Sikora via cfe-commits
mariusz-sikora-at-amd wrote: ping https://github.com/llvm/llvm-project/pull/78729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [mlir] [openmp] [pstl] [clang-tools-extra] [llvm] [lld] [lldb] [clang] [ELF] Don't resolve relocations referencing SHN_ABS to tombstone in non-SHF_ALLOC sections (PR #79238)

2024-01-24 Thread Peter Smith via cfe-commits
https://github.com/smithp35 approved this pull request. Code changes LGTM too. I can't think of a case when a C/C++ compiler would directly generate a reference to an SHN_ABS symbol as I don't think there is a way of expressing such a symbol in C/C++ and debug generation concentrates on descri

[mlir] [llvm] [clang] [AMDGPU] Add GFX12 WMMA and SWMMAC instructions (PR #77795)

2024-01-24 Thread Mirko Brkušanin via cfe-commits
mbrkusanin wrote: Rebased and reverted bfloat https://github.com/llvm/llvm-project/pull/77795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

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

[llvm] [clang] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-01-24 Thread Jay Foad via cfe-commits
@@ -2561,6 +2567,70 @@ bool SIMemoryLegalizer::expandAtomicCmpxchgOrRmw(const SIMemOpInfo &MOI, return Changed; } +bool SIMemoryLegalizer::GFX9InsertWaitcntForPreciseMem(MachineFunction &MF) { + const GCNSubtarget &ST = MF.getSubtarget(); + const SIInstrInfo *TII = ST.get

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2024-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/66514 >From 69aa9b23a7d5afb58b89a703e7755924561dd54f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 15 Sep 2023 15:51:39 +0200 Subject: [PATCH] [clang][Diagnostics] Highlight code snippets Ad

[clang] [clang][analyzer] Improve modeling of 'execv' and 'execvp' in StdLibraryFunctionsChecker (PR #78930)

2024-01-24 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/78930 >From 74a43113ee4152eb0cb6aaeb4fbc917bcf0abcf8 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Mon, 22 Jan 2024 12:42:43 +0800 Subject: [PATCH 1/2] [clang[analyzer] Improve modeling of 'execv' and 'execvp' in Std

[clang-tools-extra] [flang] [compiler-rt] [lld] [llvm] [libcxx] [clang] [lldb] [libc] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread via cfe-commits
@@ -356,14 +356,7 @@ C++23 implementation status Relaxing some constexpr restrictions https://wg21.link/P2448R2";>P2448R2 - -Clang 17 (Partial) - We do not support outside of defaulted special memeber functions the change that constexpr f

[clang-tools-extra] [flang] [compiler-rt] [lld] [llvm] [libcxx] [clang] [lldb] [libc] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread via cfe-commits
@@ -9108,7 +9123,8 @@ bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, // declaration, it is implicitly considered to be constexpr. // FIXME: Only applying this to the first declaration seems problematic, as // simple reorderings can affect the

[clang] [libclang/python] Expose Rewriter to the python binding (PR #77269)

2024-01-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @linux4life798 Can you review the last update? https://github.com/llvm/llvm-project/pull/77269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-24 Thread Timm Baeder via cfe-commits
@@ -389,10 +391,28 @@ template class LocalScope : public VariableScope { if (!Local.Desc->isPrimitive() && !Local.Desc->isPrimitiveArray()) { this->Ctx->emitGetPtrLocal(Local.Offset, SourceInfo{}); this->Ctx->emitRecordDestruction(Local.Desc); +r

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-24 Thread Timm Baeder via cfe-commits
@@ -389,10 +391,28 @@ template class LocalScope : public VariableScope { if (!Local.Desc->isPrimitive() && !Local.Desc->isPrimitiveArray()) { this->Ctx->emitGetPtrLocal(Local.Offset, SourceInfo{}); this->Ctx->emitRecordDestruction(Local.Desc); +r

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-24 Thread Timm Baeder via cfe-commits
@@ -368,6 +369,7 @@ template class LocalScope : public VariableScope { return; this->emitDestructors(); this->Ctx->emitDestroy(*Idx, SourceInfo{}); +removeStoredOpaqueValues(); tbaederr wrote: Inline this function here. https://github.com/

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-24 Thread Timm Baeder via cfe-commits
@@ -389,10 +391,28 @@ template class LocalScope : public VariableScope { if (!Local.Desc->isPrimitive() && !Local.Desc->isPrimitiveArray()) { this->Ctx->emitGetPtrLocal(Local.Offset, SourceInfo{}); this->Ctx->emitRecordDestruction(Local.Desc); +r

[clang] fb9a82b - [clang-repl] Refine fix for linker error: PLT offset too large

2024-01-24 Thread Stefan Gränitz via cfe-commits
Author: Stefan Gränitz Date: 2024-01-24T11:45:04+01:00 New Revision: fb9a82b0235713782c1cf9d1eba20ce8d95766f7 URL: https://github.com/llvm/llvm-project/commit/fb9a82b0235713782c1cf9d1eba20ce8d95766f7 DIFF: https://github.com/llvm/llvm-project/commit/fb9a82b0235713782c1cf9d1eba20ce8d95766f7.diff

[clang] [clang][analyzer] Support `fgets` in the SteamChecker (PR #73638)

2024-01-24 Thread Balazs Benics via cfe-commits
@@ -778,42 +781,61 @@ void StreamChecker::evalFgetc(const FnDescription *Desc, const CallEvent &Call, assertStreamStateOpened(OldSS); steakhal wrote: This patch caused a downstream test failure. Here is the fix: ```suggestion // We don't model the buffer

[llvm] [clang] [mlir] [AMDGPU] Add GFX12 WMMA and SWMMAC instructions (PR #77795)

2024-01-24 Thread Piotr Sobczak via cfe-commits
https://github.com/piotrAMD approved this pull request. https://github.com/llvm/llvm-project/pull/77795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/78338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr requested changes to this pull request. https://github.com/llvm/llvm-project/pull/78338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Timm Baeder via cfe-commits
@@ -1098,7 +1098,13 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() { // Produce an error if no expected-* directives could be found in the // source file(s) processed. if (Status == HasNoDirectives) { - Diags.Report(diag::err_verify_no_directives).setForc

[clang] [clang-tools-extra] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Timm Baeder via cfe-commits
@@ -1098,7 +1098,13 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() { // Produce an error if no expected-* directives could be found in the // source file(s) processed. if (Status == HasNoDirectives) { - Diags.Report(diag::err_verify_no_directives).setForc

[clang] [clang-tools-extra] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Timm Baeder via cfe-commits
tbaederr wrote: Adding Aaron since we're probably getting close. https://github.com/llvm/llvm-project/pull/78338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Support `fgets` in the SteamChecker (PR #73638)

2024-01-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/73638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Mark the fallthrough coreturn statement implicit. (PR #77465)

2024-01-24 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/77465 >From 781201c5c0a526821f51ce6aa0e2c972a9f5f51f Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 9 Jan 2024 14:02:01 +0100 Subject: [PATCH 1/2] [AST] Mark the fallthrough coreturn statement implicit. --- clan

[clang] [AMDGPU][GFX12] Add tests for unsupported builtins (PR #78729)

2024-01-24 Thread Jay Foad via cfe-commits
https://github.com/jayfoad edited https://github.com/llvm/llvm-project/pull/78729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU][GFX12] Add tests for unsupported builtins (PR #78729)

2024-01-24 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/78729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU][GFX12] Add tests for unsupported builtins (PR #78729)

2024-01-24 Thread Jay Foad via cfe-commits
@@ -4,10 +4,114 @@ typedef unsigned int uint; -kernel void test_builtins_amdgcn_gws_insts(uint a, uint b) { +#pragma OPENCL EXTENSION cl_khr_fp64:enable + +typedef float v2f __attribute__((ext_vector_type(2))); +typedef float v4f __attribute__((ext_vector_type(4))); +ty

[clang] [AMDGPU][GFX12] Add tests for unsupported builtins (PR #78729)

2024-01-24 Thread Mariusz Sikora via cfe-commits
@@ -4,10 +4,114 @@ typedef unsigned int uint; -kernel void test_builtins_amdgcn_gws_insts(uint a, uint b) { +#pragma OPENCL EXTENSION cl_khr_fp64:enable + +typedef float v2f __attribute__((ext_vector_type(2))); +typedef float v4f __attribute__((ext_vector_type(4))); +ty

[clang] 9dddb3d - [AST] Mark the fallthrough coreturn statement implicit. (#77465)

2024-01-24 Thread via cfe-commits
Author: Haojian Wu Date: 2024-01-24T12:11:00+01:00 New Revision: 9dddb3d5f3bf323b7b7f8281bb848731f69fddfa URL: https://github.com/llvm/llvm-project/commit/9dddb3d5f3bf323b7b7f8281bb848731f69fddfa DIFF: https://github.com/llvm/llvm-project/commit/9dddb3d5f3bf323b7b7f8281bb848731f69fddfa.diff LO

[clang] [AST] Mark the fallthrough coreturn statement implicit. (PR #77465)

2024-01-24 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/77465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [Docs] Fix CMakeLists.txt in doc (PR #79273)

2024-01-24 Thread via cfe-commits
https://github.com/LukeLIN-web updated https://github.com/llvm/llvm-project/pull/79273 >From 5bec4cb8a832ace256c69993f12ceae9fddedf85 Mon Sep 17 00:00:00 2001 From: Luke <1263810...@qq.com> Date: Wed, 24 Jan 2024 14:07:31 +0300 Subject: [PATCH] fix CMakeLists.txt in doc --- llvm/docs/WritingAn

[llvm] [clang-tools-extra] [clang] [Docs] Fix running-a-pass-with-opt in doc (PR #79273)

2024-01-24 Thread via cfe-commits
https://github.com/LukeLIN-web edited https://github.com/llvm/llvm-project/pull/79273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [compiler-rt] [libcxx] [lldb] [pstl] [flang] [clang-tools-extra] [mlir] [openmp] [lld] [llvm] [AMDGPU][GFX12] VOP encoding and codegen - add support for v_cvt fp8/… (PR #78414)

2024-01-24 Thread Mariusz Sikora via cfe-commits
Mirko =?utf-8?q?Brkušanin?= , Mirko =?utf-8?q?Brkušanin?= ,Mirko Brkusanin ,Mariusz Sikora Message-ID: In-Reply-To: https://github.com/mariusz-sikora-at-amd closed https://github.com/llvm/llvm-project/pull/78414 ___ cfe-commits mailing list cfe-comm

[clang] [llvm] [AArch64][SME] Implement inline-asm clobbers for za/zt0 (PR #79276)

2024-01-24 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau created https://github.com/llvm/llvm-project/pull/79276 This enables specifing "za" or "zt0" to the clobber list for inline asm. This complies with the acle SME addition to the asm extension here: https://github.com/ARM-software/acle/pull/276 >From e98987ebb48839ea

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-24 Thread via cfe-commits
@@ -368,6 +369,7 @@ template class LocalScope : public VariableScope { return; this->emitDestructors(); this->Ctx->emitDestroy(*Idx, SourceInfo{}); +removeStoredOpaqueValues(); isuckatcs wrote: This function has 2 callsites, you want the ot

[clang] [libc++] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-01-24 Thread via cfe-commits
https://github.com/huixie90 ready_for_review https://github.com/llvm/llvm-project/pull/75371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SME] Implement inline-asm clobbers for za/zt0 (PR #79276)

2024-01-24 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 cfddb59be2124f7ec615f48a2d0395c6fdb1bb56 e98987ebb48839ea652d63dfaa62ed841b426e46 --

[clang] [LTO] Fix Veclib flags correctly pass to LTO flags (PR #78749)

2024-01-24 Thread David Sherwood via cfe-commits
https://github.com/david-arm approved this pull request. LGTM as well! https://github.com/llvm/llvm-project/pull/78749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [lld] [flang] [clang] [libcxx] [compiler-rt] [llvm] [clang-tools-extra] [lldb] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread Mariya Podchishchaeva via cfe-commits
@@ -9108,7 +9123,8 @@ bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, // declaration, it is implicitly considered to be constexpr. // FIXME: Only applying this to the first declaration seems problematic, as // simple reorderings can affect the

[clang] [clang][Interp] Cleaning up `FIXME`s added during `ArrayInitLoopExpr` implementation. (PR #70053)

2024-01-24 Thread Timm Baeder via cfe-commits
@@ -368,6 +369,7 @@ template class LocalScope : public VariableScope { return; this->emitDestructors(); this->Ctx->emitDestroy(*Idx, SourceInfo{}); +removeStoredOpaqueValues(); tbaederr wrote: Ah, didn't see that. Well, it's fine to leave i

[clang] dee02ee - [clang][Interp][NFC] Complex elements can only be primitives

2024-01-24 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-01-24T12:56:16+01:00 New Revision: dee02ee9f8ffc74fea6c54f4c00df16e7ca4c8a1 URL: https://github.com/llvm/llvm-project/commit/dee02ee9f8ffc74fea6c54f4c00df16e7ca4c8a1 DIFF: https://github.com/llvm/llvm-project/commit/dee02ee9f8ffc74fea6c54f4c00df16e7ca4c8a1.diff LO

[clang] [mlir] [llvm] [AMDGPU] Add GFX12 WMMA and SWMMAC instructions (PR #77795)

2024-01-24 Thread Mirko Brkušanin via cfe-commits
mbrkusanin wrote: Rebased and updated after https://github.com/llvm/llvm-project/pull/76143 https://github.com/llvm/llvm-project/pull/77795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[llvm] [clang] [clang-tools-extra] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Shourya Goel via cfe-commits
@@ -1098,7 +1098,13 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() { // Produce an error if no expected-* directives could be found in the // source file(s) processed. if (Status == HasNoDirectives) { - Diags.Report(diag::err_verify_no_directives).setForc

[llvm] [clang] [clang-tools-extra] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/78338 >From b98f02d4c155b5be9bd4f5b2e4bf73720a81f39a Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Wed, 17 Jan 2024 01:24:17 +0530 Subject: [PATCH 01/10] Fix : more detailed no expected directive message --- cla

[llvm] [clang] [clang-tools-extra] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-01-24 Thread Shourya Goel via cfe-commits
@@ -1098,7 +1098,13 @@ void VerifyDiagnosticConsumer::CheckDiagnostics() { // Produce an error if no expected-* directives could be found in the // source file(s) processed. if (Status == HasNoDirectives) { - Diags.Report(diag::err_verify_no_directives).setForc

[llvm] [clang] [mlir] [AMDGPU] Add GFX12 WMMA and SWMMAC instructions (PR #77795)

2024-01-24 Thread Mirko Brkušanin via cfe-commits
https://github.com/mbrkusanin closed https://github.com/llvm/llvm-project/pull/77795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-24 Thread via cfe-commits
alexfh wrote: We've started seeing `call to constructor of 'SomeType' is ambiguous` errors after this patch on some code. In the case I closely inspected the code looks like https://gcc.godbolt.org/z/3MbWf69cx: ``` #include struct A { A() {} }; struct B { explicit B(A); explicit

[clang] [clang][dataflow] Strengthen pointer comparison. (PR #75170)

2024-01-24 Thread via cfe-commits
martinboehme wrote: Finally getting back to this. The reason this was causing tests to fail is really pretty obvious in hindsight: Different `StorageLocation`s may alias, so if the `StorageLocation`s for two `PointerValue`s are different, we can't assume that the pointers must compare unequal

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -681,12 +718,26 @@ renameOutsideFile(const NamedDecl &RenameDecl, llvm::StringRef MainFilePath, ExpBuffer.getError().message()); continue; } +std::string RenameIdentifier = RenameDecl.getNameAsString(); +std::optional Selector = std::nullopt; +

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -543,6 +550,45 @@ std::optional checkName(const NamedDecl &RenameDecl, return Result; } +clangd::Range tokenRangeForLoc(ParsedAST &AST, SourceLocation TokLoc, + const SourceManager &SM, + const LangOptions &Lang

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -817,7 +939,8 @@ llvm::Expected rename(const RenameInputs &RInputs) { return StartOffset.takeError(); if (!EndOffset) return EndOffset.takeError(); - if (llvm::none_of( + if (RenamingCurToken && kadircet wrote: as mentioned above, let's just ch

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -778,12 +868,44 @@ llvm::Expected rename(const RenameInputs &RInputs) { return makeError(ReasonToReject::NoSymbolFound); if (DeclsUnderCursor.size() > 1) return makeError(ReasonToReject::AmbiguousSymbol); + std::string Placeholder; + // We expect the token under

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -1017,9 +1159,10 @@ size_t renameRangeAdjustmentCost(ArrayRef Indexed, ArrayRef Lexed, int LastDLine = 0, LastDColumn = 0; int Cost = 0; for (size_t I = 0; I < Indexed.size(); ++I) { -int DLine = Indexed[I].start.line - Lexed[MappedIndex[I]].start.line; -int D

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -746,6 +812,30 @@ void findNearMiss( } // namespace +SymbolRange::SymbolRange(Range R) : Ranges({R}) {} + +SymbolRange::SymbolRange(std::vector Ranges) +: Ranges(std::move(Ranges)) {} + +Range SymbolRange::range() const { return Ranges.front(); } + +bool operator==(con

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -1029,5 +1172,151 @@ size_t renameRangeAdjustmentCost(ArrayRef Indexed, ArrayRef Lexed, return Cost; } +static bool isMatchingSelectorName(const syntax::Token &Cur, + const syntax::Token &Next, + const S

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -1029,5 +1172,151 @@ size_t renameRangeAdjustmentCost(ArrayRef Indexed, ArrayRef Lexed, return Cost; } +static bool isMatchingSelectorName(const syntax::Token &Cur, + const syntax::Token &Next, + const S

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -1029,5 +1172,151 @@ size_t renameRangeAdjustmentCost(ArrayRef Indexed, ArrayRef Lexed, return Cost; } +static bool isMatchingSelectorName(const syntax::Token &Cur, + const syntax::Token &Next, + const S

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -778,12 +868,44 @@ llvm::Expected rename(const RenameInputs &RInputs) { return makeError(ReasonToReject::NoSymbolFound); if (DeclsUnderCursor.size() > 1) return makeError(ReasonToReject::AmbiguousSymbol); + std::string Placeholder; + // We expect the token under

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -778,12 +868,44 @@ llvm::Expected rename(const RenameInputs &RInputs) { return makeError(ReasonToReject::NoSymbolFound); if (DeclsUnderCursor.size() > 1) return makeError(ReasonToReject::AmbiguousSymbol); + std::string Placeholder; + // We expect the token under

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -1029,5 +1172,151 @@ size_t renameRangeAdjustmentCost(ArrayRef Indexed, ArrayRef Lexed, return Cost; } +static bool isMatchingSelectorName(const syntax::Token &Cur, + const syntax::Token &Next, + const S

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -38,6 +38,11 @@ namespace clang { namespace clangd { + +std::vector collectRenameIdentifierRanges( kadircet wrote: let's move this into anonymous namespace, and add some comments explaining what it does? https://github.com/llvm/llvm-project/pull/76466 __

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -1029,5 +1172,151 @@ size_t renameRangeAdjustmentCost(ArrayRef Indexed, ArrayRef Lexed, return Cost; } +static bool isMatchingSelectorName(const syntax::Token &Cur, kadircet wrote: can you move all of these into anon namespace instead? https://github.c

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -543,6 +550,45 @@ std::optional checkName(const NamedDecl &RenameDecl, return Result; } +clangd::Range tokenRangeForLoc(ParsedAST &AST, SourceLocation TokLoc, + const SourceManager &SM, + const LangOptions &Lang

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-01-24 Thread kadir çetinkaya via cfe-commits
@@ -1029,5 +1172,151 @@ size_t renameRangeAdjustmentCost(ArrayRef Indexed, ArrayRef Lexed, return Cost; } +static bool isMatchingSelectorName(const syntax::Token &Cur, + const syntax::Token &Next, + const S

[mlir] [llvm] [clang] [AArch64] Replace LLVM IR function attributes for PSTATE.ZA. (PR #79166)

2024-01-24 Thread Benjamin Maxwell via cfe-commits
@@ -1098,11 +1098,15 @@ LogicalResult ModuleTranslation::convertOneFunction(LLVMFuncOp func) { llvmFunc->addFnAttr("aarch64_pstate_sm_compatible"); if (func.getArmNewZa()) -llvmFunc->addFnAttr("aarch64_pstate_za_new"); - else if (func.getArmSharedZa()) -llvmFun

[llvm] [clang-tools-extra] [clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-24 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > > Is this expected and wanted? > > Good catch! I would not expect that diagnostic; we should silence the > diagnostic if it's used in a `#ifdef`, `#elifdef`, or `defined` because the > value isn't necessary. Perhaps we should also silence something like > `sizeof(INFINITY)`

[clang] [FatLTO] output of -ffat-lto-objects -S should be assembly. (PR #79041)

2024-01-24 Thread Wael Yehia via cfe-commits
@@ -12,14 +12,27 @@ // CHECK-CC-S-NOT: -emit-llvm // CHECK-CC-S-NOT: -ffat-lto-objects -/// When LTO is enabled, we expect LLVM IR output and -ffat-lto-objects to be passed to cc1. +/// When fat LTO is enabled with -S, we expect asm output and -ffat-lto-objects to be passed

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-01-24 Thread Alexandre Ganea via cfe-commits
aganea wrote: Can you please send separate PRs for the Support changes? https://github.com/llvm/llvm-project/pull/67562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-24 Thread via cfe-commits
alexfh wrote: Actually, on the second look it doesn't seem to be too ambiguous to me. I *think* `std::vector` should be a strictly better match in this case. https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@list

[clang] c3e7707 - [clang][AST][NFC] Turn a isa<> + cast<> into dynamic_cast<>

2024-01-24 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-01-24T15:17:33+01:00 New Revision: c3e77070489979788788ef479f8932ac460b675b URL: https://github.com/llvm/llvm-project/commit/c3e77070489979788788ef479f8932ac460b675b DIFF: https://github.com/llvm/llvm-project/commit/c3e77070489979788788ef479f8932ac460b675b.diff LO

[libcxx] [lld] [clang] [lldb] [clang-tools-extra] [flang] [libc] [compiler-rt] [llvm] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-01-24 Thread via cfe-commits
@@ -9108,7 +9123,8 @@ bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD, // declaration, it is implicitly considered to be constexpr. // FIXME: Only applying this to the first declaration seems problematic, as // simple reorderings can affect the

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)

2024-01-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. LGTM, let me know if you need someone to merge this for you. https://github.com/llvm/llvm-project/pull/78400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

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

2024-01-24 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/68882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang] [clang-tools-extra] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-24 Thread via cfe-commits
bgra8 wrote: @bolshakov-a this is causing a regression in the way partial template specializations work. For the following reproducer the partial template specialization is not used by the compiler when it is expected it should be used: ``` const char kt[] = "dummy"; template class SomeTemp

[libcxxabi] [openmp] [clang] [flang] [libcxx] [libc] [compiler-rt] [mlir] [llvm] [clang-tools-extra] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1.b. (PR #78637)

2024-01-24 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78637 >From efd07e93aed51049ad3783c701284617ae446330 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 17 Jan 2024 11:11:59 + Subject: [PATCH 1/5] [AArch64] Combine store (trunc X to <3 x i8>) to sequence of ST1

[clang] [clang][analyzer] Support `fgets` in the SteamChecker (PR #73638)

2024-01-24 Thread Balázs Kéri via cfe-commits
@@ -778,42 +781,61 @@ void StreamChecker::evalFgetc(const FnDescription *Desc, const CallEvent &Call, assertStreamStateOpened(OldSS); balazske wrote: Will this invalidate only the buffer, not `F1`? https://github.com/llvm/llvm-project/pull/73638 __

[clang] [clang] Use getDefaultArgRange instead of getDefaultArg to retrieve the (PR #79296)

2024-01-24 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/79296 source location in AliasTemplateDeductionGuideTransform. I don't have a reproducible testcase, but this should be a safe and non-functional change. We have checked the `hasDefaultArg` before calling getDefaultAr

  1   2   3   4   5   6   >