[clang] [llvm] [InstCombiner] Remove trivially dead `llvm.allow.{runtime,ubsan}.check()` (PR #84851)

2024-03-31 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/84851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/7] [clangd] Support go-to-definition on type hints. The core

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/6] [clangd] Support go-to-definition on type hints. The core

[clang-tools-extra] a21e0ba - [clang-tidy] Fix buffer overflow in compareHeaders (#87213)

2024-03-31 Thread via cfe-commits
Author: Vitaly Buka Date: 2024-03-31T21:24:05-07:00 New Revision: a21e0ba192147af4968742785f375dba0e3ea768 URL: https://github.com/llvm/llvm-project/commit/a21e0ba192147af4968742785f375dba0e3ea768 DIFF: https://github.com/llvm/llvm-project/commit/a21e0ba192147af4968742785f375dba0e3ea768.diff

[clang-tools-extra] [clang-tidy] Fix buffer overflow in compareHeaders (PR #87213)

2024-03-31 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/87213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: @@ -0,0 +1,99 @@ +// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only %s +// expected-no-diagnostics + +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(),

[clang] [clang-cl] Allow a colon after /Fo option (PR #87209)

2024-03-31 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @rnk for review. LGTM! >From experience with msvc the docs are very much outdated. For example almost >all path options accept the `:` form. For example `/Fd:` is valid even though the msdn docs do not state that.

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(),

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(),

[clang] [Modules] No transitive source location change (PR #86912)

2024-03-31 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > If Clang is configured with 64 bit `SourceLocation`, we can't use 96 bits > > for serialization. We can at most use 64 bits for a slot. In that case, we > > can only assume the offset of source location **in its own module** (not > > the global offset!) is not large than

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(),

[clang-tools-extra] [clang-tidy] Fix buffer overflow in compareHeaders (PR #87213)

2024-03-31 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/87213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix buffer overflow in compareHeaders (PR #87213)

2024-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Vitaly Buka (vitalybuka) Changes `RHS` can be shorter than `LHS`. Reported by asan after #83440. --- Full diff: https://github.com/llvm/llvm-project/pull/87213.diff 1 Files Affected: - (modified)

[clang-tools-extra] [clang-tidy] Fix buffer overflow in compareHeaders (PR #87213)

2024-03-31 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/87213 `RHS` can be shorter than `LHS`. Reported by asan after #83440. >From a6d57814761cb74de98b40a4cc3acdd9b262e854 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Sun, 31 Mar 2024 18:42:25 -0700 Subject:

[clang] [coroutine] Fix type of an ImplicitParamDecl used in generateAwaitSuspendWrapper (PR #87134)

2024-03-31 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: The change itself looks good to me. It will be better if we can have a reduced test case. https://github.com/llvm/llvm-project/pull/87134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Coroutines: Properly Check if `await_suspend` return type is a `std::coroutine_handle` (PR #85684)

2024-03-31 Thread Chuanqi Xu via cfe-commits
@@ -418,39 +448,60 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema , VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); - CallExpr *AwaitSuspend = cast_or_null( - BuildSubExpr(ACT::ACT_Suspend, "await_suspend", CoroHandle));

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

2024-03-31 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/84651 ___ 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-03-31 Thread Max Winkler via cfe-commits
MaxEW707 wrote: @AaronBallman @efriedma-quic Pinging you two for a review. Looking through the history of `CGClass.cpp` you guys appear to be the common reviewers and the CodeOwners file didn't have any information for who owns `CodeGen`. Feel free to add anyone who may be a better fit.

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-03-31 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Related issue: https://github.com/clangd/clangd/issues/1774 https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-31 Thread Jun Wang via cfe-commits
@@ -0,0 +1,1413 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -mattr=+precise-memory < %s | FileCheck %s -check-prefixes=GFX9 +; RUN: llc -mtriple=amdgcn -mcpu=gfx90a

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

2024-03-31 Thread Jun Wang via cfe-commits
@@ -0,0 +1,1413 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -mattr=+precise-memory < %s | FileCheck %s -check-prefixes=GFX9 +; RUN: llc -mtriple=amdgcn -mcpu=gfx90a

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Vadim D. (vvd170501) Changes This PR adds a new `AnalyzeSystemHeaders` option to `Includes` section of clangd config. This option will allow to mark all system headers, not just the ones from standard library, as unused. Why this

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-03-31 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 ready_for_review https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-03-31 Thread Vadim D. via cfe-commits
@@ -62,15 +64,6 @@ issueIncludeCleanerDiagnostics(ParsedAST , llvm::StringRef Code, const ThreadsafeFS , HeaderFilter IgnoreHeader = {}); -/// Affects whether standard library includes should be considered for

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-03-31 Thread Vadim D. via cfe-commits
@@ -62,15 +64,6 @@ issueIncludeCleanerDiagnostics(ParsedAST , llvm::StringRef Code, const ThreadsafeFS , HeaderFilter IgnoreHeader = {}); -/// Affects whether standard library includes should be considered for

[clang] [clang-cl] Allow a colon after /Fo option (PR #87209)

2024-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Russell Greene (russelltg) Changes Modeled after https://github.com/llvm/llvm-project/commit/8513a681f7d8d1188706762e712168aebc3119dd# According to https://learn.microsoft.com/en-us/cpp/build/reference/fo-object-file-name?view=msvc-170,

[clang] [clang-cl] Allow a colon after /Fo option (PR #87209)

2024-03-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Russell Greene (russelltg) Changes Modeled after https://github.com/llvm/llvm-project/commit/8513a681f7d8d1188706762e712168aebc3119dd# According to

[clang] [clang-cl] Allow a colon after /Fo option (PR #87209)

2024-03-31 Thread Russell Greene via cfe-commits
https://github.com/russelltg created https://github.com/llvm/llvm-project/pull/87209 Modeled after https://github.com/llvm/llvm-project/commit/8513a681f7d8d1188706762e712168aebc3119dd# According to https://learn.microsoft.com/en-us/cpp/build/reference/fo-object-file-name?view=msvc-170,

[clang-tools-extra] [clangd] Add config option to allow detection of unused system headers (PR #87208)

2024-03-31 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 edited https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add config option to detect unused system headers (PR #87208)

2024-03-31 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 edited https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add config option to analyze unused system headers (PR #87208)

2024-03-31 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/87208 >From 35db92dfd0c2b43fc7afde5b093598763c4b8c89 Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Mon, 1 Apr 2024 02:26:14 +0300 Subject: [PATCH] Add config option to analyze unused system headers ---

[clang-tools-extra] [clangd] Add config option to analyze unused system headers (PR #87208)

2024-03-31 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/87208 >From 3e29095dbc2240b7a61d8d261224501a85753e7d Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Mon, 1 Apr 2024 02:26:14 +0300 Subject: [PATCH] Add config option to analyze unused system headers ---

[clang-tools-extra] [clangd] Add config option to analyze unused system headers (PR #87208)

2024-03-31 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 edited https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add config option to analyze unused system headers (PR #87208)

2024-03-31 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 82c6eeed08b1c8267f6e92d594c910fe57a9775e f222e44f5586297ddd61ac0efff4a7115a766c53 --

[clang-tools-extra] [clangd] Add config option to analyze unused system headers (PR #87208)

2024-03-31 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM

[clang-tools-extra] [clangd] Add config option to analyze unused system headers (PR #87208)

2024-03-31 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 edited https://github.com/llvm/llvm-project/pull/87208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add config option to analyze unused system headers (PR #87208)

2024-03-31 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 created https://github.com/llvm/llvm-project/pull/87208 This PR adds a new `AnalyzeSystemHeaders` option to `Includes` section of clangd config. This option will allow to mark all system headers, not just the ones from standard library, as unused. Why this change

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

2024-03-31 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] [codegen] Emit missing cleanups for stmt-expr and coro suspensions [take-2] (PR #85398)

2024-03-31 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Thanks @efriedma-quic . I was not aware that we have such edges in Codegen which could help in deleting these instructions transitively. Switched to capturing only auxillary `allocas` and deleting all transitive uses. PTAL. https://github.com/llvm/llvm-project/pull/85398

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

2024-03-31 Thread Utkarsh Saxena via cfe-commits
@@ -2503,6 +2506,29 @@ Stmt *BlockExpr::getBody() { // Generic Expression Routines //===--===// +bool Expr::mayBranchOut() const { usx95 wrote: This is now no more needed. We switched to

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

2024-03-31 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/85398 >From 0654f624b3b60026398e8b0168623a85e3129630 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 15 Mar 2024 13:19:36 + Subject: [PATCH 1/8] [codegen] Emit cleanups for branch in stmt-expr and coro

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

2024-03-31 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-31 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,252 @@ +//===--- 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-31 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,252 @@ +//===--- 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-31 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,252 @@ +//===--- 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-31 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Overal looks fine. Try spliting bigger parts of code int some lambdas or functions, so it could be more readable, consider adding some 1 line comments specially when fixes are created to point out what those insertions/replacement/deletions are. Check

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

2024-03-31 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,252 @@ +//===--- 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-31 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,252 @@ +//===--- 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-31 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,252 @@ +//===--- 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-31 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,252 @@ +//===--- 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-31 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,252 @@ +//===--- 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-31 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,252 @@ +//===--- 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-31 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-31 Thread via cfe-commits
sopyb wrote: Please let me know if I should rebase and squash the commits down into a single commit. https://github.com/llvm/llvm-project/pull/85572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-03-31 Thread via cfe-commits
sopyb wrote: I am really sorry for the absolute dumpster fire that this PR has been. I had a hard time getting adjusted to the project structure. I genuinely appreciate the feedback and help provided. This was maybe the first time I ever coded in C++ outside small university projects. I'm

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: https://github.com/Destroyerrrocket updated https://github.com/llvm/llvm-project/pull/76615 >From 7447038a5006ff5fe5fdeead865287930843d8f0 Mon Sep 17 00:00:00 2001 From:

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: Destroyerrrocket wrote: I'll rebase when I have more time, around next week (I know that ideally you'd prefer to see it already rebased)

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(),

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: Destroyerrrocket wrote: Whenever you have a change, I think this is ready for a second pass. Sorry for the delay! ^-^ If I missed something, do let me know

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: https://github.com/Destroyerrrocket updated https://github.com/llvm/llvm-project/pull/76615 >From cba67a73ea1e59eb8eeb4e702d77f329028f4c22 Mon Sep 17 00:00:00 2001

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/5] [clangd] Support go-to-definition on type hints. The core

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/4] [clangd] Support go-to-definition on type hints. The core

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/4] [clangd] Support go-to-definition on type hints. The core

[clang-tools-extra] 11a411a - Revert "[clang-tidy][NFC] Remove duplicated code"

2024-03-31 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2024-03-31T15:06:49Z New Revision: 11a411a49b62c129bba551df4587dd446fcdc660 URL: https://github.com/llvm/llvm-project/commit/11a411a49b62c129bba551df4587dd446fcdc660 DIFF: https://github.com/llvm/llvm-project/commit/11a411a49b62c129bba551df4587dd446fcdc660.diff LOG:

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

[clang-tools-extra] b6f6be4 - [clang-tidy][NFC] Remove duplicated code

2024-03-31 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2024-03-31T14:58:27Z New Revision: b6f6be4b500ff64c23a5103ac3311cb74519542f URL: https://github.com/llvm/llvm-project/commit/b6f6be4b500ff64c23a5103ac3311cb74519542f DIFF: https://github.com/llvm/llvm-project/commit/b6f6be4b500ff64c23a5103ac3311cb74519542f.diff LOG:

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: https://github.com/Destroyerrrocket edited https://github.com/llvm/llvm-project/pull/76615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: https://github.com/Destroyerrrocket edited https://github.com/llvm/llvm-project/pull/76615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/86629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

[clang-tools-extra] [clangd] Support go-to-definition on type hints. The core part (PR #86629)

2024-03-31 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86629 >From b8a69cbd9e0ee0aa35b38b7e3a78048cbe61447e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 16 Mar 2024 23:30:10 +0800 Subject: [PATCH 1/3] [clangd] Support go-to-definition on type hints. The core

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sard=C3=A0?= , Pol Marcet =?utf-8?q?Sard=C3=A0?= ,Pol M Message-ID: In-Reply-To: @@ -0,0 +1,99 @@ +// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only %s +// expected-no-diagnostics + +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -0,0 +1,99 @@ +// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only %s +// expected-no-diagnostics + +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ Destroyerrrocket

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-31 Thread Pol M via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= ,Pol M Message-ID: In-Reply-To: @@ -10895,6 +10899,132 @@ bool VectorExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) { return Success(APValue(ResultElements.data(), ResultElements.size()), E); }

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

2024-03-31 Thread Congcong Cai 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] [llvm] [HLSL][DXIL][SPIRV] Intrinsic unification PR (PR #87171)

2024-03-31 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-31 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] [clang][FMV] Direct-call FMV callees from FMV callers (PR #80093)

2024-03-31 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: @erichkeane while I agree that Clang might not be the best place for such an optimization, I have some concerns about implementing it in LLVM: * We cannot distinguish a FMV resolver from any other ifunc resolver. * There is no information at the LLVM IR level about function

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

2024-03-31 Thread 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-31 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/8] [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-31 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/7] [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-31 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-31 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-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-31 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-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-03-31 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] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-03-31 Thread Jonathan Wakely via cfe-commits
jwakely wrote: As I've just commented at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114479 the `__is_array` intrinsic exists to optimize `std::is_array` and so should match its existing behaviour. If you want to change the behaviour of `std::is_array` then please do so via an LWG issue,

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

2024-03-31 Thread Jonathan Wakely via cfe-commits
jwakely wrote: > We don't use the trait currently in libc++ because of this bug and GCC only > added it in trunk (and have the same bug), so probably not. N.B. MSVC used to have the same bug as well, and it affected their `std::is_array` because MSVC auto-replaces `std::is_array::value` with

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2024-03-31 Thread Karl-Johan Karlsson via cfe-commits
https://github.com/karka228 closed https://github.com/llvm/llvm-project/pull/74440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ea92b1f - [Sema] Implement support for -Wformat-signedness (#74440)

2024-03-31 Thread via cfe-commits
Author: Karl-Johan Karlsson Date: 2024-03-31T11:09:52+02:00 New Revision: ea92b1f9d0fc31f1fd97ad04eb0412003a37cb0d URL: https://github.com/llvm/llvm-project/commit/ea92b1f9d0fc31f1fd97ad04eb0412003a37cb0d DIFF:

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2024-03-31 Thread Karl-Johan Karlsson via cfe-commits
https://github.com/karka228 updated https://github.com/llvm/llvm-project/pull/74440 >From 1dd6c32ee8e053c900e23f37d50f8c3f4868858a Mon Sep 17 00:00:00 2001 From: Karl-Johan Karlsson Date: Tue, 5 Dec 2023 10:03:00 +0100 Subject: [PATCH 01/10] [Sema] Implement support for -Wformat-signedness In

  1   2   >