[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-26 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > My concern with this approach is that compiler-rt is treated as a different > project and updating the code within LLVM makes it easy to miss running the > test locally for the other project. I think such issues will be caught by the > buildbot but having it flagged earlie

[clang-tools-extra] [clang-tidy] Improve performance of google-runtime-int (PR #86596)

2024-03-26 Thread Paul Kirth via cfe-commits
ilovepi wrote: Well, its down to about 15 minutes from 1hr 40 min, which is a pretty great improvement. 15 minutes does still seem to be too long for a file that's only 2KLOC. I know its more complex w/ headers and macros, but it does only take about 1-2 minutes to compile normally, so I feel

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

2024-03-26 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-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Overall looks fine. Some minor style issues. Try getting rid of findNextTokenSkippingComments, and maybe just jump to begin() + token width https://github.com/llvm/llvm-project/pull/86129 __

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,193 @@ +//===--- 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: Ap

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,193 @@ +//===--- 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: Ap

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,193 @@ +//===--- 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: Ap

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,193 @@ +//===--- 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: Ap

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,75 @@ +.. title:: clang-tidy - readability-enum-initial-value + +readability-enum-initial-value +== + +Detects explicit initialization of a part of enumerators in an enumeration, and +relying on compiler to initialize the others. + +When addi

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,193 @@ +//===--- 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: Ap

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,75 @@ +.. title:: clang-tidy - readability-enum-initial-value + +readability-enum-initial-value +== + +Detects explicit initialization of a part of enumerators in an enumeration, and +relying on compiler to initialize the others. + +When addi

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,193 @@ +//===--- 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: Ap

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,75 @@ +.. title:: clang-tidy - readability-enum-initial-value + +readability-enum-initial-value +== + +Detects explicit initialization of a part of enumerators in an enumeration, and +relying on compiler to initialize the others.

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,193 @@ +//===--- 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: Ap

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,193 @@ +//===--- 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: Ap

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,193 @@ +//===--- 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: Ap

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-03-26 Thread via cfe-commits
@@ -88,6 +88,7 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +- Implemented _BitInt literal suffixes as ``__wb`` or ``__WB`` with unsigned modifiers also allowed. (#GH85223). Sirraide wrote:

[clang] 0c3e24f - [analyzer] Allow egraph rewriter not to open the generated HTML directly (#85515)

2024-03-26 Thread via cfe-commits
Author: Ella Ma Date: 2024-03-27T01:56:56+08:00 New Revision: 0c3e24f7c90243040fedcdfbbb417505f7cc0102 URL: https://github.com/llvm/llvm-project/commit/0c3e24f7c90243040fedcdfbbb417505f7cc0102 DIFF: https://github.com/llvm/llvm-project/commit/0c3e24f7c90243040fedcdfbbb417505f7cc0102.diff LOG:

[clang] [analyzer] Allow egraph rewriter not to open the generated HTML directly (PR #85515)

2024-03-26 Thread Ella Ma via cfe-commits
https://github.com/Snape3058 closed https://github.com/llvm/llvm-project/pull/85515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-03-26 Thread Johannes Doerfert via cfe-commits
@@ -1235,27 +1251,56 @@ class OpenMPIRBuilder { getTargetEntryUniqueInfo(FileIdentifierInfoCallbackTy CallBack, StringRef ParentName = ""); - /// Functions used to generate reductions. Such functions take two Values - /// representing LHS and RHS

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-03-26 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert edited https://github.com/llvm/llvm-project/pull/80343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-03-26 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,1071 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filechec

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-03-26 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert commented: Some comments inlined. Do we support non trivial constructors for reduction variables? Similarly, did we support user defined reductions? If either questions is answered with yes, do we keep that support? We might need to ask Alexey. https://github.com/

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-03-26 Thread Johannes Doerfert via cfe-commits
@@ -607,15 +621,17 @@ class OpenMPIRBuilder { /// Generator for '#omp barrier' /// /// \param Loc The location where the barrier directive was encountered. - /// \param DK The kind of directive that caused the barrier. + /// \param Kind The kind of directive that caused

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-03-26 Thread Johannes Doerfert via cfe-commits
@@ -1235,27 +1251,56 @@ class OpenMPIRBuilder { getTargetEntryUniqueInfo(FileIdentifierInfoCallbackTy CallBack, StringRef ParentName = ""); - /// Functions used to generate reductions. Such functions take two Values - /// representing LHS and RHS

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Justin Bogner via cfe-commits
@@ -753,7 +753,10 @@ def err_drv_hlsl_unsupported_target : Error< "HLSL code generation is unsupported for target '%0'">; def err_drv_hlsl_bad_shader_required_in_target : Error< "%select{shader model|Vulkan environment|shader stage}0 is required as %select{OS|environment}1

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 2016 %s 2>&1 | FileCheck -check-prefix=both_invalid %s +// RUN: not %clang_dxc -enable-16bit-types -T lib_6_4 -HV 2017 %s 2>&1 | FileCheck -check-prefix=HV_invalid %s +// RUN: not %clang_dxc -enable-16bi

[clang] Add clang_elementwise_builtin_alias (PR #86175)

2024-03-26 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/86175 >From 5e10b1e42a20a39c9a3d5ff332591713511832c8 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 20 Mar 2024 13:24:07 -0700 Subject: [PATCH 1/7] make elemnetwise alias an alias of builtin alias --- clan

[clang] Fix printing of templated records. (PR #86339)

2024-03-26 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: I'm getting errors like: ``` llvm-project/clang/unittests/AST/DeclPrinterTest.cpp:1394:3: error: expression result unused [-Werror,-Wunused-value] [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; }; ``` This file being a clang test, I am wondering if this

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Natalie Chouinard via cfe-commits
@@ -753,7 +753,10 @@ def err_drv_hlsl_unsupported_target : Error< "HLSL code generation is unsupported for target '%0'">; def err_drv_hlsl_bad_shader_required_in_target : Error< "%select{shader model|Vulkan environment|shader stage}0 is required as %select{OS|environment}1

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Natalie Chouinard via cfe-commits
@@ -4284,11 +4284,25 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Diags.Report(diag::err_drv_hlsl_bad_shader_unsupported) << ShaderModel << T.getOSName() << T.str(); } +// validate that if fnative-half-type

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Natalie Chouinard via cfe-commits
@@ -753,7 +753,10 @@ def err_drv_hlsl_unsupported_target : Error< "HLSL code generation is unsupported for target '%0'">; def err_drv_hlsl_bad_shader_required_in_target : Error< "%select{shader model|Vulkan environment|shader stage}0 is required as %select{OS|environment}1

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Natalie Chouinard via cfe-commits
@@ -4284,11 +4284,25 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Diags.Report(diag::err_drv_hlsl_bad_shader_unsupported) << ShaderModel << T.getOSName() << T.str(); } +// validate that if fnative-half-type

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Natalie Chouinard via cfe-commits
@@ -4284,11 +4284,25 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Diags.Report(diag::err_drv_hlsl_bad_shader_unsupported) << ShaderModel << T.getOSName() << T.str(); } +// validate that if fnative-half-type

[clang] [C++20] [Modules] Introduce -fmodules-reduced-bmi (PR #85050)

2024-03-26 Thread Iain Sandoe via cfe-commits
iains wrote: > > > @iains @dwblaikie Understood. And I thought the major problem is that > > > there are a lot flags from clang modules. And it is indeed confusing. But > > > given we have to introduce new flags in this case, probably we can only > > > try to make it more clear by better docum

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 2016 %s 2>&1 | FileCheck -check-prefix=both_invalid %s +// RUN: not %clang_dxc -enable-16bit-types -T lib_6_4 -HV 2017 %s 2>&1 | FileCheck -check-prefix=HV_invalid %s +// RUN: not %clang_dxc -enable-16bi

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Joshua Batista via cfe-commits
@@ -753,7 +753,10 @@ def err_drv_hlsl_unsupported_target : Error< "HLSL code generation is unsupported for target '%0'">; def err_drv_hlsl_bad_shader_required_in_target : Error< "%select{shader model|Vulkan environment|shader stage}0 is required as %select{OS|environment}1

[clang] AMDGPU: Simplify EmitAMDGPUBuiltinExpr for load transposes, NFC (PR #86707)

2024-03-26 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng created https://github.com/llvm/llvm-project/pull/86707 We should not manually get the types of the loading data. Instead, we can get the types from the intrinsics directly. >From 485dff66813104ad73d8eada7cd7d43edf9d093d Mon Sep 17 00:00:00 2001 From: Changpeng Fa

[clang] AMDGPU: Simplify EmitAMDGPUBuiltinExpr for load transposes, NFC (PR #86707)

2024-03-26 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng updated https://github.com/llvm/llvm-project/pull/86707 >From 485dff66813104ad73d8eada7cd7d43edf9d093d Mon Sep 17 00:00:00 2001 From: Changpeng Fang Date: Tue, 26 Mar 2024 11:06:48 -0700 Subject: [PATCH 1/2] AMDGPU: Simplify EmitAMDGPUBuiltinExpr for load transpose

[clang] AMDGPU: Simplify EmitAMDGPUBuiltinExpr for load transposes, NFC (PR #86707)

2024-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Changpeng Fang (changpeng) Changes We should not manually get the types of the loading data. Instead, we can get the types from the intrinsics directly. --- Full diff: https://github.com/llvm/llvm-project/pull/86707.diff 1 Files Affect

[clang] [codegen] Emit missing cleanups for stmt-expr and coro suspensions [take-2] (PR #85398)

2024-03-26 Thread Richard Smith via cfe-commits
@@ -2503,6 +2506,29 @@ Stmt *BlockExpr::getBody() { // Generic Expression Routines //===--===// +bool Expr::mayBranchOut() const { zygoloid wrote: Computing this seems a little expensive in

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-26 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > This doesn't leave us with good options, does it? :-( Not really. Zero-sized arrays should probably have been supported by C++ all along, but it's too late to change it now. > I think we need to consider the following things: > > * Should `Ty[0]` and `Ty[]` be handled

[clang] Fix printing of templated records. (PR #86339)

2024-03-26 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > I'm getting errors like: > > ``` > llvm-project/clang/unittests/AST/DeclPrinterTest.cpp:1394:3: error: > expression result unused [-Werror,-Wunused-value] > [](PrintingPolicy &Policy) { Policy.SuppressTagKeyword = false; }; > ``` > > This file being a clang test, I am wonde

[clang] [codegen] Emit missing cleanups for stmt-expr and coro suspensions [take-2] (PR #85398)

2024-03-26 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Instead of Expr::mayBranchOut, I'd prefer to just unconditionally create the alloca, then delete it later if it turns out we didn't actually need to emit the branch. Trying to explicitly compute whether there's a branch out seems both difficult, and potentially costly for

[clang] [clang-format] Handle C++ Core Guidelines suppression tags (PR #86458)

2024-03-26 Thread Björn Schäpers via cfe-commits
@@ -4827,6 +4827,10 @@ bool TokenAnnotator::spaceRequiredBefore(const AnnotatedLine &Line, Right.is(TT_TemplateOpener)) { return true; } +if (Left.is(tok::identifier) && Right.is(tok::numeric_constant) && +Right.TokenText[0] == '.') {

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-26 Thread Björn Schäpers via cfe-commits
@@ -2218,6 +2218,11 @@ struct FormatStyle { /// \version 3.8 bool BreakAfterJavaFieldAnnotations; + /// If ``true``, clang-format will always break before function definition + /// parameters + /// \version 19 + bool BreakFunctionDefinitionParameters;

[clang] Fix printing of templated records. (PR #86339)

2024-03-26 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: Creating a PR with `[](PrintingPolicy [[maybe_unused]] & Policy) { Policy.SuppressTagKeyword = true; };` on those tests. https://github.com/llvm/llvm-project/pull/86339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang-format] Add BreakFunctionDefinitionParameters option (PR #84988)

2024-03-26 Thread Björn Schäpers via cfe-commits
@@ -7951,6 +7951,24 @@ TEST_F(FormatTest, AllowAllArgumentsOnNextLineDontAlign) { Input, Style); } +TEST_F(FormatTest, BreakFunctionDefinitionParameters) { HazardyKnusperkeks wrote: As I understand you want this, so that you can put all argume

[clang] [clang-format] Fix anonymous reference parameter with default value (PR #86254)

2024-03-26 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/86254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [codegen] Emit missing cleanups for stmt-expr and coro suspensions [take-2] (PR #85398)

2024-03-26 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If we do keep mayBranchOut(), "asm goto" should also be added to the list of expressions that can branch out. (I think JumpDiagnostics currently forbids actually branching out in cases that would require a cleanup, but better to be defensive here.) https://github.com/llv

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-26 Thread via cfe-commits
https://github.com/komalverma04 updated https://github.com/llvm/llvm-project/pull/86411 >From b6ca6f0ef83d03e299d6ee9a8ed9b8044477914e Mon Sep 17 00:00:00 2001 From: komalverma04 <114138604+komalverm...@users.noreply.github.com> Date: Sat, 23 Mar 2024 11:14:44 -0700 Subject: [PATCH 1/6] Update c

[clang] [Clang][analyzer] add documentation for optin performance padding (padding checker) #73675 (PR #86411)

2024-03-26 Thread via cfe-commits
@@ -804,10 +804,38 @@ Check for performance anti-patterns when using Grand Central Dispatch. .. _optin-performance-Padding: -optin.performance.Padding -" +optin.performance.Padding (C, C++, ObjC) + Check for ex

[clang] 28ddbd4 - [NFC] Refactor ConstantArrayType size storage (#85716)

2024-03-26 Thread via cfe-commits
Author: Chris B Date: 2024-03-26T14:15:56-05:00 New Revision: 28ddbd4a863c4c1b6c36deb6edf305ee93412cd4 URL: https://github.com/llvm/llvm-project/commit/28ddbd4a863c4c1b6c36deb6edf305ee93412cd4 DIFF: https://github.com/llvm/llvm-project/commit/28ddbd4a863c4c1b6c36deb6edf305ee93412cd4.diff LOG:

[clang] [NFC] Refactor ConstantArrayType size storage (PR #85716)

2024-03-26 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/85716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] Add numerical sanitizer (PR #85916)

2024-03-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Can we split the patch into smaller pieces? e.g. clang, transform, runtime ? This one has transform, comments, so we can keep it for transform. https://github.com/llvm/llvm-project/pull/85916 ___ cfe-commits mailing list cfe-commits

[clang] [compiler-rt] [llvm] Add numerical sanitizer (PR #85916)

2024-03-26 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: clang changes LGTM, but they are missing testst https://github.com/llvm/llvm-project/pull/85916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve performance of google-runtime-int (PR #86596)

2024-03-26 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: I will go with merging this. There are still few improvements possible, but they require partial check rewrite. I may to work on some PoC. You could test with additional matcher (at the beginning): `unless(isExpansionInSystemHeader())` and see if excluding system headers helps

[clang-tools-extra] 5e6e40f - [clang-tidy] Improve performance of google-runtime-int (#86596)

2024-03-26 Thread via cfe-commits
Author: Piotr Zegar Date: 2024-03-26T20:19:23+01:00 New Revision: 5e6e40fee31d5db2f44d604b0362e1e819f41ba5 URL: https://github.com/llvm/llvm-project/commit/5e6e40fee31d5db2f44d604b0362e1e819f41ba5 DIFF: https://github.com/llvm/llvm-project/commit/5e6e40fee31d5db2f44d604b0362e1e819f41ba5.diff L

[clang-tools-extra] [clang-tidy] Improve performance of google-runtime-int (PR #86596)

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

[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/86720 fixes #86719 - `SemaChecking.cpp` - Adds unsigned semaChecks to `__builtin_elementwise_bitreverse` - `hlsl_intrinsics.h` - remove signed `reversebits` apis >From 0535f804c10c2c1a089a4c3c061d39b01f0ac0ee Mon Sep

[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang @llvm/pr-subscribers-hlsl Author: Farzon Lotfi (farzonl) Changes fixes #86719 - `SemaChecking.cpp` - Adds unsigned semaChecks to `__builtin_elementwise_bitreverse` - `hlsl_intrinsics.h` - remove signed `reversebit

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

2024-03-26 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-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,199 @@ +//===--- 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: Ap

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,199 @@ +//===--- 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: Ap

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

2024-03-26 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Except already raised code-smells, i do not like `MinMaxUseInitializerListCheck::generateReplacement` method. My main problem with it is that, once things like whitespaces, comments (between arguments) and other stuff will be used, this function may not al

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,199 @@ +//===--- 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: Ap

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,105 @@ +// RUN: %check_clang_tidy %s modernize-min-max-use-initializer-list %t + +// CHECK-FIXES: #include +namespace std { +template< class T > +const T& max( const T& a, const T& b ) { + return (a < b) ? b : a; +}; + +template< class T, class Compare > +const T& max

[clang-tools-extra] 8ea94b6 - [clang-tidy] Improved modernize-use-using by fixing a false-negative (#82947)

2024-03-26 Thread via cfe-commits
Author: Félix-Antoine Constantin Date: 2024-03-26T20:39:05+01:00 New Revision: 8ea94b614bd8ac74802867588129bcfd0a326620 URL: https://github.com/llvm/llvm-project/commit/8ea94b614bd8ac74802867588129bcfd0a326620 DIFF: https://github.com/llvm/llvm-project/commit/8ea94b614bd8ac74802867588129bcfd0a3

[clang-tools-extra] [clang-tidy] Improved modernize-use-using by fixing a false-negative (PR #82947)

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

[clang] [llvm] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #86721)

2024-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Akira Hatanaka (ahatanak) Changes To authenticate pointers, CodeGen needs access to the key and discriminators that were used to sign the pointer. That information is sometimes known from the context, but not always, which is why `Address

[clang] [llvm] [InstallAPI] Add *umbrella-header options (PR #86587)

2024-03-26 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/86587 >From 9b25b0486d8f3c8409ee199a9f4695da7780e6cb Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 25 Mar 2024 17:12:14 -0400 Subject: [PATCH 1/3] [InstallAPI] Add *umbrella-header options Umbrella header

[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread Justin Bogner via cfe-commits
@@ -54,31 +29,6 @@ uint16_t4 test_bitreverse_ushort4(uint16_t4 p0) } #endif -// CHECK: define noundef i32 @ -// CHECK: call i32 @llvm.bitreverse.i32( -int test_bitreverse_int(int p0) -{ - return reversebits(p0); -} bogner wrote: Will these implicitly co

[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread Farzon Lotfi via cfe-commits
@@ -54,31 +29,6 @@ uint16_t4 test_bitreverse_ushort4(uint16_t4 p0) } #endif -// CHECK: define noundef i32 @ -// CHECK: call i32 @llvm.bitreverse.i32( -int test_bitreverse_int(int p0) -{ - return reversebits(p0); -} farzonl wrote: errors specifically `er

[clang] Fix printing of templated records. (PR #86339)

2024-03-26 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: > Creating a PR with `[](PrintingPolicy [[maybe_unused]] & Policy) { > Policy.SuppressTagKeyword = true; };` on those tests. I get this error while running `ninja check-clang-unit`. My build tree is configured with `-DCMAKE_CXX_COMPILER=/usr/bin/clang++` and `-DLLVM_ENA

[clang] [llvm] [InstallAPI] Add *umbrella-header options (PR #86587)

2024-03-26 Thread Juergen Ributzka via cfe-commits
@@ -424,6 +448,56 @@ InstallAPIContext Options::createContext() { if (!Glob->didMatch()) Diags->Report(diag::warn_glob_did_not_match) << Glob->str(); + // Mark any explicit or inferred umbrella headers. If one exists, move + // that to the beginning of the input he

[clang] Fix printing of templated records. (PR #86339)

2024-03-26 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: Looking at other examples, should the lambda expression be the last argument to `ASSERT_TRUE`? https://github.com/llvm/llvm-project/pull/86339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,68 @@ +//===--- 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: Apa

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,86 @@ +//===--- 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: Apa

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,86 @@ +//===--- 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: Apa

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,86 @@ +//===--- 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: Apa

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

2024-03-26 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,31 @@ +//===--- MathMissingParenthesesCheck.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] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread Justin Bogner via cfe-commits
@@ -54,31 +29,6 @@ uint16_t4 test_bitreverse_ushort4(uint16_t4 p0) } #endif -// CHECK: define noundef i32 @ -// CHECK: call i32 @llvm.bitreverse.i32( -int test_bitreverse_int(int p0) -{ - return reversebits(p0); -} bogner wrote: In that case we might ne

[clang] [llvm] [InstallAPI] Add *umbrella-header options (PR #86587)

2024-03-26 Thread Cyndy Ishida via cfe-commits
@@ -424,6 +448,56 @@ InstallAPIContext Options::createContext() { if (!Glob->didMatch()) Diags->Report(diag::warn_glob_did_not_match) << Glob->str(); + // Mark any explicit or inferred umbrella headers. If one exists, move + // that to the beginning of the input he

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-03-26 Thread Justin Stitt via cfe-commits
JustinStitt wrote: cc: @MaskRay (since they also reviewed https://github.com/llvm/llvm-project/pull/82432) https://github.com/llvm/llvm-project/pull/86618 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread Farzon Lotfi via cfe-commits
@@ -54,31 +29,6 @@ uint16_t4 test_bitreverse_ushort4(uint16_t4 p0) } #endif -// CHECK: define noundef i32 @ -// CHECK: call i32 @llvm.bitreverse.i32( -int test_bitreverse_int(int p0) -{ - return reversebits(p0); -} farzonl wrote: I noticed the same thin

[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-03-26 Thread Ye Luo via cfe-commits
ye-luo wrote: `-DRUNTIMES_CMAKE_ARGS="-DCMAKE_C_FLAGS=--gcc-install-dir=$GCC_ROOT;-DCMAKE_CXX_FLAGS=--gcc-install-dir=$GCC_ROOT"` worked for me https://github.com/llvm/llvm-project/pull/85891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-03-26 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > `-DRUNTIMES_CMAKE_ARGS="-DCMAKE_C_FLAGS=--gcc-install-dir=$GCC_ROOT;-DCMAKE_CXX_FLAGS=--gcc-install-dir=$GCC_ROOT"` > worked for me Great, we should probably document this somewhere. https://github.com/llvm/llvm-project/pull/85891 __

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-26 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. thanks! are you able to merge or do you need me to? https://github.com/llvm/llvm-project/pull/86577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [clang-repl] Add call to 'InitializeAllAsmParsers' (PR #86727)

2024-03-26 Thread Andrew V. Teylu via cfe-commits
https://github.com/aytey created https://github.com/llvm/llvm-project/pull/86727 This PR fixes the following issue when working with `clang-repl`: ``` fatal error: error in backend: Inline asm not supported by this streamer because we don't have an asm parser for this target ``` When working w

[clang] [clang-repl] Add call to 'InitializeAllAsmParsers' (PR #86727)

2024-03-26 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Fix printing of templated records. (PR #86339)

2024-03-26 Thread Amy Kwan via cfe-commits
amy-kwan wrote: This also fails on PPC, as well: https://lab.llvm.org/buildbot/#/builders/36/builds/43998/steps/12/logs/stdio https://github.com/llvm/llvm-project/pull/86339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread Justin Bogner via cfe-commits
@@ -54,31 +29,6 @@ uint16_t4 test_bitreverse_ushort4(uint16_t4 p0) } #endif -// CHECK: define noundef i32 @ -// CHECK: call i32 @llvm.bitreverse.i32( -int test_bitreverse_int(int p0) -{ - return reversebits(p0); -} bogner wrote: Alright, let's get this

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-26 Thread via cfe-commits
overmighty wrote: I need you to merge this for me please. Thanks. https://github.com/llvm/llvm-project/pull/86577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Add call to 'InitializeAllAsmParsers' (PR #86727)

2024-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andrew V. Teylu (aytey) Changes This PR fixes the following issue when working with `clang-repl`: ``` fatal error: error in backend: Inline asm not supported by this streamer because we don't have an asm parser for this target ``` When w

[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/86720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Add call to 'InitializeAllAsmParsers' (PR #86727)

2024-03-26 Thread Andrew V. Teylu via cfe-commits
aytey wrote: This my first PR against LLVM; does something like this need tests? I'm 100% happy to add tests for this, but are there some examples of "good" `clang-repl` tests I can learn from/extend from? https://github.com/llvm/llvm-project/pull/86727

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/85340 >From 74a869a282d532ec426dbc1c954779ec2972aa5c Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Thu, 14 Mar 2024 17:04:12 -0700 Subject: [PATCH 01/18] add test --- .../clang/Basic/DiagnosticDriverKinds.td

[clang] ac1af75 - [clang] Implement constexpr support for __builtin_{clzg,ctzg} (#86577)

2024-03-26 Thread via cfe-commits
Author: OverMighty Date: 2024-03-26T13:22:47-07:00 New Revision: ac1af75051195e63cc518cf12312dd4eaf2e9bf8 URL: https://github.com/llvm/llvm-project/commit/ac1af75051195e63cc518cf12312dd4eaf2e9bf8 DIFF: https://github.com/llvm/llvm-project/commit/ac1af75051195e63cc518cf12312dd4eaf2e9bf8.diff LO

[clang] [clang] Implement constexpr support for __builtin_{clzg, ctzg} (PR #86577)

2024-03-26 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers closed https://github.com/llvm/llvm-project/pull/86577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix printing of templated records. (PR #86339)

2024-03-26 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: oh! I think I know what the issue is. I have a fix for it. PR following up. https://github.com/llvm/llvm-project/pull/86339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

<    1   2   3   4   5   >