[clang] [llvm] Reapply "Reland "[HLSL] Implement the `reflect` HLSL function"" (#124046) (PR #128386)

2025-02-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/128386 This reverts commit 0fe8e70c6609ff86cd40fbb45a85a8ed04c153c2. >From 37bc44832ab10781b467c9b4a9e62af594305534 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Sat, 22 Feb 2025 17:38:18 -0800 Subject: [PATCH] =

[clang] [llvm] Reapply "Reland "[HLSL] Implement the `reflect` HLSL function"" (#124046) (PR #128386)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang Author: Vitaly Buka (vitalybuka) Changes This reverts commit 0fe8e70c6609ff86cd40fbb45a85a8ed04c153c2. --- Patch is 30.02 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/12838

[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-22 Thread Vitaly Buka via cfe-commits
@@ -1,6 +1,5 @@ -; RUN: not llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o /dev/null 2>&1 | FileCheck %s -; RUN: not llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o /dev/null 2>&1 | FileCheck %s -; UNSUPPORTED: hwasan +; RUN: not llc -v

[clang] [llvm] Reapply "Reland "[HLSL] Implement the `reflect` HLSL function"" (#124046) (PR #128386)

2025-02-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka converted_to_draft https://github.com/llvm/llvm-project/pull/128386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. LGTM regarding previous HWASAN crash, which is gone https://github.com/llvm/llvm-project/pull/125599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I take a look briefly about `HeuristicResolver`, it looks like not related to > other Sema parts. Is it possible to move the whole `HeuristicResolver` out of > `Sema` lib to `AST`? In future enhancements to `HeuristicResolver`, I would like to implement optional heuris

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: David Rivera (RiverDave) Changes This PR aims to fix `performance-move-const-arg` #126515 ## Changes Enhanced the `performance-move-arg` check in Clang-Tidy to detect cases where std::move is used in **ternary expressions whi

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-22 Thread David Rivera via cfe-commits
https://github.com/RiverDave created https://github.com/llvm/llvm-project/pull/128402 This PR aims to fix `performance-move-const-arg` #126515 ## Changes Enhanced the `performance-move-arg` check in Clang-Tidy to detect cases where std::move is used in **ternary expressions which was not bein

[clang-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-22 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-tools-extra] [clang-tidy] Fix performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-22 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/128402 ___ 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 performance-move-const-arg false negative in ternary… (PR #128402)

2025-02-22 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/128402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [polly] [DAG] shouldReduceLoadWidth - hasOneUse should check just the loaded value - not the chain (PR #128167)

2025-02-22 Thread Craig Topper via cfe-commits
@@ -1817,7 +1817,7 @@ class TargetLoweringBase { EVT NewVT) const { topperc wrote: Why not move this definition to TargetLowering.cpp? inlining the body of a virtual function is kind of silly. https://github.com/llvm/llvm-p

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-22 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/128265 >From c13cf10fe9f63c4fa361985388ab1ab6c7e55514 Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Mon, 17 Feb 2025 22:50:49 +0100 Subject: [PATCH 1/5] add new check --

[clang-tools-extra] [clang-tidy]improve performance-unnecessary-value-param performance (PR #128383)

2025-02-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/128383 Tolerate fix-it breaking compilation when functions is used as pointers. `isReferencedOutsideOfCallExpr` will visit the whole translate unit for each matched function decls. It will waste lots of cpu time in

[clang-tools-extra] [clang-tidy]improve performance-unnecessary-value-param performance (PR #128383)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes Tolerate fix-it breaking compilation when functions is used as pointers. `isReferencedOutsideOfCallExpr` will visit the whole translate unit for each matched function decls. It will waste lots

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Note: this is the last remaining use of > `CXXRecordDecl::lookupDependentName()`. I plan to remove it in a follow-up > patch. The follow-up patch is https://github.com/llvm/llvm-project/pull/128392. https://github.com/llvm/llvm-project/pull/128391 _

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/128391 The use replaces CXXRecordDecl::lookupDependentName() which HeuristicResolver aims to supersede. >From b44bc0bb4772ff503c8d93430331606d2f2356e3 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sat, 22

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Ridge (HighCommander4) Changes The use replaces CXXRecordDecl::lookupDependentName() which HeuristicResolver aims to supersede. --- Full diff: https://github.com/llvm/llvm-project/pull/128391.diff 4 Files Affected: - (modified)

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Note: this is the last remaining use of `CXXRecordDecl::lookupDependentName()`. I plan to remove it in a follow-up patch. https://github.com/llvm/llvm-project/pull/128391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang-offload-packager] Avoid repeated hash lookups (NFC) (PR #128297)

2025-02-22 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/128297 ___ 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 bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-02-22 Thread Baranov Victor via cfe-commits
vbvictor wrote: @PiotrZSL, @denzor200 I think we should provide 100% valid fix-its for default `SmartPointers`. That will be `std::shared_ptr`, `std::unique_ptr`, `boost::shared_ptr`. I created a note in docs that warns users about inconvenience that can happen when non-default smart pointers

[clang] [FatLTO] Detect LLD linker more reliably (PR #128285)

2025-02-22 Thread Vincent Lee via cfe-commits
@@ -862,13 +862,12 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, const llvm::Triple &Triple = ToolChain.getTriple(); thevinster wrote: I can restore the original behavior on the linker path plus the additional check on -fuse-l

[clang] [llvm] [CMake] Fix some breakages when using ninja multi config (PR #65451)

2025-02-22 Thread via cfe-commits
https://github.com/ur4t updated https://github.com/llvm/llvm-project/pull/65451 >From 1555d9e1af70b87885e2ae060bf7215f12cbdf89 Mon Sep 17 00:00:00 2001 From: ur4t Date: Sat, 22 Feb 2025 17:34:22 +0800 Subject: [PATCH 1/2] [llvm][CMake] Fix llvm shared library when using ninja multi config ---

[clang] [llvm] [CMake] Fix some breakages when using ninja multi config (PR #65451)

2025-02-22 Thread via cfe-commits
ur4t wrote: @MaskRay I have unselected the hidden email feature and updated the branch. Is it necessary to reset email of my old commits? https://github.com/llvm/llvm-project/pull/65451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [X86] Allow using the lzcnt intrinsics for non-LZCNT targets (PR #128284)

2025-02-22 Thread Simon Pilgrim via cfe-commits
@@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -x c -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +lzcnt -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -x c++ -std=c++11 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +lzcnt -emit-llvm -o - | FileCheck %s

[clang] bac4171 - Remove xbegin and _xend (#126952)

2025-02-22 Thread via cfe-commits
Author: Devon Loehr Date: 2025-02-22T16:46:08+08:00 New Revision: bac4171073399352e5bd0ba541820e2a9b3f37d7 URL: https://github.com/llvm/llvm-project/commit/bac4171073399352e5bd0ba541820e2a9b3f37d7 DIFF: https://github.com/llvm/llvm-project/commit/bac4171073399352e5bd0ba541820e2a9b3f37d7.diff L

[clang] [analyzer] Refine TimeTrace name for dispatchWorkItem (PR #128352)

2025-02-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/128352 Fixes https://github.com/llvm/llvm-project/pull/125508#discussion_r1965038954 >From ff647449a2eb0c5ac4930e86e53c02a04ac78ec3 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sat, 22 Feb 2025 12:40:31 +0100 S

[clang] [analyzer] Refine TimeTrace name for dispatchWorkItem (PR #128352)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Fixes https://github.com/llvm/llvm-project/pull/125508#discussion_r1965038954 --- Full diff: https://github.com/llvm/llvm-project/pull/128352.diff 2 Files Affected: - (modified) clang/l

[clang] [analyzer] Refine TimeTrace name for dispatchWorkItem (PR #128352)

2025-02-22 Thread Balazs Benics via cfe-commits
steakhal wrote: @necto https://github.com/llvm/llvm-project/pull/128352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

2025-02-22 Thread Matt Arsenault via cfe-commits
@@ -14,6 +14,12 @@ #include "hip/hip_version.h" #endif // __has_include("hip/hip_version.h") +#ifdef __SPIRV__ +#define __PRIVATE_AS __attribute__((address_space(0))) arsenm wrote: Using opencl_private is the simpler fix. You are calling code declared and de

[clang-tools-extra] [clang-tidy][NFC][docs] Use single tick for 'false' and 'true' values in options (PR #128362)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Baranov Victor (vbvictor) Changes Unify doc style for options that use `true` or `false` as default values. --- Full diff: https://github.com/llvm/llvm-project/pull/128362.diff 3 Files Affected: - (modified) clang-tools-ext

[clang-tools-extra] [clang-tidy][NFC][docs] Use single tick for 'false' and 'true' values in options (PR #128362)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Baranov Victor (vbvictor) Changes Unify doc style for options that use `true` or `false` as default values. --- Full diff: https://github.com/llvm/llvm-project/pull/128362.diff 3 Files Affected: - (modified) clang-tools-extra/docs

[clang-tools-extra] [clang-tidy][NFC][docs] Use single tick for 'false' and 'true' values in options (PR #128362)

2025-02-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/128362 Unify doc style for options that use `true` or `false` as default values. >From 41807b8f379a19714fb89b2f13bc3af389c44ac0 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 22 Feb 2025 17:26:52 +0300 Subj

[clang-tools-extra] [clang-tidy][NFC][docs] Use single tick for 'false' and 'true' values in options (PR #128362)

2025-02-22 Thread Baranov Victor via cfe-commits
vbvictor wrote: @EugeneZelenko @HerrCai0907, Small change to docs of some checks. https://github.com/llvm/llvm-project/pull/128362 ___ 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-use-numeric-limits` (PR #127430)

2025-02-22 Thread Katherine Whitlock via cfe-commits
@@ -0,0 +1,84 @@ +// RUN: %check_clang_tidy %s readability-use-numeric-limits %t +#include + +void constants() { + // CHECK-MESSAGES: :[[@LINE+2]]:14: warning: The constant -128 is being utilized. Consider using std::numeric_limits::min() instead [readability-use-numeric-limit

[clang-tools-extra] [clang-tidy][NFC][docs] Use single tick for 'false' and 'true' values in options (PR #128362)

2025-02-22 Thread via cfe-commits
https://github.com/EugeneZelenko approved this pull request. https://github.com/llvm/llvm-project/pull/128362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [emacs] Check for a 'buffer' type instead of 'buffer-live' (PR #128385)

2025-02-22 Thread Roi Martin via cfe-commits
https://github.com/jroimartin created https://github.com/llvm/llvm-project/pull/128385 This is a follow-up to commit f69110dcc973 ("Check for a 'buffer' type instead of 'buffer-live'."). In Emacs 29, 'buffer-live' is no longer recognized as a type and generates a compilation warning. Every f

[clang] Add clang atomic control options and attribute (PR #114841)

2025-02-22 Thread Yaxun Liu via cfe-commits
@@ -1101,6 +1107,187 @@ inline void FPOptions::applyChanges(FPOptionsOverride FPO) { *this = FPO.applyOverrides(*this); } +// The three atomic code-generation options. +// The canonical (positive) names are: +// "remote_memory", "fine_grained_memory", and "ignore_denormal

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM as temporary solution But clang-tidy actually do not want to reply on `Sema`. I take a look briefly about `HeuristicResolver`, it looks like not related to other Sema parts. Is it possible to move the whole `HeuristicResolver` out

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-22 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/128265 >From c13cf10fe9f63c4fa361985388ab1ab6c7e55514 Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Mon, 17 Feb 2025 22:50:49 +0100 Subject: [PATCH 1/5] add new check --

[clang] [analyzer] Fix use after scope after #123003 (PR #128372)

2025-02-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-win` running on `avx512-intel64-win` while building `clang` at step 6 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/81/builds/5023 Here is the relevant pi

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-22 Thread Fangyi Zhou via cfe-commits
@@ -867,18 +868,18 @@ ProgramStateRef createContainerBegin(ProgramStateRef State, return setContainerData(State, Cont, CData); } -ProgramStateRef createContainerEnd(ProgramStateRef State, const MemRegion *Cont, - const Expr *E, QualType T,

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-22 Thread Fangyi Zhou via cfe-commits
@@ -844,7 +845,7 @@ SymbolRef getContainerEnd(ProgramStateRef State, const MemRegion *Cont) { return CDataPtr->getEnd(); } -ProgramStateRef createContainerBegin(ProgramStateRef State, +ProgramStateRef createContainerBegin(CheckerContext &C, ProgramStateRef State,

[clang] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (PR #127554)

2025-02-22 Thread Ryosuke Niwa via cfe-commits
@@ -3668,6 +3668,12 @@ Here are some examples of situations that we warn about as they *might* be poten RefCountable* uncounted = counted.get(); // warn } +alpha.webkit.UnretainedLocalVarsChecker +""" +The goal of this rule is to

[clang-tools-extra] [emacs] Check for a 'buffer' type instead of 'buffer-live' (PR #128385)

2025-02-22 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] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (PR #127554)

2025-02-22 Thread Ryosuke Niwa via cfe-commits
@@ -332,6 +345,14 @@ class UncheckedCallArgsChecker final : public RawPtrRefCallArgsChecker { return isUncheckedPtr(QT); } + bool isSafePtr(const CXXRecordDecl *Record) const final { +return isRefCounted(Record) || isCheckedPtr(Record); + } + + bool isSafePtrType

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-22 Thread Fangyi Zhou via cfe-commits
@@ -111,8 +111,13 @@ class SValExplainer : public FullSValVisitor { } std::string VisitSymbolConjured(const SymbolConjured *S) { -return "symbol of type '" + S->getType().getAsString() + - "' conjured at statement '" + printStmt(S->getStmt()) + "'"; +std

[clang-tools-extra] [emacs] Check for a 'buffer' type instead of 'buffer-live' (PR #128385)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Roi Martin (jroimartin) Changes This is a follow-up to commit f69110dcc973 ("Check for a 'buffer' type instead of 'buffer-live'."). In Emacs 29, 'buffer-live' is no longer recognized as a type and generates a compilation warn

[clang-tools-extra] [clang-tidy][NFC][docs] Use single tick for 'false' and 'true' values in options (PR #128362)

2025-02-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/128362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-22 Thread Deric Cheung via cfe-commits
Icohedron wrote: > LGTM regarding previous HWASAN crash, which is gone Thank you for fixing the issue! I will revert the patches then. https://github.com/llvm/llvm-project/pull/125599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [FatLTO] Detect LLD linker more reliably (PR #128285)

2025-02-22 Thread Vincent Lee via cfe-commits
https://github.com/thevinster updated https://github.com/llvm/llvm-project/pull/128285 >From b8d961acfa2bf17486d63de9481ff46445d6b38f Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Fri, 21 Feb 2025 20:33:25 -0800 Subject: [PATCH 1/3] [FatLTO] Detect LLD linker more reliably --- clang/lib/Dr

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-22 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %check_clang_tidy -std=c99 %s bugprone-true-macro %t +// RUN: %check_clang_tidy -std=c11 %s bugprone-true-macro %t +// RUN: %check_clang_tidy -std=c17 %s bugprone-true-macro %t steakhal wrote: I think you should have a RUN line for a cas

[clang-tools-extra] [clang-tidy][NFC][docs] Use single tick for 'false' and 'true' values in options (PR #128362)

2025-02-22 Thread Baranov Victor via cfe-commits
vbvictor wrote: Thanks for fast approval! @HerrCai0907, Could you merge, please. https://github.com/llvm/llvm-project/pull/128362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] fix fp when modifying variant by ``operator[]`` with template in parameters (PR #128407)

2025-02-22 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/128407 `ArraySubscriptExpr` can switch base and idx. For dependent array subscript access, we should check both base and idx conservatively. >From ff265c9f01d68b8657d217ba4ea62b77a5775bb5 Mon Sep 17 00:00:00 2001

[clang] [clang-tools-extra] [clang-tidy] fix fp when modifying variant by ``operator[]`` with template in parameters (PR #128407)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes `ArraySubscriptExpr` can switch base and idx. For dependent array subscript access, we should check both base and idx conservatively. --- Full diff: https://github.com/llvm/llvm-project/pull/128407.

[clang] [clang][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

2025-02-22 Thread Matt Arsenault via cfe-commits
@@ -14,6 +14,12 @@ #include "hip/hip_version.h" #endif // __has_include("hip/hip_version.h") +#ifdef __SPIRV__ +#define __PRIVATE_AS __attribute__((address_space(0))) arsenm wrote: Never use numbered address spaces. Unconditionally use __attribute__((opencl_

[clang] [clang-format] Add the C language instead of treating it like C++ (PR #128287)

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

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-22 Thread David Olsen via cfe-commits
dkolsen-pgi wrote: I like the idea of changing the assembly format for function types from `!cir.func` to `!cir.func<(!argType) -> !returnType>`. That is 1. Easier to parse. 2. Consistent with function types in other MLIR dialects. 3. Consistent with the assembly format for function definition

[clang] Bb/reland expose astcontext to checker ctors (PR #128369)

2025-02-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/128369 Reapply "[analyzer] Delay the checker constructions after parsing" (#128350) This reverts commit db836edf47f36ed04cab919a7a2c4414f4d0d7e6, as-is. Depends on #128368 >From 6fd30233a570ace5ccf3f04f649ddd37b

[clang] [X86] Allow using the lzcnt intrinsics for non-LZCNT targets (PR #128284)

2025-02-22 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/128284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [polly] [DAG] shouldReduceLoadWidth - hasOneUse should check just the loaded value - not the chain (PR #128167)

2025-02-22 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/128167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (PR #127554)

2025-02-22 Thread Rashmi Mudduluru via cfe-commits
@@ -3668,6 +3668,12 @@ Here are some examples of situations that we warn about as they *might* be poten RefCountable* uncounted = counted.get(); // warn } +alpha.webkit.UnretainedLocalVarsChecker +""" +The goal of this rule is to

[clang] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (PR #127554)

2025-02-22 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. Left some nitpicks. otherwise LGTM. https://github.com/llvm/llvm-project/pull/127554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [FatLTO] Detect LLD linker more reliably (PR #128285)

2025-02-22 Thread Shoaib Meenai via cfe-commits
@@ -862,13 +862,12 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, const llvm::Triple &Triple = ToolChain.getTriple(); smeenai wrote: Yeah, I think it's best to keep the old check as well as adding the new one. https://github.co

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-22 Thread Balazs Benics via cfe-commits
steakhal wrote: FYI C23 introduced the `true` and `false` keywords. https://github.com/llvm/llvm-project/pull/128265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Clean up slightly the messed up ownership model of the analyzer (PR #128368)

2025-02-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/128368 Well, yes. It's not pretty. At least after this we would have a bit more unique pointers than before. This is for fixing the memory leak diagnosed by: https://lab.llvm.org/buildbot/#/builders/24/builds/5580 An

[clang] Bb/reland expose astcontext to checker ctors (PR #128369)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Reapply "[analyzer] Delay the checker constructions after parsing" (#128350) This reverts commit db836edf47f36ed04cab919a7a2c4414f4d0d7e6, as-is. Depends on #128368 --- Patch is 27.

[clang] [analyzer] Clean up slightly the messed up ownership model of the analyzer (PR #128368)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Well, yes. It's not pretty. At least after this we would have a bit more unique pointers than before. This is for fixing the memory leak diagnosed by: https://lab.llvm.org/buildbot/#/build

[clang] Reapply "[analyzer] Delay the checker constructions after parsing" (PR #128369)

2025-02-22 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 db836edf47f36ed04cab919a7a2c4414f4d0d7e6 ea932d93a47e6747f50768fc232d2c9e9375b6da --e

[clang] [analyzer] Clean up slightly the messed up ownership model of the analyzer (PR #128368)

2025-02-22 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 db836edf47f36ed04cab919a7a2c4414f4d0d7e6 6fd30233a570ace5ccf3f04f649ddd37bd4149b2 --e

[clang] Reapply "[analyzer] Delay the checker constructions after parsing" (PR #128369)

2025-02-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/128369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Allow overriding Unknown memspaces using a ProgramState trait (PR #123003)

2025-02-22 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Use after scope: https://lab.llvm.org/buildbot/#/builders/169/builds/8735 https://lab.llvm.org/buildbot/#/builders/94/builds/4653/steps/17/logs/stdio https://github.com/llvm/llvm-project/pull/123003 ___ cfe-commits mailing list cfe-c

[clang] 6db96c9 - [clang][bytecode] Always reject ctors of invalid parent decls (#128295)

2025-02-22 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-22T22:04:44+01:00 New Revision: 6db96c9ecc781c742f546d2863632d44e9c9b435 URL: https://github.com/llvm/llvm-project/commit/6db96c9ecc781c742f546d2863632d44e9c9b435 DIFF: https://github.com/llvm/llvm-project/commit/6db96c9ecc781c742f546d2863632d44e9c9b435.diff L

[clang] [analyzer] Allow overriding Unknown memspaces using a ProgramState trait (PR #123003)

2025-02-22 Thread Balazs Benics via cfe-commits
steakhal wrote: > Use after scope: > https://lab.llvm.org/buildbot/#/builders/169/builds/8735 > https://lab.llvm.org/buildbot/#/builders/94/builds/4653/steps/17/logs/stdio > Yeey, could you please revert this for me? @vitalybuka https://github.com/llvm/llvm-project/pull/123003 ___

[clang] [clang][bytecode] Always reject ctors of invalid parent decls (PR #128295)

2025-02-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/128295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Allow overriding Unknown memspaces using a ProgramState trait (PR #123003)

2025-02-22 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Should be fixed with #128372 https://github.com/llvm/llvm-project/pull/123003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix use after scope after #123003 (PR #128372)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Vitaly Buka (vitalybuka) Changes In #123003 make_first_range was applied to temporarily. --- Full diff: https://github.com/llvm/llvm-project/pull/128372.diff 1 Files Affected: - (modified) clang/lib/StaticAnalyzer/Che

[clang] [analyzer] Fix use after scope after #123003 (PR #128372)

2025-02-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/128372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix use after scope after #123003 (PR #128372)

2025-02-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/128372 In #123003 make_first_range was applied to temporarily. >From d3384dec3f6aa0e3d9d6585f8b2553dfcff2d579 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Sat, 22 Feb 2025 13:32:12 -0800 Subject: [PATCH] =?UTF

[clang] d2616cc - [analyzer] Fix use after scope after #123003 (#128372)

2025-02-22 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-02-22T13:33:15-08:00 New Revision: d2616cc3926ec0ac73ec547e04b64e045035bd3c URL: https://github.com/llvm/llvm-project/commit/d2616cc3926ec0ac73ec547e04b64e045035bd3c DIFF: https://github.com/llvm/llvm-project/commit/d2616cc3926ec0ac73ec547e04b64e045035bd3c.diff L

[clang] [analyzer] Fix use after scope after #123003 (PR #128372)

2025-02-22 Thread Balazs Benics via cfe-commits
steakhal wrote: Ah, I wish we had C++23 already. That would have fixed this too. Thanks! https://github.com/llvm/llvm-project/pull/128372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] Remove xbegin and _xend (PR #126952)

2025-02-22 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang closed https://github.com/llvm/llvm-project/pull/126952 ___ 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 bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-02-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 42e03bb9cc9bd815476b0a3f06ac5f58826e3708 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Fri, 31 Jan 2025 19:29:05 +0300 Subject: [PATCH 1/8] [clang-tidy] add new check bugprone-reset-ambiguous-call

[clang] 8f7e34b - [clang-offload-packager] Avoid repeated hash lookups (NFC) (#128297)

2025-02-22 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-02-22T02:09:27-08:00 New Revision: 8f7e34b0af5f15219b9369f6430fc091dbadff6c URL: https://github.com/llvm/llvm-project/commit/8f7e34b0af5f15219b9369f6430fc091dbadff6c DIFF: https://github.com/llvm/llvm-project/commit/8f7e34b0af5f15219b9369f6430fc091dbadff6c.diff L

[clang] [clang-offload-packager] Avoid repeated hash lookups (NFC) (PR #128297)

2025-02-22 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/128297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Allow overriding Unknown memspaces using a ProgramState trait (PR #123003)

2025-02-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/123003 >From b59b7c783b0d84dfe41cf22875875cde015c1971 Mon Sep 17 00:00:00 2001 From: Michael Flanders Date: Mon, 13 Jan 2025 12:34:50 -0600 Subject: [PATCH] [analyzer] Allow overriding Unknown memspaces using a Progr

[clang] [clang][Sema] Propagate `volatile` during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -ast-dump %s | FileCheck %s antoniofrighetto wrote: Added a test in CodeGen too, thanks! https://github.com/llvm/llvm-project/pull/127824 ___ cfe-commits ma

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/127824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/127824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From aebd5455e9cf583b9f5a29c68d5217f49c7a49b5 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Feb 2025 16:47:18 +0100 Subject: [PATCH 1/2] [clang][Sema] Propagate qualifiers during deriv

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From aebd5455e9cf583b9f5a29c68d5217f49c7a49b5 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Feb 2025 16:47:18 +0100 Subject: [PATCH 1/2] [clang][Sema] Propagate qualifiers during deriv

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
@@ -3107,8 +3107,11 @@ Sema::PerformObjectMemberConversion(Expr *From, /*IgnoreAccess=*/true)) return ExprError(); - return ImpCastExprToType(From, DestType, CK_UncheckedDerivedToBase, - VK, &BasePath); + if (F

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-22 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,32 @@ +get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS) +get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS) + +include_directories(${LLVM_MAIN_SRC_DIR}/../mlir/include) +include_directories(${CMAKE_BINARY_DIR}/tools/mlir/include) + +add_clang

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-22 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,46 @@ +//===--===// +// +// 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: Apac

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-22 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko commented: LGTM https://github.com/llvm/llvm-project/pull/128254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-22 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/128254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f0088ee - [analyzer] Delay the checker constructions after parsing (#127409)

2025-02-22 Thread via cfe-commits
Author: Balazs Benics Date: 2025-02-22T10:52:31+01:00 New Revision: f0088ee87cecfb442921251b4a70f96cf3474a15 URL: https://github.com/llvm/llvm-project/commit/f0088ee87cecfb442921251b4a70f96cf3474a15 DIFF: https://github.com/llvm/llvm-project/commit/f0088ee87cecfb442921251b4a70f96cf3474a15.diff

[clang] [analyzer] Delay the checker constructions after parsing (PR #127409)

2025-02-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/127409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (isuckatcs) Changes In C++, `true` is considered a keyword by the preprocessor so an `#if true` enters the true branch, while in C, ``true`` is not treated as a special keyword by the preprocessor, so the false branch is entered

[clang-tools-extra] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-22 Thread via cfe-commits
https://github.com/isuckatcs ready_for_review https://github.com/llvm/llvm-project/pull/128265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >