[clang] Introduce paged vector (PR #66430)

2023-09-18 Thread Giulio Eulisse via cfe-commits
https://github.com/ktf updated https://github.com/llvm/llvm-project/pull/66430 >From b952f0577dfe8112f394bd5392212f843c0cc86e Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+...@users.noreply.github.com> Date: Thu, 14 Sep 2023 21:58:21 +0200 Subject: [PATCH 01/16] Introduce PagedVector

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Guillaume Chatelet via cfe-commits
https://github.com/gchatelet updated https://github.com/llvm/llvm-project/pull/66504 >From f1427a81c4a3425c1a574316fc26d2c74297b34b Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Fri, 15 Sep 2023 12:34:17 + Subject: [PATCH 1/3] [clang-tidy] Update

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))` (PR #65852)

2023-09-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65852 >From d9d8bcbb98e8f5aecb9733329389d61a489bd731 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Sat, 9 Sep 2023 23:07:29 +0800 Subject: [PATCH 1/3] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Reassociate loop invariant GEP index calculations.

2023-09-18 Thread Dmitriy Smirnov via Phabricator via cfe-commits
d-smirnov added a comment. @nikic Could you check out the updated code to make sure we're on the right track before I try to fix the rest of the unit tests? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155688/new/

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))` (PR #65852)

2023-09-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))` (PR #65852)

2023-09-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65852 >From d9d8bcbb98e8f5aecb9733329389d61a489bd731 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Sat, 9 Sep 2023 23:07:29 +0800 Subject: [PATCH 1/2] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq

[clang] [clang-cl] Fix for __FUNCTION__ in c++. (PR #66120)

2023-09-18 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/66120 >From 3fcfa303bd211f9a3382657012968cd3f7269db8 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Tue, 12 Sep 2023 11:25:19 -0700 Subject: [PATCH 1/2] [clang-cl] Fix for __FUNCTION__ in c++. ---

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-18 Thread via cfe-commits
@@ -305,9 +305,22 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) mflr 0 std 0, PPC64_OFFS_SRR0(3) // store lr as ssr0 PPC64_STR(1) + PPC64_STR(4) // Save r4 first since it will be used for fixing r2. +#if defined(_AIX) + // The TOC register (r2) was changed by

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-18 Thread via cfe-commits
@@ -305,9 +305,22 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) mflr 0 std 0, PPC64_OFFS_SRR0(3) // store lr as ssr0 PPC64_STR(1) + PPC64_STR(4) // Save r4 first since it will be used for fixing r2. +#if defined(_AIX) + // The TOC register (r2) was changed by

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread Piotr Fusik via cfe-commits
pfusik wrote: > I'd be inclined to move the test to clang/test/Parser/ because even though > the fix is in Sema, it's testing a wrong parse. It's an ICE in Sema. The test is identical to the bug report, but it doesn't mean the issue is limited to syntax errors. ```cpp int main() {

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))` (PR #65852)

2023-09-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))` (PR #65852)

2023-09-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -1625,6 +1625,35 @@ SmallVector has grown a few other minor advantages over std::vector, causing and is no longer "private to the implementation". A name like ``SmallVectorHeader`` might be more appropriate. +.. _dss_pagedvector: + +llvm/ADT/PagedVector.h

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))` (PR #65852)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Changes This patch folds the pattern `a ne/eq (zext (a ne/eq c))` into a boolean constant or a compare. Clang vs GCC: https://godbolt.org/z/4ro817WE8 Alive2: https://alive2.llvm.org/ce/z/6z9NRF Fixes #65073. --- Full diff:

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))` (PR #65852)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Changes This patch folds the pattern `a ne/eq (zext (a ne/eq c))` into a boolean constant or a compare. Clang vs GCC: https://godbolt.org/z/4ro817WE8 Alive2: https://alive2.llvm.org/ce/z/6z9NRF Fixes #65073. --- Full diff:

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))` (PR #65852)

2023-09-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65852 >From d9d8bcbb98e8f5aecb9733329389d61a489bd731 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Sat, 9 Sep 2023 23:07:29 +0800 Subject: [PATCH] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))`

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))` (PR #65852)

2023-09-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65852 >From d9d8bcbb98e8f5aecb9733329389d61a489bd731 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Sat, 9 Sep 2023 23:07:29 +0800 Subject: [PATCH] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c))`

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Erich Keane via cfe-commits
@@ -2613,70 +2579,6 @@ class TypeAliasTemplateDecl : public RedeclarableTemplateDecl { static bool classofKind(Kind K) { return K == TypeAliasTemplate; } }; -/// Declaration of a function specialization at template class scope. -/// -/// For example: -/// \code -///

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I guess my first question is 'why'? My second is 'if this is unnecessary, why was it here in the first place?`. I'd like some level of historical analysis here/perhaps the knowledge of @zygoloid. https://github.com/llvm/llvm-project/pull/66636

