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

2024-04-01 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-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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] ee99475 - [clang] Fix bitfield access unit for vbase corner case (#87238)

2024-04-01 Thread via cfe-commits
Author: Nathan Sidwell Date: 2024-04-01T15:41:38-04:00 New Revision: ee99475068523de185dce0a449b65e684a1e6b73 URL: https://github.com/llvm/llvm-project/commit/ee99475068523de185dce0a449b65e684a1e6b73 DIFF: https://github.com/llvm/llvm-project/commit/ee99475068523de185dce0a449b65e684a1e6b73.diff

[clang] [clang] Fix bitfield access unit for vbase corner case (PR #87238)

2024-04-01 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan closed https://github.com/llvm/llvm-project/pull/87238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-04-01 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > FWIW, I did verify that it's very unlikely the changes in this PR will break > existing code: > https://sourcegraph.com/search?q=context:global+__need_unreachable+-file:.*clang.*&patternType=keyword&sm=0, > so that's a good thing. > > > I do wonder if we could have

[clang] [compiler-rt] [llvm] [thinlto] Implement the import of vtable definitions. (PR #72551)

2024-04-01 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 closed https://github.com/llvm/llvm-project/pull/72551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [thinlto] Implement the import of vtable definitions. (PR #72551)

2024-04-01 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: Superseded by https://github.com/llvm/llvm-project/pull/79381 https://github.com/llvm/llvm-project/pull/72551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add ``ignoringParenImpCasts`` in ``hasAnyArgument`` fix#75754 (PR #87268)

2024-04-01 Thread via cfe-commits
https://github.com/komalverma04 edited https://github.com/llvm/llvm-project/pull/87268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #87278)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: David Pagan (ddpagan) Changes IR for 'target teams loop' is now dependent on suitability of associated loop-nest. If a loop-nest: - does not contain a function call, or - the -fopenmp-assume-no-nested-parallelism has been specifi

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #87278)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Pagan (ddpagan) Changes IR for 'target teams loop' is now dependent on suitability of associated loop-nest. If a loop-nest: - does not contain a function call, or - the -fopenmp-assume-no-nested-parallelism has been specified, - or

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #87278)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: David Pagan (ddpagan) Changes IR for 'target teams loop' is now dependent on suitability of associated loop-nest. If a loop-nest: - does not contain a function call, or - the -fopenmp-assume-no-nested-parallelism has been specifi

[clang] [DebugInfo] Add flag to only emit referenced member functions (PR #87018)

2024-04-01 Thread Reid Kleckner via cfe-commits
rnk wrote: To restate the finding, 29% of .debug_info is describing class methods, at least in Clang. I think this is a useful mode, and we should land it as is. There are many users up against the scaling limits of debug info size, and it's helpful to have this as an option for experimentati

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-01 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/79230 >From 44813fefa59b442abcc6cb23c2ac8d3f78e44efc Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 16 Jan 2024 13:18:09 -0800 Subject: [PATCH 01/12] Add support for builtin_verbose_trap The builtin causes

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-04-01 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 04a3e8d8cbd6943f44a81fddb0524902202a1a78 Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/5] [clang-tidy] Add bugprone-move-shared-pointer-contents check.

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (pizzud) Changes This check detects moves of the contents of a shared pointer rather than the pointer itself. Other code with a reference to the shared pointer is probably not expecting the move. The set of shared pointe

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-04-01 Thread via cfe-commits
@@ -0,0 +1,157 @@ +//===--- MoveSharedPointerContentsCheck.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 bugprone-move-shared-pointer-contents check. (PR #67467)

2024-04-01 Thread via cfe-commits
@@ -0,0 +1,125 @@ +// RUN: %check_clang_tidy %s bugprone-move-shared-pointer-contents %t -- -config="{CheckOptions: {bugprone-move-shared-pointer-contents.SharedPointerClasses: '::std::shared_ptr;my::OtherSharedPtr;'}}" + +// Some dummy definitions we'll need. + +namespace std

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-04-01 Thread via cfe-commits
@@ -0,0 +1,157 @@ +//===--- MoveSharedPointerContentsCheck.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 bugprone-move-shared-pointer-contents check. (PR #67467)

2024-04-01 Thread via cfe-commits
@@ -117,7 +117,8 @@ Clang-Tidy Checks :doc:`bugprone-parent-virtual-call `, "Yes" :doc:`bugprone-posix-return `, "Yes" :doc:`bugprone-redundant-branch-condition `, "Yes" - :doc:`bugprone-reserved-identifier `, "Yes" + :doc:`bugprone-reserved-identifier `, "Yes", -

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-04-01 Thread via cfe-commits
@@ -0,0 +1,157 @@ +//===--- MoveSharedPointerContentsCheck.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 bugprone-move-shared-pointer-contents check. (PR #67467)

2024-04-01 Thread via cfe-commits
@@ -0,0 +1,157 @@ +//===--- MoveSharedPointerContentsCheck.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] Rework the printing of attributes (PR #87281)

2024-04-01 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev created https://github.com/llvm/llvm-project/pull/87281 Commit https://github.com/llvm/llvm-project/commit/46f3ade introduced a notion of printing the attributes on the left to improve the printing of attributes attached to variable declarations. The intent was to

[clang] Rework the printing of attributes (PR #87281)

2024-04-01 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @giulianobelinassi, I could not select you for a reviewer but please take a look at the pull request. https://github.com/llvm/llvm-project/pull/87281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] Rework the printing of attributes (PR #87281)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vassil Vassilev (vgvassilev) Changes Commit https://github.com/llvm/llvm-project/commit/46f3ade introduced a notion of printing the attributes on the left to improve the printing of attributes attached to variable declarations. The intent

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

2024-04-01 Thread Erich Keane via cfe-commits
@@ -80,7 +80,8 @@ class NumericLiteralParser { bool isFloat128 : 1; // 1.0q bool isFract : 1; // 1.0hr/r/lr/uhr/ur/ulr bool isAccum : 1; // 1.0hk/k/lk/uhk/uk/ulk - bool isBitInt : 1;// 1wb, 1uwb (C23) + bool isBitInt : 1; // 1wb, 1uwb (C23)

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

2024-04-01 Thread Erich Keane via cfe-commits
@@ -1117,6 +1118,26 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

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

2024-04-01 Thread Erich Keane via cfe-commits
@@ -974,6 +974,7 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, bool isFixedPointConstant = isFixedPointLiteral(); bool isFPConstant = isFloatingLiteral(); bool HasSize = false; + bool PossibleBitInt = false; erichkeane wrote: I'd

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

2024-04-01 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-04-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM from my side, others are still reviewing. Your test file contains a few trailing whitespaces that you could remove. https://github.com/llvm/llvm-project/pull/84481 ___ cfe-commits mailing li

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

2024-04-01 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,97 @@ +//===--- 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] Rework the printing of attributes (PR #87281)

2024-04-01 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/87281 >From 94f1c8653903cc3db55abd641c68a9dd11f05df3 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Mon, 1 Apr 2024 15:01:33 + Subject: [PATCH 1/5] Revert "Remove extra switch from 0323938d" This reverts

[clang] e93b5f5 - [ubsan][NFC] Remove recently added `cl::init(false)`

2024-04-01 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2024-04-01T13:37:42-07:00 New Revision: e93b5f5a4776ffea12d03652559dfdf8d421184c URL: https://github.com/llvm/llvm-project/commit/e93b5f5a4776ffea12d03652559dfdf8d421184c DIFF: https://github.com/llvm/llvm-project/commit/e93b5f5a4776ffea12d03652559dfdf8d421184c.diff L

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

2024-04-01 Thread Utkarsh Saxena via cfe-commits
@@ -266,6 +269,54 @@ class alignas(8) EHCleanupScope : public EHScope { }; mutable struct ExtInfo *ExtInfo; + /// Erases auxillary allocas and their usages for an unused cleanup. + /// Cleanups should mark these allocas as 'used' if the cleanup is + /// emitted, otherwi

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

2024-04-01 Thread Utkarsh Saxena via cfe-commits
@@ -1105,19 +1105,24 @@ void CodeGenFunction::EmitNewArrayInitializer( } // Enter a partial-destruction Cleanup if necessary. -if (needsEHCleanup(DtorKind)) { +if (DtorKind) { + AllocaTrackerRAII AllocaTracker(*this); usx95 wrote: Unfortu

[clang] [OpenMP][CodeGen] Improved codegen for combined loop directives (PR #87278)

2024-04-01 Thread Eli Friedman via cfe-commits
@@ -6135,6 +6137,79 @@ processImplicitMapsWithDefaultMappers(Sema &S, DSAStackTy *Stack, } } +namespace { +/// A 'teams loop' with a nested 'loop bind(parallel)' or generic function +/// call in the associated loop-nest cannot be a 'parallel for'. +class TeamsLoopChecker fi

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

2024-04-01 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/85398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add test for CWG1606 (PR #87274)

2024-04-01 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. Thank you for the test! LGTM. Do we also have a test that `sizeof([=]{ return i + j;})` should fail as well? Tangentially related to this DR but if we don't we should cover that in our tests someplace. https://github.com/llvm/llvm-project/

[clang] [clang] Add test for CWG1606 (PR #87274)

2024-04-01 Thread Shafik Yaghmour via cfe-commits
shafik wrote: It looks like we do have a test and it looks like the restriction was lifted in C++20. https://github.com/llvm/llvm-project/pull/87274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] cppcheck: pass NodeKinds by const reference (PR #87273)

2024-04-01 Thread Oliver Stöneberg via cfe-commits
firewave wrote: Depending on the calling code the fix might actually be the introduction of `std::move()`. This is a known issue upstream: https://trac.cppcheck.net/ticket/12384. https://github.com/llvm/llvm-project/pull/87273 ___ cfe-commits mailing

[clang] [clang] MangledSymbol: Added move to Names param in init list (PR #87287)

2024-04-01 Thread Braden Helmer via cfe-commits
https://github.com/bradenhelmer created https://github.com/llvm/llvm-project/pull/87287 Fixes #87255 >From 4d0290b2dc10705cf229e4c1c3b40dd5155ea61c Mon Sep 17 00:00:00 2001 From: Braden Helmer Date: Mon, 1 Apr 2024 18:09:59 -0400 Subject: [PATCH] Added move for Names parameter in MangledSymbol

[clang] [clang] MangledSymbol: Added move to Names param in init list (PR #87287)

2024-04-01 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] [clang] MangledSymbol: Added move to Names param in init list (PR #87287)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Braden Helmer (bradenhelmer) Changes Fixes #87255 --- Full diff: https://github.com/llvm/llvm-project/pull/87287.diff 1 Files Affected: - (modified) clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp (+2-1) ``diff diff --g

[clang] [M68k] Change gcc register name from a7 to sp. (PR #87095)

2024-04-01 Thread Jim Lin via cfe-commits
https://github.com/tclin914 updated https://github.com/llvm/llvm-project/pull/87095 >From dec6021133f67304bfc9942a1a4985cce6a15645 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Sat, 30 Mar 2024 01:37:49 +0800 Subject: [PATCH 1/2] [M68k] Change gcc register name from a7 to sp In M68kRegisterInfo

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-04-01 Thread Jun Wang via cfe-commits
jwanggit86 wrote: @jayfoad @arsenm Any other comments? https://github.com/llvm/llvm-project/pull/79236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [M68k] Change gcc register name from a7 to sp. (PR #87095)

2024-04-01 Thread Jim Lin via cfe-commits
https://github.com/tclin914 updated https://github.com/llvm/llvm-project/pull/87095 >From dec6021133f67304bfc9942a1a4985cce6a15645 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Sat, 30 Mar 2024 01:37:49 +0800 Subject: [PATCH 1/3] [M68k] Change gcc register name from a7 to sp In M68kRegisterInfo

[clang] f2a87b0 - [OpenMP] Use loaded offloading toolchains to add libraries (#87108)

2024-04-01 Thread via cfe-commits
Author: Joseph Huber Date: 2024-04-01T17:26:20-05:00 New Revision: f2a87b07e7fe1892a11ee9424d22dbaec5de5b5b URL: https://github.com/llvm/llvm-project/commit/f2a87b07e7fe1892a11ee9424d22dbaec5de5b5b DIFF: https://github.com/llvm/llvm-project/commit/f2a87b07e7fe1892a11ee9424d22dbaec5de5b5b.diff

[clang] [OpenMP] Use loaded offloading toolchains to add libraries (PR #87108)

2024-04-01 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/87108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [M68k] Change gcc register name from a7 to sp. (PR #87095)

2024-04-01 Thread Jim Lin via cfe-commits
tclin914 wrote: > Is it possible use `TargetInfo::getGCCRegAliases` to model the aliasing > between a7 and sp? Also, could you add a simple test? Implement getGCCRegAliases and add testcase. https://github.com/llvm/llvm-project/pull/87095 ___ cfe-com

[clang] [clang][Sema] Ignore the parentheses in the guard of DiagnoseUnexpandedParameterPack (PR #86401)

2024-04-01 Thread David Blaikie via cfe-commits
dwblaikie wrote: Thanks for continuing to look into this! @cor3ntin - perhaps you've got some more thoughts on this too? https://github.com/llvm/llvm-project/pull/86401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

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

2024-04-01 Thread Richard Smith via cfe-commits
@@ -1117,19 +1118,37 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isImaginary) break; // Cannot be repeated. isImaginary = true; continue; // Success. +case '_': + if (isFPConstant) +break; // Invalid for floats

[clang] [DebugInfo] Add flag to only emit referenced member functions (PR #87018)

2024-04-01 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: Seems to be a reasonable tuning option to have available. I probably wouldn't want this to be on by default, but I can see the appeal. https://github.com/llvm/llvm-project/pull/87018 ___ cfe-commits mailing list cfe-commits@lists.

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

2024-04-01 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 1/2] [HLSL][DXIL][SPIRV] Intrinsic unification PR --- clang/inclu

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-04-01 Thread William Junda Huang via cfe-commits
huangjd wrote: > > > Reading LLVM IR lit CHECK lines from clang codegen is a bit difficult - > > > could you include some simple examples (perhaps from the new clang tests > > > in this patch) showing the DWARF output just as comments in this review > > > for something more easily glanceable?

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

2024-04-01 Thread via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-04-01 Thread William Junda Huang via cfe-commits
huangjd wrote: I am making another diff (not to be submitted) to get statistics on how frequently these 2 cases are encountered https://github.com/llvm/llvm-project/pull/81545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

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

2024-04-01 Thread via cfe-commits
https://github.com/sopyb 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] [Clang][CodeGen] Fix `CanSkipVTablePointerInitialization` for dynamic classes with a trivial anonymous union (PR #84651)

2024-04-01 Thread Max Winkler via cfe-commits
@@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -emit-llvm -o - | FileCheck %s MaxEW707 wrote: Fair point since they are both Itanium ABI. I'll remove the lin

[clang] [Clang][CodeGen] Fix `CanSkipVTablePointerInitialization` for dynamic classes with a trivial anonymous union (PR #84651)

2024-04-01 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 updated https://github.com/llvm/llvm-project/pull/84651 >From 28cbaad3c16e985306c7b977cb7d9e8e89c39a07 Mon Sep 17 00:00:00 2001 From: MaxEW707 <82551778+maxew...@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:40:52 -0500 Subject: [PATCH 1/2] Fix `CanSkipVTablePoin

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

2024-04-01 Thread via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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-04-01 Thread via cfe-commits
@@ -0,0 +1,278 @@ +//===--- 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] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-04-01 Thread Shafik Yaghmour via cfe-commits
@@ -3899,6 +3899,9 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, SemaRef.Diag(OwnedTagDecl->getLocation(), DiagID) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); D.setInvalidType(true); + OwnedTagDecl->setCompleteDefi

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

2024-04-01 Thread Shafik Yaghmour via cfe-commits
@@ -3899,6 +3899,9 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, SemaRef.Diag(OwnedTagDecl->getLocation(), DiagID) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); D.setInvalidType(true); + OwnedTagDecl->setCompleteDefi

[clang] [InstallAPI] Fixup dsym test (PR #87299)

2024-04-01 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/87299 Update the test to run when the compiler is built to support arm64-darwin targets. >From fc2b73a261a0eddb19d49fcbbf301ec40a1d5ed2 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 1 Apr 2024 18:09:27 -

[clang] [InstallAPI] Fixup dsym test (PR #87299)

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes Update the test to run when the compiler is built to support arm64-darwin targets. --- Full diff: https://github.com/llvm/llvm-project/pull/87299.diff 1 Files Affected: - (modified) clang/test/Install

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

2024-04-01 Thread Qizhi Hu via cfe-commits
@@ -3899,6 +3899,9 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, SemaRef.Diag(OwnedTagDecl->getLocation(), DiagID) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); D.setInvalidType(true); + OwnedTagDecl->setCompleteDefi

[clang] [Clang][Sema] Skip checking anonymous enum in using enum declaration (PR #87144)

2024-04-01 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: LGTM after addressing Aaron's comments. Can you elaborate more on the details of the bug in the summary. This goes into the git log and we want folks to be able to understand the problem well from the summary w/o having to do additional checks. Thank you

[clang] [InstallAPI] Fixup dsym test (PR #87299)

2024-04-01 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/87299 >From fc2b73a261a0eddb19d49fcbbf301ec40a1d5ed2 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 1 Apr 2024 18:09:27 -0700 Subject: [PATCH] [InstallAPI] Fixup dsym test to actually run when compiler is

[clang] 30fd099 - [InstallAPI] Fixup dsym test (#87299)

2024-04-01 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-04-01T18:30:23-07:00 New Revision: 30fd099d5062638b5fe6b89135ad6433a888023a URL: https://github.com/llvm/llvm-project/commit/30fd099d5062638b5fe6b89135ad6433a888023a DIFF: https://github.com/llvm/llvm-project/commit/30fd099d5062638b5fe6b89135ad6433a888023a.diff

[clang] [InstallAPI] Fixup dsym test (PR #87299)

2024-04-01 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/87299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [asan][windows] Eliminate the static asan runtime on windows (PR #81677)

2024-04-01 Thread Charlie Barto via cfe-commits
barcharcraz wrote: @rnk @vitalybuka This should be ready for a more in-depth review (I'll stop force-pushing) The remaining commits here all depend on each-other in some way. Splitting off any more commits would mean introducing bugs into main until other parts of this are merged. https://

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

2024-04-01 Thread Qizhi Hu via cfe-commits
@@ -3899,6 +3899,9 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, SemaRef.Diag(OwnedTagDecl->getLocation(), DiagID) << SemaRef.Context.getTypeDeclType(OwnedTagDecl); D.setInvalidType(true); + OwnedTagDecl->setCompleteDefi

[clang] 21f85e2 - [NFC] [C++20] [Modules] Pulling out getCXX20NamedModuleOutputPath into a seperate function

2024-04-01 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-02T09:58:59+08:00 New Revision: 21f85e230056172cffcaec76352e5a2019b54b86 URL: https://github.com/llvm/llvm-project/commit/21f85e230056172cffcaec76352e5a2019b54b86 DIFF: https://github.com/llvm/llvm-project/commit/21f85e230056172cffcaec76352e5a2019b54b86.diff LO

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

2024-04-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From 79706501a7a3f0f2e0e9c9411bdd5e00e34ae175 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH 1/3] [C++20] [Modules] Introduce -fgen-reduced-bmi --- clang/inc

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

2024-04-01 Thread Chuanqi Xu via cfe-commits
@@ -193,6 +193,20 @@ DwarfFissionKind getDebugFissionKind(const Driver &D, const llvm::opt::ArgList &Args, llvm::opt::Arg *&Arg); +// Calculate the output path of the module file when compiling a module

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

2024-04-01 Thread Chuanqi Xu via cfe-commits
@@ -3017,6 +3017,7 @@ defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules", def fmodule_output_EQ : Joined<["-"], "fmodule-output=">, Flags<[NoXarchOption]>, Visibility<[ClangOption, CC1Option]>, + MarshallingInfoString>, ChuanqiXu9 wro

[clang] MIPS/Clang: Set HasUnalignedAccess false if +strict-align (PR #87257)

2024-04-01 Thread YunQiang Su via cfe-commits
@@ -330,6 +331,8 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public TargetInfo { IsMicromips = true; else if (Feature == "+mips32r6" || Feature == "+mips64r6") HasUnalignedAccess = true; + else if (Feature == "+strict-align") +StrictAli

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/75912 >From 7399d2417a4b758fa0a98da1f99f3b4ec0eb1046 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 19 Dec 2023 17:00:59 +0800 Subject: [PATCH 1/3] [C++20] [Modules] [Itanium ABI] Generate the vtable in the m

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-01 Thread Chuanqi Xu via cfe-commits
@@ -1483,10 +1483,15 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { if (D->isThisDeclarationADefinition()) Record.AddCXXDefinitionData(D); - // Store (what we currently believe to be) the key function to avoid - // deserializing every method so we can c

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-01 Thread Chuanqi Xu via cfe-commits
@@ -41,9 +43,10 @@ Base::~Base() {} // CHECK: @_ZTSW3Mod4Base = constant // CHECK: @_ZTIW3Mod4Base = constant -// CHECK-INLINE: @_ZTVW3Mod4Base = linkonce_odr {{.*}}unnamed_addr constant -// CHECK-INLINE: @_ZTSW3Mod4Base = linkonce_odr {{.*}}constant -// CHECK-INLINE: @_ZTIW3M

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

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

[clang] [clang]Treat arguments to builtin type traits as template type arguments (PR #87132)

2024-04-01 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: LGTM but I want @fahadnayyar to verify this addresses his concerns. https://github.com/llvm/llvm-project/pull/87132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

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

2024-04-01 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-04-01 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl ready_for_review 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] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-04-01 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: FWIW, for OpenMP we only need to support the [[]] spelling in C++. The fact we had everything else was a side-effect of the implementation, IIRC. Thus, this should be fine for OpenMP. https://github.com/llvm/llvm-project/pull/84934 _

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

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Farzon Lotfi (farzonl) Changes Start of #83882 - `Builtins.td` - add the `hlsl` `all` elementwise builtin. - `CGBuiltin.cpp` - Show a use case for CGHLSLUtils via an `all` intrinsic codegen. - `CGHLSLRuntime.cpp` - move `thread_id` to use

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

2024-04-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx @llvm/pr-subscribers-hlsl Author: Farzon Lotfi (farzonl) Changes Start of #83882 - `Builtins.td` - add the `hlsl` `all` elementwise builtin. - `CGBuiltin.cpp` - Show a use case for CGHLSLUtils via an `all` intrinsic codegen. - `CGHLSLRun

[clang] [llvm] [HLSL][DXIL][SPIRV] Implementation of an abstraction for intrinsic selection of HLSL backends (PR #87171)

2024-04-01 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] [X86_32] Teach X86_32 va_arg to ignore empty structs. (PR #86075)

2024-04-01 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker updated https://github.com/llvm/llvm-project/pull/86075 >From 929fba43012209b74b654b8d9a017a43826063fe 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 str

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

2024-04-01 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker updated https://github.com/llvm/llvm-project/pull/86075 >From a4d9a6fefdbe7c0ee6a891af230438a10ddd7c5a 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 str

<    1   2   3   4   >