[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-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-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-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] [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] [Sema] Add code completion for if constexpr and consteval (PR #124315)

2025-02-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: If I'm understanding correctly, this patch only completes the keywords themselves. SemaCodeComplete also has the ability to produce "snippets", for example [here](https://searchfox.org/llvm/rev/4e44bd027bf4e490380be770172994561616bd2d/clang/lib/Sema/SemaCodeComplete.cpp#2

[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-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 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 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 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] [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] [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] 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 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
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-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
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] [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] [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] [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
@@ -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] [CMake] Fix some breakages when using ninja multi config (PR #65451)

2025-02-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-win` running on `as-worker-93` while building `clang,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/2342 Here is the releva

[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] 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-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-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-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] [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
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] [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] [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] [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-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 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-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] 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] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-02-22 Thread via cfe-commits
@@ -0,0 +1,34 @@ +//===--- TrueMacroCheck.h - clang-tidy --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-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] [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][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] [analyzer] Fix use after scope after #123003 (PR #128372)

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang 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/Checkers/StackAddrEsc

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

2025-02-22 Thread Simon Pilgrim via cfe-commits
@@ -1817,7 +1817,7 @@ class TargetLoweringBase { EVT NewVT) const { RKSimon wrote: There's an implicit dependency that I'm still trying to track down. https://github.com/llvm/llvm-project/pull/128167

[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
@@ -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] [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] [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] [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] [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] [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] 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] [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] [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] 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 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] [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 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] 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 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] 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] [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] 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] 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] [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-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] [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] [clang-format] Add the C language instead of treating it like C++ (PR #128287)

2025-02-22 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/128287 >From 84cfaec1f830463d2332f14eca9cfbb86919d3d5 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 21 Feb 2025 21:41:36 -0800 Subject: [PATCH 1/2] [clang-format] Add the C language instead of treating it like C++

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

2025-02-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang,llvm` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/16701 Here is the relevant piece of the bui

[libunwind] [libunwind][X86-64] Handle Linux sigreturn trampoline when DWARF info is missing (PR #103473)

2025-02-22 Thread Konstantin Bogdanov via cfe-commits
thevar1able wrote: Ping https://github.com/llvm/llvm-project/pull/103473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-22 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/65451 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 62c7891 - [CMake] Fix some breakages when using ninja multi config (#65451)

2025-02-22 Thread via cfe-commits
Author: ur4t Date: 2025-02-22T09:52:53-08:00 New Revision: 62c78919c678915936fcc08212b02db23738dd4d URL: https://github.com/llvm/llvm-project/commit/62c78919c678915936fcc08212b02db23738dd4d DIFF: https://github.com/llvm/llvm-project/commit/62c78919c678915936fcc08212b02db23738dd4d.diff LOG: [CM

[clang-tools-extra] [clang-tidy] Add modernize-nlohmann-json-explicit-conversions check (PR #126425)

2025-02-22 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe closed https://github.com/llvm/llvm-project/pull/126425 ___ 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 modernize-nlohmann-json-explicit-conversions check (PR #126425)

2025-02-22 Thread Mike Crowe via cfe-commits
mikecrowe wrote: Thanks for the reviews. I have been able to turn this check into a plugin successfully and I will propose that it is included with the nlohmann/json library. https://github.com/llvm/llvm-project/pull/126425 ___ cfe-commits mailing li

[clang-tools-extra] [clang-tidy] Add modernize-nlohmann-json-explicit-conversions check (PR #126425)

2025-02-22 Thread Mike Crowe via cfe-commits
@@ -0,0 +1,72 @@ +//===--- NlohmannJsonExplicitConversionsCheck.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-tidy] Add modernize-nlohmann-json-explicit-conversions check (PR #126425)

2025-02-22 Thread Mike Crowe via cfe-commits
@@ -0,0 +1,72 @@ +//===--- NlohmannJsonExplicitConversionsCheck.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] [clang-tools-extra] [clang-tidy] Fixed clang-tidy rewriter not properly handling symlinks (PR #126393)

2025-02-22 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 updated https://github.com/llvm/llvm-project/pull/126393 From c5d22c2dfba00742892dca6bfc84dd9e70b73d2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Sun, 24 Dec 2023 21:01:32 -0500 Subject: [PATCH] [clang-tidy] Fixed clang-tidy rew

[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-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][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 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 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] [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

[libunwind] [libunwind][X86-64] Handle Linux sigreturn trampoline when DWARF info is missing (PR #103473)

2025-02-22 Thread Konstantin Bogdanov via cfe-commits
https://github.com/thevar1able updated https://github.com/llvm/llvm-project/pull/103473 >From 3beb6fc40ccc0b5726b360156063ef35e2b1db3f Mon Sep 17 00:00:00 2001 From: Michael Kolupaev Date: Tue, 13 Aug 2024 21:16:08 + Subject: [PATCH 1/2] [libunwind][X86-64] Handle Linux sigreturn trampoline

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

2025-02-22 Thread Alex Voicu 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))) AlexVlx wrote: Acknowledged, but the header was already using numbered address spaces (ROCDL

[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][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

2025-02-22 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/128360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][X86-64] Handle Linux sigreturn trampoline when DWARF info is missing (PR #103473)

2025-02-22 Thread Konstantin Bogdanov via cfe-commits
https://github.com/thevar1able updated https://github.com/llvm/llvm-project/pull/103473 >From 3beb6fc40ccc0b5726b360156063ef35e2b1db3f Mon Sep 17 00:00:00 2001 From: Michael Kolupaev Date: Tue, 13 Aug 2024 21:16:08 + Subject: [PATCH 1/2] [libunwind][X86-64] Handle Linux sigreturn trampoline

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

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alex Voicu (AlexVlx) Changes Do not hardcode `address_space(5)` (`private`) in the ROCDL interface, as that breaks SPIRV generation (the latter uses 0). Add test. In the long run we should stop using ROCDL inline. --- Patch is 183.37 Ki

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

2025-02-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Alex Voicu (AlexVlx) Changes Do not hardcode `address_space(5)` (`private`) in the ROCDL interface, as that breaks SPIRV generation (the latter uses 0). Add test. In the long run we should stop using ROCDL inline. --- Patch is 183

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

2025-02-22 Thread via cfe-commits
Author: Phoebe Wang Date: 2025-02-22T20:33:44+08:00 New Revision: 7981c2997c370c6f1b2c9de3d6364e9121136f20 URL: https://github.com/llvm/llvm-project/commit/7981c2997c370c6f1b2c9de3d6364e9121136f20 DIFF: https://github.com/llvm/llvm-project/commit/7981c2997c370c6f1b2c9de3d6364e9121136f20.diff L

[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] [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

  1   2   >