[clang-tools-extra] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,132 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] Introduce paged vector (PR #66430)

2023-09-18 Thread Jakub Kuderski via cfe-commits
@@ -0,0 +1,133 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread via cfe-commits
cor3ntin wrote: @erichkeane Opinions? https://github.com/llvm/llvm-project/pull/66636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/65918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread via cfe-commits
cor3ntin wrote: @Fznamznon I think so too, although I'd be inclined to move the test to `clang/test/Parser/` because even though the fix is in Sema, it's testing a wrong parse. The commit message also could do with a longer description. Otherwise LGTM

[PATCH] D148381: [Clang] Implement the 'counted_by' attribute

2023-09-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I've got no further comments/concerns. Comment at: clang/include/clang/AST/Decl.h:4272-4275 +FieldDecl *FD = nullptr; +for (FieldDecl *Field : fields()) + FD = Field; +return FD; aaron.ballman wrote: > void wrote: >

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-18 Thread Congcong Cai via cfe-commits
@@ -4532,6 +4532,15 @@ static void TryReferenceListInitialization(Sema , if (T1Quals.hasAddressSpace()) Sequence.AddQualificationConversionStep( cv1T1, DestType->isRValueReferenceType() ? VK_XValue : VK_LValue); + else if

[clang] clang/OpenCL: set sqrt fp accuracy on call to Z4sqrt (PR #66651)

2023-09-18 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: @alan-baker @arsenm @AnastasiaStulova Could you review this PR please? Thank you https://github.com/llvm/llvm-project/pull/66651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] clang/OpenCL: set sqrt fp accuracy on call to Z4sqrt (PR #66651)

2023-09-18 Thread Romaric Jodin via cfe-commits
https://github.com/rjodinchr created https://github.com/llvm/llvm-project/pull/66651 This is reverting the previous implementation to avoid adding inline function in opencl headers. This was breaking clspv flow google/clspv#1231, while https://reviews.llvm.org/D156743 mentioned that just

[clang] [LLD][AARCH64] lld incorrectly handles .eh_frame when it has a non-zero offset within its output section. (PR #65966)

2023-09-18 Thread via cfe-commits
https://github.com/simpal01 updated https://github.com/llvm/llvm-project/pull/65966 >From eb4d99345cbe9aba6b909ccbc7ce932dcaef3f7d Mon Sep 17 00:00:00 2001 From: Simi Pallipurath Date: Mon, 11 Sep 2023 14:42:27 +0100 Subject: [PATCH] [LLD][AARCH64] lld incorrectly handles .eh_frame when it has

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-18 Thread Louis Dionne via cfe-commits
@@ -108,7 +108,34 @@ constexpr bool test() { auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove { return x; }; assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) == ); } + { // Make sure we don't call the projection more than three

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-18 Thread Louis Dionne via cfe-commits
@@ -108,7 +108,34 @@ constexpr bool test() { auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove { return x; }; assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) == ); } + { // Make sure we don't call the projection more than three

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-18 Thread Louis Dionne via cfe-commits
@@ -37,9 +37,10 @@ struct __fn { _LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))), "Bad bounds passed to std::ranges::clamp"); -if (std::invoke(__comp,

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-18 Thread Louis Dionne via cfe-commits
ldionne wrote: > Any idea why the CI is failing? It mentions line 86 not being constexpr > because of assert, but it doesn't seem like I've done anything which should > affect that... I looked into it a bit and I think the CI is failing because of the `std::forward` problem. The assertion on

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-18 Thread Louis Dionne via cfe-commits
ldionne wrote: > Any idea why the CI is failing? It mentions line 86 not being constexpr > because of assert, but it doesn't seem like I've done anything which should > affect that... I looked into it a bit and I think the CI is failing because of the `std::forward` problem. The assertion on

[clang] [analyzer] Do not use APInt methods on _BitInt() Types (PR #65887)

2023-09-18 Thread via cfe-commits
https://github.com/DonatNagyE approved this pull request. Don't forget to update the commit message! https://github.com/llvm/llvm-project/pull/65887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-18 Thread Louis Dionne via cfe-commits
https://github.com/ldionne resolved https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)

2023-09-18 Thread Louis Dionne via cfe-commits
https://github.com/ldionne resolved https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-18 Thread via cfe-commits
@@ -1333,7 +1333,14 @@ void StmtProfiler::VisitPredefinedExpr(const PredefinedExpr *S) { void StmtProfiler::VisitIntegerLiteral(const IntegerLiteral *S) { VisitExpr(S); S->getValue().Profile(ID); - ID.AddInteger(S->getType()->castAs()->getKind()); + + QualType T =

[PATCH] D155064: [clang][SemaCXX] Diagnose tautological uses of consteval if and is_constant_evaluated

2023-09-18 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 556946. hazohelet added a comment. After discussion in https://github.com/llvm/llvm-project/pull/66222, I noticed I had misunderstood the recursiveness of constant-evaluated context. I was pushing constant-evaluating on the lambda body when it appears

[clang] [clang][doc] Add documentation for the ASTs used to represent C++ templates (PR #66436)

2023-09-18 Thread Erich Keane via cfe-commits
erichkeane wrote: > TBH, not sure if the UML diagrams would really help anyone understand what's > going on. I tend to agree with this, the documentation via these diagrams is confusing me as well, it doesn't really seem to add anything (and in fact, seem to be 'subtracting' in my case).

[clang] [clang] Improve CI output when trailing whitespace is found (PR #66649)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes Fixes #66468 --- Full diff: https://github.com/llvm/llvm-project/pull/66649.diff 1 Files Affected: - (modified) clang/utils/ci/run-buildbot (+5-1) ``diff diff --git a/clang/utils/ci/run-buildbot b/clang/utils/ci/run-buildbot

[clang] [clang] Improve CI output when trailing whitespace is found (PR #66649)

2023-09-18 Thread Louis Dionne via cfe-commits
ldionne wrote: @asl This should make it a bit more explicit. I see this now when running locally: ``` + echo '*** Checking for trailing whitespace left in Clang source files ***' *** Checking for trailing whitespace left in Clang source files *** + grep -rnI '[[:blank:]]$' clang/lib

[clang] [clang] Improve CI output when trailing whitespace is found (PR #66649)

2023-09-18 Thread Louis Dionne via cfe-commits
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/66649 Fixes #66468 >From df20b6321bf9332571fc4e45ae370793876f7773 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 18 Sep 2023 09:58:29 -0400 Subject: [PATCH] [clang] Improve CI output when trailing whitespace

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon commented: The change needs a release note, otherwise looks good. Right, @cor3ntin ? https://github.com/llvm/llvm-project/pull/66643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Remove inaccurate legacy handling of bad bitwise shifts (PR #66647)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Changes Previously, bitwise shifts with constant operands were validated by the checker `core.UndefinedBinaryOperatorResult`. However, this logic was unreliable, and commit 25b9696b61e53a958e217bb3d0eab66350dc187f added the

[clang] [analyzer] Remove inaccurate legacy handling of bad bitwise shifts (PR #66647)

2023-09-18 Thread via cfe-commits
https://github.com/DonatNagyE created https://github.com/llvm/llvm-project/pull/66647 Previously, bitwise shifts with constant operands were validated by the checker `core.UndefinedBinaryOperatorResult`. However, this logic was unreliable, and commit 25b9696b61e53a958e217bb3d0eab66350dc187f

[clang-tools-extra] [InstSimplify] Fold icmp of `X and/or C1` and `X and/or C2` into constant (PR #65905)

2023-09-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw closed https://github.com/llvm/llvm-project/pull/65905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [InstSimplify] Fold icmp of `X and/or C1` and `X and/or C2` into constant (PR #65905)

2023-09-18 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > LGTM, but please cleanup commits. GitHub will squash commits into a single commit. https://github.com/llvm/llvm-project/pull/65905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [InstSimplify] Fold icmp of `X and/or C1` and `X and/or C2` into constant (PR #65905)

2023-09-18 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > LGTM, but please cleanup commits. GitHub will squash commits into a single commit. https://github.com/llvm/llvm-project/pull/65905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D134654: [clang] Detect header loops

2023-09-18 Thread Nathan Sidwell via Phabricator via cfe-commits
urnathan added a comment. In D134654#4645969 , @cor3ntin wrote: > @aaron.ballman @urnathan What is the status of this PR? I'd kind of forgotten about it. Did get a query from, I think, boost about how I detected the loops I reported -- which was by

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-18 Thread via cfe-commits
@@ -305,9 +305,22 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) mflr 0 std 0, PPC64_OFFS_SRR0(3) // store lr as ssr0 PPC64_STR(1) + PPC64_STR(4) // Save r4 first since it will be used for fixing r2. +#if defined(_AIX) + // The TOC register (r2) was changed by

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-18 Thread via cfe-commits
@@ -305,9 +305,22 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) mflr 0 std 0, PPC64_OFFS_SRR0(3) // store lr as ssr0 PPC64_STR(1) + PPC64_STR(4) // Save r4 first since it will be used for fixing r2. +#if defined(_AIX) + // The TOC register (r2) was changed by

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes Fixes https://github.com/llvm/llvm-project/issues/48527 --- Full diff: https://github.com/llvm/llvm-project/pull/66643.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaStmt.cpp (+2) - (added) clang/test/SemaCXX/gh48527.cpp (+10)

[PATCH] D159528: [clang] Fix null dereference on return in lambda attribute statement expr

2023-09-18 Thread Piotr Fusik via Phabricator via cfe-commits
pfusik abandoned this revision. pfusik added a comment. Moved to https://github.com/llvm/llvm-project/pull/66643 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159528/new/ https://reviews.llvm.org/D159528

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread Piotr Fusik via cfe-commits
https://github.com/pfusik created https://github.com/llvm/llvm-project/pull/66643 Fixes https://github.com/llvm/llvm-project/issues/48527 >From ea731b4d3d553f42cbaaec2079adeec3927b4150 Mon Sep 17 00:00:00 2001 From: Piotr Fusik Date: Mon, 18 Sep 2023 15:10:58 +0200 Subject: [PATCH] [clang]

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-18 Thread Paul T Robinson via cfe-commits
@@ -2325,6 +2325,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::Naked); // OptimizeNone wins over OptimizeForSize and MinSize. +F->removeFnAttr(llvm::Attribute::OptimizeForDebugging);

[clang] [clang] Preserve UDL nodes in RemoveNestedImmediateInvocation (PR #66641)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes D63960 performs a tree transformation on AST to prevent evaluating constant expressions eagerly by removing recorded immediate consteval invocations from subexpressions. (See https://reviews.llvm.org/D63960#inline-600736 for its

[clang] [clang] Preserve UDL nodes in RemoveNestedImmediateInvocation (PR #66641)

2023-09-18 Thread via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/66641 D63960 performs a tree transformation on AST to prevent evaluating constant expressions eagerly by removing recorded immediate consteval invocations from subexpressions. (See

[clang] [clang][Interp] Add IntegralAP for arbitrary-precision integers (PR #65844)

2023-09-18 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/65844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] Three-way comparisons (PR #65901)

2023-09-18 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/65901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D159528: [clang] Fix null dereference on return in lambda attribute statement expr

2023-09-18 Thread Piotr Fusik via Phabricator via cfe-commits
pfusik created this revision. Herald added a project: All. pfusik requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/48527 Repository: rG LLVM Github Monorepo

[clang] Fix math-errno issue (PR #66381)

2023-09-18 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/66381 >From 997e3b69ac5c20a9130b957c86c08b16d23af07c Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 14 Sep 2023 06:27:35 -0700 Subject: [PATCH 1/7] Fix math-errno issue ---

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Gábor Spaits via cfe-commits
https://github.com/spaits edited https://github.com/llvm/llvm-project/pull/66481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Gábor Spaits via cfe-commits
https://github.com/spaits edited https://github.com/llvm/llvm-project/pull/66481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [Documentation] Replace recommonmark by myst-parser (PR #65664)

2023-09-18 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/65664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Documentation] Replace recommonmark by myst-parser (PR #65664)

2023-09-18 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/65664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 closed https://github.com/llvm/llvm-project/pull/66586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-18 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Ping on the updated patch, which is now also passing downstream testing after I realized that we were missing a backport of commit e451d552348bc714614d294e32dfbe7ec2cd4005, which explains why some constructors were wrongly ordered...

[clang] [Inliner] Improve attribute propagation to callsites when inlining. (PR #66036)

2023-09-18 Thread Nikita Popov via cfe-commits
nikic wrote: > ``` > define noundef nonnull ptr @foo() { >%b = call ptr @bar() >call void @use(ptr %p) willreturn nounwind >ret ptr %b > } > ``` > > If we add `nonnull` to `@bar` during inlining it can still make `%p` poison > for its use in `@use`. I get it will trigger proper UB

[clang] [Documentation] Replace recommonmark by myst-parser (PR #65664)

2023-09-18 Thread via cfe-commits
cor3ntin wrote: @andreil99 Sorry, I missed that. I'd like to wait a few days for the bots to have the package installed first to minimize disruption. https://github.com/llvm/llvm-project/pull/65664 ___ cfe-commits mailing list

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread David Spickett via cfe-commits
DavidSpickett wrote: > I was only able to check intel's one (w.r.t to -mcpu), without being aware on > aarch64 / riscv world's detail. Yes I wouldn't expect you to right away, that's why we all keep an eye out for each other's changes :) . That's what I meant about starting by writing more

[clang] [Inliner] Improve attribute propagation to callsites when inlining. (PR #66036)

2023-09-18 Thread via cfe-commits
goldsteinn wrote: > > > It occurs to me that the current return attribute propagation is > > > currently buggy for poison-generating attributes: > > > https://llvm.godbolt.org/z/x8n18q9Mj > > > In this case the argument to use() will now be poison as well, while > > > before inlining only the

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread Balint Cristian via cfe-commits
cbalint13 wrote: > Put `-mcpu` aside for now, that's nice, but it's only going to be viable in a > world where the backend (tablegen) and frontend (target parsers/ABI info) > agree on what is valid and can also be passed to clang. > So what your patch produces is kinda like `./bin/clang

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/66636 This removes the `ClassScopeFunctionSpecializationDecl` `Decl` node, and instead uses `DependentFunctionTemplateSpecializationInfo` to handle such declarations. `DependentFunctionTemplateSpecializationInfo`

[PATCH] D153131: [clang analysis][thread-safety] Handle return-by-reference...

2023-09-18 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. > I think we should use the expected exit set instead of the entry set. Indeed, I've added a few tests to check this. Let me know if you see any other tests that might be valuable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D153131: [clang analysis][thread-safety] Handle return-by-reference...

2023-09-18 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 556940. courbet marked 7 inline comments as done. courbet added a comment. - Check return values against the exit set rather than the entry set, add unit tests. - Address other cosmetic review comments Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D159212: [MLIR] Allow dialects to disable CSE for certain operations

2023-09-18 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak abandoned this revision. skatrak added a comment. I'll close this patch now, since the agreed approach has been to try using the `IsolatedFromAbove` trait and not to add an interface modifying the CSE pass behavior. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo Changes This patch adds a new fn attribute, `optdebug`, that specifies that optimizations should make decisions that prioritize debug info quality, potentially at the cost of runtime performance. This patch does not add any functional

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-18 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer created https://github.com/llvm/llvm-project/pull/66632 This patch adds a new fn attribute, `optdebug`, that specifies that optimizations should make decisions that prioritize debug info quality, potentially at the cost of runtime performance. This patch does not

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread David Spickett via cfe-commits
DavidSpickett wrote: Put `-mcpu` aside for now, that's nice, but it's only going to be viable in a world where the backend (tablegen) and frontend (target parsers/ABI info) agree on what is valid and can also be passed to clang. > The file with the full log outputs is here: >

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread Balint Cristian via cfe-commits
cbalint13 wrote: @DavidSpickett Hi David, > Thankyou for looking into this, if it can work it's much cleaner than an ever > expanding if. > > I think that `getAllProcessorFeatures` may include things that are rejected > by `-march`. I will check that for Arm and AArch64. Since the list

[clang-tools-extra] [llvm][documentation] Fix coroutines documentation (PR #66420)

2023-09-18 Thread Tobias Hieta via cfe-commits
tru wrote: ping @tstellar - guess it can be a wrong team name / label name? https://github.com/llvm/llvm-project/pull/66420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Inliner] Improve attribute propagation to callsites when inlining. (PR #66036)

2023-09-18 Thread Nikita Popov via cfe-commits
nikic wrote: > > It occurs to me that the current return attribute propagation is currently > > buggy for poison-generating attributes: https://llvm.godbolt.org/z/x8n18q9Mj > > In this case the argument to use() will now be poison as well, while before > > inlining only the return value was

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread David Spickett via cfe-commits
DavidSpickett wrote: One way to check the formats is to add checks for the column titles (if any) and first extension listed in `clang/test/Driver/print-supported-extensions.c`, to document the existing behaviour. RISC-V calls into it's own ABI info class which only has unit tests so if you

[clang] [analyzer] Do not use APInt methods on _BitInt() Types (PR #65887)

2023-09-18 Thread via cfe-commits
vabridgers wrote: The status above shows 1 change requested, but I believe I've resolved the requested changes. Please review at your convenience. Thank you. https://github.com/llvm/llvm-project/pull/65887 ___ cfe-commits mailing list

[clang-tools-extra] [llvm][documentation] Fix coroutines documentation (PR #66420)

2023-09-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/66420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread David Spickett via cfe-commits
DavidSpickett wrote: Thankyou for looking into this, if it can work it's much cleaner than an ever expanding if. I think that `getAllProcessorFeatures` my include things that are rejected by `-march`. I will check that for Arm and AArch64. Since the list of features in the target parser may

[clang-tools-extra] [llvm][documentation] Fix coroutines documentation (PR #66420)

2023-09-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/66420 >From 71c5d851d2b14022434fb6533ec7418ee00751c2 Mon Sep 17 00:00:00 2001 From: NoodleSugar Date: Tue, 12 Sep 2023 12:39:13 +0200 Subject: [PATCH] [llvm][documentation] Fix coroutines documentation ---

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-18 Thread via cfe-commits
vabridgers wrote: The status above is showing 1 change requested, but I think I've addressed all comments. Please review at your convenience. Thank you. https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list

[clang] [analyzer] Do not use APInt methods on _BitInt() Types (PR #65887)

2023-09-18 Thread via cfe-commits
https://github.com/vabridgers resolved https://github.com/llvm/llvm-project/pull/65887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > Where would that be? `clang-tools-extra/docs/ReleaseNotes.rst`? I can't find > what the current release notes look like for head. Yes, it's deployed here: https://clang.llvm.org/extra/ReleaseNotes.html https://github.com/llvm/llvm-project/pull/66504

[PATCH] D157526: [clang][Sema] Remove irrelevant diagnostics from constraint satisfaction failure

2023-09-18 Thread Takuya Shimizu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb2cd9db58933: [clang][Sema] Remove irrelevant diagnostics from constraint satisfaction failure (authored by hazohelet). Changed prior to commit:

[clang] b2cd9db - [clang][Sema] Remove irrelevant diagnostics from constraint satisfaction failure

2023-09-18 Thread Takuya Shimizu via cfe-commits
Author: Takuya Shimizu Date: 2023-09-18T18:14:44+09:00 New Revision: b2cd9db589335d5885c04df83003a623cf2f05ff URL: https://github.com/llvm/llvm-project/commit/b2cd9db589335d5885c04df83003a623cf2f05ff DIFF:

[PATCH] D158595: [clang][Interp] Allow zero-init of primitives with an empty init list

2023-09-18 Thread Timm Bäder via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG52a55a717838: [clang][Interp] Allow zero-init of primitives with an empty init list (authored by tbaeder). Repository: rG LLVM Github Monorepo

[clang] 52a55a7 - [clang][Interp] Allow zero-init of primitives with an empty init list

2023-09-18 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-09-18T11:09:30+02:00 New Revision: 52a55a7178381c7ac2b46155f2cc000dac48f2d4 URL: https://github.com/llvm/llvm-project/commit/52a55a7178381c7ac2b46155f2cc000dac48f2d4 DIFF: https://github.com/llvm/llvm-project/commit/52a55a7178381c7ac2b46155f2cc000dac48f2d4.diff

[clang-tools-extra] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -4532,6 +4532,15 @@ static void TryReferenceListInitialization(Sema , if (T1Quals.hasAddressSpace()) Sequence.AddQualificationConversionStep( cv1T1, DestType->isRValueReferenceType() ? VK_XValue : VK_LValue); + else if

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -4532,6 +4532,15 @@ static void TryReferenceListInitialization(Sema , if (T1Quals.hasAddressSpace()) Sequence.AddQualificationConversionStep( cv1T1, DestType->isRValueReferenceType() ? VK_XValue : VK_LValue); + else if

[clang] [Driver][NVPTX] Add a warning that device debug info does not work with optimizations (PR #65327)

2023-09-18 Thread Georgi Mirazchiyski via cfe-commits
GeorgeWeb wrote: @Artem-B Hi, sorry for the direct ping. I was just wondering if it's okay to take a quick look at this patch. (Didn't know how to ping folks subscribed to clang-driver). Thanks!  https://github.com/llvm/llvm-project/pull/65327 ___

<    1   2   3   4   5   >