[clang] [clang][analyzer] Move 'alpha.core.FixedAddressDereference' out of alpha (PR #132404)

2025-03-22 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/132404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #130990)

2025-03-22 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/130990 >From 48f8e2591c317f90eff6f1d0a4ecdf27e19a1b01 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Thu, 13 Mar 2025 00:39:09 +0800 Subject: [PATCH 1/3] [Clang][CodeGen][UBSan] Add pre-commit tests. NFC. --- cla

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-22 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > It would be good to have a unit test of this problem, would the one in the > CERT check mentioned above be sufficient? I think it's pretty reasonable. https://github.com/llvm/llvm-project/pull/128150 ___ cfe-commits mailing list

[clang-tools-extra] [clang-tidy] Fix `thread_local` false positives in `misc-use-internal-linkage` check (PR #132573)

2025-03-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/132573 Based on C++ standard (see issue https://github.com/llvm/llvm-project/issues/131679) and [StackOverflow](https://stackoverflow.com/questions/22794382/are-c11-thread-local-variables-automatically-static) `thre

[clang-tools-extra] [clang-tidy] Added Conflicting Global Accesses checker (PR #130421)

2025-03-22 Thread via cfe-commits
https://github.com/ConcreteCactus reopened https://github.com/llvm/llvm-project/pull/130421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Multipart checker refactor 1: VirtualCallChecker (PR #132072)

2025-03-22 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -42,8 +42,14 @@ namespace { class VirtualCallChecker : public Checker { public: - // These are going to be null if the respective check is disabled. - mutable std::unique_ptr BT_Pure, BT_Impure; + enum : CheckerPartI

[clang] [clang][analyzer] Correctly handle structured bindings captured by lambda (PR #132579)

2025-03-22 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/132579 >From cbd1ab21502db7fec5aa017031ad6ac8eb1edb7c Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 23 Mar 2025 10:32:12 +0800 Subject: [PATCH] [clang][analyzer] Correctly handle structured bindings captured by la

[clang-tools-extra] [clang-tools-extra] Use *Set::insert_range (NFC) (PR #132589)

2025-03-22 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/132589 DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently gained C++23-style insert_range. This patch replaces: Dest.insert(Src.begin(), Src.end()); with: Dest.insert_range(Src); >From 6

[clang-tools-extra] [clang-tools-extra] Use *Set::insert_range (NFC) (PR #132589)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd @llvm/pr-subscribers-clang-tidy Author: Kazu Hirata (kazutakahirata) Changes DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently gained C++23-style insert_range. This patch replaces: Dest.insert(Src.begin(), Src.end()); with:

[clang] [NFC][clang] Remove superfluous header files after refactor in #132252 (PR #132495)

2025-03-22 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray created https://github.com/llvm/llvm-project/pull/132495 None >From 7f1f78ad0c39a8bd1b6c8e4cc7001f6282167d3c Mon Sep 17 00:00:00 2001 From: Jonathan Thackray Date: Fri, 21 Mar 2025 23:56:42 + Subject: [PATCH] [NFC][clang] Remove superfluous header files after r

[clang] [clang][analyzer] Fix crash caused by overload operator member function with explicit this (PR #132581)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (flovent) Changes This PR fixs #116372. >From this PR #83585, CSA starts to model overload operator member >function with explicit this as `SimpleFunctionCall` rather than >`CXXMemberOperatorCall` (derived from `CX

[clang] [clang][analyzer] Fix crash caused by overload operator member function with explicit this (PR #132581)

2025-03-22 Thread via cfe-commits
https://github.com/flovent created https://github.com/llvm/llvm-project/pull/132581 This PR fixs #116372. >From this PR #83585, CSA starts to model overload operator member function >with explicit this as `SimpleFunctionCall` rather than `CXXMemberOperatorCall` >(derived from `CXXInstanceCall

[clang] [clang] Fix static_cast bypassing access control (PR #132285)

2025-03-22 Thread via cfe-commits
@@ -23,3 +22,67 @@ void test(A &a, B &b) { const A &&ar10 = static_cast(xvalue()); const A &&ar11 = static_cast(xvalue()); } + +struct C : private A { // expected-note 4 {{declared private here}} +C&& that(); + +void f() { +(void)static_cast(*this); +

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-22 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,342 @@ +//===--- UseScopedLockCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-22 Thread Daniel Chen via cfe-commits
@@ -223,6 +223,13 @@ endif() # This can be used to detect whether we're in the runtimes build. set(LLVM_RUNTIMES_BUILD ON) +if (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") + # Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF as AIX doesn't s

[clang-tools-extra] [clang-tidy] Fix `thread_local` false positives in `misc-use-internal-linkage` check (PR #132573)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Baranov Victor (vbvictor) Changes Based on C++ standard (see issue https://github.com/llvm/llvm-project/issues/131679) and [StackOverflow](https://stackoverflow.com/questions/22794382/are-c11-thread-local-variables-automatically-stat

[clang] [clang][analyzer] Correctly handle structured bindings captured by lambda (PR #132579)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 @llvm/pr-subscribers-clang Author: None (flovent) Changes this PR fixs #91835. For `DeclRefExpr` in lambda's function body, it will references to original variable declaration in AST rather than `FieldDecl` for lambda class, so

[clang] [clang][analyzer] Correctly handle structured bindings captured by lambda (PR #132579)

2025-03-22 Thread via cfe-commits
https://github.com/flovent created https://github.com/llvm/llvm-project/pull/132579 this PR fixs #91835. For `DeclRefExpr` in lambda's function body, it will references to original variable declaration in AST rather than `FieldDecl` for lambda class, so it's needed to find the corresponding `

[clang] [SPARC][Driver] Set correct IAS mode defaults for Linux and Free/OpenBSD (PR #130108)

2025-03-22 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov approved this pull request. https://github.com/llvm/llvm-project/pull/130108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Retain the expanding index for unevaluated type constraints (PR #109518)

2025-03-22 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I have a patch, I'll post it soon! https://github.com/llvm/llvm-project/pull/109518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Retain the expanding index for unevaluated type constraints (PR #109518)

2025-03-22 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > @zyn0217 > > > > I am having second thoughts on both this PR and the follow up fix > https://github.com/llvm/llvm-project/commit/adb0d8ddceb143749c519d14b8b31b481071da77 > > > > We shouldn't be adding information that is required for correct substitution > into `SubstTem

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-03-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (Rebased) https://github.com/llvm/llvm-project/pull/130473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

2025-03-22 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/130473 >From ea2b2409894092ddc7b3fea5a6bee887e4d62235 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 9 Mar 2025 01:36:25 -0500 Subject: [PATCH 1/6] Change the parameter type of resolveTypeToTagDecl() to

[clang] [clang][bytecode] Ignore overflow in unary operators if requested (PR #132557)

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

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-22 Thread Daniel Chen via cfe-commits
DanielCChen wrote: I will revert this commit first. https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Retain the expanding index for unevaluated type constraints (PR #109518)

2025-03-22 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @zyn0217 I am having second thoughts on both this PR and the follow up fix https://github.com/llvm/llvm-project/commit/adb0d8ddceb143749c519d14b8b31b481071da77 We shouldn't be adding information that is required for correct substitution into `SubstTemplateTypeParmType `, it's

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-03-22 Thread Shilei Tian via cfe-commits
shiltian wrote: > (assuming this intrinsic is supported there) The intrinsic is at least not supported by AMDGPU. :-) https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-22 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,44 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 + +// RUN: %clang_cc1 -O1 -triple spirv-pc-vulkan-compute %s -emit-llvm -o - | FileCheck %s + +typedef float float2 __attribute__((ext_vector_type(2))); +typedef

[libclc] [libclc] link_bc target should depends on target builtins.link.clc-arch_suffix (PR #132338)

2025-03-22 Thread Wenju He via cfe-commits
@@ -313,8 +314,8 @@ function(add_libclc_builtin_set) INTERNALIZE TARGET ${builtins_link_lib_tgt} INPUTS $ -${ARG_INTERNAL_LINK_DEPENDENCIES} - DEPENDENCIES ${builtins_link_lib_tmp_tgt} +$ wenju-he wrote: thanks, changed t

[clang] [compiler-rt] [Clang][PGO] Fix profile function visibility bug (PR #127257)

2025-03-22 Thread David Tellenbach via cfe-commits
dtellenbach wrote: @EthanLuisMcDonough I think your patch effectively introduces a dependency on libc because `__llvm_write_custom_profile` has `__attribute__((uses))`` but calls e.g. `atoi` through `setupIOBuffer`. In compiler-rt it's not safe to make that assumption because it potentially b

[clang-tools-extra] 3fbc9b9 - [clang-doc] Correct improper file paths in HTML output (#132103)

2025-03-22 Thread via cfe-commits
Author: Paul Kirth Date: 2025-03-20T14:11:42-07:00 New Revision: 3fbc9b9efc669a236ab21ab06f854bd9ad751af3 URL: https://github.com/llvm/llvm-project/commit/3fbc9b9efc669a236ab21ab06f854bd9ad751af3 DIFF: https://github.com/llvm/llvm-project/commit/3fbc9b9efc669a236ab21ab06f854bd9ad751af3.diff LO

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-22 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: I believe I found something promising: * Revert the parts of the code that sets the TraversalScope. This messes up the `ParentMapContext`. * Apply this change: ``` bool MatchASTVisitor::TraverseDecl(Decl *DeclNode) { if (!DeclNode) { return true; } + if (Options.

[clang] [NFC][analyzer] Multipart checker refactor 1: VirtualCallChecker (PR #132072)

2025-03-22 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/132072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -3,6 +3,16 @@ // RUN: clang-doc --format=html --output=%t/docs --executor=all-TUs %t/build/compile_commands.json // RUN: FileCheck %s -input-file=%t/docs/index_json.js -check-prefix=JSON-INDEX +// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Shape.html -check-pre

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -3,6 +3,16 @@ // RUN: clang-doc --format=html --output=%t/docs --executor=all-TUs %t/build/compile_commands.json // RUN: FileCheck %s -input-file=%t/docs/index_json.js -check-prefix=JSON-INDEX +// RUN: FileCheck %s -input-file=%t/docs/GlobalNamespace/Shape.html -check-pre

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -57,11 +58,13 @@ static void writeFileDefinition(const ClangDocContext &CDCtx, const Location &L, OS << "*Defined at " << L.Filename << "#" << std::to_string(L.LineNumber) << "*"; } else { -OS << "*Defined at [" << L.Filename << "#" << std::to_string(L.Line

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -516,15 +518,16 @@ writeFileDefinition(const Location &L, std::make_unique(HTMLTag::TAG_A, std::to_string(L.LineNumber)); // The links to a specific line in the source code use the github / // googlesource notation so it won't work for all hosting pages. - // FIXM

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -749,13 +752,8 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) { Out.emplace_back(std::move(Table)); - if (I.DefLoc) { -if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); -else - Out.emplace_back( - write

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-03-22 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. 'Thraed' typo in the commit message but otherwise LGTM. But someone else should also approve this. https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits mailing list cfe-commits@lis

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -276,6 +286,62 @@ // HTML-CIRCLE: return // HTML-CIRCLE: double The perimeter of the circle. +// HTML-SHAPE-PREFIX: class Shape +// HTML-SHAPE-PREFIX-NEXT: +// HTML-SHAPE-PREFIX-NEXT: Defined at line +// HTML-SHAPE-PREFIX-NEXT: https://repository.com/./incl

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -383,4 +449,4 @@ // MD-ALL-FILES: ## [GlobalNamespace](GlobalNamespace{{[\/]}}index.md) // MD-INDEX: # C/C++ Reference -// MD-INDEX: * Namespace: [GlobalNamespace](GlobalNamespace) +// MD-INDEX: * Namespace: [GlobalNamespace](GlobalNamespace) ilovepi wrote

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv edited https://github.com/llvm/llvm-project/pull/131280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix static_cast bypassing access control (PR #132285)

2025-03-22 Thread via cfe-commits
@@ -23,3 +22,67 @@ void test(A &a, B &b) { const A &&ar10 = static_cast(xvalue()); const A &&ar11 = static_cast(xvalue()); } + +struct C : private A { // expected-note 4 {{declared private here}} +C&& that(); + +void f() { +(void)static_cast(*this); +

[clang] [clang] Fix static_cast bypassing access control (PR #132285)

2025-03-22 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/132285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix static_cast bypassing access control (PR #132285)

2025-03-22 Thread via cfe-commits
https://github.com/Sirraide commented: Fix overall looks fine. https://github.com/llvm/llvm-project/pull/132285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Mohamed Emad via cfe-commits
@@ -57,11 +58,13 @@ static void writeFileDefinition(const ClangDocContext &CDCtx, const Location &L, OS << "*Defined at " << L.Filename << "#" << std::to_string(L.LineNumber) << "*"; } else { -OS << "*Defined at [" << L.Filename << "#" << std::to_string(L.Line

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Mohamed Emad via cfe-commits
@@ -749,13 +752,8 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) { Out.emplace_back(std::move(Table)); - if (I.DefLoc) { -if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); -else - Out.emplace_back( - write

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Mohamed Emad via cfe-commits
@@ -490,15 +490,17 @@ genReferencesBlock(const std::vector &References, } return Out; } - static std::unique_ptr -writeFileDefinition(const Location &L, -std::optional RepositoryUrl = std::nullopt) { - if (!L.IsFileInRootDir && !RepositoryUrl) +writeF

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -490,15 +490,17 @@ genReferencesBlock(const std::vector &References, } return Out; } - static std::unique_ptr -writeFileDefinition(const Location &L, -std::optional RepositoryUrl = std::nullopt) { - if (!L.IsFileInRootDir && !RepositoryUrl) +writeF

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -749,13 +752,8 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) { Out.emplace_back(std::move(Table)); - if (I.DefLoc) { -if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); -else - Out.emplace_back( - write

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -57,11 +58,13 @@ static void writeFileDefinition(const ClangDocContext &CDCtx, const Location &L, OS << "*Defined at " << L.Filename << "#" << std::to_string(L.LineNumber) << "*"; } else { -OS << "*Defined at [" << L.Filename << "#" << std::to_string(L.Line

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-03-22 Thread Alexander Richardson via cfe-commits
arichardson wrote: Would be good to get a review from e.g. amdgpu folks since the non-zero globals AS would result in a functional change (assuming this intrinsic is supported there). https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits m

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread via cfe-commits
@@ -12985,6 +12985,16 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, assert(Src.isInt()); return Success((Src.getInt() & (Alignment - 1)) == 0 ? 1 : 0, E); } + case Builtin::BI__builtin_is_modifiable_lvalue: { +const Expr *Arg = E->getArg(0);

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -std=c99 -fsyntax-only -verify %s + Sirraide wrote: > Edit: Perhaps it's wanted to make this intrinsic accept VLA (and report > `false`) and variably-modified types without evaluating the non-constant > array size. That sho

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm < %s| FileCheck %s + +void report(int value); Sirraide wrote: Yeah, all of these should just be sema tests using `static_assert`; maybe 1 or 2 codegen tests just to make sure we can emit

[clang] [llvm] [AARCH64][Neon] switch to using bitcasts in arm_neon.h where appropriate (PR #127043)

2025-03-22 Thread via cfe-commits
https://github.com/CarolineConcatto commented: Hi Marian, I am seeing some errors by the CI, but it goes away If I re-run update_cc_tests it fixes it. But like the other files it also adds some extra check lines. https://github.com/llvm/llvm-project/pull/127043 _

[clang] [Clang] Check PP presence when printing stats (PR #131608)

2025-03-22 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for the fix! Second, that we need a summary explaining the problem and solution. Is this linked to a bug report, if it is, then we should mention that bug report as well. I would also like to see a test showing a case where we successfully print

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-03-22 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 edited https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-22 Thread Matheus Izvekov via cfe-commits
@@ -17,3 +16,134 @@ void k() { } } // namespace GH64347 + +namespace GH123591 { + + +template < typename... _Types > +struct variant { + template + variant(_Types...); +}; + +template +using AstNode = variant; + +AstNode tree(42, 43, 44); + +} + +namespace GH123591_2 { + +

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-22 Thread Matheus Izvekov via cfe-commits
@@ -17,3 +16,134 @@ void k() { } } // namespace GH64347 + +namespace GH123591 { + + +template < typename... _Types > +struct variant { + template + variant(_Types...); +}; + +template +using AstNode = variant; + +AstNode tree(42, 43, 44); + +} + +namespace GH123591_2 { + +

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/132559 This corrects the behaviour for getCommonSugaredType with regards to array top level qualifiers: remove differing top level qualifiers, as they must be redundant with element qualifiers. Fixes https://github.

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This corrects the behaviour for getCommonSugaredType with regards to array top level qualifiers: remove differing top level qualifiers, as they must be redundant with element qualifiers. Fixes https://g

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/132559 >From 27cf231f8497cc483c44d5e5ada05af9ae48e6ab Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 22 Mar 2025 14:39:10 -0300 Subject: [PATCH] [clang] ASTContex: fix getCommonSugaredType for array types

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread David Rivera via cfe-commits
RiverDave wrote: @HerrCai0907 could we merge this? https://github.com/llvm/llvm-project/pull/129370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread David Rivera via cfe-commits
@@ -159,8 +159,8 @@ Changes in existing checks - Improved :doc:`modernize-use-default-member-init ` check by matching - ``constexpr`` and ``static``` values on member initialization and by detecting - explicit casting of built-in types within member list initialization. +

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From 4e5e44c721e1867b9263d0a0ea4669d0bd3bdd4a Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 02:09:02 -0500 Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list in

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From c81ff04def9d2198c84b96fb5cfa1de90ca57a11 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 02:09:02 -0500 Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list in

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-03-22 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: As far as I know GPUs don't do TLS... https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-22 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I posted an alternative fix for this here: https://github.com/llvm/llvm-project/pull/132559 https://github.com/llvm/llvm-project/pull/131649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang-tools-extra] [clang-tidy] Added Conflicting Global Accesses checker (PR #130421)

2025-03-22 Thread via cfe-commits
https://github.com/ConcreteCactus updated https://github.com/llvm/llvm-project/pull/130421 >From 41c7e3093e9943383d25d7c8d0c31b5ab2edd18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ron=20H=C3=A1rn=C3=A1si?= Date: Fri, 22 Nov 2024 21:43:04 +0100 Subject: [PATCH] [clang-tidy] Added Conflictin

[clang] db7475a - [clang][bytecode] Ignore overflow in unary operators if requested (#132557)

2025-03-22 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-22T18:03:50+01:00 New Revision: db7475a770c360a42560aa01859d5dcbb808ade8 URL: https://github.com/llvm/llvm-project/commit/db7475a770c360a42560aa01859d5dcbb808ade8 DIFF: https://github.com/llvm/llvm-project/commit/db7475a770c360a42560aa01859d5dcbb808ade8.diff L

[clang] [clang][bytecode] Ignore overflow in unary operators if requested (PR #132557)

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

[clang] Minor unused variable error for sanitizer builds (PR #132372)

2025-03-22 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/132372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread Baranov Victor via cfe-commits
@@ -159,8 +159,8 @@ Changes in existing checks - Improved :doc:`modernize-use-default-member-init ` check by matching - ``constexpr`` and ``static``` values on member initialization and by detecting - explicit casting of built-in types within member list initialization. +

[clang] [clang][bytecode] Ignore overflow in unary operators if requested (PR #132557)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Add PreInc and PreDec ops for this purpose and ignore the overflow if UnaryOperator::canOverflow() returns false. --- Full diff: https://github.com/llvm/llvm-project/pull/132557.diff 4 Files Affected: - (

[clang] [clang][bytecode] Ignore overflow in unary operators if requested (PR #132557)

2025-03-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132557 Add PreInc and PreDec ops for this purpose and ignore the overflow if UnaryOperator::canOverflow() returns false. >From 06a6ab84ce28373731bd3750b876f951f849b129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20

[clang] [NFC][Static Analyzer] Rename and discuss about `NotNullConstraint` & `NotNullBufferConstraint` (PR #131374)

2025-03-22 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/131374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a bot failure after 032ad590 (PR #132555)

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

[clang] [clang][bytecode][NFC] Use getElemType() in __builtin_memchr as well (PR #132550)

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

[clang] [Clang] Fix a bot failure after 032ad590 (PR #132555)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes See https://github.com/llvm/llvm-project/pull/132061?notification_referrer_id=NT_kwDOBv04MLUxNTM5NjQwOTM5MToxMTcyNTgyODg#issuecomment-2745313527 --- Full diff: https://github.com/llvm/llvm-project/pull/13255

[clang] [Clang] Fix a bot failure after 032ad590 (PR #132555)

2025-03-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/132555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 868c89f - [Clang] Fix a bot failure after 032ad590 (#132555)

2025-03-22 Thread via cfe-commits
Author: Younan Zhang Date: 2025-03-22T23:58:15+08:00 New Revision: 868c89ff0e0ef09ac504873cb9bab8197f5fca2d URL: https://github.com/llvm/llvm-project/commit/868c89ff0e0ef09ac504873cb9bab8197f5fca2d DIFF: https://github.com/llvm/llvm-project/commit/868c89ff0e0ef09ac504873cb9bab8197f5fca2d.diff

[clang] [Clang] Fix a bot failure after 032ad590 (PR #132555)

2025-03-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/132555 See https://github.com/llvm/llvm-project/pull/132061?notification_referrer_id=NT_kwDOBv04MLUxNTM5NjQwOTM5MToxMTcyNTgyODg#issuecomment-2745313527 >From e74045c3cb0264d434411b7a9046637e1d9984ae Mon Sep 17 00:00:0

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread Baranov Victor via cfe-commits
@@ -159,8 +159,8 @@ Changes in existing checks - Improved :doc:`modernize-use-default-member-init ` check by matching - ``constexpr`` and ``static``` values on member initialization and by detecting - explicit casting of built-in types within member list initialization. +

[clang] [clang][bytecode][NFC] Use getElemType() in __builtin_memchr as well (PR #132550)

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

[clang] [clang] fix RecursiveASTVisitor traversal from type to decl (PR #132551)

2025-03-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/132551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running on `linaro-clang-armv8-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/13778 Here is the relevant piece o

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-22 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I'll merge without a release note, instead I plan to backport it to the 20 release along with a changelog. https://github.com/llvm/llvm-project/pull/132061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang] Use *Set::insert_range (NFC) (PR #132507)

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

[clang] [Clang][NFC] Use MarkUsedTemplateParameters in building alias CTAD guides (PR #132369)

2025-03-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/132369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c5d4dfb - [Clang][NFC] Use MarkUsedTemplateParameters in building alias CTAD guides (#132369)

2025-03-22 Thread via cfe-commits
Author: Younan Zhang Date: 2025-03-22T23:04:46+08:00 New Revision: c5d4dfb291af1f9c099c25b78dd2ea0a6496a45f URL: https://github.com/llvm/llvm-project/commit/c5d4dfb291af1f9c099c25b78dd2ea0a6496a45f DIFF: https://github.com/llvm/llvm-project/commit/c5d4dfb291af1f9c099c25b78dd2ea0a6496a45f.diff

[clang] [Clang][NFC] Use MarkUsedTemplateParameters in building alias CTAD guides (PR #132369)

2025-03-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. Nice cleanup, LGTM https://github.com/llvm/llvm-project/pull/132369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/132061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 032ad59 - [Clang] Fix various bugs in alias CTAD transform (#132061)

2025-03-22 Thread via cfe-commits
Author: Younan Zhang Date: 2025-03-22T22:55:58+08:00 New Revision: 032ad590d6bac76965fac17b9f2ce41e076a5a0a URL: https://github.com/llvm/llvm-project/commit/032ad590d6bac76965fac17b9f2ce41e076a5a0a DIFF: https://github.com/llvm/llvm-project/commit/032ad590d6bac76965fac17b9f2ce41e076a5a0a.diff

[clang] [clang] fix RecursiveASTVisitor traversal from type to decl (PR #132551)

2025-03-22 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: It is a change but within the parameters of what the regressing commit already was. This is just changing what had already been changed there. https://github.com/llvm/llvm-project/pull/132551 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang] fix RecursiveASTVisitor traversal from type to decl (PR #132551)

2025-03-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. I think it would be better to have a release note as it looks like a potential behavior change of ASTVisitor. Otherwise feel free to merge to put out the fire. https://github.com/llvm/llvm-project/pull/132551 __

[clang] [clang][bytecode][NFC] Use getElemType() in __builtin_memchr as well (PR #132550)

2025-03-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/132550 >From 060f275678f831a12b07af626919615e468165c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 22 Mar 2025 15:23:07 +0100 Subject: [PATCH] [clang][bytecode][NFC] Use getElemType() in __b

[libclc] [libclc] link_bc target should depends on target builtins.link.clc-arch_suffix (PR #132338)

2025-03-22 Thread Wenju He via cfe-commits
@@ -211,8 +211,9 @@ endfunction() # * ALIASES ... # List of aliases # * INTERNAL_LINK_DEPENDENCIES ... wenju-he wrote: done https://github.com/llvm/llvm-project/pull/132338 ___ cfe-commits mailing list cfe-

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-03-22 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Thanks, for the report, will be fixed by https://github.com/llvm/llvm-project/pull/132551 https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang] fix RecursiveASTVisitor traversal from type to decl (PR #132551)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes For that visitor, it is not expected that a type can traverse into a declaration. This makes the MemberPointer visitor conform to that rule. This turns the base class visitor into a CXXRecordType visitor

  1   2   >