[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/68738 >From f9e29053a7a8fd8222cfbdf579776fafd6564b89 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 10 Oct 2023 21:53:37 +0200 Subject: [PATCH 1/8] [clang-tidy] Add check to flag objects hostile to suspension i

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,82 @@ +//===--- CoroutineSuspensionHostileCheck.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: Apache-

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,82 @@ +//===--- CoroutineSuspensionHostileCheck.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: Apache-

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,82 @@ +//===--- CoroutineSuspensionHostileCheck.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: Apache-

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,131 @@ +// RUN: %check_clang_tidy -std=c++20 %s misc-coroutine-hostile-raii %t \ +// RUN: -config="{CheckOptions: \ +// RUN: {misc-coroutine-hostile-raii.RAIIDenyList: \ +// RUN: 'my::Mutex; ::my::other::Mutex'}}" + +namespace std { + +templa

[clang] Correctly compute conversion seq for args to fn with reversed param order (PR #68999)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Friendly ping. https://github.com/llvm/llvm-project/pull/68999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,117 @@ +//===--- CoroutineHostileRAII.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: Ap

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,117 @@ +//===--- CoroutineHostileRAII.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: Ap

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-17 Thread Nikita Popov via cfe-commits
nikic wrote: > > We should update LangRef and require that the integer arg has the size of > > the pointer index type > > As in disallow say `ptrmask.p0.i32` on typical systems with 64-bit pointer > index? (So a lot of the current usages). Or something else? Yes, exactly. I've started working

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,117 @@ +//===--- CoroutineHostileRAII.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: Ap

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,117 @@ +//===--- CoroutineHostileRAII.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: Ap

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,117 @@ +//===--- CoroutineHostileRAII.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: Ap

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: I would still like to see some cleanup in matchers. Mainly hasHostileRAII, when it would be redesigned to get matches as an argument, then it could be renamed to something more generic, and other AST matchers woudn't be needed then. https://github.com/ll

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,49 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +This check detects hostile-RAII objects which should not persist across a PiotrZSL wrote: this should start with: "Detects when objects

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,49 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +This check detects hostile-RAII objects which should not persist across a +suspension point in a coroutine. + +Some objects require that they be destroyed

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,49 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +This check detects hostile-RAII objects which should not persist across a +suspension point in a coroutine. + +Some objects require that they be destroyed

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,45 @@ +//===--- CoroutineHostileRAIICheck.h - clang-tidy *- 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: Apa

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,45 @@ +//===--- CoroutineHostileRAIICheck.h - clang-tidy *- 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: Apa

[clang] [flang][driver] support -dumpversion and -dumpmachine (PR #68896)

2023-10-17 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/68896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang][driver] support -dumpversion and -dumpmachine (PR #68896)

2023-10-17 Thread Andrzej Warzyński via cfe-commits
@@ -2081,7 +2082,7 @@ bool Driver::HandleImmediateArgs(const Compilation &C) { if (C.getArgs().hasArg(options::OPT_dumpversion)) { // Since -dumpversion is only implemented for pedantic GCC compatibility, we // return an answer which matches our definition of __VERSI

[clang] [flang][driver] support -dumpversion and -dumpmachine (PR #68896)

2023-10-17 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space commented: Could this be implemented without any updates to Clang (beyond Options.td)? https://github.com/llvm/llvm-project/pull/68896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-17 Thread Lawrence Benson via cfe-commits
@@ -5126,6 +5126,14 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, Diags.Report(DiagID); return; } +case UETT_VectorElements: { lawben wrote: I don't know. But none of the other `UETT_*` types are covered in `Micr

[clang] [Driver] Ignore non-clang pch files when -include a.h probes a.h.gch (PR #69204)

2023-10-17 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann approved this pull request. This looks great to me. Thank you for working on this! Please give @MaskRay a chance to comment on this before merging it. https://github.com/llvm/llvm-project/pull/69204 ___ cfe-commits maili

[clang] 20af0e5 - Enable v for RISCV64 Android (#69261)

2023-10-17 Thread via cfe-commits
Author: AdityaK Date: 2023-10-17T08:52:55-07:00 New Revision: 20af0e5e8d5692327753286ac869ff1c347d819b URL: https://github.com/llvm/llvm-project/commit/20af0e5e8d5692327753286ac869ff1c347d819b DIFF: https://github.com/llvm/llvm-project/commit/20af0e5e8d5692327753286ac869ff1c347d819b.diff LOG:

[clang] Enable v for RISCV64 Android (PR #69261)

2023-10-17 Thread via cfe-commits
https://github.com/hiraditya closed https://github.com/llvm/llvm-project/pull/69261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-17 Thread Lawrence Benson via cfe-commits
https://github.com/lawben updated https://github.com/llvm/llvm-project/pull/69010 >From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001 From: Lawrence Benson Date: Wed, 11 Oct 2023 17:26:11 +0200 Subject: [PATCH 01/10] Add __builtin_vectorelements to get the number of element

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-17 Thread Lawrence Benson via cfe-commits
https://github.com/lawben updated https://github.com/llvm/llvm-project/pull/69010 >From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001 From: Lawrence Benson Date: Wed, 11 Oct 2023 17:26:11 +0200 Subject: [PATCH 01/10] Add __builtin_vectorelements to get the number of element

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-17 Thread Lawrence Benson via cfe-commits
https://github.com/lawben updated https://github.com/llvm/llvm-project/pull/69010 >From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001 From: Lawrence Benson Date: Wed, 11 Oct 2023 17:26:11 +0200 Subject: [PATCH 01/10] Add __builtin_vectorelements to get the number of element

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I'm good with it if the pre-commit is, and no one comes out and really needs the mangling done in this patch. https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-co

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

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

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-17 Thread Erich Keane via cfe-commits
@@ -5126,6 +5126,14 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, Diags.Report(DiagID); return; } +case UETT_VectorElements: { erichkeane wrote: OK, SGTM at least, I just know this pattern of 'cannot yet mangle...

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I'm good with it if the pre-commit is, and no one comes out and really needs the mangling done in this patch. https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-co

[clang] [SVE ACLE] Allow default zero initialisation for svcount_t. (PR #69321)

2023-10-17 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/69321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-17 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. the flag changes lgtm and the remaining code was already reviews, so push it! https://github.com/llvm/llvm-project/pull/68572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] 7cad5a9 - [Clang][SVE2.1] Add svpext builtins

2023-10-17 Thread Caroline Concatto via cfe-commits
Author: Caroline Concatto Date: 2023-10-17T16:15:22Z New Revision: 7cad5a9eb48e44a10121044d0342ccfbdd8df672 URL: https://github.com/llvm/llvm-project/commit/7cad5a9eb48e44a10121044d0342ccfbdd8df672 DIFF: https://github.com/llvm/llvm-project/commit/7cad5a9eb48e44a10121044d0342ccfbdd8df672.diff

[PATCH] D151081: [Clang][SVE2.1] Add svpext builtins

2023-10-17 Thread Caroline via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7cad5a9eb48e: [Clang][SVE2.1] Add svpext builtins (authored by CarolineConcatto). Changed prior to commit: https://reviews.llvm.org/D151081?vs=557730&id=557737#toc Repository: rG LLVM Github Monorepo

[clang-tools-extra] [MLIR][Presburger] Implement matrix inverse (PR #67382)

2023-10-17 Thread Arjun P via cfe-commits
@@ -432,4 +432,138 @@ MPInt IntMatrix::normalizeRow(unsigned row, unsigned cols) { MPInt IntMatrix::normalizeRow(unsigned row) { return normalizeRow(row, getNumColumns()); +} + +MPInt IntMatrix::determinant() { + unsigned r = getNumRows(); + unsigned c = getNumColumns();

[clang] [NVPTX] Fixed some wmma store builtins that had non-const src param. (PR #69354)

2023-10-17 Thread via cfe-commits
https://github.com/JackAKirk created https://github.com/llvm/llvm-project/pull/69354 Now all wmma store builtins have src param marked const. Summary: Signed-off-by: JackAKirk >From ced70b957023723ec0a0b026a04d0f04da848f2f Mon Sep 17 00:00:00 2001 From: JackAKirk Date: Tue, 17 Oct 2023 16:5

[clang] [NVPTX] Fixed some wmma store builtins that had non-const src param. (PR #69354)

2023-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (JackAKirk) Changes Now all wmma store builtins have src param marked const. Summary: Signed-off-by: JackAKirk --- Full diff: https://github.com/llvm/llvm-project/pull/69354.diff 1 Files Affected: - (modi

[clang-tools-extra] [MLIR][Presburger] Implement matrix inverse (PR #67382)

2023-10-17 Thread via cfe-commits
@@ -432,4 +432,138 @@ MPInt IntMatrix::normalizeRow(unsigned row, unsigned cols) { MPInt IntMatrix::normalizeRow(unsigned row) { return normalizeRow(row, getNumColumns()); +} + +MPInt IntMatrix::determinant() { + unsigned r = getNumRows(); + unsigned c = getNumColumns();

[clang] [AArch64] Stack probing for dynamic allocas in GlobalISel (PR #67123)

2023-10-17 Thread Oskar Wirga via cfe-commits
https://github.com/oskarwirga approved this pull request. https://github.com/llvm/llvm-project/pull/67123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-10-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/67201 >From bdd5a67168d21fe8218f5f525921cdb9bd056c9b Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 6 Sep 2023 11:41:56 -0700 Subject: [PATCH 1/3] [libunwind][libc++][libc++abi] Add cross-compilation fl

[clang] [AArch64] Stack probing for dynamic allocas in GlobalISel (PR #67123)

2023-10-17 Thread Oskar Wirga via cfe-commits
oskarwirga wrote: I was able to confirm this stack works as expected in my local testing. I haven't uncovered any further interactions with other mitigations. Thank you for working on this! https://github.com/llvm/llvm-project/pull/67123 ___ cfe-comm

[PATCH] D151197: [Clang][SVE2p1] Add svpsel builtins

2023-10-17 Thread Caroline via Phabricator via cfe-commits
CarolineConcatto updated this revision to Diff 557739. CarolineConcatto added a comment. -Remove immediate+base from psel and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151197/new/ https://reviews.llvm.org/D151197 Files: clang/include/

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,49 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +This check detects hostile-RAII objects which should not persist across a +suspension point in a coroutine. + +Some objects require that they be destroyed

[clang] [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker (PR #67663)

2023-10-17 Thread Endre Fülöp via cfe-commits
@@ -84,33 +104,70 @@ class InvalidPtrChecker REGISTER_SET_WITH_PROGRAMSTATE(InvalidMemoryRegions, const MemRegion *) // Stores the region of the environment pointer of 'main' (if present). -REGISTER_TRAIT_WITH_PROGRAMSTATE(EnvPtrRegion, const MemRegion *) +REGISTER_TRAIT_WITH_

[clang-tools-extra] [MLIR][Presburger] Implement matrix inverse (PR #67382)

2023-10-17 Thread via cfe-commits
@@ -432,4 +432,138 @@ MPInt IntMatrix::normalizeRow(unsigned row, unsigned cols) { MPInt IntMatrix::normalizeRow(unsigned row) { return normalizeRow(row, getNumColumns()); +} + +MPInt IntMatrix::determinant() { + unsigned r = getNumRows(); + unsigned c = getNumColumns();

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/68738 >From f9e29053a7a8fd8222cfbdf579776fafd6564b89 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 10 Oct 2023 21:53:37 +0200 Subject: [PATCH 1/9] [clang-tidy] Add check to flag objects hostile to suspension i

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,117 @@ +//===--- CoroutineHostileRAII.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: Ap

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Port Swift's merge function pass to llvm: merging functions that differ in constants (PR #68235)

2023-10-17 Thread Manman Ren via cfe-commits
https://github.com/manman-ren updated https://github.com/llvm/llvm-project/pull/68235 >From 7e422cecbd5fc28fb0ec699b702d6bccf321f93f Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Mon, 2 Oct 2023 11:16:58 -0700 Subject: [PATCH] Preliminary patch for merging functions that differ in constants

[clang] [RFC] Perform lifetime bound checks for arguments to coroutine (PR #69360)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/69360 None >From be3f5faa6cd17d76f26fb1bc6d6b59a8a78ffe82 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 17 Oct 2023 19:37:28 +0200 Subject: [PATCH] Lifetime bound check for coroutine --- clang/lib/Sema/SemaI

[libunwind] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/15] [libc++] Implement ranges::contains Differential Revision

[libunwind] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/15] [libc++] Implement ranges::contains Differential Revision

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-17 Thread via cfe-commits
goldsteinn wrote: > > > We should update LangRef and require that the integer arg has the size of > > > the pointer index type > > > > > > As in disallow say `ptrmask.p0.i32` on typical systems with 64-bit pointer > > index? (So a lot of the current usages). Or something else? > > Yes, exact

[clang] [RFC] Perform lifetime bound checks for arguments to coroutine (PR #69360)

2023-10-17 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 4480e650b3cf7cc63cfd3767cd6b120f8bfad2ac be3f5faa6cd17d76f26fb1bc6d6b59a8a78ffe82 --

[clang] [AIX][clang][driver] fix no-pthread option (PR #69363)

2023-10-17 Thread David Tenty via cfe-commits
https://github.com/daltenty created https://github.com/llvm/llvm-project/pull/69363 We don't properly check the boolean pthread option in the AIX toolchain, so we don't respect the no- form of the option. >From 560bf7329998e88d0ba12a2030b376d4a5aa173b Mon Sep 17 00:00:00 2001 From: David Tenty

[clang] [AIX][clang][driver] fix no-pthread option (PR #69363)

2023-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Tenty (daltenty) Changes We don't properly check the boolean pthread option in the AIX toolchain, so we don't respect the no- form of the option. --- Full diff: https://github.com/llvm/llvm-project/pull/69363.diff 2 Files Affected

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -163,6 +163,12 @@ New checks Flags coroutines that suspend while a lock guard is in scope at the suspension point. +- New :doc:`misc-coroutine-hostile-raii + ` check. + + Detects when objects of certain hostile RAII types persists across suspension points in a corout

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL deleted https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix deduction guide (PR #69366)

2023-10-17 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/69366 Currently clang assumes implicit deduction guide to be host device. This generates two identical implicit deduction guides when a class have a device and a host constructor which have the same input parameter a

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Except few nits mainly in documentation, this looks fine for me. https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,49 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +Detects when objects of certain hostile RAII types persists across suspension points in a coroutine. +Such hostile types include scoped-lockable types and

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,49 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +Detects when objects of certain hostile RAII types persists across suspension points in a coroutine. +Such hostile types include scoped-lockable types and

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -241,6 +241,7 @@ Clang-Tidy Checks :doc:`llvmlibc-restrict-system-libc-headers `, "Yes" :doc:`misc-confusable-identifiers `, :doc:`misc-const-correctness `, "Yes" + :doc:`misc-coroutine-hostile-raii `_, "No" PiotrZSL wrote: Remove "No", for chec

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -163,6 +163,12 @@ New checks Flags coroutines that suspend while a lock guard is in scope at the suspension point. +- New :doc:`misc-coroutine-hostile-raii + ` check. + + Detects when objects of certain hostile RAII types persists across suspension points in a corout

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,96 @@ +//===--- CoroutineHostileRAII.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: Apa

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: And run clang-format/git-clang-format on this https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix deduction guide (PR #69366)

2023-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes Currently clang assumes implicit deduction guide to be host device. This generates two identical implicit deduction guides when a class have a device and a host constructor which have the same input para

[clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2023-10-17 Thread Paul Kirth via cfe-commits
@@ -27,6 +27,11 @@ using namespace llvm; +static cl::opt ilovepi wrote: is it possible to use something other than a `cl::opt`? I know we make heavy use of them to control codegen options, but they tend to get dropped on the floor easily if you have to fo

[clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2023-10-17 Thread Paul Kirth via cfe-commits
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB, CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) return; + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (STI.hasFeature(RISCV::FeatureStdExt

[clang] Correctly compute conversion seq for args to fn with reversed param order (PR #68999)

2023-10-17 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Thanks, looks good. Our overall approach here seems error-prone, and I wonder if there's a better way to model the reversal of the conversion sequence. For example, perhaps we could change `ConversionSequenceList` into a class that tracks

[clang] [AIX][clang][driver] fix no-pthread option (PR #69363)

2023-10-17 Thread David Tenty via cfe-commits
https://github.com/daltenty updated https://github.com/llvm/llvm-project/pull/69363 >From 560bf7329998e88d0ba12a2030b376d4a5aa173b Mon Sep 17 00:00:00 2001 From: David Tenty Date: Tue, 17 Oct 2023 11:53:55 -0400 Subject: [PATCH 1/2] [AIX][clang][driver] fix no-pthread option We don't properly

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/68738 >From f9e29053a7a8fd8222cfbdf579776fafd6564b89 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 10 Oct 2023 21:53:37 +0200 Subject: [PATCH 01/10] [clang-tidy] Add check to flag objects hostile to suspension

[clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2023-10-17 Thread Sami Tolvanen via cfe-commits
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB, CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) return; + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (STI.hasFeature(RISCV::FeatureStdExt

[clang] [Driver] Link Flang runtime on Solaris (PR #65644)

2023-10-17 Thread Rainer Orth via cfe-commits
https://github.com/rorth updated https://github.com/llvm/llvm-project/pull/65644 >From 31bdd3477d9f54996b71584598bdd75f2cef31db Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 7 Sep 2023 19:19:32 +0200 Subject: [PATCH 1/2] [Driver] Link Flang runtime on Solaris I noticed that `flang-new`

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,48 @@ +//===- unittests/Driver/GCCVersionTest.cpp --- GCCVersion parser tests ===// +// +// 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: Apa

[clang] [Driver] Link Flang runtime on Solaris (PR #65644)

2023-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rainer Orth (rorth) Changes I noticed that `flang-new` cannot link Fortran executables on Solaris since the runtime libs are missing. This patch fixes this, following `Gnu.cpp`. The `linker-flags.f90` testcase is augmented to test for t

[clang-tools-extra] 3151281 - [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (#68738)

2023-10-17 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2023-10-17T20:46:01+02:00 New Revision: 31512811b8c0f8fd328fba585640992c39218f1e URL: https://github.com/llvm/llvm-project/commit/31512811b8c0f8fd328fba585640992c39218f1e DIFF: https://github.com/llvm/llvm-project/commit/31512811b8c0f8fd328fba585640992c39218f1e.diff

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,48 @@ +//===- unittests/Driver/GCCVersionTest.cpp --- GCCVersion parser tests ===// +// +// 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: Apa

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/69078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-17 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,48 @@ +//===- unittests/Driver/GCCVersionTest.cpp --- GCCVersion parser tests ===// +// +// 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: Apa

[clang] Correctly compute conversion seq for args to fn with reversed param order (PR #68999)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: +1 I agree that this is confusing and error prone. https://github.com/llvm/llvm-project/pull/68999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Avoid potential sideeffects from XOR (PR #67193)

2023-10-17 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/67193 >From 6db37f7f76347a7821d9a95c0fdac4e250df2e78 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 22 Sep 2023 12:35:09 -0700 Subject: [PATCH 1/5] [CodeGen] Avoid potential sideeffects from XOR XOR may cha

[clang] e6d0b12 - Correctly compute conversion seq for args to fn with reversed param order (#68999)

2023-10-17 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2023-10-17T20:53:42+02:00 New Revision: e6d0b126c824222fca2f31a2ba571c2ee2bb4760 URL: https://github.com/llvm/llvm-project/commit/e6d0b126c824222fca2f31a2ba571c2ee2bb4760 DIFF: https://github.com/llvm/llvm-project/commit/e6d0b126c824222fca2f31a2ba571c2ee2bb4760.diff

[clang] Correctly compute conversion seq for args to fn with reversed param order (PR #68999)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/68999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Avoid potential sideeffects from XOR (PR #67193)

2023-10-17 Thread Bill Wendling via cfe-commits
@@ -9066,21 +9066,18 @@ bool AArch64InstrInfo::shouldOutlineFromFunctionByDefault( void AArch64InstrInfo::buildClearRegister(Register Reg, MachineBasicBlock &MBB, MachineBasicBlock::iterator Iter, -

[clang-tools-extra] [CodeGen] Avoid potential sideeffects from XOR (PR #67193)

2023-10-17 Thread Bill Wendling via cfe-commits
@@ -9066,21 +9066,18 @@ bool AArch64InstrInfo::shouldOutlineFromFunctionByDefault( void AArch64InstrInfo::buildClearRegister(Register Reg, MachineBasicBlock &MBB, MachineBasicBlock::iterator Iter, -

[clang] [Driver] Link Flang runtime on Solaris (PR #65644)

2023-10-17 Thread Fangrui Song via cfe-commits
@@ -21,12 +22,12 @@ ! run on any other platform, such as Windows that use a .exe ! suffix. Clang's driver will try to resolve the path to the ld ! executable and may find the GNU linker from MinGW or Cygwin. -! GNU-LABEL: "{{.*}}ld{{(\.exe)?}}" -! GNU-SAME: "

[clang] [Driver] Link Flang runtime on Solaris (PR #65644)

2023-10-17 Thread Fangrui Song via cfe-commits
@@ -2,8 +2,9 @@ ! invocation. These libraries are added on top of other standard runtime ! libraries that the Clang driver will include. -! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,GNU +! RUN: %flang -### -targe

[clang] [CodeGen] Avoid potential sideeffects from XOR (PR #67193)

2023-10-17 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/67193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][index] Fix processing of CompoundAssignOperator at setting up reference roles (PR #69370)

2023-10-17 Thread Aleksandr Platonov via cfe-commits
https://github.com/ArcsinX created https://github.com/llvm/llvm-project/pull/69370 Without this patch in expressions like `foo += 1` reference `foo` has no read and write roles. This happens because `CompoundAssignOperator` is also a `BinaryOperator`, thus handling `CompoindAssignOperator` in

[clang] [clang][index] Fix processing of CompoundAssignOperator at setting up reference roles (PR #69370)

2023-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aleksandr Platonov (ArcsinX) Changes Without this patch in expressions like `foo += 1` reference `foo` has no read and write roles. This happens because `CompoundAssignOperator` is also a `BinaryOperator`, thus handling `CompoindAssignOp

[clang] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/16] [libc++] Implement ranges::contains Differential Revision

[clang-tools-extra] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/16] [libc++] Implement ranges::contains Differential Revision

<    1   2   3   >