[clang-tools-extra] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,46 @@ +//===--- CastingThroughVoidCheck.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 new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,46 @@ +//===--- CastingThroughVoidCheck.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 new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,46 @@ +//===--- CastingThroughVoidCheck.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 new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,46 @@ +//===--- CastingThroughVoidCheck.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 new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,46 @@ +//===--- CastingThroughVoidCheck.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 new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,37 @@ +//===--- CastingThroughVoidCheck.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 new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,37 @@ +//===--- CastingThroughVoidCheck.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 new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -125,6 +125,12 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`bugprone-casting-through-void + ` check. + + Detects usage of ``static_cast`` pointer to the other pointer throght PiotrZSL wrote: Not only static_cast, need some generic des

[clang-tools-extra] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -82,6 +82,7 @@ Clang-Tidy Checks :doc:`bugprone-bad-signal-to-kill-thread `, :doc:`bugprone-bool-pointer-implicit-conversion `, "Yes" :doc:`bugprone-branch-clone `, + :doc:`bugprone-casting-through-void `, "Yes" PiotrZSL wrote: Remove "Yes", ch

[clang-tools-extra] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %check_clang_tidy %s bugprone-casting-through-void %t + +using T = void*; + +void test() { + int i = 100; + double d = 100; + + static_cast(static_cast(&d)); + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: do not cast double * to int * through void * [

[clang-tools-extra] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Good start, I will look more closely into documentation once I finish work. https://github.com/llvm/llvm-project/pull/69465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[libunwind] [X86][RFC] Support AVX10 options (PR #67278)

2023-10-18 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/67278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [X86][RFC] Support AVX10 options (PR #67278)

2023-10-18 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/67278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D157331: [clang] Implement C23

2023-10-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D157331#4654265 , @mstorsjo wrote: > This change broke building a recent version of gettext. Gettext uses gnulib > for polyfilling various utility functions. Since not long ago, these > functions internally use ``, > h

[clang] [X86][RFC] Support AVX10 options (PR #67278)

2023-10-18 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/67278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Analyzer] Move checker 'alpha.unix.Errno' to 'unix.Errno'. (PR #69469)

2023-10-18 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/69469 None From 0fdc57b49002afd8aa54043837ee4155688b4c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Tue, 17 Oct 2023 11:51:27 +0200 Subject: [PATCH] [clang][Analyzer] Move checker 'alpha

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

2023-10-18 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Ah. I see, this is because this is not a warning but hard errors in C++20. 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 new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/69465 >From 627f68e57b2526fb72285ef4831fc3c02a6ee6d0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 18 Oct 2023 08:47:02 +0800 Subject: [PATCH 1/2] [clang-tidy]Add new check bugprone-casting-through-void F

[clang-tools-extra] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/69465 >From 627f68e57b2526fb72285ef4831fc3c02a6ee6d0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 18 Oct 2023 08:47:02 +0800 Subject: [PATCH 1/2] [clang-tidy]Add new check bugprone-casting-through-void F

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-18 Thread Alexander Richardson via cfe-commits
@@ -43,6 +43,12 @@ #define LIBUNWIND_AVAIL #endif +#if defined(__SANITIZE_MEMORY__) || \ arichardson wrote: Ah I assumed it was needed for GCC since it doesn't have __has_feature(). https://github.com/llvm/llvm-p

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-18 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/67860 >From e39c568ba557fbca5d3ef17f3d4f4d74f15e8205 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 29 Sep 2023 13:25:39 -0700 Subject: [PATCH 1/2] [libunwind] Fix running tests with MSan In order to ru

[clang] [clang][Analyzer] Move checker 'alpha.unix.Errno' to 'unix.Errno'. (PR #69469)

2023-10-18 Thread Balázs Kéri via cfe-commits
balazske wrote: This checker was dependent on `unix.StdCLibraryFunctions`. After that checker was moved out of alpha, it is possible to move `alpha.unix.Errno` out of alpha. The checker was tested first on the following projects. The following links were automatically generated to compare the c

[clang-tools-extra] [run-clang-tidy] Accept directory as value for -export-fixes (PR #69453)

2023-10-18 Thread Amadeus Gebauer via cfe-commits
https://github.com/amgebauer updated https://github.com/llvm/llvm-project/pull/69453 >From 182198f8ca07e458fa34158fcdbfa72310ff12f4 Mon Sep 17 00:00:00 2001 From: Amadeus Gebauer Date: Wed, 18 Oct 2023 14:02:44 +0200 Subject: [PATCH 1/2] [run-clang-tidy] Accept directory for -export-fixes ---

[clang-tools-extra] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/69465 >From 627f68e57b2526fb72285ef4831fc3c02a6ee6d0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 18 Oct 2023 08:47:02 +0800 Subject: [PATCH 1/2] [clang-tidy]Add new check bugprone-casting-through-void F

[clang-tools-extra] [run-clang-tidy, clang-tidy-diff] Accept directory as value for -export-fixes (PR #69453)

2023-10-18 Thread Amadeus Gebauer via cfe-commits
https://github.com/amgebauer edited https://github.com/llvm/llvm-project/pull/69453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1b93e15 - [Clang][SVE2p1] Add svpsel builtins

2023-10-18 Thread Caroline Concatto via cfe-commits
Author: Caroline Concatto Date: 2023-10-18T15:05:26Z New Revision: 1b93e15bcd9a270e5d5233f548f402a6bd684177 URL: https://github.com/llvm/llvm-project/commit/1b93e15bcd9a270e5d5233f548f402a6bd684177 DIFF: https://github.com/llvm/llvm-project/commit/1b93e15bcd9a270e5d5233f548f402a6bd684177.diff

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

2023-10-18 Thread Caroline via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1b93e15bcd9a: [Clang][SVE2p1] Add svpsel builtins (authored by CarolineConcatto). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151197/new/ https://reviews.

[PATCH] D151433: [Clang][SVE2.1] Add builtins for Multi-vector load and store

2023-10-18 Thread Kerry McLaughlin via Phabricator via cfe-commits
kmclaughlin added inline comments. Comment at: clang/include/clang/Basic/arm_sve.td:1920 + +def SVST1B_X2 : MInst<"svst1[_{2}_x2]", "v}p2", "cUc", [IsStructStore,], MemEltTyDefault, "aarch64_sve_st1_pn_x2">; +def SVST1H_X2 : MInst<"svst1[_{2}_x2]", "v}p2", "sUshb", [IsStructStor

[PATCH] D157331: [clang] Implement C23

2023-10-18 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D157331#4654353 , @aaron.ballman wrote: > In D157331#4654265 , @mstorsjo > wrote: > >> This change broke building a recent version of gettext. Gettext uses gnulib >> for polyfilling v

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-10-18 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/69473 Pull request #65409 changed the brace kind heuristic to not treat a preprocessor if directive as a in statement, however, this caused some regressions. If the contents of a brace don't immediately determine the

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-10-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Emilia Kond (rymiel) Changes Pull request #65409 changed the brace kind heuristic to not treat a preprocessor if directive as a in statement, however, this caused some regressions. If the contents of a brace don't immediately dete

[clang] [clang-format] Skip PP directives when determining brace kind (PR #69473)

2023-10-18 Thread Emilia Kond via cfe-commits
rymiel wrote: Here's my solution to the regression I caused (https://github.com/llvm/llvm-project/issues/68404), but I don't think it's a particularly nice solution let me know what I should change (there's some code duplication that should probably be extracted out) https://github.com/llvm/l

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

2023-10-18 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/66632 >From 18f494a4006b4c21b364a91107d4a07ceaf88213 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Mon, 18 Sep 2023 09:59:11 +0100 Subject: [PATCH 1/3] [LLVM] Add new attribute `optdebug` to optimize for debuggin

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

2023-10-18 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/66632 >From eccff5693ebcaac45a7ddf56cbb33a48de281041 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Mon, 18 Sep 2023 09:59:11 +0100 Subject: [PATCH 1/3] [LLVM] Add new attribute `optdebug` to optimize for debuggin

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

2023-10-18 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer closed https://github.com/llvm/llvm-project/pull/66632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Handle real and imaginary parts of complex lvalue in `APValue::printPretty` (PR #69252)

2023-10-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for the fix! You should also add a release note to `clang/docs/ReleaseNotes.rst` so users know about the fix. https://github.com/llvm/llvm-project/pull/69252 ___ cfe-commits mailing list cfe-commits

[clang] [Clang] Handle real and imaginary parts of complex lvalue in `APValue::printPretty` (PR #69252)

2023-10-18 Thread Aaron Ballman via cfe-commits
@@ -113,3 +113,8 @@ void t92(void) { (0 ? (_Complex double) 2.0f : 2.0f); } +// PR69218 +int t10(void) { + float _Complex a; + return (0 < &__real__ a) && (0 < &__imag__ a); +} AaronBallman wrote: I think this test should live in `clang/test/Sema/complex-

[clang] [Clang] Handle real and imaginary parts of complex lvalue in `APValue::printPretty` (PR #69252)

2023-10-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/69252 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [run-clang-tidy, clang-tidy-diff] Accept directory as value for -export-fixes (PR #69453)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -327,14 +345,14 @@ def main(): if yaml and args.export_fixes: PiotrZSL wrote: if combine_fixes: https://github.com/llvm/llvm-project/pull/69453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2023-10-18 Thread via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/69477 That would turn: int x = f() + 1; into: auto placeholder = f() + 1; int x = placeholder; which makes little sense and is clearly not intended, as stated explicitly by a comment in eligibleForExtraction().

[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)

2023-10-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: None (ckandeler) Changes That would turn: int x = f() + 1; into: auto placeholder = f() + 1; int x = placeholder; which makes little sense and is clearly not intended, as stated explicitly by a comment in eligibleForExtraction(). It

[clang-tools-extra] [run-clang-tidy, clang-tidy-diff] Accept directory as value for -export-fixes (PR #69453)

2023-10-18 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM. Would be good to test if both scripts are working before merge. https://github.com/llvm/llvm-project/pull/69453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang-tools-extra] [run-clang-tidy, clang-tidy-diff] Accept directory as value for -export-fixes (PR #69453)

2023-10-18 Thread Amadeus Gebauer via cfe-commits
https://github.com/amgebauer updated https://github.com/llvm/llvm-project/pull/69453 >From 182198f8ca07e458fa34158fcdbfa72310ff12f4 Mon Sep 17 00:00:00 2001 From: Amadeus Gebauer Date: Wed, 18 Oct 2023 14:02:44 +0200 Subject: [PATCH 1/2] [run-clang-tidy] Accept directory for -export-fixes ---

[clang-tools-extra] [libc++] Add assertions for potential OOB reads in std::nth_element (PR #67023)

2023-10-18 Thread Daniel Kutenin via cfe-commits
danlark1 wrote: @ldionne, CI is green, please, merge Thanks for the feedback to everyone! https://github.com/llvm/llvm-project/pull/67023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [libc++] Add assertions for potential OOB reads in std::nth_element (PR #67023)

2023-10-18 Thread Daniel Kutenin via cfe-commits
danlark1 wrote: @ldionne, CI is green, please, merge Thanks for the feedback to everyone! https://github.com/llvm/llvm-project/pull/67023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

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

2023-10-18 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: @daltenty, can we also have a check that the driver does not pass `-pthread` to the frontend when `-no-pthread` is used? As a complication, I think the code responsible is common cross-platform code in [clang/Driver/ToolChains/Clang.cpp](https://github.com/llvm/l

[clang-tools-extra] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/69465 >From 627f68e57b2526fb72285ef4831fc3c02a6ee6d0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 18 Oct 2023 08:47:02 +0800 Subject: [PATCH 1/4] [clang-tidy]Add new check bugprone-casting-through-void F

[clang-tools-extra] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,11 @@ +.. title:: clang-tidy - bugprone-casting-through-void + +bugprone-casting-through-void += + +A check detects usage of ``static_cast`` pointer to the other pointer throght PiotrZSL wrote: ```Detects unsafe or redundant

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,11 @@ +.. title:: clang-tidy - bugprone-casting-through-void + +bugprone-casting-through-void += + +A check detects usage of ``static_cast`` pointer to the other pointer throght +``static_cast`` to ``void *`` in C++ code. + +Use of these cast

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,11 @@ +.. title:: clang-tidy - bugprone-casting-through-void + +bugprone-casting-through-void += + +A check detects usage of ``static_cast`` pointer to the other pointer throght +``static_cast`` to ``void *`` in C++ code. + +Use of these cast

[clang] [CONCEPTS]Corrected comparison of constraints with out of line CTD (PR #69244)

2023-10-18 Thread Erich Keane via cfe-commits
erichkeane wrote: My main two reviewers are away this week, and the review I got caught the 'dumb' stuff I'm likely to miss anyway. So I'm going to merge this to give it more time to bake, and count on RAC. https://github.com/llvm/llvm-project/pull/69244 __

[clang] 98191d7 - [CONCEPTS]Corrected comparison of constraints with out of line CTD (#69244)

2023-10-18 Thread via cfe-commits
Author: Erich Keane Date: 2023-10-18T09:10:30-07:00 New Revision: 98191d7c160cc982ac3f4db234da080e2bd8a192 URL: https://github.com/llvm/llvm-project/commit/98191d7c160cc982ac3f4db234da080e2bd8a192 DIFF: https://github.com/llvm/llvm-project/commit/98191d7c160cc982ac3f4db234da080e2bd8a192.diff L

[clang] [CONCEPTS]Corrected comparison of constraints with out of line CTD (PR #69244)

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

[clang] [analyzer] Move alpha checker EnumCastOutOfRange to optin (PR #67157)

2023-10-18 Thread via cfe-commits
DonatNagyE wrote: @Xazax-hun This checker doesn't accept the use of bitwise enums (like the one in your example), so projects that use bitwise enums should not enable this checker. (Perhaps this limitation should be mentioned in the docs? @gamesh411) It would be possible to write a more comple

[clang-tools-extra] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/69465 >From 627f68e57b2526fb72285ef4831fc3c02a6ee6d0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 18 Oct 2023 08:47:02 +0800 Subject: [PATCH 1/5] [clang-tidy]Add new check bugprone-casting-through-void F

[clang] e7b827e - Add a FIXME comment; NFC

2023-10-18 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-10-18T12:16:33-04:00 New Revision: e7b827e11bd36cb7056538d05761039af9ced60d URL: https://github.com/llvm/llvm-project/commit/e7b827e11bd36cb7056538d05761039af9ced60d DIFF: https://github.com/llvm/llvm-project/commit/e7b827e11bd36cb7056538d05761039af9ced60d.diff

[clang] [Sema] Add check for bitfield assignments to integral types (PR #69049)

2023-10-18 Thread via cfe-commits
vabridgers wrote: Hi @AaronBallman , please let me know if you're ok with me merging this PR. This is a refinement of PR https://github.com/llvm/llvm-project/pull/68276. Thanks! https://github.com/llvm/llvm-project/pull/69049 ___ cfe-commits mailing

[clang] Correct end for the CastOperation.OpRange (PR #69480)

2023-10-18 Thread Botond István Horváth via cfe-commits
https://github.com/HoBoIs created https://github.com/llvm/llvm-project/pull/69480 Set the correct end for the CastOperation.OpRange in CXXFunctionalCastExpr. Now it is the closing bracket's location instead of the parameter's location. This can lead to better highlight in the diagnostics. Sim

[clang] Correct end for the CastOperation.OpRange (PR #69480)

2023-10-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Botond István Horváth (HoBoIs) Changes Set the correct end for the CastOperation.OpRange in CXXFunctionalCastExpr. Now it is the closing bracket's location instead of the parameter's location. This can lead to better highlight in the diag

[clang] Correct end for the CastOperation.OpRange (PR #69480)

2023-10-18 Thread Timm Baeder via cfe-commits
tbaederr wrote: The output looks good, but you should probably add a test in `clang/test/Misc/misc-source-ranges.cpp`. https://github.com/llvm/llvm-project/pull/69480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang-tools-extra] [clangd] Add tweak for turning an unscoped into a scoped enum (PR #69481)

2023-10-18 Thread via cfe-commits
https://github.com/ckandeler created https://github.com/llvm/llvm-project/pull/69481 None >From ce99c66c344702f61203aa143239c7c8aacf65e7 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 25 Sep 2023 16:55:53 +0200 Subject: [PATCH] [clangd] Add tweak for turning an unscoped into a sc

[clang-tools-extra] 5987123 - [clang-tidy][DOC] Fix list.rst

2023-10-18 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-10-18T16:26:08Z New Revision: 598712315b0e55e860d8c82e6e212df20b4d3ff4 URL: https://github.com/llvm/llvm-project/commit/598712315b0e55e860d8c82e6e212df20b4d3ff4 DIFF: https://github.com/llvm/llvm-project/commit/598712315b0e55e860d8c82e6e212df20b4d3ff4.diff LOG: [

[clang-tools-extra] [run-clang-tidy, clang-tidy-diff] Accept directory as value for -export-fixes (PR #69453)

2023-10-18 Thread Amadeus Gebauer via cfe-commits
https://github.com/amgebauer updated https://github.com/llvm/llvm-project/pull/69453 >From 182198f8ca07e458fa34158fcdbfa72310ff12f4 Mon Sep 17 00:00:00 2001 From: Amadeus Gebauer Date: Wed, 18 Oct 2023 14:02:44 +0200 Subject: [PATCH 1/2] [run-clang-tidy] Accept directory for -export-fixes ---

[clang-tools-extra] [run-clang-tidy, clang-tidy-diff] Accept directory as value for -export-fixes (PR #69453)

2023-10-18 Thread Amadeus Gebauer via cfe-commits
amgebauer wrote: I tested both scripts locally with both options (providing a yaml file and a directory) work on my machine. https://github.com/llvm/llvm-project/pull/69453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang-tools-extra] 1891d21 - [clang-tidy][DOC] Fix syntax in coroutine-hostile-raii.rst

2023-10-18 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-10-18T16:30:18Z New Revision: 1891d21312cf45f070532bd3709eecf6a0e4f54e URL: https://github.com/llvm/llvm-project/commit/1891d21312cf45f070532bd3709eecf6a0e4f54e DIFF: https://github.com/llvm/llvm-project/commit/1891d21312cf45f070532bd3709eecf6a0e4f54e.diff LOG: [

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/69465 >From 627f68e57b2526fb72285ef4831fc3c02a6ee6d0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 18 Oct 2023 08:47:02 +0800 Subject: [PATCH 1/6] [clang-tidy]Add new check bugprone-casting-through-void

[clang-tools-extra] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/69465 >From 627f68e57b2526fb72285ef4831fc3c02a6ee6d0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 18 Oct 2023 08:47:02 +0800 Subject: [PATCH 1/6] [clang-tidy]Add new check bugprone-casting-through-void F

[clang] [Sema] Add check for bitfield assignments to integral types (PR #69049)

2023-10-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Btw, if you're just repairing tests like you had to do here, you generally are okay to not go through another round of review unless you want an extra set of eyes on things. The original approval is fine so long as you're not ma

[clang] 708808e - [Sema] Add check for bitfield assignments to integral types (#69049)

2023-10-18 Thread via cfe-commits
Author: vabridgers Date: 2023-10-18T11:40:07-05:00 New Revision: 708808e8532e7c3647356aec0664fcf94b1093d1 URL: https://github.com/llvm/llvm-project/commit/708808e8532e7c3647356aec0664fcf94b1093d1 DIFF: https://github.com/llvm/llvm-project/commit/708808e8532e7c3647356aec0664fcf94b1093d1.diff LO

[clang] [Sema] Add check for bitfield assignments to integral types (PR #69049)

2023-10-18 Thread via cfe-commits
https://github.com/vabridgers closed https://github.com/llvm/llvm-project/pull/69049 ___ 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 new check bugprone-casting-through-void (PR #69465)

2023-10-18 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 5a600c23f9e01f58bac09a8fad096e194fc90ae2 e073d026aa7e12720af1d1760b8c49e22ae970d8 --

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

2023-10-18 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Perhaps this belongs in the ABI-breaking-checks build? 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] Improve `_Alignas` on a `struct` declaration diagnostic (PR #65638)

2023-10-18 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -std=c23 -fsyntax-only -verify %s +// RUN: not %clang_cc1 -std=c99 -pedantic -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-EXT %s + +_Alignas(int) struct c1; // expected-warning {{attribute '_Alignas' before "struct" is ignored}} +alig

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,50 @@ +//===--- CastingThroughVoidCheck.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] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,32 @@ +.. title:: clang-tidy - bugprone-casting-through-void + +bugprone-casting-through-void += + +A check detects unsafe or redundant two-step casting operations involving ``void*``. + +Two-step type conversions via void* are discouraged f

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,32 @@ +.. title:: clang-tidy - bugprone-casting-through-void + +bugprone-casting-through-void += + +A check detects unsafe or redundant two-step casting operations involving ``void*``. PiotrZSL wrote: do not start with A ch

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,32 @@ +.. title:: clang-tidy - bugprone-casting-through-void + +bugprone-casting-through-void += + +A check detects unsafe or redundant two-step casting operations involving ``void*``. + +Two-step type conversions via void* are discouraged f

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,32 @@ +.. title:: clang-tidy - bugprone-casting-through-void + +bugprone-casting-through-void += + +A check detects unsafe or redundant two-step casting operations involving ``void*``. + +Two-step type conversions via void* are discouraged f

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,96 @@ +// RUN: %check_clang_tidy %s bugprone-casting-through-void %t + +using V = void*; +using CV = const void*; + +int i = 100; +double d = 100; +const int ci = 100; +const double cd = 100; + +void normal_test() { + static_cast(static_cast(&d)); + // CHECK-MESSAGES:

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,96 @@ +// RUN: %check_clang_tidy %s bugprone-casting-through-void %t + +using V = void*; +using CV = const void*; + +int i = 100; +double d = 100; +const int ci = 100; +const double cd = 100; + +void normal_test() { + static_cast(static_cast(&d)); + // CHECK-MESSAGES:

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,96 @@ +// RUN: %check_clang_tidy %s bugprone-casting-through-void %t + +using V = void*; +using CV = const void*; + +int i = 100; +double d = 100; +const int ci = 100; +const double cd = 100; + +void normal_test() { + static_cast(static_cast(&d)); + // CHECK-MESSAGES:

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,96 @@ +// RUN: %check_clang_tidy %s bugprone-casting-through-void %t + +using V = void*; +using CV = const void*; + +int i = 100; +double d = 100; +const int ci = 100; +const double cd = 100; + +void normal_test() { + static_cast(static_cast(&d)); + // CHECK-MESSAGES:

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,50 @@ +//===--- CastingThroughVoidCheck.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] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,32 @@ +.. title:: clang-tidy - bugprone-casting-through-void + +bugprone-casting-through-void += + +A check detects unsafe or redundant two-step casting operations involving ``void*``. + +Two-step type conversions via void* are discouraged f

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -2732,6 +2732,16 @@ extern const internal::VariadicDynCastAllOfMatcher castExpr; extern const internal::VariadicDynCastAllOfMatcher cxxFunctionalCastExpr; +/// Matches a builtin bit cast expression. +/// +/// Example: Matches __builtin_bit_cast(double, i) in +/// \code

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,50 @@ +//===--- CastingThroughVoidCheck.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] [clang] Language to String function (PR #69487)

2023-10-18 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda created https://github.com/llvm/llvm-project/pull/69487 This PR adds a function which converts the language to string. >From 7214e2ad580724c6b747ce5da126f4e8dbdc825c Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Wed, 18 Oct 2023 13:20:58 -0400 Subject: [PATCH] add

[clang] [clang] Language to String function (PR #69487)

2023-10-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yusra Syeda (ysyeda) Changes This PR adds a function which converts the language to string. --- Full diff: https://github.com/llvm/llvm-project/pull/69487.diff 2 Files Affected: - (modified) clang/include/clang/Basic/LangStandard.h (+1

[clang-tools-extra] fea55db - [clang-tidy][DOC] Fix syntax in coroutine-hostile-raii.rst

2023-10-18 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2023-10-18T17:34:40Z New Revision: fea55db23372e24e764627c81dd7cf565dcf54c2 URL: https://github.com/llvm/llvm-project/commit/fea55db23372e24e764627c81dd7cf565dcf54c2 DIFF: https://github.com/llvm/llvm-project/commit/fea55db23372e24e764627c81dd7cf565dcf54c2.diff LOG: [

[clang-tools-extra] [libc][libm][GPU] Add missing vendor entrypoints to the GPU version of `libm` (PR #66034)

2023-10-18 Thread Anton Rydahl via cfe-commits
https://github.com/AntonRydahl updated https://github.com/llvm/llvm-project/pull/66034 >From 7a357059d3ca78afcb02e33a6afce225029a3836 Mon Sep 17 00:00:00 2001 From: antonrydahl Date: Mon, 11 Sep 2023 17:06:41 -0700 Subject: [PATCH 1/3] [libc][libm][GPU] Add missing vendor entrypoints to the GP

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread via cfe-commits
@@ -0,0 +1,50 @@ +//===--- CastingThroughVoidCheck.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] [clang] Expand invalid PCM diagnostic (PR #69489)

2023-10-18 Thread Nuri Amari via cfe-commits
https://github.com/NuriAmari created https://github.com/llvm/llvm-project/pull/69489 Summary: When a PCM file is loaded, it can go wrong in various ways. The current diagnostic only produces the name of the malformed PCM, not why it is malformed. Expand the diagnostic to display what went wro

[clang] [clang] Language to String function (PR #69487)

2023-10-18 Thread via cfe-commits
https://github.com/muiez approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/69487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Expand invalid PCM diagnostic (PR #69489)

2023-10-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nuri Amari (NuriAmari) Changes Summary: When a PCM file is loaded, it can go wrong in various ways. The current diagnostic only produces the name of the malformed PCM, not why it is malformed. Expand the diagnostic to display what went w

[clang] [HIP] Document func ptr and virtual func (PR #68126)

2023-10-18 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/68126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-10-18 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/69354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Document func ptr and virtual func (PR #68126)

2023-10-18 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/68126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 10079a2 - [HIP] Document func ptr and virtual func (#68126)

2023-10-18 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-10-18T14:14:04-04:00 New Revision: 10079a23c5b6becfdaaa34d8ba72c91706ad4a6d URL: https://github.com/llvm/llvm-project/commit/10079a23c5b6becfdaaa34d8ba72c91706ad4a6d DIFF: https://github.com/llvm/llvm-project/commit/10079a23c5b6becfdaaa34d8ba72c91706ad4a6d.dif

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-18 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/69493 This is similar to debug info correlation. The motivation is that debug info correlation doesn't work on Windows because it's hard to make codeview contains those artificial debug info. The idea is to offload

[clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-10-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Zequan Wu (ZequanWu) Changes This is similar to debug info correlation. The motivation is that debug info correlation doesn't work on Windows because it's hard to make codeview contains those artificial debug info. The idea is to offloa

<    1   2   3   4   >