[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-15 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > @dwblaikie do you have any memory of what caused regressions on the last try > in the first place? Do we happen to do more work for compiles with many files > because we accidentally push some computations further down the dependency > tree and have to duplicate it instead

[clang] [clang][dataflow] Tighten checking for existence of a function body. (PR #78163)

2024-01-15 Thread via cfe-commits
martinboehme wrote: Build failure is merely a clang-format failure in a file not touched by this PR (clang/docs/HLSL/FunctionCalls.rst). https://github.com/llvm/llvm-project/pull/78163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] Fix 'newline in constant' encoding issue in clangd sources (PR #78085)

2024-01-15 Thread via cfe-commits
https://github.com/BinVerse closed https://github.com/llvm/llvm-project/pull/78085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Process terminator condition within `transferCFGBlock()`. (PR #78127)

2024-01-15 Thread via cfe-commits
martinboehme wrote: The failing buildkite is merely a clang-format failure for a file not touched by this PR (clang/docs/HLSL/FunctionCalls.rst). https://github.com/llvm/llvm-project/pull/78127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon edited https://github.com/llvm/llvm-project/pull/78200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
@@ -11889,6 +11889,13 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, NewFD->setInvalidDecl(); } + if (NewFD->hasAttr() || NewFD->hasAttr()) { +if (isa(NewFD)) + Diag(NewFD->getLocation(), diag::warn_pure_attr_on_cxx_constructor); +

[clang] [llvm] [clang-tools-extra] workflows: Refactor release-tasks.yml (PR #69523)

2024-01-15 Thread Aiden Grossman via cfe-commits
@@ -10,112 +10,70 @@ on: - 'llvmorg-*' jobs: - release-tasks: -permissions: - contents: write # To upload assets to release. + validate-tag: +name: Validate Tag runs-on: ubuntu-latest if: github.repository == 'llvm/llvm-project' +outputs: +

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/78200 >From b080d04eb30254502ccd5d59d76b5197db1fa88d Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Mon, 15 Jan 2024 22:24:34 +0400 Subject: [PATCH 1/4] add warning and test ---

[clang-tools-extra] [llvm] [clang] workflows: Refactor release-tasks.yml (PR #69523)

2024-01-15 Thread Aiden Grossman via cfe-commits
@@ -0,0 +1,74 @@ +name: Release Lit + +permissions: + contents: read + +on: + workflow_dispatch: +inputs: + release-version: +description: 'Release Version' +required: true +type: string + + workflow_call: +inputs: + release-version: +

[clang-tools-extra] [llvm] [clang] workflows: Refactor release-tasks.yml (PR #69523)

2024-01-15 Thread Tobias Hieta via cfe-commits
@@ -10,112 +10,70 @@ on: - 'llvmorg-*' jobs: - release-tasks: -permissions: - contents: write # To upload assets to release. + validate-tag: +name: Validate Tag runs-on: ubuntu-latest if: github.repository == 'llvm/llvm-project' +outputs: +

[clang] [clang][dataflow] Add an early-out to `flowConditionImplies()` / `flowConditionAllows()`. (PR #78172)

2024-01-15 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/78172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] af1463d - [clang][dataflow] Add an early-out to `flowConditionImplies()` / `flowConditionAllows()`. (#78172)

2024-01-15 Thread via cfe-commits
Author: martinboehme Date: 2024-01-16T08:25:21+01:00 New Revision: af1463d403182720ae0e3fab07634817dd0f41be URL: https://github.com/llvm/llvm-project/commit/af1463d403182720ae0e3fab07634817dd0f41be DIFF: https://github.com/llvm/llvm-project/commit/af1463d403182720ae0e3fab07634817dd0f41be.diff

[clang-tools-extra] [llvm] [clang] workflows: Refactor release-tasks.yml (PR #69523)

2024-01-15 Thread Tobias Hieta via cfe-commits
@@ -0,0 +1,74 @@ +name: Release Lit + +permissions: + contents: read + +on: + workflow_dispatch: +inputs: + release-version: +description: 'Release Version' +required: true +type: string + + workflow_call: +inputs: + release-version: +

[clang-tools-extra] [NFC][clang-tidy]improve performance for misc-unused-using-decls check (PR #78231)

2024-01-15 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM. There is open issue for performance of this check. Consider mentioning this in release notes as some generic performance improvment. Do you have any benchmarks ? https://github.com/llvm/llvm-project/pull/78231

[llvm] [clang] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-15 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese updated https://github.com/llvm/llvm-project/pull/77711 >From d3e928fc5b725cb3e484a8cfd50fa23c26f7eb22 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 10 Jan 2024 16:58:59 -0800 Subject: [PATCH] [clang][Driver] Don't ignore -gmodules .gch files A

[clang] [CLANG][NFC] Modify test cases to suit assigned default sysroot path (PR #77075)

2024-01-15 Thread via cfe-commits
Yunzezhu94 wrote: > > @MaskRay Wasn't it you that mentioned this? > > Yes. I hoped that we could deprecated `DEFAULT_SYSROOT`: > https://reviews.llvm.org/D158218 , but the relative `DEFAULT_SYSROOT` does > not have a good replacement. I think since relative DEFAULT_SYSROOT still works,

[llvm] [clang] [clang-tools-extra] workflows: Refactor release-tasks.yml (PR #69523)

2024-01-15 Thread Aiden Grossman via cfe-commits
@@ -26,21 +35,26 @@ jobs: prepare: name: Prepare to build binaries runs-on: ubuntu-22.04 -if: github.repository == 'llvm/llvm-project' outputs: - release-version: ${{ steps.validate-tag.outputs.release-version }} - flags: ${{

[llvm] [clang-tools-extra] [clang] workflows: Refactor release-tasks.yml (PR #69523)

2024-01-15 Thread Aiden Grossman via cfe-commits
@@ -10,112 +10,70 @@ on: - 'llvmorg-*' jobs: - release-tasks: -permissions: - contents: write # To upload assets to release. + validate-tag: +name: Validate Tag runs-on: ubuntu-latest if: github.repository == 'llvm/llvm-project' +outputs: +

[clang] [clang-tools-extra] [llvm] workflows: Refactor release-tasks.yml (PR #69523)

2024-01-15 Thread Aiden Grossman via cfe-commits
@@ -0,0 +1,74 @@ +name: Release Lit + +permissions: + contents: read + +on: + workflow_dispatch: +inputs: + release-version: +description: 'Release Version' +required: true +type: string + + workflow_call: +inputs: + release-version: +

[clang-tools-extra] [clang] [llvm] workflows: Refactor release-tasks.yml (PR #69523)

2024-01-15 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 commented: No issues on my end. Definitely seems to be an improvement over what was there before. It would be nice to unify the documentation test action and the documentation release action (at least somewhat), but it doesn't seem like they're particularly

[llvm] [clang-tools-extra] [clang] workflows: Refactor release-tasks.yml (PR #69523)

2024-01-15 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 edited https://github.com/llvm/llvm-project/pull/69523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][driver] Allow explicit specification of -lFortran_main (PR #78152)

2024-01-15 Thread Michael Klemm via cfe-commits
mjklemm wrote: > In a long run, I still think that we need to get rid of `Fortran_main`. > Perhaps, for the minimal, we can rename it to remove `Fortran` in the name to > make people think that it is not required (by the users) to do any linking > for Fortran code. I'd agree to that! The

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-15 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: Overall this looks great to me, very happy to see reduced duplication between clang and llvm. It would be great if we could just emit the atomic IR in all cases but unfortunately non-power-of-two sizes result in a verifier error. We could probably

[clang] [clang][analyzer] Add function 'fscanf' to StreamChecker. (PR #78180)

2024-01-15 Thread Ben Shi via cfe-commits
@@ -975,6 +981,61 @@ void StreamChecker::evalFprintf(const FnDescription *Desc, C.addTransition(StateFailed); } +void StreamChecker::evalFscanf(const FnDescription *Desc, const CallEvent , + CheckerContext ) const { + ProgramStateRef State =

[clang-tools-extra] [clang-tidy] Fixes to readability-implicit-bool-conversion (PR #72050)

2024-01-15 Thread Congcong Cai via cfe-commits
@@ -173,16 +173,30 @@ StringRef getEquivalentBoolLiteralForExpr(const Expr *Expression, return {}; } +bool needsSpacePrefix(SourceLocation Loc, ASTContext ) { + SourceRange PrefixRange(Loc.getLocWithOffset(-1), Loc); + StringRef SpaceBeforeStmtStr = Lexer::getSourceText(

[clang-tools-extra] [clang-tidy] Add bugprone-chained-comparison check (PR #76365)

2024-01-15 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,161 @@ +//===--- ChainedComparisonCheck.cpp - clang-tidy --===// +// +// 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] Add bugprone-chained-comparison check (PR #76365)

2024-01-15 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,161 @@ +//===--- ChainedComparisonCheck.cpp - clang-tidy --===// +// +// 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] Add bugprone-chained-comparison check (PR #76365)

2024-01-15 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,161 @@ +//===--- ChainedComparisonCheck.cpp - clang-tidy --===// +// +// 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] Add bugprone-chained-comparison check (PR #76365)

2024-01-15 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,161 @@ +//===--- ChainedComparisonCheck.cpp - clang-tidy --===// +// +// 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] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/77711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 481fd41 - [modularize] Use SmallString::operator std::string (NFC)

2024-01-15 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-01-15T21:25:51-08:00 New Revision: 481fd41aaa343e2ee2c86c2444fbc2e5ad1f3831 URL: https://github.com/llvm/llvm-project/commit/481fd41aaa343e2ee2c86c2444fbc2e5ad1f3831 DIFF: https://github.com/llvm/llvm-project/commit/481fd41aaa343e2ee2c86c2444fbc2e5ad1f3831.diff

[clang] d34ac45 - [Basic] Use StringRef::consume_front (NFC)

2024-01-15 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-01-15T21:25:48-08:00 New Revision: d34ac450a74657f03e15dd6776b406d1f31e054a URL: https://github.com/llvm/llvm-project/commit/d34ac450a74657f03e15dd6776b406d1f31e054a DIFF: https://github.com/llvm/llvm-project/commit/d34ac450a74657f03e15dd6776b406d1f31e054a.diff

[clang-tools-extra] [NFC][clang-tidy]improve performance for misc-unused-using-decls check (PR #78231)

2024-01-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes `UnusedUsingDeclsCheck::removeFromFoundDecls` will be called with high frequency. At current time it will check every `Context`. This patch adds a cache to reduce algorithm complexity. --- Full

[clang-tools-extra] [NFC][clang-tidy]improve performance for misc-unused-using-decls check (PR #78231)

2024-01-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/78231 `UnusedUsingDeclsCheck::removeFromFoundDecls` will be called with high frequency. At current time it will check every `Context`. This patch adds a cache to reduce algorithm complexity. >From

[libunwind] [libunwind][WebAssembly] Fix libunwind.cpp guard (PR #78230)

2024-01-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Heejin Ahn (aheejin) Changes This should have been ``, meaning neither SjLj nor Wasm uses this file. --- Full diff: https://github.com/llvm/llvm-project/pull/78230.diff 1 Files Affected: - (modified) libunwind/src/libunwind.cpp

[libunwind] [libunwind][WebAssembly] Omit unused parts of libunwind.cpp for Wasm (PR #73196)

2024-01-15 Thread Heejin Ahn via cfe-commits
@@ -26,7 +26,7 @@ #include #endif -#if !defined(__USING_SJLJ_EXCEPTIONS__) +#if !defined(__USING_SJLJ_EXCEPTIONS__) || !defined(__USING_WASM_EXCEPTIONS__) aheejin wrote: Sorry, fixed in #78230. https://github.com/llvm/llvm-project/pull/73196

[libunwind] [libunwind][WebAssembly] Fix libunwind.cpp guard (PR #78230)

2024-01-15 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/78230 This should have been `&&`, meaning neither SjLj nor Wasm uses this file. >From 9ddfd0446342ea3c257b5d1d104f957a83c01e3c Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 15 Jan 2024 20:06:48 -0800 Subject:

[llvm] [clang] AMDGPU/GFX12: Add new dot4 fp8/bf8 instructions (PR #77892)

2024-01-15 Thread Matt Arsenault via cfe-commits
@@ -2696,6 +2696,25 @@ def int_amdgcn_udot8 : ImmArg>, ImmArg>, ImmArg>] >; +// f32 %r = llvm.amdgcn.dot4.f32.type_a.type_b (v4type_a (as i32) %a, v4type_b (as i32) %b, f32 %c) +// %r = %a[0] * %b[0] + %a[1] * %b[1] + %a[2] * %b[2] + %a[3] * %b[3] + %c +class

[clang] [clang] Fix CTAD not work for function-type and array-type arguments. (PR #78159)

2024-01-15 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM after more detailed summary provided. https://github.com/llvm/llvm-project/pull/78159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Fix CTAD not work for function-type and array-type arguments. (PR #78159)

2024-01-15 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Can you please provide a more detailed summary, since these are usually what goes in the git log. It should describe the cause and the approach of the fix. It is also helpful for reviewers as well. https://github.com/llvm/llvm-project/pull/78159

[clang] 1b6c1a3 - [NFC] Improve test for clang/test/Modules/GH77953.cpp

2024-01-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-01-16T11:32:10+08:00 New Revision: 1b6c1a3bd73be4dd904230c637d65810cf3334cd URL: https://github.com/llvm/llvm-project/commit/1b6c1a3bd73be4dd904230c637d65810cf3334cd DIFF: https://github.com/llvm/llvm-project/commit/1b6c1a3bd73be4dd904230c637d65810cf3334cd.diff

[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (PR #74775)

2024-01-15 Thread via cfe-commits
sethp wrote: oh, @tbaederr I see you've done some overlapping work over in https://github.com/llvm/llvm-project/pull/68288 : I'll make time to review that and see what ought to happen to dovetail these patches. https://github.com/llvm/llvm-project/pull/74775

[clang] [Clang] Only compare template params of potential overload after checking their decl context (PR #78139)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,28 @@ +// From https://github.com/llvm/llvm-project/issues/77953 +// RUN: rm -rf %t +// RUN: mkdir -p %t +// RUN: split-file %s %t + +// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a.pcm +// RUN: %clang_cc1 -std=c++20 -fmodule-file=a=%t/a.pcm

[clang-tools-extra] [llvm] [clang] [PowerPC] Check value uses in ValueBit tracking (PR #66040)

2024-01-15 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/66040 >From ebaafdd6d45bb62b1847e60df627dfd96971a22c Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Tue, 12 Sep 2023 10:39:55 +0800 Subject: [PATCH] [PowerPC] Check value uses in ValueBit tracking ---

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-01-15 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > @ilya-biryukov any chance you/your folks could test this change for > > performance implications in google? It's especially helpful to CERN, but > > the last iteration of this direction had some regressions that stalled out > > progress on that version a few years ago,

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #72607)

2024-01-15 Thread via cfe-commits
@@ -437,6 +442,16 @@ namespace { MostDerivedArraySize = 2; MostDerivedPathLength = Entries.size(); } +void addVectorUnchecked(QualType EltTy, uint64_t Size, uint64_t Idx) { + Entries.push_back(PathEntry::ArrayIndex(Idx)); + + // This is

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #72607)

2024-01-15 Thread via cfe-commits
@@ -144,6 +144,9 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +- Allow single element access of vector object to be constant expression. + Supports the `V.xyzw` syntax and other tidbits as seen in OpenCL.

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #72607)

2024-01-15 Thread via cfe-commits
https://github.com/sethp commented: Thanks for looking into this! I was surprised to find that `clang` didn't support element accesses in a `constexpr` context, I'm glad you've put the effort in to get it working! Two minor notes below, otherwise LGTM.

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #72607)

2024-01-15 Thread via cfe-commits
https://github.com/sethp edited https://github.com/llvm/llvm-project/pull/72607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -11889,6 +11889,13 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, NewFD->setInvalidDecl(); } + if (NewFD->hasAttr() || NewFD->hasAttr()) { +if (isa(NewFD)) + Diag(NewFD->getLocation(), diag::warn_pure_attr_on_cxx_constructor); +

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -692,6 +692,13 @@ def warn_maybe_falloff_nonvoid_function : Warning< def warn_falloff_nonvoid_function : Warning< "non-void function does not return a value">, InGroup; +def warn_pure_attr_on_cxx_constructor : Warning< + "constructor cannot be 'pure' (undefined

[clang] Warning for incorrect useof 'pure' attribute (PR #78200)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -11889,6 +11889,13 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, NewFD->setInvalidDecl(); } + if (NewFD->hasAttr() || NewFD->hasAttr()) { +if (isa(NewFD)) + Diag(NewFD->getLocation(), diag::warn_pure_attr_on_cxx_constructor); +

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) { RecordDecl *RD = FD->getReturnType()->getAsRecordDecl(); if (!RD || !RD->getUnderlyingDecl()->hasAttr()) return; - // Allow `get_return_object()`. - if (FD->getDeclName().isIdentifier() &&

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-15 Thread Chuanqi Xu via cfe-commits
@@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath , Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) -VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if

[flang] [llvm] [lldb] [clang] [mlir] [libunwind] [libcxx] [clang-tools-extra] [libunwind] fix dynamic .eh_frame registration (PR #77185)

2024-01-15 Thread via cfe-commits
https://github.com/hstk30-hw closed https://github.com/llvm/llvm-project/pull/77185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] 58b33d0 - [libunwind] fix dynamic .eh_frame registration (#77185)

2024-01-15 Thread via cfe-commits
Author: SihangZhu Date: 2024-01-16T10:13:11+08:00 New Revision: 58b33d0301a36900fc641b4b0e110b683064bab8 URL: https://github.com/llvm/llvm-project/commit/58b33d0301a36900fc641b4b0e110b683064bab8 DIFF: https://github.com/llvm/llvm-project/commit/58b33d0301a36900fc641b4b0e110b683064bab8.diff

[flang] [llvm] [libc] [lldb] [clang] [compiler-rt] [libunwind] [libcxx] [clang-tools-extra] [libc++] Implement ranges::iota (PR #68494)

2024-01-15 Thread James E T Smith via cfe-commits
@@ -1149,9 +1171,11 @@ struct Proxy { // Calling swap(Proxy{}, Proxy{}) would fail (pass prvalues) // Compare operators are defined for the convenience of the tests - friend constexpr bool operator==(const Proxy&, const Proxy&) -requires (std::equality_comparable &&

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

2024-01-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM then. 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

[clang] [flang] [compiler-rt] [libunwind] [libc] [clang-tools-extra] [lldb] [libcxx] [llvm] [libc++] Implement ranges::iota (PR #68494)

2024-01-15 Thread James E T Smith via cfe-commits
@@ -0,0 +1,171 @@ +//===--===// +// +// 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] [flang] [compiler-rt] [libunwind] [libc] [clang-tools-extra] [lldb] [libcxx] [llvm] [libc++] Implement ranges::iota (PR #68494)

2024-01-15 Thread James E T Smith via cfe-commits
@@ -1172,6 +1198,22 @@ struct Proxy { requires std::three_way_comparable_with, std::decay_t> { return lhs.data <=> rhs.data; } + + // Needed to allow certain types to be weakly_incremental + constexpr Proxy& operator++() +requires(HasPreIncrementOp) + { +

[clang-tools-extra] [clang-tidy] fix modernize-use-auto incorrect fix hints for pointer (PR #77943)

2024-01-15 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/77943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-15 Thread Jessica Paquette via cfe-commits
@@ -298,7 +298,7 @@ struct CounterMappingRegion { unsigned ExpandedFileID, unsigned LineStart, unsigned ColumnStart, unsigned LineEnd, unsigned ColumnEnd, RegionKind Kind) - : MCDCParams(MCDCParams),

[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-15 Thread Jessica Paquette via cfe-commits
@@ -722,6 +739,24 @@ struct MCDCCoverageBuilder { return I->second; } + /// Return the ID of the next condition when the given condition is True. + MCDCConditionID getNextIfTrueCondID(const Expr *Cond) const { +auto I =

[clang] [clang-format] adds a space after not inside macros (PR #78176)

2024-01-15 Thread Owen Pan via cfe-commits
owenca wrote: > I think this is kind of too specific. +1. > Also I agree with [#78166 > (comment)](https://github.com/llvm/llvm-project/issues/78166#issuecomment-1892311219) > that `WhitespaceSensitiveMacros` should be used. I don't think we should require that the option be used.

[clang] [clang-format] adds a space after not inside macros (PR #78176)

2024-01-15 Thread Owen Pan via cfe-commits
@@ -4842,7 +4842,7 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine , return true; } if (Left.is(TT_UnaryOperator)) { -if (Right.isNot(tok::l_paren)) { +if (!Right.isOneOf(tok::r_paren, tok::l_paren, tok::exclaim)) { owenca

[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-15 Thread Jessica Paquette via cfe-commits
@@ -746,21 +781,52 @@ struct MCDCCoverageBuilder { // assign that ID to its LHS node. Its RHS will receive a new ID. if (CondIDs.contains(CodeGenFunction::stripCond(E))) { // If Stmt has an ID, assign its ID to LHS -

[clang] [clang] Add `clang::behaves_like_std(...)` attribute (PR #76596)

2024-01-15 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > It's not ready, but I have a draft for a much more general attribute: #78071 I was playing around with your draft PR and I do prefer your solution over mine. It will even help to cleanup my custom `xmmintrin.h` header that we have to reduce include times from SSE headers.

[clang] [clang] Fix direct-initialization with new expressions for arrays (PR #78201)

2024-01-15 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > I believe the approach here is not sufficient and we have a current PR in > progress: #76976 > > we also need codegen work to implement this. Correct - here are some examples that will cause this to fail: ```cpp void foo(int n) { new int[n](1, 2); } ``` ```cpp void

[clang] [Clang] Only compare template params of potential overload after checking their decl context (PR #78139)

2024-01-15 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/78139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c58bc24 - [Clang] Only compare template params of potential overload after checking their decl context (#78139)

2024-01-15 Thread via cfe-commits
Author: cor3ntin Date: 2024-01-16T00:56:42+01:00 New Revision: c58bc24fcf678c55b0bf522be89eff070507a005 URL: https://github.com/llvm/llvm-project/commit/c58bc24fcf678c55b0bf522be89eff070507a005 DIFF: https://github.com/llvm/llvm-project/commit/c58bc24fcf678c55b0bf522be89eff070507a005.diff

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-15 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: %check_clang_tidy %s readability-use-std-min-max %t + +constexpr int myConstexprMin(int a, int b) { + return a < b ? a : b; +} + +constexpr int myConstexprMax(int a, int b) { + return a > b ? a : b; +} + +int bar(int x, int y) { + return x < y ? x :

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-15 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,128 @@ +//===--- UseStdMinMaxCheck.cpp - clang-tidy ---===// +// +// 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] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-15 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: %check_clang_tidy %s readability-use-std-min-max %t + +constexpr int myConstexprMin(int a, int b) { + return a < b ? a : b; +} + +constexpr int myConstexprMax(int a, int b) { + return a > b ? a : b; +} + +int bar(int x, int y) { + return x < y ? x :

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-15 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 edited https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-15 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,128 @@ +//===--- UseStdMinMaxCheck.cpp - clang-tidy ---===// +// +// 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] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-15 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 requested changes to this pull request. Overall looks good, but left a few comments regarding some nits that I think should be addressed before landing this PR. https://github.com/llvm/llvm-project/pull/77816 ___

[clang] [clang-tools-extra] [lld] [compiler-rt] [llvm] [lldb] [flang] [libcxx] [mlir] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-15 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,52 @@ +//===--- AvoidNestedConditionalOperatorCheck.cpp - clang-tidy --===// HerrCai0907 wrote: fixed in 10602c2b4a662872d1aaeda1dbc58e5d6f613fda https://github.com/llvm/llvm-project/pull/78022 ___

[clang-tools-extra] 10602c2 - [NFC]add - at the beginning for alignment

2024-01-15 Thread Congcong Cai via cfe-commits
Author: Congcong Cai Date: 2024-01-16T07:49:07+08:00 New Revision: 10602c2b4a662872d1aaeda1dbc58e5d6f613fda URL: https://github.com/llvm/llvm-project/commit/10602c2b4a662872d1aaeda1dbc58e5d6f613fda DIFF: https://github.com/llvm/llvm-project/commit/10602c2b4a662872d1aaeda1dbc58e5d6f613fda.diff

[clang] [clang] Fix direct-initialization with new expressions for arrays (PR #78201)

2024-01-15 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I believe the approach here is not sufficient and we have a current PR in progress: https://github.com/llvm/llvm-project/pull/76976 we also need codegen work to implement this. https://github.com/llvm/llvm-project/pull/78201

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-15 Thread via cfe-commits
cor3ntin wrote: > Is this a potentially breaking change since we have expanded what types are > considered literals and already existing code may observe this fix? Some expression will become constant expressions and presumably that can be SFINAE upon, but given that this is a DR, I don't

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-15 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/78195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-15 Thread via cfe-commits
@@ -208,3 +208,54 @@ namespace dr2565 { // dr2565: 16 open #endif } + + +namespace dr2598 { // dr2598: 18 +#if __cplusplus >= 201103L +struct NonLiteral { +NonLiteral(); +}; + +struct anonymous1 { +union {} a; +}; +static_assert(__is_literal(anonymous1), ""); +

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-15 Thread via cfe-commits
@@ -1383,6 +1383,34 @@ void CXXRecordDecl::addedMember(Decl *D) { } } +bool CXXRecordDecl::isLiteral() const { + const LangOptions = getLangOpts(); + if (!(LangOpts.CPlusPlus20 ? hasConstexprDestructor() + : hasTrivialDestructor())) +

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-15 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/78195 >From f354ca458c1fa3cebb375f756f1a87fcf0586c3c Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 15 Jan 2024 18:09:48 +0100 Subject: [PATCH 1/3] [Clang] Implement CWG2598: Union of non-literal types A

[clang-tools-extra] [clang-tid]fix modernize-use-auto incorrect fix hints for pointer (PR #77943)

2024-01-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/77943 >From 537d283288f555c2bb7cff90aee89fe9b18f08b8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 13 Jan 2024 00:31:33 +0800 Subject: [PATCH 1/4] [clang-tid]fix modernize-use-auto incorrect fix hints for

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-15 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Mostly looks good but I would like a second set of eyes. https://github.com/llvm/llvm-project/pull/78195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-15 Thread Shafik Yaghmour via cfe-commits
@@ -208,3 +208,54 @@ namespace dr2565 { // dr2565: 16 open #endif } + + +namespace dr2598 { // dr2598: 18 +#if __cplusplus >= 201103L +struct NonLiteral { +NonLiteral(); +}; + +struct anonymous1 { +union {} a; +}; +static_assert(__is_literal(anonymous1), ""); +

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-15 Thread Shafik Yaghmour via cfe-commits
@@ -208,3 +208,54 @@ namespace dr2565 { // dr2565: 16 open #endif } + + +namespace dr2598 { // dr2598: 18 +#if __cplusplus >= 201103L +struct NonLiteral { +NonLiteral(); +}; + +struct anonymous1 { +union {} a; +}; +static_assert(__is_literal(anonymous1), ""); +

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-15 Thread Shafik Yaghmour via cfe-commits
@@ -208,3 +208,54 @@ namespace dr2565 { // dr2565: 16 open #endif } + + +namespace dr2598 { // dr2598: 18 +#if __cplusplus >= 201103L +struct NonLiteral { +NonLiteral(); +}; + +struct anonymous1 { +union {} a; +}; +static_assert(__is_literal(anonymous1), ""); +

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-15 Thread Shafik Yaghmour via cfe-commits
@@ -1383,6 +1383,34 @@ void CXXRecordDecl::addedMember(Decl *D) { } } +bool CXXRecordDecl::isLiteral() const { + const LangOptions = getLangOpts(); + if (!(LangOpts.CPlusPlus20 ? hasConstexprDestructor() + : hasTrivialDestructor())) +

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

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

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-15 Thread Bhuminjay Soni via cfe-commits
11happy wrote: @PiotrZSL also added the include check. https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-15 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy updated https://github.com/llvm/llvm-project/pull/77816 >From 1883d987b2f83adaef05fdb47ae25c7b06582a64 Mon Sep 17 00:00:00 2001 From: 11happy Date: Fri, 12 Jan 2024 00:02:46 +0530 Subject: [PATCH 01/19] Add readability check to suggest replacement of conditional

[libunwind] [flang] [mlir] [llvm] [libcxx] [clang-tools-extra] [lldb] [clang] [libunwind] fix dynamic .eh_frame registration (PR #77185)

2024-01-15 Thread via cfe-commits
https://github.com/lhames approved this pull request. Ok -- local testing seems to confirm that this is the right fix. We need to add a testcase for this API, but that can happen as a follow-up. https://github.com/llvm/llvm-project/pull/77185 ___

[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-15 Thread Leandro Lupori via cfe-commits
luporl wrote: > > If the compiler is built with `DEFAULT_SYSROOT`, the `-isysroot` option is > > ignored. Is that the expected behavior? My local MacOS build (with > > `-DDEFAULT_SYSROOT="$(xcrun --show-sdk-path)"`) has `isysroot.f90` failed. > > I expected `-isysroot` to override

[llvm] [clang] [clang-tools-extra] [AMDGPU][GFX12] Add Atomic cond_sub_u32 (PR #76224)

2024-01-15 Thread Mariusz Sikora via cfe-commits
mariusz-sikora-at-amd wrote: > Missing UniformityAnalysis test for these Done https://github.com/llvm/llvm-project/pull/76224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] [AMDGPU][GFX12] Add Atomic cond_sub_u32 (PR #76224)

2024-01-15 Thread Mariusz Sikora via cfe-commits
https://github.com/mariusz-sikora-at-amd updated https://github.com/llvm/llvm-project/pull/76224 >From 89b94cc98e188142cff11d58f27fe6c25183b376 Mon Sep 17 00:00:00 2001 From: Vang Thao Date: Thu, 21 Dec 2023 11:58:47 +0100 Subject: [PATCH 1/3] [AMDGPU][GFX12] Add Atomic cond_sub_u32 ---

[clang] [Clang] Implement CWG2598: Union of non-literal types (PR #78195)

2024-01-15 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Is this a potentially breaking change since we have expanded what types are considered literals and already existing code may observe this fix? https://github.com/llvm/llvm-project/pull/78195 ___ cfe-commits

[flang] [llvm] [clang-tools-extra] [clang] [compiler-rt] [VPlan] Replace VPRecipeOrVPValue with VP2VP recipe simplification. (PR #76090)

2024-01-15 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76090 >From 7c31c8bc2acf60bd50cb6d63944ee8d4946b9638 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Thu, 4 May 2023 21:33:24 +0100 Subject: [PATCH] [VPlan] Replace VPRecieOrVPValue with VP2VP recipe simplification.

  1   2   3   4   5   6   >