[clang] [clang][nullability] Remove `RecordValue`. (PR #89052)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-clang Author: None (martinboehme) Changes This class no longer serves any purpose; see also the discussion here: https://reviews.llvm.org/D155204#inline-1503204 A lot of existing tests in TransferTest.cpp check for th

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (JinjinLi868) Changes Data type conversion between fp16 and bf16 will generate fptrunc and fpextend nodes, but they are actually bitcast nodes. --- Full diff: https://github.com/llvm/llvm-project/pull/89051.diff 1 Files Affected:

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-17 Thread Ilya Biryukov via cfe-commits
@@ -112,7 +112,10 @@ struct UpdateIndexCallbacks : public ParsingCallbacks { // Index outlives TUScheduler (declared first) FIndex(FIndex), // shared_ptr extends lifetime - Stdlib(Stdlib)]() mutable { +

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-17 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: All good from my side, but asked @sam-mccall or @usx95 to check the context propagation bit as I'm missing context to make sure it's correct. https://github.com/llvm/llvm-project/pull/88381 ___ cfe-commits mailing list cfe-commits

[clang] [ClangOffloadBundler] Add file size to header (PR #88827)

2024-04-17 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Seems the documentation builder is complaining, maybe something wrong with > the .rst file. It is passing now https://github.com/llvm/llvm-project/pull/88827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang-tools-extra] [clang][NFC] Fix FieldDecl::isUnnamedBitfield() capitalization (PR #89048)

2024-04-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thanks for the cleanup! https://github.com/llvm/llvm-project/pull/89048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [CUDA][HIP] Fix record layout on Windows (PR #87651)

2024-04-17 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: ping It passes our internal Windows CI. https://github.com/llvm/llvm-project/pull/87651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "Improve stack usage to increase recursive initialization depth" (PR #89006)

2024-04-17 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Thank you for the revert! https://github.com/llvm/llvm-project/pull/89006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-17 Thread Nathan Gauër via cfe-commits
@@ -1109,6 +1124,10 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S, llvm::BasicBlock *CondBlock = CondDest.getBlock(); EmitBlock(CondBlock); + if (getTarget().getTriple().isSPIRVLogical()) Keenuts wrote: Right, something at the module level, which

[clang] [clang][NFC] Remove class layout scissor (PR #89055)

2024-04-17 Thread Nathan Sidwell via cfe-commits
https://github.com/urnathan created https://github.com/llvm/llvm-project/pull/89055 Now that `accumulateBitfields` does the correct clipping, we don't need the scissor any more -- `checkBitfieldClipping` can compute its location directly. >From db5e6456f26ea9b859d3ff24161d7494d58bb7e1 Mon Sep

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-04-17 Thread via cfe-commits
bgra8 wrote: @dtemirbulatov this patch causes `clang` to crash. Please revert. repro.cc: ``` typedef __SVFloat32_t a; #pragma clang attribute push(__attribute__((target("+sve"))), \ apply_to = function) template struct b { using c = int; }; temp

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

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

[clang] [Clang][Parse] Diagnose requires expressions with explicit object parameters (PR #88974)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify %s + +auto x0 = requires (this int) { true; }; // expected-error {{a requires clause cannot have an explicit object parameter}} +auto x1 = requires (int, this int) { true; }; // expected-error {{a requires clau

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader creates extra HeaderFileInfo, breaks PCM reuse (PR #89005)

2024-04-17 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: > @ilya-biryukov can you check that this fixes your running out of source > location space problem please? Just tried it. The patch as is did not help. I've also tried changing the previous line to `getExistingFileInfo(, /*WantExternal=*/false)` and it didn't help either.

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-17 Thread via cfe-commits
https://github.com/nihui created https://github.com/llvm/llvm-project/pull/89062 do not bitcast 16bit `bfloat16` to 32bit `int32_t` directly bitcast to `int16_t`, and then upcast to `int32_t` Fix ASAN runtime error when calling vcvtah_f32_bf16 `==21842==ERROR: AddressSanitizer: stack-buffer-over

[clang] [clang][CodeGen] fix UB in aarch64 bfloat16 scalar conversion (PR #89062)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (nihui) Changes do not bitcast 16bit `bfloat16` to 32bit `int32_t` directly bitcast to `int16_t`, and then upcast to `int32_t` Fix ASAN runtime error when calling vcvtah_f32_bf16 `==21842==ERROR: AddressSanitizer: stack-buffer-overflo

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-17 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/88918 From 94d76dcdfac88d1d50fe705406c0280c33766e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Mon, 15 Apr 2024 17:05:40 +0200 Subject: [PATCH 1/3] [clang][SPIR-V] Always add convervence intri

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/89019 >From 89a5bbcc89c1e43ac7f2e60f3c234c2c42928c86 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 17 Apr 2024 12:24:56 +0800 Subject: [PATCH] [clang] Distinguish unresolved templates in UnresolvedLookupExpr

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-17 Thread Nathan Gauër via cfe-commits
@@ -1109,6 +1124,10 @@ void CodeGenFunction::EmitForStmt(const ForStmt &S, llvm::BasicBlock *CondBlock = CondDest.getBlock(); EmitBlock(CondBlock); + if (getTarget().getTriple().isSPIRVLogical()) Keenuts wrote: Changed those for a module-level function w

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

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

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-04-17 Thread Qizhi Hu via cfe-commits
jcsxky wrote: gently ping. @erichkeane @shafik Any opinions on this pr? https://github.com/llvm/llvm-project/pull/87173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] [CLANG] Adding C23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-17 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread Younan Zhang via cfe-commits
@@ -186,3 +186,74 @@ class E { #endif template using D = int; // expected-note {{declared here}} E ed; // expected-note {{instantiation of}} + +namespace non_functions { + +#if __cplusplus >= 201103L +namespace PR88832 { +template struct O { + static const T v = 0; +}; + +st

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread Younan Zhang via cfe-commits
zyn0217 wrote: The pre-commit CI is still clogging after a few hours, and I'm opening it for feedback anyway. https://github.com/llvm/llvm-project/pull/89019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/89019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Younan Zhang (zyn0217) Changes This patch revolves around the misuse of UnresolvedLookupExpr in BuildTemplateIdExpr. Basically, we build up an UnresolvedLookupExpr not only for function overloads but for "unresolved" templates

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes This patch revolves around the misuse of UnresolvedLookupExpr in BuildTemplateIdExpr. Basically, we build up an UnresolvedLookupExpr not only for function overloads but for "unresolved" templates wherever

[clang] [llvm] Move several vector intrinsics out of experimental namespace (PR #88748)

2024-04-17 Thread Maciej Gabka via cfe-commits
mgabka wrote: Added a message here: https://discourse.llvm.org/t/rfc-promoting-experimental-interleave2-deinterleave2-reverse-splice-and-stepvector-intrinsics-to-first-class-intrinsics/78414 https://github.com/llvm/llvm-project/pull/88748 ___ cfe-comm

[clang] [llvm] [AArch64][SME] Add intrinsics for multi-vector BFCLAMP (PR #88251)

2024-04-17 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/88251 >From fe692284cd248e372302671e094eb9950edb5ee5 Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Wed, 10 Apr 2024 10:20:03 + Subject: [PATCH 1/3] [AArch64][SME] Add intrinsics for multi-vector BFCLAMP --- c

[clang] [llvm] [AArch64][SME] Add intrinsics for multi-vector BFCLAMP (PR #88251)

2024-04-17 Thread via cfe-commits
@@ -2148,6 +2148,11 @@ let TargetGuard = "sme2" in { def SVSCLAMP_X4 : SInst<"svclamp[_single_{d}_x4]", "44dd", "csil", MergeNone, "aarch64_sve_sclamp_single_x4", [IsStreaming], []>; def SVUCLAMP_X4 : SInst<"svclamp[_single_{d}_x4]", "44dd", "UcUsUiUl", MergeNon

[clang] [NFC] Clean dead code in ParsedAttr.h (PR #89064)

2024-04-17 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/89064 None >From f36208514cbef24c4673a333db064d9ffae34e74 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 17 Apr 2024 20:33:22 +0800 Subject: [PATCH] [NFC] CLean dead code in ParsedAttr.h Signed-off-by: yronglin

[clang] [NFC] Clean dead code in ParsedAttr.h (PR #89064)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/89064.diff 1 Files Affected: - (modified) clang/include/clang/Sema/ParsedAttr.h (+1-6) ``diff diff --git a/clang/include/clang/Sema/ParsedAttr.

[clang] [llvm] [AArch64][SME] Add intrinsics for vector groups ZERO (PR #88114)

2024-04-17 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/88114 >From c44bd42f8011dd09771fda50a76a7321342c2b2f Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Thu, 4 Apr 2024 14:36:54 + Subject: [PATCH 1/3] WIP --- clang/include/clang/Basic/arm_sme.td | 29 +

[clang] [Clang][Parse] Diagnose requires expressions with explicit object parameters (PR #88974)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88974 >From 05e44aedb2acfa2945b7be0217db9f8bb8bf70f5 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 15:42:45 -0400 Subject: [PATCH 1/2] [Clang][Parse] Diagnose requires expressions with e

[clang] [llvm] [AArch64][SME] Add intrinsics for vector groups ZERO (PR #88114)

2024-04-17 Thread via cfe-commits
@@ -0,0 +1,94 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc -verify-machineinstrs < %s | FileCheck %s + +target triple = "aarch64-linux" + +define void @test_svzero_za64_vg1x2(i32 %slice) #0 { --

[clang] [Clang][Parse] Diagnose requires expressions with explicit object parameters (PR #88974)

2024-04-17 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread via cfe-commits
https://github.com/Sirraide commented: I think the general approach of this makes sense. Can you add some more tests that involve an expression with this new type as the argument to a function call? You’ve taken care of handling that case from what I’ve seen, but having tests for that would p

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread via cfe-commits
@@ -186,3 +186,74 @@ class E { #endif template using D = int; // expected-note {{declared here}} E ed; // expected-note {{instantiation of}} + +namespace non_functions { + +#if __cplusplus >= 201103L +namespace PR88832 { +template struct O { + static const T v = 0; +}; + +st

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread via cfe-commits
@@ -186,3 +186,74 @@ class E { #endif template using D = int; // expected-note {{declared here}} E ed; // expected-note {{instantiation of}} + +namespace non_functions { + +#if __cplusplus >= 201103L +namespace PR88832 { +template struct O { + static const T v = 0; +}; + +st

[clang] [clang] Distinguish unresolved templates in UnresolvedLookupExpr (PR #89019)

2024-04-17 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/89019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SME] Add intrinsics for vector groups ZERO (PR #88114)

2024-04-17 Thread via cfe-commits
https://github.com/Lukacma deleted https://github.com/llvm/llvm-project/pull/88114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parse] Diagnose requires expressions with explicit object parameters (PR #88974)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88974 >From 05e44aedb2acfa2945b7be0217db9f8bb8bf70f5 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 15:42:45 -0400 Subject: [PATCH 1/2] [Clang][Parse] Diagnose requires expressions with e

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-17 Thread Connor Sughrue via cfe-commits
@@ -0,0 +1,278 @@ +//===--- cc1modbuildd_main.cpp - Clang CC1 Module Build Daemon ===// +// +// 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

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-17 Thread Connor Sughrue via cfe-commits
https://github.com/cpsughrue edited https://github.com/llvm/llvm-project/pull/67562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SME] Add intrinsics for vector groups ZERO (PR #88114)

2024-04-17 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/88114 >From c44bd42f8011dd09771fda50a76a7321342c2b2f Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Thu, 4 Apr 2024 14:36:54 + Subject: [PATCH 1/4] WIP --- clang/include/clang/Basic/arm_sme.td | 29 +

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-17 Thread Connor Sughrue via cfe-commits
https://github.com/cpsughrue updated https://github.com/llvm/llvm-project/pull/67562 >From 8f2e1a2d02227b14dc70fb6898b37b9e0565b296 Mon Sep 17 00:00:00 2001 From: cpsughrue Date: Sun, 9 Jul 2023 23:19:58 -0400 Subject: [PATCH 01/24] [clang][MBD] set up module build daemon infrastructure The mo

[clang] [llvm] [AArch64][SME] Add intrinsics for vector groups ZERO (PR #88114)

2024-04-17 Thread via cfe-commits
@@ -0,0 +1,94 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc -verify-machineinstrs < %s | FileCheck %s + +target triple = "aarch64-linux" + +define void @test_svzero_za64_vg1x2(i32 %slice) #0 { --

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-17 Thread Connor Sughrue via cfe-commits
https://github.com/cpsughrue updated https://github.com/llvm/llvm-project/pull/67562 >From 8f2e1a2d02227b14dc70fb6898b37b9e0565b296 Mon Sep 17 00:00:00 2001 From: cpsughrue Date: Sun, 9 Jul 2023 23:19:58 -0400 Subject: [PATCH 01/24] [clang][MBD] set up module build daemon infrastructure The mo

[clang] [Clang][Sema] Warn when 'exclude_from_explicit_instantiation' attribute is used on local classes and members thereof (PR #88777)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88777 >From 5f19ff4e34c3e3153157cfb06ba1022e982b4f2d Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 12 Apr 2024 14:33:30 -0400 Subject: [PATCH 1/2] [Clang][Sema] Ignore 'exclude_from_explicit_instant

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-17 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/88381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Clean dead code in ParsedAttr.h (PR #89064)

2024-04-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, good catch! https://github.com/llvm/llvm-project/pull/89064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-04-17 Thread Erich Keane via cfe-commits
erichkeane wrote: > Unless the original test was subtly broken, the forward fix in > [0a789ea](https://github.com/llvm/llvm-project/commit/0a789ea8a829da345e46d8224d73b2ddaba6969f) > seems erroneous. > > The forward fix changes the test to have a different declaration of `new`. > But I would

[clang] Reapply "[Clang][Sema] placement new initializes typedef array with correct size (#83124)" (PR #89036)

2024-04-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: The original patch pointed out a regression: https://github.com/llvm/llvm-project/pull/83124#issuecomment-2060090590 Please contact that person and get a reproducer and make sure you aren't breaking them. https://github.com/llvm/llvm-project/pull/89036

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams edited https://github.com/llvm/llvm-project/pull/87623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if (CGM.getCodeGenO

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams commented: (oops, didn't submit my inline replies...) https://github.com/llvm/llvm-project/pull/87623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -310,6 +310,24 @@ namespace llvm { DINode::DIFlags Flags = DINode::FlagZero, DINodeArray Annotations = nullptr); +/// Create debugging information entry for a template alias. +/// \param Ty O

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if (CGM.getCodeGenO

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

2024-04-17 Thread Erich Keane via cfe-commits
@@ -3903,7 +3904,14 @@ bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation Loc) { if (R.isInvalid()) return true; - bool ValueIsPositive = ValueAPS.isStrictlyPositive(); + // GCC allows the value of unroll count to be 0. + // https://gcc.gnu.org/onlinedocs/gcc/Loop-

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

2024-04-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/88666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] set declaration invalid earlier to prevent crash in calculating record layout (PR #87173)

2024-04-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/87173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-17 Thread via cfe-commits
https://github.com/JinjinLi868 updated https://github.com/llvm/llvm-project/pull/89051 >From 69a584119d8978d0ea3177c59d8772f00df3a68e Mon Sep 17 00:00:00 2001 From: Jinjin Li Date: Wed, 17 Apr 2024 16:44:50 +0800 Subject: [PATCH] [clang] Fix half && bfloat16 convert node expr codegen Data type

[clang] [NFC] Clean dead code in ParsedAttr.h (PR #89064)

2024-04-17 Thread via cfe-commits
yronglin wrote: > LGTM, good catch! Thanks for your review! https://github.com/llvm/llvm-project/pull/89064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Warn when 'exclude_from_explicit_instantiation' attribute is used on local classes and members thereof (PR #88777)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88777 >From 5f19ff4e34c3e3153157cfb06ba1022e982b4f2d Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 12 Apr 2024 14:33:30 -0400 Subject: [PATCH 1/3] [Clang][Sema] Ignore 'exclude_from_explicit_instant

[clang] [Clang] Allow the value of unroll count to be zero in `#pragma GCC unroll` and `#pragma unroll` (PR #88666)

2024-04-17 Thread via cfe-commits
@@ -3903,7 +3904,14 @@ bool Sema::CheckLoopHintExpr(Expr *E, SourceLocation Loc) { if (R.isInvalid()) return true; - bool ValueIsPositive = ValueAPS.isStrictlyPositive(); + // GCC allows the value of unroll count to be 0. + // https://gcc.gnu.org/onlinedocs/gcc/Loop-

[clang] [Clang][Sema] Warn when 'exclude_from_explicit_instantiation' attribute is used on local classes and members thereof (PR #88777)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Release note added https://github.com/llvm/llvm-project/pull/88777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3820571 - [C99] Remove WG14 N522 from the C status page

2024-04-17 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-04-17T09:32:22-04:00 New Revision: 38205717501237f2b7a57eaabe65a8367e5f91c3 URL: https://github.com/llvm/llvm-project/commit/38205717501237f2b7a57eaabe65a8367e5f91c3 DIFF: https://github.com/llvm/llvm-project/commit/38205717501237f2b7a57eaabe65a8367e5f91c3.diff

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Michael Buch via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if (CGM.getCodeGenO

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Michael Buch via cfe-commits
https://github.com/Michael137 edited https://github.com/llvm/llvm-project/pull/87623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add initial LIT tests (PR #87989)

2024-04-17 Thread Fraser Cormack via cfe-commits
@@ -1,3 +1,6 @@ -__kernel void foo(int *i) { +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s frasercrmck wrote: Ach I misunderstood how `update_cc_test_checks` works. It doesn't actually go through the regular LIT infrastructure, so we can't do anything inv

[clang] [flang] [flang][driver] Avoid mentions of Clang in Flang's command line reference. (PR #88932)

2024-04-17 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > Would you like me to introduce DocBriefForVariants? +1 That would be helpful for `-I`: * https://flang.llvm.org/docs/FlangCommandLineReference.html#cmdoption-flang-I-dir Ideally we'd find more examples (so that you are not adding it for just one option). As for this: ``

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: This appears to just assert today, but interpreting this as bitcast doesn't make sense. I would expect this to emit a pair of casts, fpext to float, and fptrunc down to half https://github.com/llvm/llvm-project/pull/89051 __

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-17 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,14 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -target-feature +fullbf16 -S -emit-llvm %s -o - | FileCheck %s +// CHECK-LABEL: define dso_local half @test_

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/89051 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-17 Thread Matt Arsenault via cfe-commits
arsenm wrote: > This appears to just assert today, but interpreting this as bitcast doesn't > make sense. I would expect this to emit a pair of casts, fpext to float, and > fptrunc down to half If we don't just reject it as an invalid cast https://github.com/llvm/llvm-project/pull/89051

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, auto PP = getPrintingPolicy(); Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None); + SourceLocation Loc = AliasDecl->getLocation(); + + if (CGM.getCodeGenO

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-04-17 Thread Pengcheng Wang via cfe-commits
@@ -7238,10 +7238,15 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.addOptInFlag(CmdArgs, options::OPT_frelaxed_template_template_args, options::OPT_fno_relaxed_template_template_args); - // -fsized-deallocation is off by default,

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-17 Thread Joseph Huber via cfe-commits
jhuber6 wrote: It's definitely not ideal that this prints a non-existent path if the per-target runtime directory configuration is off. Couldn't we just do a trivial filesystem check to make sure it exists before appending it? https://github.com/llvm/llvm-project/pull/87866 ___

[clang] [Clang][Parse] Diagnose requires expressions with explicit object parameters (PR #88974)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88974 >From f81f0582dd7ee8d951128917398319c052371b3e Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 16 Apr 2024 15:42:45 -0400 Subject: [PATCH 1/3] [Clang][Parse] Diagnose requires expressions with e

[clang] [Clang][Sema] Warn when 'exclude_from_explicit_instantiation' attribute is used on local classes and members thereof (PR #88777)

2024-04-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/88777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Clean dead code in ParsedAttr.h (PR #89064)

2024-04-17 Thread Abdul Raheem via cfe-commits
https://github.com/abdulraheembeigh approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/89064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-04-17 Thread via cfe-commits
bgra8 wrote: @dtemirbulatov could you please revert to green to unblock us and continue the investigation asynchronously? https://github.com/llvm/llvm-project/pull/79842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] d558c09 - [NFC] Clean dead code in ParsedAttr.h (#89064)

2024-04-17 Thread via cfe-commits
Author: yronglin Date: 2024-04-17T22:11:04+08:00 New Revision: d558c090fc78beb6737098f058a084635b893567 URL: https://github.com/llvm/llvm-project/commit/d558c090fc78beb6737098f058a084635b893567 DIFF: https://github.com/llvm/llvm-project/commit/d558c090fc78beb6737098f058a084635b893567.diff LOG:

[clang] [NFC] Clean dead code in ParsedAttr.h (PR #89064)

2024-04-17 Thread via cfe-commits
https://github.com/yronglin closed https://github.com/llvm/llvm-project/pull/89064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
@@ -1455,21 +1455,17 @@ void TypePrinter::printTag(TagDecl *D, raw_ostream &OS) { // If this is a class template specialization, print the template // arguments. - if (const auto *Spec = dyn_cast(D)) { -ArrayRef Args; -TypeSourceInfo *TAW = Spec->getTypeAsWritten

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-17 Thread Erich Keane via cfe-commits
@@ -1455,21 +1455,17 @@ void TypePrinter::printTag(TagDecl *D, raw_ostream &OS) { // If this is a class template specialization, print the template // arguments. - if (const auto *Spec = dyn_cast(D)) { -ArrayRef Args; -TypeSourceInfo *TAW = Spec->getTypeAsWritten

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
@@ -2596,27 +2588,14 @@ class VarTemplateSpecializationDecl : public VarDecl, llvm::PointerUnion SpecializedTemplate; - /// Further info for explicit template specialization/instantiation. - struct ExplicitSpecializationInfo { -/// The type-as-written. -TypeSourc

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-17 Thread Erich Keane via cfe-commits
@@ -2596,27 +2588,14 @@ class VarTemplateSpecializationDecl : public VarDecl, llvm::PointerUnion SpecializedTemplate; - /// Further info for explicit template specialization/instantiation. - struct ExplicitSpecializationInfo { -/// The type-as-written. -TypeSourc

[clang] [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (PR #88427)

2024-04-17 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea updated https://github.com/llvm/llvm-project/pull/88427 >From 1b11d526e2cde1df64c7c4e05b2698b6d40926c3 Mon Sep 17 00:00:00 2001 From: Alexandre Ganea Date: Thu, 11 Apr 2024 13:02:30 -0400 Subject: [PATCH 1/2] [clang-scan-deps] Fix atomic contention when updating `Trac

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/89076 Fixes: #89065 >From 49b4cd16c7f22bf31239f9474bb68c81ed76f057 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 17 Apr 2024 22:22:18 +0800 Subject: [PATCH] [clang-tidy] bugprone-lambda-function-name ign

[clang-tools-extra] [clang-tidy] bugprone-lambda-function-name ignore macro in captures (PR #89076)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes Fixes: #89065 --- Full diff: https://github.com/llvm/llvm-project/pull/89076.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp (+4-3) - (modi

[clang] [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (PR #88427)

2024-04-17 Thread Alexandre Ganea via cfe-commits
aganea wrote: > As an alternative approach: could we turn these into member variables, make > them non-atomic and take care to update the stats of the superior > `FileManager` whenever an inferior `FileManager` goes out of scope? (e.g. > after implicitly building a module) As suggested. http

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-04-17 Thread Krystian Stasiowski via cfe-commits
@@ -2596,27 +2588,14 @@ class VarTemplateSpecializationDecl : public VarDecl, llvm::PointerUnion SpecializedTemplate; - /// Further info for explicit template specialization/instantiation. - struct ExplicitSpecializationInfo { -/// The type-as-written. -TypeSourc

[libclc] [libclc] Add initial LIT tests (PR #87989)

2024-04-17 Thread Matt Arsenault via cfe-commits
@@ -1,3 +1,6 @@ -__kernel void foo(int *i) { +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s arsenm wrote: The target absolutely should be explicit in any testing files. Pretending these tests can be generic is going to be an intractable problem https://g

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-17 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/89078 [[dcl.fct]p6](https://eel.is/c++draft/dcl.fct#6) states: > [...] An explicit-object-parameter-declaration shall appear only as the first > parameter-declaration of a parameter-declaration-list of either: > - a

[libclc] [libclc] Add initial LIT tests (PR #87989)

2024-04-17 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/87989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-17 Thread Orlando Cazalet-Hyams via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \ +// RUN: | FileCheck %s + + Check that -gtemplate-alias causes DW_TAG_template_alias emission for + template aliase

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes [[dcl.fct]p6](https://eel.is/c++draft/dcl.fct#6) states: > [...] An explicit-object-parameter-declaration shall appear only as the first parameter-declaration of a parameter-declaration-list of either: > - a member

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-17 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/89078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-04-17 Thread via cfe-commits
https://github.com/cor3ntin commented: Generally, I like the approach. Note this PR is related to https://github.com/llvm/llvm-project/pull/88974/files @sdkrystian https://github.com/llvm/llvm-project/pull/89078 ___ cfe-commits mailing list cfe-com

<    1   2   3   4   5   >