[clang-tools-extra] [clang-tidy] Fix handling --driver-mode= (PR #66553)

2024-03-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/66553 >From f4f9c996171892813dc11eb5bcb29e0616475f40 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Fri, 15 Sep 2023 21:39:17 + Subject: [PATCH 1/3] [clang-tidy] Fix handling --driver-mode= Driver mode passed

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/86129 ___ 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 readability-enum-initial-value (PR #86129)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,200 @@ +//===--- EnumInitialValueCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. For me looks fine (had to check how it behave when coma is in next line). Some ideas for separate check or future options: - enforce that enums are sorted by value - enforce that enums are sorted by name - enforce that there is no

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/86129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/84481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,112 @@ +//===--- MathMissingParenthesesCheck.cpp - clang-tidy -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,112 @@ +//===--- MathMissingParenthesesCheck.cpp - clang-tidy -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Overall, I like what I see. Just few nits. https://github.com/llvm/llvm-project/pull/84481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -129,6 +129,12 @@ New checks Replaces certain conditional statements with equivalent calls to ``std::min`` or ``std::max``. +- New :doc:`readability-math-missing-parentheses PiotrZSL wrote: put this before readability-use-std-min-max

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,81 @@ +// RUN: %check_clang_tidy %s readability-math-missing-parentheses %t + +int foo(){ +return 5; +} + +int bar(){ +return 4; +} + +class fun{ +public: +int A; +double B; +fun(){ +A = 5; +B = 5.4; +} +}; + +void f(){ +

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,25 @@ +.. title:: clang-tidy - readability-math-missing-parentheses + +readability-math-missing-parentheses + + +Check for missing parentheses in mathematical expressions that involve operators +of different priorities. Parentheses

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/84481 ___ 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 suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,337 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,337 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,337 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,337 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,337 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,337 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/85572 ___ 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 suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: In short, avoid any string parsing/manipulation. https://github.com/llvm/llvm-project/pull/85572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improved --verify-config when using literal style in config file (PR #85591)

2024-03-30 Thread Piotr Zegar via cfe-commits
=?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin, =?utf-8?q?F=C3=A9lix-Antoine?= Constantin Message-ID: In-Reply-To: https://github.com/PiotrZSL approved this pull request. LGTM

[clang-tools-extra] Support renaming designated initializers (PR #86976)

2024-03-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/86976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Support renaming designated initializers (PR #86976)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -367,6 +367,25 @@ class RenamerClangTidyVisitor return true; } + bool VisitDesignatedInitExpr(DesignatedInitExpr *Expr) { +for (const auto : Expr->designators()) { + if (!Designator.isFieldDesignator()) +continue; + auto *FieldDecl =

[clang-tools-extra] Support renaming designated initializers (PR #86976)

2024-03-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Release notes entry is missing. Should be: "Improved [readability-identifier-naming](https://clang.llvm.org/extra/clang-tidy/checks/readability/identifier-naming.html) check in GetConfigPerFile mode by resolving symbolic links to header files. Fixed

[clang-tools-extra] Support renaming designated initializers (PR #86976)

2024-03-30 Thread Piotr Zegar via cfe-commits
@@ -755,3 +755,11 @@ STATIC_MACRO void someFunc(MyFunPtr, const MyFunPtr) {} // CHECK-FIXES: {{^}}STATIC_MACRO void someFunc(my_fun_ptr_t, const my_fun_ptr_t) {} #undef STATIC_MACRO } + +struct Some_struct { + int SomeMember; +// CHECK-MESSAGES: :[[@LINE-1]]:7:

[clang] [llvm] [HLSL][DXIL][SPIRV] Intrinsic unification PR (PR #87171)

2024-03-30 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/87171 >From dcf4896ca4d86a34a731f31e7dc42e271a62a02f Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 28 Mar 2024 21:05:36 -0400 Subject: [PATCH] [HLSL][DXIL][SPIRV] Intrinsic unification PR ---

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-03-30 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/87173 >From 710a72c43ae9612e577172a978bfafe6553a6f9e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 31 Mar 2024 09:38:05 +0800 Subject: [PATCH] [Clang][Sema] set declaration invalid earlier to prevent crash in

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes Try to fix https://github.com/llvm/llvm-project/issues/75221 This crash caused by calculating record layout which contains a field declaration with dependent type. Make it invalid when report diagnose to prevent

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-03-30 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/87173 Try to fix https://github.com/llvm/llvm-project/issues/75221 This crash caused by calculating record layout which contains a field declaration with dependent type. Make it invalid when report diagnose to prevent

[clang] [analyzer][docs] Document the `optin.performance.Padding` checker (PR #86411)

2024-03-30 Thread via cfe-commits
https://github.com/komalverma04 commented: Great learning! https://github.com/llvm/llvm-project/pull/86411 ___ 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 readability-enum-initial-value (PR #86129)

2024-03-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/86129 >From 4e0845a143a820d4a68ffbdced206654c7593359 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 15 Mar 2024 08:07:47 +0800 Subject: [PATCH 1/8] [clang-tidy] add new check readability-enum-initial-value

[clang] [llvm] [HLSL][DXIL][SPIRV] Intrinsic unification PR (PR #87171)

2024-03-30 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/87171 ___ 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 readability-enum-initial-value (PR #86129)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,199 @@ +//===--- EnumInitialValueCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/86129 >From 4e0845a143a820d4a68ffbdced206654c7593359 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 15 Mar 2024 08:07:47 +0800 Subject: [PATCH 1/7] [clang-tidy] add new check readability-enum-initial-value

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,199 @@ +//===--- EnumInitialValueCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [Clang] [Sema] Improve support for `__restrict`-qualified member functions (PR #83855)

2024-03-30 Thread via cfe-commits
Sirraide wrote: Update: it seems that the GCC behaviour is intended, and it actually makes a lot of sense now imo at least (see the initial pr comment for more info about this). https://github.com/llvm/llvm-project/pull/83855 ___ cfe-commits mailing

[clang] [Clang] [Sema] Improve support for `__restrict`-qualified member functions (PR #83855)

2024-03-30 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/83855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL][SPIRV] Intrinsic unification PR (PR #87171)

2024-03-30 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/87171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL][SPIRV] Intrinsic unification PR (PR #87171)

2024-03-30 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/87171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL][SPIRV] Intrinsic unification PR (PR #87171)

2024-03-30 Thread Farzon Lotfi via cfe-commits
@@ -18176,12 +18177,30 @@ Intrinsic::ID getDotProductIntrinsic(QualType QT, int elementCount) { return Intrinsic::dx_udot; } +Intrinsic::ID getAllIntrinsic(const llvm::Triple::ArchType Arch) { farzonl wrote: this is a simple memchanism since we are only

[clang] [llvm] [HLSL][DXIL][SPIRV] Intrinsic unification PR (PR #87171)

2024-03-30 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/87171 DO NOT MERGE This is part of a proposal for how to unify spir-v and DirectX intrinsics. The issue tracking this work is: #83882 >From 02a78955fc1ccb78690b0cd87de51f73cf8785de Mon Sep 17 00:00:00 2001

[clang] [HLSL][clang] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr (PR #87131)

2024-03-30 Thread Marc Auberer via cfe-commits
marcauberer wrote: Workflow run also succeeded: https://github.com/llvm/llvm-project/actions/runs/8493247308 https://github.com/llvm/llvm-project/pull/87131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,199 @@ +//===--- EnumInitialValueCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,199 @@ +//===--- EnumInitialValueCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,199 @@ +//===--- EnumInitialValueCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,199 @@ +//===--- EnumInitialValueCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,199 @@ +//===--- EnumInitialValueCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: I only have some minor comments, otherwise looks good to me https://github.com/llvm/llvm-project/pull/86129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-30 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/86129 ___ 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 readability-enum-initial-value (PR #86129)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,199 @@ +//===--- EnumInitialValueCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [HLSL][clang] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr (PR #87131)

2024-03-30 Thread Marc Auberer via cfe-commits
https://github.com/marcauberer closed https://github.com/llvm/llvm-project/pull/87131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3c8ede9 - [HLSL][clang] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr (#87131)

2024-03-30 Thread via cfe-commits
Author: Marc Auberer Date: 2024-03-30T21:33:56+01:00 New Revision: 3c8ede9f4524fd8defbbf41788003a6d4b0afb04 URL: https://github.com/llvm/llvm-project/commit/3c8ede9f4524fd8defbbf41788003a6d4b0afb04 DIFF: https://github.com/llvm/llvm-project/commit/3c8ede9f4524fd8defbbf41788003a6d4b0afb04.diff

[clang] [HLSL][clang] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr (PR #87131)

2024-03-30 Thread Marc Auberer via cfe-commits
marcauberer wrote: @farzonl All three tests pass  ```sh $ ./bin/llvm-lit ../llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveGetLaneIndex.ll ../llvm/test/CodeGen/SPIRV/scfg-add-pre-headers.ll ../llvm/test/CodeGen/SPIRV/transcoding/spirv-private-array-initialization.ll -- Testing: 3 tests, 3

[clang] [HLSL][clang] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr (PR #87131)

2024-03-30 Thread Marc Auberer via cfe-commits
https://github.com/marcauberer edited https://github.com/llvm/llvm-project/pull/87131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr (PR #87131)

2024-03-30 Thread Farzon Lotfi via cfe-commits
farzonl wrote: minor nit pick, you don't have to do this one: could you make the HLSL prefix first. It helps with some bookeeping we are doing. https://github.com/llvm/llvm-project/pull/87131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][HLSL] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr (PR #87131)

2024-03-30 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/87131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr (PR #87131)

2024-03-30 Thread Farzon Lotfi via cfe-commits
farzonl wrote: Hi @marcauberer The change looks good. I'm 99% sure this won't have an effect on the SPIRV backend, however there is still that 1% chance it does. The tests I want to check landed in this PR https://github.com/llvm/llvm-project/pull/85979/files For convenience this is what

[clang] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-03-30 Thread Gedare Bloom via cfe-commits
gedare wrote: I saw some comments on this. Looks like some were deleted maybe. This is still in my queue, but unclear when I'll get back to it. https://github.com/llvm/llvm-project/pull/77522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Add fix-its to `avoid-return-with-void-value` check (PR #81420)

2024-03-30 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/81420 From 30213a8dd24e77aa7189bc6db0a7484138a7dc52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sun, 11 Feb 2024 17:04:12 +0100 Subject: [PATCH 1/5] [clang-tidy] Add fix-its to

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-30 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/84481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-30 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: I had an idea to simplify `addParantheses` and `check` a bit, otherwise this looks good. https://github.com/llvm/llvm-project/pull/84481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] Add clang-tidy check readability-math-missing-parentheses (PR #84481)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,112 @@ +//===--- MathMissingParenthesesCheck.cpp - clang-tidy -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/85572 ___ 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 suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/85572 ___ 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 suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,342 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,342 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,337 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,342 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,268 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti requested changes to this pull request. I've added a comment about the string parsing and comments in `generateReplacement` on how to do this in a better way, which should help you. Also, if-statements with a single statement branches should not have braces.

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,342 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,342 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,337 @@ +//===--- MinMaxUseInitializerListCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/85572 ___ 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 suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,26 @@ +.. title:: clang-tidy - modernize-min-max-use-initializer-list + +modernize-min-max-use-initializer-list +== + +Replaces nested ``std::min`` and ``std::max`` calls with an initializer list where applicable. + +For instance,

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread via cfe-commits
https://github.com/sopyb updated https://github.com/llvm/llvm-project/pull/85572 >From 17d6ad65216237f9a325d9b608c1372cbbf83ff0 Mon Sep 17 00:00:00 2001 From: sopy Date: Sun, 17 Mar 2024 17:30:27 +0200 Subject: [PATCH 1/6] [clang-tidy] add check to suggest replacement of nested std::min or

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread via cfe-commits
sopyb wrote: I tried to figure it out today as well, but I couldn't. I just ended up going through the source code figuring out the comment ranges and checking if the characters are contained between those. Let me know if there was a better way to do it and I will go ahead and make more

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-30 Thread via cfe-commits
https://github.com/sopyb updated https://github.com/llvm/llvm-project/pull/85572 >From 17d6ad65216237f9a325d9b608c1372cbbf83ff0 Mon Sep 17 00:00:00 2001 From: sopy Date: Sun, 17 Mar 2024 17:30:27 +0200 Subject: [PATCH 1/5] [clang-tidy] add check to suggest replacement of nested std::min or

[clang] 556bf03 - [clang][NFC] Fix ARM64EC clang-cl linker driver tests. (#87160)

2024-03-30 Thread via cfe-commits
Author: Jacek Caban Date: 2024-03-30T17:18:12+01:00 New Revision: 556bf03a572fb8f6a91f1ad5227603b37717c55d URL: https://github.com/llvm/llvm-project/commit/556bf03a572fb8f6a91f1ad5227603b37717c55d DIFF: https://github.com/llvm/llvm-project/commit/556bf03a572fb8f6a91f1ad5227603b37717c55d.diff

[clang] [clang][NFC] Fix ARM64EC clang-cl linker driver tests. (PR #87160)

2024-03-30 Thread Jacek Caban via cfe-commits
https://github.com/cjacek closed https://github.com/llvm/llvm-project/pull/87160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Fix ARM64EC clang-cl linker driver tests. (PR #87160)

2024-03-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jacek Caban (cjacek) Changes Add '--' argument to clang-cl to avoid interpreting input files with /U option. Fix for llvm-clang-aarch64-darwin buildbot failure after #86835. --- Full diff:

[clang] [clang][NFC] Fix ARM64EC clang-cl linker driver tests. (PR #87160)

2024-03-30 Thread Jacek Caban via cfe-commits
https://github.com/cjacek created https://github.com/llvm/llvm-project/pull/87160 Add '--' argument to clang-cl to avoid interpreting input files with /U option. Fix for llvm-clang-aarch64-darwin buildbot failure after #86835. >From 2808ce015e4d025164c635d75795c714babe4f05 Mon Sep 17 00:00:00

[clang] [clang][HLSL] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr (PR #87131)

2024-03-30 Thread Marc Auberer via cfe-commits
https://github.com/marcauberer ready_for_review https://github.com/llvm/llvm-project/pull/87131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr (PR #87131)

2024-03-30 Thread Marc Auberer via cfe-commits
https://github.com/marcauberer updated https://github.com/llvm/llvm-project/pull/87131 >From b275a7b3e79fdf316ac2d19b25b43e9298b3715a Mon Sep 17 00:00:00 2001 From: Marc Auberer Date: Sat, 30 Mar 2024 01:52:52 +0100 Subject: [PATCH] [Clang] Move hlsl_wave_get_lane_index to EmitHLSLBuiltinExpr

[clang] [clang][Driver] Pass -machine argument to the linker explicitly for ARM64EC targets. (PR #86835)

2024-03-30 Thread Jacek Caban via cfe-commits
https://github.com/cjacek closed https://github.com/llvm/llvm-project/pull/86835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 37c175a - [clang][Driver] Pass -machine argument to the linker explicitly for ARM64EC targets. (#86835)

2024-03-30 Thread via cfe-commits
Author: Jacek Caban Date: 2024-03-30T16:43:33+01:00 New Revision: 37c175af955f0aeab67e8c553a0a47b2ed0fdba2 URL: https://github.com/llvm/llvm-project/commit/37c175af955f0aeab67e8c553a0a47b2ed0fdba2 DIFF: https://github.com/llvm/llvm-project/commit/37c175af955f0aeab67e8c553a0a47b2ed0fdba2.diff

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-30 Thread Xiang Li via cfe-commits
@@ -0,0 +1,258 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are

[clang] [WIP][Clang] Extend lifetime of the temporary in default member init expression (PR #86960)

2024-03-30 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/86960 >From 107cf4fdda2680a3de4fd0cea6e9fc1eaaf5f8c7 Mon Sep 17 00:00:00 2001 From: yronglin Date: Thu, 28 Mar 2024 22:02:16 +0800 Subject: [PATCH] [WIP][Clang] Extend lifetime of the temporary in default member

[clang] [RFC][Clang] Enable custom type checking for printf (PR #86801)

2024-03-30 Thread Vikram Hegde via cfe-commits
vikramRH wrote: > I looked at the OpenCL spec for C standard library support and was surprised > that 1) it's only talking about C99 so it's unclear what happens for C11 > (clause 6 says "This document describes the modifications and restrictions to > C99 and C11 in OpenCL C" but 6.11 only

[clang] [ClangFE] Improve handling of casting of atomic memory operations. (PR #86691)

2024-03-30 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: Updated per review. https://github.com/llvm/llvm-project/pull/86691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ClangFE] Improve handling of casting of atomic memory operations. (PR #86691)

2024-03-30 Thread Jonas Paulsson via cfe-commits
@@ -134,14 +134,11 @@ static _Atomic float glob_flt = 0.0f; void force_global_uses(void) { (void)glob_pointer; - // CHECK: %[[LOCAL_INT:.+]] = load atomic i32, ptr @[[GLOB_POINTER]] seq_cst - // CHECK-NEXT: inttoptr i32 %[[LOCAL_INT]] to ptr + // CHECK: load atomic ptr,

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-03-30 Thread Piyou Chen via cfe-commits
BeMg wrote: 1. Suppress the warning `warn_target_clone_mixed_values` for RISC-V 2. Update `__riscv_ifunc_select`. From `__riscv_ifunc_select(char *)` into `__riscv_ifunc_select(unsigned long long, unsigned long long )`. 3. Add one more error messenge when there are +extension that hwprobe

[clang] [ClangFE] Improve handling of casting of atomic memory operations. (PR #86691)

2024-03-30 Thread Jonas Paulsson via cfe-commits
@@ -1399,13 +1401,22 @@ RValue AtomicInfo::convertAtomicTempToRValue(Address addr, LVal.getBaseInfo(), TBAAAccessInfo())); } +static bool shouldCastToInt(llvm::Type *ValTy, bool CmpXchg) { JonPsson1 wrote: I thought it was a bit more clear than

[clang] [ClangFE] Improve handling of casting of atomic memory operations. (PR #86691)

2024-03-30 Thread Jonas Paulsson via cfe-commits
https://github.com/JonPsson1 updated https://github.com/llvm/llvm-project/pull/86691 >From 0b4ee03b3e095d904c4ce37eee8dee0e5e055a4c Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Tue, 26 Mar 2024 01:16:25 +0100 Subject: [PATCH 1/3] Refactoring with shouldCastToInt(). Also include atomic

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-03-30 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786 >From 239b404203c66ab5336ffdfb45969a50c439a1c0 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Tue, 19 Mar 2024 06:22:17 -0700 Subject: [PATCH 1/4] [RISCV][FMV] Support target_clones ---

[clang] [Win32][ELF] Make CodeView a DebugInfoFormat only for COFF format (PR #87149)

2024-03-30 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/87149 >From 16fea4659909423319f0107b2a4d5bcc31185299 Mon Sep 17 00:00:00 2001 From: Phoebe Wang Date: Sat, 30 Mar 2024 17:29:06 +0800 Subject: [PATCH] [Win32][ELF] Make CodeView a DebugInfoFormat only for COFF

[clang] [clang-repl] Expose markUserCodeStart() in extended Interpreter interface (PR #87064)

2024-03-30 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: You are right. I guess I was a little worried that we are leaking "severe" implementation details to the interface. https://github.com/llvm/llvm-project/pull/87064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [X86_32] Teach X86_32 va_arg to ignore empty structs. (PR #86075)

2024-03-30 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 44a81af510801edce842e9574ec4d52cc7bd0ae9 5178a001cc3ce765e3d29e91e24597fa1b0f42d6 --

[clang] [X86_32] Teach X86_32 va_arg to ignore empty structs. (PR #86075)

2024-03-30 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker updated https://github.com/llvm/llvm-project/pull/86075 >From 5178a001cc3ce765e3d29e91e24597fa1b0f42d6 Mon Sep 17 00:00:00 2001 From: Longsheng Mou Date: Thu, 21 Mar 2024 11:23:56 +0800 Subject: [PATCH] [X86_32] Teach X86_32 va_arg to ignore empty structs. Empty

  1   2   >