[clang] [HLSL] Use HLSLToolChain for Vulkan (PR #110306)

2024-09-30 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/110306 >From bbdbc42f10a2c4f4e265610f325177ccf764cb83 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Fri, 27 Sep 2024 12:49:34 -0400 Subject: [PATCH] [HLSL] Use HLSLToolChain for Vulkan The options are not transl

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-09-30 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: 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 9f3728d157

[clang-tools-extra] 282fc93 - [clang-tidy][NFC] optimize unused using decls performance (#110200)

2024-09-30 Thread via cfe-commits
Author: Congcong Cai Date: 2024-09-30T21:25:22+08:00 New Revision: 282fc93f09154c58a9b819ba7beaaba6c5e6ad8a URL: https://github.com/llvm/llvm-project/commit/282fc93f09154c58a9b819ba7beaaba6c5e6ad8a DIFF: https://github.com/llvm/llvm-project/commit/282fc93f09154c58a9b819ba7beaaba6c5e6ad8a.diff

[clang] [clang] Finish implementation of P0522 (PR #96023)

2024-09-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I'm OK with this as long as it is the direction CWG is going. https://github.com/llvm/llvm-project/pull/96023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-30 Thread Rahul Joshi via cfe-commits
jurahul wrote: I have the fix for LIBC build failure in flight. Will commit once its approved (or when checks complete). Pre-commit builds do not seem to build this target. https://github.com/llvm/llvm-project/pull/110032 ___ cfe-commits mailing list

[clang] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110542)

2024-09-30 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/110542 Fix the calling convention used for the call in the entry point wrapper. No calling convention is currently set. It can easily use the calling convention of the function that is being called. Without this, ther

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-09-30 Thread Tor Shepherd via cfe-commits
torshepherd wrote: Hmm another case to consider: ![image](https://github.com/user-attachments/assets/193c9570-0e6b-47cd-8d8c-0279e727eac2) In this case the argument is unnamed. I think for this I should just insert `/* unused */` or `/* unnamed */` ? https://github.com/llvm/llvm-project/pull/

[clang] [llvm] workflows/release-binaries: Use static ZSTD on macOS (PR #109909)

2024-09-30 Thread Tom Stellard via cfe-commits
tstellar wrote: If you add these 3 options to the cmake invocation in release-binaries.yml, it should give us more verbose output and make the problem easier to debug: ``` -DCMAKE_VERBOSE_MAKEFILE=ON \ -DBOOTSTRAP_CMAKE_VERBOSE_MAKEFILE=ON \ -DBOOTSTRAP_BOOTSTRAP_CMAKE_V

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-09-30 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/95712 >From 2c9e7c16524b7ce3bf818e451279722dc45d3efc Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Mon, 23 Sep 2024 23:12:23 -0400 Subject: [PATCH 1/2] just defaults --- clang-tools-extra/clangd/Config.h

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-30 Thread Chris B via cfe-commits
@@ -312,6 +312,8 @@ def err_invalid_vector_long_double_decl_spec : Error< "cannot use 'long double' with '__vector'">; def err_invalid_vector_complex_decl_spec : Error< "cannot use '_Complex' with '__vector'">; +def err_invalid_vector_size : Error< + "expected vector size

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-30 Thread via cfe-commits
koachan wrote: My bad, yeah, I forgot to run bugpoint tests. https://github.com/llvm/llvm-project/pull/110608 should fix it. https://github.com/llvm/llvm-project/pull/106951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [clang] Fix the local parameter of void type inside the `Requires` expression. (PR #109831)

2024-09-30 Thread Younan Zhang via cfe-commits
@@ -153,6 +153,10 @@ RequiresExpr::RequiresExpr(ASTContext &C, SourceLocation RequiresKWLoc, std::copy(Requirements.begin(), Requirements.end(), getTrailingObjects()); RequiresExprBits.IsSatisfied |= Dependent; + RequiresExprBits.IsSatisfied &= + llvm::no

[clang] [clang] Fix the local parameter of void type inside the `Requires` expression. (PR #109831)

2024-09-30 Thread Younan Zhang via cfe-commits
@@ -9509,6 +9509,19 @@ Sema::ActOnStartRequiresExpr(SourceLocation RequiresKWLoc, PushDeclContext(BodyScope, Body); for (ParmVarDecl *Param : LocalParameters) { +if (Param->getType()->isVoidType()) { + if (LocalParameters.size() > 1) { +Diag(Param->getBeg

[clang] [Clang][Concepts] Normalize SizeOfPackExpr's pack declaration (PR #110238)

2024-09-30 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/110238 >From 23a765ac6d8e455121346405332d2066dcc0861e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 27 Sep 2024 18:23:47 +0800 Subject: [PATCH 1/9] [Clang] GH93099 --- clang/include/clang/Sema/Sema.h

[clang] [Clang][CodeGen] Emit load of GEP after EmitMemberExpr (PR #110487)

2024-09-30 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/110487 >From 375a71d114fffb94c16455f476364a7de9e08191 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 30 Sep 2024 03:41:15 -0700 Subject: [PATCH 1/2] [Clang][CodeGen] Emit load of value We were missing a loa

[clang] [Clang][TableGen] Change ClangAttrEmitter to use const Record * (PR #110584)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [mlir] [TableGen] Change TableGenMain to use const RecordKeeper (PR #110578)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-core Author: Rahul Joshi (jurahul) Changes Change TableGenMain's `MainFn` argument to be a function that accepts a const reference to RecordKeeper. --- Full diff: https://github.com/llvm/llvm-project/pull/110578.diff 5 Files Affected: - (modifi

[clang] [libc] [llvm] [mlir] [TableGen] Change TableGenMain to use const RecordKeeper (PR #110578)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change ClangAttrEmitter to use const Record * (PR #110584)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Emit load of GEP after EmitMemberExpr (PR #110487)

2024-09-30 Thread Bill Wendling via cfe-commits
bwendling wrote: > > If I return the LValueToRValue cast and run EmitLValue on it > > I'm surprised EmitLValue didn't error out on that. The result of an > LValueToRValue cast is an rvalue. Calling EmitPointerWithAlignment on it > should work, I think. > > > I understand, but there are ~30 di

[clang] [libc] [llvm] [mlir] [TableGen] Change TableGenMain to use const RecordKeeper (PR #110578)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change ClangAttrEmitter to use const Record * (PR #110584)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes This is a part of effort to have better const correctness in TableGen backends: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089

[clang] [Clang][TableGen] Change ClangDiagnosticEmitter to use const Record * (PR #110585)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes This is a part of effort to have better const correctness in TableGen backends: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089 -

[clang] [Clang][TableGen] Change ClangDiagnosticEmitter to use const Record * (PR #110585)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change ClangDiagnosticEmitter to use const Record * (PR #110585)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/110585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Change ClangDiagnosticEmitter to use const Record * (PR #110585)

2024-09-30 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/110585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Jan Hendrik Farr (Cydox) Changes Fixes #110385 Fix counted_by attribute for cases where the flexible array member is accessed through struct pointer inside another struct: ``` struct variable { int a; int b;

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Hendrik Farr (Cydox) Changes Fixes #110385 Fix counted_by attribute for cases where the flexible array member is accessed through struct pointer inside another struct: ``` struct variable { int a; int b; int l

[clang] [Clang] Fix 'counted_by' for nested struct pointers (PR #110497)

2024-09-30 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Clang][CodeGen] Emit load of GEP after EmitMemberExpr (PR #110487)

2024-09-30 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: Reopened my fix as #110497 and also adjusted the test to also check for the case of a nested struct without indirection. https://github.com/llvm/llvm-project/pull/110487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-30 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: Sorry for the late response, I missed this earlier (it looks generally good). https://github.com/llvm/llvm-project/pull/98788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -16,21 +16,93 @@ #include "clang/Basic/Builtins.h" #include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h" +#include "clang/StaticAnalyzer/Checkers/Taint.h" #include "clang/StaticAnalyzer/Core/Checker.h" #include "clang/StaticAnalyzer/Core/CheckerManager.h"

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/102602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for LUTI4 SME2 instruction (#97755) (PR #109953)

2024-09-30 Thread via cfe-commits
https://github.com/CarolineConcatto closed https://github.com/llvm/llvm-project/pull/109953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for MOVT SME2 instruction (PR #97602)

2024-09-30 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/97602 >From ac405d7516ea92cf3c63220d1bdf0677dd7dd372 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Wed, 3 Jul 2024 15:55:45 + Subject: [PATCH 1/7] [Clang][LLVM][AArch64] Add intrinsic for MOVT SME

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ppc64le-lld-multistage-test` running on `ppc64le-lld-multistage-test` while building `clang,llvm` at step 12 "build-stage2-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/3916

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-30 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/98788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Convert AMDGPUResourceUsageAnalysis pass from Module to MF pass (PR #102913)

2024-09-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/2796 Here is the r

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -10,8 +10,10 @@ void testRValueOutput() { int &ref = global; ref = 1; __asm__("" : "=r"(((int)(global; // don't crash on rvalue output operand - clang_analyzer_eval(global == 1); // expected-warning{{UNKNOWN}} - clang_analyzer_eval(ref == 1);// expected-warn

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. A direct bind can be always swapped out for an invalidation, so this PR is correct. I wonder if you have plans for interpreting the asm block to see if we could do something better - e.g. because we could infer that it will only write a s

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -40,7 +42,19 @@ void testInlineAsmMemcpyUninit(void) { int a[10], b[10] = {}, c; MyMemcpy(&a[1], &b[1], sizeof(b) - sizeof(b[1])); -c = a[0]; // expected-warning{{Assigned value is garbage or undefined}} +c = a[0]; // FIXME: should be warning about uninitiali

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -49,6 +63,6 @@ void testAsmWithVoidPtrArgument() clang_analyzer_dump(*(int *)globalVoidPtr); // expected-warning-re {{reg_${{[0-9]+}}},0 S64b,int}>}} clang_analyzer_dump_ptr(globalVoidPtr); // expected-warning-re {{&SymRegion{reg_${{[0-9]+} asm ("" : : "a"(global

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-30 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/109838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] use `invalidateRegions()` in `VisitGCCAsmStmt` (PR #109838)

2024-09-30 Thread Balazs Benics via cfe-commits
@@ -40,7 +42,19 @@ void testInlineAsmMemcpyUninit(void) { int a[10], b[10] = {}, c; MyMemcpy(&a[1], &b[1], sizeof(b) - sizeof(b[1])); -c = a[0]; // expected-warning{{Assigned value is garbage or undefined}} +c = a[0]; // FIXME: should be warning about uninitiali

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for MOVT SME2 instruction (PR #97602)

2024-09-30 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/97602 >From ac405d7516ea92cf3c63220d1bdf0677dd7dd372 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Wed, 3 Jul 2024 15:55:45 + Subject: [PATCH 1/8] [Clang][LLVM][AArch64] Add intrinsic for MOVT SME

[clang] [clang][x86] Add constexpr support for LZCNT/TZCNT intrinsics (PR #110499)

2024-09-30 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/110499 >From b61842abda168ea02bb6b25598ce6d08757bb4f7 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 30 Sep 2024 13:21:42 +0100 Subject: [PATCH 1/2] [clang][x86] Add constexpr support for LZCNT/TZCNT intrinsi

[clang] [llvm] [mlir] [LLVM][TableGen] Change SeachableTableEmitter to use const RecordKeeper (PR #110032)

2024-09-30 Thread Matt Arsenault via cfe-commits
@@ -1556,7 +1557,7 @@ class RecordVal { bool IsUsed = false; /// Reference locations to this record value. - SmallVector ReferenceLocs; + mutable SmallVector ReferenceLocs; arsenm wrote: Is this removed in later patches? https://github.com/llvm/llvm-p

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-30 Thread Erich Keane via cfe-commits
erichkeane wrote: > > THOUGH: that makes me wonder, have you played with virtual bases yet? Are > > we 'sane' for those? > > I have not, but those can't be aggregates, right? Right, good, yeah, that shouldn't be a problem then. > > The function should be pretty easy though > > > `// DFS for

[clang] [clang-tools-extra] [clangd] [AST] Handle uninitialized type constraints (PR #110496)

2024-09-30 Thread Florian Albrechtskirchinger via cfe-commits
@@ -1899,7 +1899,7 @@ void ASTDeclWriter::VisitTemplateTypeParmDecl(TemplateTypeParmDecl *D) { Record.push_back(D->wasDeclaredWithTypename()); const TypeConstraint *TC = D->getTypeConstraint(); - assert((bool)TC == D->hasTypeConstraint()); + Record.push_back(TC != nullp

[clang] [clang][frontend] Add support for attribute plugins for statement attributes (PR #110334)

2024-09-30 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: This looks like a relatively straightforward extension in line with the current Clang interfaces. Therefore, I feel we should accept this. However, please wait for feedback from Clang owners to make sure this does not go against some non-obvious trade-offs or future plans

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
zimirza wrote: Sure, I can add the changes to the release notes. I noticed that tests did not work as expected. I can make this pull request a draft, since I need to figure out why tests did not work. https://github.com/llvm/llvm-project/pull/110366

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 From 4fb69942effb3cf34d07f33a14a95757b6ca5ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B8=D1=88=D0=B0=D0=BD=20=D0=9C=D0=B8=D1=80=D0=B7?= =?UTF-8?q?=D0=B0?= Date: Sat, 28 Sep 2024 17:05:42 +0200 Subjec

[clang] [clang-tools-extra] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2024-09-30 Thread Зишан Мирза via cfe-commits
https://github.com/zimirza converted_to_draft https://github.com/llvm/llvm-project/pull/110366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Itanium Mangle] Enable mangling of enclosing class for member… (PR #110503)

2024-09-30 Thread Utkarsh Saxena via cfe-commits
@@ -704,6 +704,15 @@ ItaniumMangleContextImpl::getEffectiveDeclContext(const Decl *D) { return D->getLexicalDeclContext()->getRedeclContext(); } + if (const auto *FTD = dyn_cast(D)) { +// Member-like constrained friends are mangled as if they were members of +

[clang] [clang][Itanium Mangle] Enable mangling of enclosing class for member… (PR #110503)

2024-09-30 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 commented: Thanks. Left a comment about adding a FIXME to remove ABI compat checks and figuring out the support for past ABI. https://github.com/llvm/llvm-project/pull/110503 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [clang-tools-extra] [clangd] [AST] Handle uninitialized type constraints (PR #110496)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clangd Author: Florian Albrechtskirchinger (falbrechtskirchinger) Changes Note: This patch is based on the assumption, that an assertion causing a crash in clangd, is incorrect. Alternatively, the true error may lie el

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-09-30 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @zyn0217 I plan to reapply the patch after addressing the issues discussed above, but I have to get some more pressing work stuff done first :) https://github.com/llvm/llvm-project/pull/106585 ___ cfe-commits mailing list cfe-commits

[clang] [clang][Itanium Mangle] Enable mangling of enclosing class for member… (PR #110503)

2024-09-30 Thread Haojian Wu via cfe-commits
hokein wrote: Thanks. Can you update the comment [here](https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/LangOptions.h#L242-L245) to mention this case? And I think it is better to move the release note `Mangle friend function ...` from the `Bug Fixes to C++ Support`

[clang] [analyzer] Adding optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp updated https://github.com/llvm/llvm-project/pull/106389 >From beb6f6787f4a92e8892ba8f19d0af924edd56e3b Mon Sep 17 00:00:00 2001 From: Daniel Krupp Date: Wed, 28 Aug 2024 15:32:35 +0200 Subject: [PATCH 1/4] Adding optin.taint.TaintedDiv checker Tainted division operat

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -20,6 +22,7 @@ // RUN: not %clang_analyze_cc1 -Wno-pointer-to-int-cast \ // RUN: -Wno-incompatible-library-redeclaration -verify %s \ // RUN: -analyzer-checker=optin.taint.GenericTaint \ +// RUN: -analyzer-checker=optin.taint.TaintedDiv \ NagyDonat wr

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=optin.taint,core,alpha.security.ArrayBoundV2,optin.taint.TaintedAlloc -analyzer-output=text -verify %s +// RUN: %clang_cc1 -analyze -analyzer-checker=optin.taint,core,alpha.security.ArrayBoundV2,optin.taint.TaintedA

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -25,16 +25,20 @@ using namespace ento; using namespace taint; namespace { -class DivZeroChecker : public Checker< check::PreStmt > { - const BugType BT{this, "Division by zero"}; - const BugType TaintBT{this, "Division by zero", categories::TaintedData}; +class DivZeroChe

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -1288,6 +1288,34 @@ by explicitly marking the ``size`` parameter as sanitized. See the delete[] ptr; } +.. _optin-taint-TaintedDiv: + +optin.taint.TaintedDiv (C, C++, ObjC) +" +This checker warns when the denominator in a division

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -1288,6 +1288,34 @@ by explicitly marking the ``size`` parameter as sanitized. See the delete[] ptr; } +.. _optin-taint-TaintedDiv: + +optin.taint.TaintedDiv (C, C++, ObjC) +" +This checker warns when the denominator in a division

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -1703,6 +1703,12 @@ def TaintedAllocChecker: Checker<"TaintedAlloc">, Dependencies<[DynamicMemoryModeling, TaintPropagationChecker]>, Documentation; +def TaintedDivChecker: Checker<"TaintedDiv">, + HelpText<"Check for divisions, where the denominator " + "mig

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: Looks good overall, I added several suggestions but they mostly tweak the documentation and the comments. Moreover, I don't see any tests where the separation between `optin.taint.TaintedDiv` and `core.DivideZero` is tested by enabling one of them and

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/106389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -1288,6 +1288,34 @@ by explicitly marking the ``size`` parameter as sanitized. See the delete[] ptr; } +.. _optin-taint-TaintedDiv: + +optin.taint.TaintedDiv (C, C++, ObjC) +" +This checker warns when the denominator in a division

[clang] [analyzer] Add optin.taint.TaintedDiv checker (PR #106389)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -1288,6 +1288,34 @@ by explicitly marking the ``size`` parameter as sanitized. See the delete[] ptr; } +.. _optin-taint-TaintedDiv: + +optin.taint.TaintedDiv (C, C++, ObjC) +" +This checker warns when the denominator in a division

[clang] [llvm] [SPARC] Align i128 to 16 bytes in SPARC datalayouts (PR #106951)

2024-09-30 Thread Rainer Orth via cfe-commits
rorth wrote: FWIW, the same failures exist on Linux/sparc64, too. https://github.com/llvm/llvm-project/pull/106951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Improve filtering logic for undesired proto symbols (PR #110091)

2024-09-30 Thread Haojian Wu via cfe-commits
@@ -75,18 +76,61 @@ bool isPrivateProtoDecl(const NamedDecl &ND) { if (ND.getIdentifier() == nullptr) return false; auto Name = ND.getIdentifier()->getName(); - if (!Name.contains('_')) -return false; - // Nested proto entities (e.g. Message::Nested) have top-leve

[clang-tools-extra] [clangd] Improve filtering logic for undesired proto symbols (PR #110091)

2024-09-30 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. still good. https://github.com/llvm/llvm-project/pull/110091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110275)

2024-09-30 Thread Nathan Gauër via cfe-commits
@@ -415,6 +415,7 @@ void CGHLSLRuntime::emitEntryFunction(const FunctionDecl *FD, } CallInst *CI = B.CreateCall(FunctionCallee(Fn), Args); + CI->setCallingConv(Fn->getCallingConv()); (void)CI; Keenuts wrote: nit: `(void)CI` can now be removed. https

[clang] [HLSL][SPIRV] Fix calling convention for call in entry function. (PR #110275)

2024-09-30 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts approved this pull request. https://github.com/llvm/llvm-project/pull/110275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][x86] Add constexpr support for LZCNT/TZCNT intrinsics (PR #110499)

2024-09-30 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/110499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][frontend] Add support for attribute plugins for statement attributes (PR #110334)

2024-09-30 Thread Eric Astor via cfe-commits
https://github.com/ericastor updated https://github.com/llvm/llvm-project/pull/110334 >From 0411b2939e10ca335e84731502126145509bef2d Mon Sep 17 00:00:00 2001 From: Eric Astor Date: Fri, 27 Sep 2024 22:35:28 + Subject: [PATCH] [clang][frontend] Add support for attribute plugins for statemen

[clang] [clang][CodeGen] Emit improved memory effects and return status for AsmStmt (PR #110510)

2024-09-30 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: The intention is to enable LLVM to do more of the optimizations that GCC does around inline asm statements. The following example demonstrates this: https://godbolt.org/z/53rzbjW7z All of the test cases marked as "MISSED" are also optimized by LLVM with this patch, except f

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-09-30 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/109804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-09-30 Thread Donát Nagy via cfe-commits
@@ -2808,27 +2825,63 @@ void ExprEngine::processBranch(const Stmt *Condition, std::tie(StTrue, StFalse) = *KnownCondValueAssumption; else { assert(!isa(Condition)); + // TODO: instead of this shortcut perhaps it would be better to "rejoin" + // the com

[clang] [analyzer] Suppress out of bounds reports after weak loop assumptions (PR #109804)

2024-09-30 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: 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

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-30 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - | FileCheck %s +// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple spirv--vulkan-library %s -fnative-half-type -emit-l

[clang] 8815328 - [clang][x86] Add constexpr support for all remaining TBM intrinsics (#110515)

2024-09-30 Thread via cfe-commits
Author: Simon Pilgrim Date: 2024-09-30T17:13:05+01:00 New Revision: 8815328b6bf0f8c5088f6df73ad853a5aba159d9 URL: https://github.com/llvm/llvm-project/commit/8815328b6bf0f8c5088f6df73ad853a5aba159d9 DIFF: https://github.com/llvm/llvm-project/commit/8815328b6bf0f8c5088f6df73ad853a5aba159d9.diff

[clang] [Clang][CodeGen] Emit load of GEP after EmitMemberExpr (PR #110487)

2024-09-30 Thread Jan Hendrik Farr via cfe-commits
Cydox wrote: > I went ahead and used the `EmitPointerWithAlignment` for all (it worked > without needing special casing). I'll look into doing this in Sema as a > potential cleanup. With that change now the compiler segfaults when compiling the example C file I posted above: > ```c > #inclu

[clang] [clang-tools-extra] [clangd] [AST] Handle uninitialized type constraints (PR #110496)

2024-09-30 Thread Younan Zhang via cfe-commits
zyn0217 wrote: @falbrechtskirchinger We need to resort to `-fallow-pch-with-compiler-errors` :) Specifically, add the following file to `clang/test/PCH` (or somehow merge it into a pre-existing test, which I'd prefer) Name it with a reasonable name e.g. `cxx2a-invalid-constraint-serializatio

[clang] [RISCV] Implement Clang Builtins for XCVmac Extension in CV32E40P (PR #110623)

2024-09-30 Thread via cfe-commits
https://github.com/realqhc updated https://github.com/llvm/llvm-project/pull/110623 >From da8b2fc0b5815f5870efe650ba5d585ec14e1a08 Mon Sep 17 00:00:00 2001 From: Qihan Cai Date: Tue, 1 Oct 2024 12:14:15 +1000 Subject: [PATCH 1/2] [RISCV] Implement Clang Builtins for XCVmac Extension in CV32E40

[clang] [RISCV] Implement Clang Builtins for XCVmac Extension in CV32E40P (PR #110623)

2024-09-30 Thread via cfe-commits
https://github.com/realqhc updated https://github.com/llvm/llvm-project/pull/110623 >From da8b2fc0b5815f5870efe650ba5d585ec14e1a08 Mon Sep 17 00:00:00 2001 From: Qihan Cai Date: Tue, 1 Oct 2024 12:14:15 +1000 Subject: [PATCH 1/2] [RISCV] Implement Clang Builtins for XCVmac Extension in CV32E40

[clang] [RISCV] Implement Clang Builtins for XCVmac Extension in CV32E40P (PR #110623)

2024-09-30 Thread Craig Topper via cfe-commits
@@ -0,0 +1,111 @@ +/*=== riscv_corev_mac.h - CORE-V multiply accumulate intrinsics === + * + * 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] [clang][x86] Add constexpr support for PDEP/PEXT intrinsics (PR #110535)

2024-09-30 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/110535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix the local parameter of void type inside the `Requires` expression. (PR #109831)

2024-09-30 Thread via cfe-commits
c8ef wrote: Thank you all for reviewing! If this patch looks good, could someone help me land it? https://github.com/llvm/llvm-project/pull/109831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Clang][TableGen] Change ClangAttrEmitter to use const Record * (PR #110584)

2024-09-30 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM Looks like this a project-wide refactor, and since this is literally just adding `const` in a bunch of places, I don’t think there is much that could go wrong here. https://github.com/llvm/llvm-project/pull/110584 __

[clang] [clang] [Driver] Ensure we error on lto with link.exe and target `*-windows-msvc` on non cl driver modes (PR #109607)

2024-09-30 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/109607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)

2024-09-30 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > > Why isn't `misc` suitable for this use case? > > `bugprone` was just an initial thought. If the group think leads us to `misc` > I'm ok with moving in that direction. Other thoughts? Maybe i misunderstood, I thought you meant creating a new clang-tidy module called `a

[clang] [Clang] Add __builtin_(elementwise|reduce)_(max|min)imum (PR #110198)

2024-09-30 Thread Francis Visoiu Mistrih via cfe-commits
https://github.com/francisvm updated https://github.com/llvm/llvm-project/pull/110198 >From 8b53cbbcb3f9ea11b091407ec4ecfa59d1f748a3 Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Thu, 26 Sep 2024 18:05:09 -0700 Subject: [PATCH] [Clang] Add __builtin_elementwise|reduce_max|minimum

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-30 Thread Kyungwoo Lee via cfe-commits
kyulee-com wrote: > * Looking at the NFC, this seems like it has very similar issues to > Propeller, which wants to redo just the codegen with a new injected profile > and BB ordering. It would be good to see if we can converge to similar > approaches. I asked @rlavaee to take a look and he is

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-09-30 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. Also LGTM, sorry for not responding earlier. I agree with the minor suggestions of @steakhal . https://github.com/llvm/llvm-project/pull/102602 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang][frontend] Add support for attribute plugins for statement attributes (PR #110334)

2024-09-30 Thread Eric Astor via cfe-commits
https://github.com/ericastor updated https://github.com/llvm/llvm-project/pull/110334 >From 0411b2939e10ca335e84731502126145509bef2d Mon Sep 17 00:00:00 2001 From: Eric Astor Date: Fri, 27 Sep 2024 22:35:28 + Subject: [PATCH 1/2] [clang][frontend] Add support for attribute plugins for stat

[clang] [clang][x86] Add constexpr support for BZHI intrinsics (PR #110508)

2024-09-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Simon Pilgrim (RKSimon) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110508.diff 6 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+3) - (modified) clang/include/clang/Basic/BuiltinsX86.def (+1-1) - (mod

[clang] [clang][Itanium Mangle] Enable mangling of enclosing class for member… (PR #110503)

2024-09-30 Thread Viktoriia Bakalova via cfe-commits
https://github.com/VitaNuo updated https://github.com/llvm/llvm-project/pull/110503 >From f22108bcbe97365a29e134ecd496533641f901fb Mon Sep 17 00:00:00 2001 From: Viktoriia Bakalova Date: Mon, 30 Sep 2024 12:50:09 + Subject: [PATCH] [clang][Itanium Mangle] Enable mangling of enclosing class

[clang] [clang][Itanium Mangle] Enable mangling of enclosing class for member… (PR #110503)

2024-09-30 Thread Viktoriia Bakalova via cfe-commits
https://github.com/VitaNuo updated https://github.com/llvm/llvm-project/pull/110503 >From 53ef5a19100bdda3f6886cddaedf474cffd055b1 Mon Sep 17 00:00:00 2001 From: Viktoriia Bakalova Date: Mon, 30 Sep 2024 12:50:09 + Subject: [PATCH] [clang][Itanium Mangle] Enable mangling of enclosing class

<    1   2   3   4   5   6   >