[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-12 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/94159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9d7299f - [Clang] Add fix-it hint to insert `*` when a modifiable lvalue is required (#94159)

2024-06-12 Thread via cfe-commits
Author: Rajveer Singh Bharadwaj Date: 2024-06-13T08:54:13+02:00 New Revision: 9d7299fb84bcaafc6b7368dbe5ee6de29e71e655 URL: https://github.com/llvm/llvm-project/commit/9d7299fb84bcaafc6b7368dbe5ee6de29e71e655 DIFF: https://github.com/llvm/llvm-project/commit/9d7299fb84bcaafc6b7368dbe5ee6de29e71

[clang] [clang] Fix-it hint for `++this` -> `++*this` when deref is modifiable (PR #94159)

2024-06-12 Thread via cfe-commits
Sirraide wrote: > @Sirraide Can you land this for me? Sure; looks like everything is fine. https://github.com/llvm/llvm-project/pull/94159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-12 Thread Mingming Liu via cfe-commits
@@ -103,27 +114,226 @@ static cl::opt ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden, cl::desc("Dump IR after transformation happens")); +// Indirect call promotion pass will fall back to function-based comparison if +// vtable-count / function-

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-12 Thread Mingming Liu via cfe-commits
@@ -321,14 +790,114 @@ bool IndirectCallPromoter::processFunction(ProfileSummaryInfo *PSI) { if (!NumCandidates || (PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount))) continue; + auto PromotionCandidates = getPromotionCandidatesForCallSite

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-12 Thread Mingming Liu via cfe-commits
@@ -1393,16 +1398,27 @@ MDNode *getPGOFuncNameMetadata(const Function &F) { return F.getMetadata(getPGOFuncNameMetadataName()); } -void createPGOFuncNameMetadata(Function &F, StringRef PGOFuncName) { - // Only for internal linkage functions. - if (PGOFuncName == F.getName(

[clang] [compiler-rt] [llvm] [TypeProf][InstrFDO]Implement more efficient comparison sequence for indirect-call-promotion with vtable profiles. (PR #81442)

2024-06-12 Thread Mingming Liu via cfe-commits
@@ -1967,11 +1969,23 @@ void llvm::updateProfileCallee( uint64_t CloneEntryCount = PriorEntryCount - NewEntryCount; for (auto Entry : *VMap) { if (isa(Entry.first)) -if (auto *CI = dyn_cast_or_null(Entry.second)) +if (auto *CI = dyn_cast_or_null(En

[clang] [clang] Don't print extra space when dumping template names (PR #95213)

2024-06-12 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/95213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1dbd7be - [clang] Don't print extra space when dumping template names (#95213)

2024-06-12 Thread via cfe-commits
Author: Haojian Wu Date: 2024-06-13T08:29:05+02:00 New Revision: 1dbd7bedc37fca1e7744dca202d0af427f399d68 URL: https://github.com/llvm/llvm-project/commit/1dbd7bedc37fca1e7744dca202d0af427f399d68 DIFF: https://github.com/llvm/llvm-project/commit/1dbd7bedc37fca1e7744dca202d0af427f399d68.diff LO

[clang] [clang] Don't print extra space when dumping template names (PR #95213)

2024-06-12 Thread Haojian Wu via cfe-commits
hokein wrote: Thanks for the review, I'd go with the current fix. https://github.com/llvm/llvm-project/pull/95213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][cmake] Copy assets to build directory (PR #95187)

2024-06-12 Thread Petr Hosek via cfe-commits
@@ -25,3 +25,11 @@ install(FILES ../assets/clang-doc-default-stylesheet.css install(FILES ../assets/index.js DESTINATION "${CMAKE_INSTALL_DATADIR}/clang" COMPONENT clang-doc) + +add_custom_target(copy-clang-doc-assets petrhosek wrote: We prefer having a ru

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-12 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Our current theory is that somehow the build system does not mark this symbol as exported. Maybe we can confirm that by making the symbol resolution for that particular one via the JIT absolute symbol definition. This is rather a workaround and the real fix should be in the b

[clang] added regcall struct by reg support (PR #95257)

2024-06-12 Thread via cfe-commits
mahesh-attarde wrote: There are not failures on `buildkite/github-pull-requests/linux-linux-x64.` something else is off. https://github.com/llvm/llvm-project/pull/95257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang] fix broken canonicalization of DeducedTemplateSpecializationType (PR #95202)

2024-06-12 Thread NAKAMURA Takumi via cfe-commits
@@ -0,0 +1,73 @@ +//===- unittests/AST/ProfilingTest.cpp --- Tests for Profiling --===// +// +// 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: Apache-2.0

[clang] [clang][ARM] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-06-12 Thread Chris Copeland via cfe-commits
https://github.com/chrisnc updated https://github.com/llvm/llvm-project/pull/91870 >From 16a00f4cf511e6dd96202d3013b41873f8dcba6b Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Sat, 11 May 2024 00:15:50 -0700 Subject: [PATCH] [ARM][clang] Fix warning for VFP function calls from interrupts

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-06-12 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From 094dbf3e01a62136db6be1afd6194f1d84ca8494 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Wed, 12 Jun 2024 02:14:32 -0700 Subject: [PATCH 1/3] [Offload][AMDGPU] Impose more restrictions for implicit

[clang] [clang][ARM] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-06-12 Thread Chris Copeland via cfe-commits
chrisnc wrote: I've rebased, updated the warning text and release notes, and created https://github.com/llvm/llvm-project/issues/95359 for the future improvement to warn about calling interrupt handlers. https://github.com/llvm/llvm-project/pull/91870 __

[clang] [clang][ARM] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-06-12 Thread Chris Copeland via cfe-commits
https://github.com/chrisnc updated https://github.com/llvm/llvm-project/pull/91870 >From a67b6703d384eb63b947e75c13d6421a5f961f6c Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Sat, 11 May 2024 00:15:50 -0700 Subject: [PATCH] [ARM][clang] Fix warning for VFP function calls from interrupts

[clang-tools-extra] [clang-doc] Add basic e2e test (PR #93928)

2024-06-12 Thread via cfe-commits
PeterChou1 wrote: I think this finally works i think we could also shelve https://github.com/llvm/llvm-project/pull/94717 since I wrote that pr to get around the fact that we can't copy assets https://github.com/llvm/llvm-project/pull/93928 ___ cfe-

[clang] [clang-format] Fix bad comment indentation before ifdef after braceless if (PR #94776)

2024-06-12 Thread Owen Pan via cfe-commits
owenca wrote: @Erich-Reitz you were on the right track. See #95354. https://github.com/llvm/llvm-project/pull/94776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't over-indent comment below unbraced body (PR #95354)

2024-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #45002. --- Full diff: https://github.com/llvm/llvm-project/pull/95354.diff 3 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+5) - (modified) clang/lib/Format/UnwrappedLine

[clang] [clang-format] Don't over-indent comment below unbraced body (PR #95354)

2024-06-12 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/95354 Fixes #45002. >From 02f1731d57d40e51605f667c8a0b1223b159e645 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 12 Jun 2024 22:04:17 -0700 Subject: [PATCH] [clang-format] Don't overindent comment below unbraced b

[clang] added regcall struct by reg support (PR #95257)

2024-06-12 Thread via cfe-commits
mahesh-attarde wrote: Regcall ABI is described on https://cdrdv2-public.intel.com/679047/Intel-ABI-Vector-Function-v0.9.8.pdf Page No. 18 > ![image](https://github.com/llvm/llvm-project/assets/145317060/5ff49ca5-0b4c-4c8f-9f00-5de65e4eaeda) https://github.com/llvm/llvm-project/pull/95257 _

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-12 Thread David Green via cfe-commits
davemgreen wrote: If you remove tan from isTriviallyVectorizable it should prevent vectorization in the short term. It might be better to default FTAN to expand in https://github.com/llvm/llvm-project/blob/64c9a1e1266ec7bc4c4896b2df116fa12dbacf15/llvm/lib/CodeGen/TargetLoweringBase.cpp#L960,

[clang] [Clang][Sema] qualifier should be transformed (PR #94725)

2024-06-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov requested changes to this pull request. Needs changes as discussed. https://github.com/llvm/llvm-project/pull/94725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-12 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Can we change the target-independent bits of the tan() implementation in the backend so it doesn't require each target to explicitly request that tan() needs to be expanded? It should be possible to adjust the code in TargetLoweringBase.cpp a bit so FTAN defaults to being

[clang] 64c9a1e - [clang][Interp] Also revisit references to const types

2024-06-12 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-13T06:55:07+02:00 New Revision: 64c9a1e1266ec7bc4c4896b2df116fa12dbacf15 URL: https://github.com/llvm/llvm-project/commit/64c9a1e1266ec7bc4c4896b2df116fa12dbacf15 DIFF: https://github.com/llvm/llvm-project/commit/64c9a1e1266ec7bc4c4896b2df116fa12dbacf15.diff LO

[clang] [clang][ARM] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-06-12 Thread Chris Copeland via cfe-commits
chrisnc wrote: Thank you for the review! > * Calling a function marked interrupt from a function marked interrupt is > still UB isn't it? Should there be another warning to cover that scenario as > well? Correct. I can create a separate issue to describe such a warning. > * I see that gcc ha

[clang] [Clang][Sema] qualifier should be transformed (PR #94725)

2024-06-12 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I think this is missing one detail: We now have the same qualifier in two places: The elaborated type node attached to the TST, and in the name of the TST itself. While this is not ideal situation, I think it makes sense to just drop the TemplateName qualifier in the transform

[clang] [clang][ARM] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-06-12 Thread Chris Copeland via cfe-commits
@@ -384,6 +384,10 @@ Modified Compiler Flags evaluating to ``true`` and an empty body such as ``while(1);``) are considered infinite, even when the ``-ffinite-loop`` flag is set. +- Removed "arm interrupt calling convention" warning that was included in ch

[clang] [clang][ARM] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-06-12 Thread Chris Copeland via cfe-commits
@@ -336,9 +336,10 @@ def warn_anyx86_excessive_regsave : Warning< " with attribute 'no_caller_saved_registers'" " or be compiled with '-mgeneral-regs-only'">, InGroup>; -def warn_arm_interrupt_calling_convention : Warning< - "call to function without interrupt attribute

[clang] Check whether EvaluatedStmt::Value is valid in VarDecl::hasInit (PR #94515)

2024-06-12 Thread Matheus Izvekov via cfe-commits
@@ -2402,10 +2405,9 @@ Expr *VarDecl::getInit() { auto *Eval = getEvaluatedStmt(); - return cast_if_present( - Eval->Value.isOffset() - ? Eval->Value.get(getASTContext().getExternalSource()) - : Eval->Value.get(nullptr)); + return cast(Eval->Value.i

[clang] Check whether EvaluatedStmt::Value is valid in VarDecl::hasInit (PR #94515)

2024-06-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. This is much better, thanks! LGTM https://github.com/llvm/llvm-project/pull/94515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] Check whether EvaluatedStmt::Value is valid in VarDecl::hasInit (PR #94515)

2024-06-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/94515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add a builtin for llvm.amdgcn.make.buffer.rsrc intrinsic (PR #95276)

2024-06-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/95276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Don't print extra space when dumping template names (PR #95213)

2024-06-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. I think what I tried to do here is generally consistent: The convention on the Text node dumper is to add a space at the beginning of the field you want to append. I think the true issue here is the label: It breaks convention by adding a

[clang] [Clang][AMDGPU] Add a builtin for llvm.amdgcn.make.buffer.rsrc intrinsic (PR #95276)

2024-06-12 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,95 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -cl-std=CL2.0 -target-cpu verde -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple

[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)

2024-06-12 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/70306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-06-12 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: FYI https://github.com/itanium-cxx-abi/cxx-abi/issues/184 is the tracking issue for the mangling rules we need here. We will probably end up with something quite different than what I coded here so far. https://github.com/llvm/llvm-project/pull/94981 ___

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-06-12 Thread Matheus Izvekov via cfe-commits
@@ -9219,7 +9222,8 @@ class Sema final : public SemaBase { /// \returns true if an error occurred, false otherwise. bool CheckTemplateArgumentList( TemplateDecl *Template, SourceLocation TemplateLoc, - TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateA

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-06-12 Thread Matheus Izvekov via cfe-commits
@@ -9434,6 +9505,32 @@ ASTContext::getSubstTemplateTemplateParmPack(const TemplateArgument &ArgPack, return TemplateName(Subst); } +/// Retrieve the template name that represents a template name +/// deduced from a specialization. +TemplateName +ASTContext::getDeducedTempla

[clang-tools-extra] [clang-doc][cmake] Copy assets to build directory (PR #95187)

2024-06-12 Thread via cfe-commits
PeterChou1 wrote: > @petrhosek I'm pretty sure there's a better way to spell this, but I think we > need something similar to properly test clang-doc w/o an install step. > > cc: @PeterChou1 It looks like copy_directory_if_different is not available on windows https://github.com/llvm/llvm-pro

[clang] [Clang][AMDGPU] Add a builtin for llvm.amdgcn.make.buffer.rsrc intrinsic (PR #95276)

2024-06-12 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,95 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -cl-std=CL2.0 -target-cpu verde -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #94981)

2024-06-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/94981 >From f05e8590c7fae599d0658829949fa907942e83f2 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Mon, 20 May 2024 01:15:03 -0300 Subject: [PATCH] [clang] Implement CWG2398 provisional TTP matching to class t

[clang] [Clang][AMDGPU] Add a builtin for llvm.amdgcn.make.buffer.rsrc intrinsic (PR #95276)

2024-06-12 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > > I am wondering whether prefix the builtin type with `__amdgcn_` would be > > better since I envision risk of conflicting with reserved names of other > > compilers or standard libraries. > > In the patch where the type was introduced we had a brief back-and-forth. I > chec

[clang] [Serialization] Use 32 bit aligned decl id instead of unaligned decl id (PR #95348)

2024-06-12 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @alexfh Could you try to test this? And if this doesn't mitigate it, it will be helpful to provide the hotspot. https://github.com/llvm/llvm-project/pull/95348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [Serialization] Use 32 bit aligned decl id instead of unaligned decl id (PR #95348)

2024-06-12 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 78ee473784e5ef6f0b19ce4cb111fb6e4d23c6b2 eeef0c06e2a17f49ce3bdf8ae78b9bf1cd05a077 --

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-12 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I sent https://github.com/llvm/llvm-project/pull/95348 for aligned related change. For size increase, the reason and the possible solution are clear. We should store the declaration ID as two slots instead of one in the serialized format so that we can utilize VBR6 format be

[clang] [Serialization] Use 32 bit aligned decl id instead of unaligned decl id (PR #95348)

2024-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Chuanqi Xu (ChuanqiXu9) Changes See the post commit message in https://github.com/llvm/llvm-project/pull/92083. I suspect the compile time regression in AArch64 is related to alignments. I am not sure if

[clang] [Serialization] Use 32 bit aligned decl id instead of unaligned decl id (PR #95348)

2024-06-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/95348 See the post commit message in https://github.com/llvm/llvm-project/pull/92083. I suspect the compile time regression in AArch64 is related to alignments. I am not sure if this is the problem since I can't re

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/94889 >From 217c00f47aaa65b113d1c1cfd93a9c4e1d235c1a Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 9 Jun 2024 11:49:18 +0800 Subject: [PATCH 1/7] [Clang] Fix two issues of CTAD for aggregates --- clang/lib/S

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-12 Thread Younan Zhang via cfe-commits
@@ -1449,7 +1449,10 @@ void InitListChecker::CheckSubElementType(const InitializedEntity &Entity, // dependent non-array type or an array type with a value-dependent // bound assert(AggrDeductionCandidateParamTypes); - if (!isa_and_nonnull( + //

[clang] [clang-format] Don't count template template parameter as declaration (PR #95025)

2024-06-12 Thread Owen Pan via cfe-commits
@@ -1269,10 +1269,17 @@ class AnnotatingParser { if (CurrentToken && CurrentToken->is(tok::less)) { CurrentToken->setType(TT_TemplateOpener); next(); - if (!parseAngle()) + TemplateDeclarationDepth++; + if (!parseAngle()) { +TemplateDeclar

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-12 Thread Farzon Lotfi via cfe-commits
farzonl wrote: It seems like we have four options here. We can drop the `def Tan : FPMathTemplate, LibBuiltin<"math.h">` builtins so no `Builtin::BItanf` or `Builtin::BItanl` in cgbuitlin switch case. That wouldn't solve the SLPVectorizer case but doesn't expose it either unless you use a

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

2024-06-12 Thread Younan Zhang via cfe-commits
@@ -10918,22 +10944,24 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (!(RD->getDefinition() && RD->isAggregate())) return; QualType Ty = Context.getRecordType(RD); - SmallVector ElementTypes; - - InitListChecker CheckInitList(*

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

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

[clang] [Clang] Fix handling of brace ellison when building deduction guides (PR #94889)

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

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-12 Thread Chuanqi Xu via cfe-commits
@@ -318,6 +318,9 @@ namespace { if (Diags.hasUnrecoverableErrorOccurred()) return; + if (RD->shouldEmitInExternalSource()) ChuanqiXu9 wrote: Yes, I think it is not bad to put the check `RD->shouldEmitInExternalSource()` into `HandleVTable`

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-12 Thread Eli Friedman via cfe-commits
@@ -318,6 +318,9 @@ namespace { if (Diags.hasUnrecoverableErrorOccurred()) return; + if (RD->shouldEmitInExternalSource()) efriedma-quic wrote: Did you mean to change something in ModuleBuilder.cpp? https://github.com/llvm/llvm-project/pul

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: SLPVectorizer can introduce `llvm.tan.v2f32`. For example, running `opt -O3` on the following introduces `llvm.tan.v2f32` ``` target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "thumbv7-unknown-linux-android26" ; Function Attrs: null_pointe

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-12 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: Ok I think I'm completely happy with the patch now. It makes perfect sense to me and appears to be doing the right thing. Thank you @ziqingluo-90 for figuring this out! Let's add that comment and land. https://github.com/llvm/llvm-project/pull/92031 __

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-12 Thread Artem Dergachev via cfe-commits
@@ -1911,6 +1911,20 @@ SourceManager::getDecomposedIncludedLoc(FileID FID) const { return DecompLoc; } +FileID SourceManager::getFirstFIDOfLoadedAST(SourceLocation Loc) const { + assert(isLoadedSourceLocation(Loc) && + "Must be a source location in a loaded PCH/Mod

[clang] [Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-06-12 Thread Artem Dergachev via cfe-commits
@@ -1483,26 +1484,40 @@ void Preprocessor::emitFinalMacroWarning(const Token &Identifier, } bool Preprocessor::isSafeBufferOptOut(const SourceManager &SourceMgr, - const SourceLocation &Loc) const { - // Try to find a region in `Safe

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-12 Thread Chuanqi Xu via cfe-commits
@@ -318,6 +318,9 @@ namespace { if (Diags.hasUnrecoverableErrorOccurred()) return; + if (RD->shouldEmitInExternalSource()) ChuanqiXu9 wrote: I use `isInCurrentModuleUnit` instead since I feel the semantics are more clear. https://github.co

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-06-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/75912 >From cf8be3c418dde67b74d4a5a4ea98a33f0e2fbd72 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 19 Dec 2023 17:00:59 +0800 Subject: [PATCH 1/6] [C++20] [Modules] [Itanium ABI] Generate the vtable in the m

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > @aeubanks I'll revert. Is this example C or C++? C++ https://github.com/llvm/llvm-project/pull/94216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-12 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Oh, the time regression is surprising to me. And I observed that @alexfh only reports (compile performance) problems on AArch64 but @bgra8 reports (size increase problems) on both ARM64 and X86_64. @alexfh is it true? So I **guess** the problem may come from the unaligned a

[clang] 2e1ad93 - [clang] fix broken canonicalization of DeducedTemplateSpecializationType (#95202)

2024-06-12 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-06-12T22:40:39-03:00 New Revision: 2e1ad93961a3f444659c5d02d800e3144acccdb4 URL: https://github.com/llvm/llvm-project/commit/2e1ad93961a3f444659c5d02d800e3144acccdb4 DIFF: https://github.com/llvm/llvm-project/commit/2e1ad93961a3f444659c5d02d800e3144acccdb4.dif

[clang] [clang] fix broken canonicalization of DeducedTemplateSpecializationType (PR #95202)

2024-06-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/95202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix broken canonicalization of DeducedTemplateSpecializationType (PR #95202)

2024-06-12 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/95202 >From 8bd63f109c2bc1888b4d8dbd5e880900bbb4cef7 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 12 Jun 2024 00:42:48 -0300 Subject: [PATCH] [clang] fix broken canonicalization of DeducedTemplateSpecial

[clang-tools-extra] [clang-tidy] ignoring macro with hash preprocessing token in cppcoreguidelines-macro-usage (PR #95265)

2024-06-12 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/95265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] b06da39 - [clang-tidy] ignoring macro with hash preprocessing token in cppcoreguidelines-macro-usage (#95265)

2024-06-12 Thread via cfe-commits
Author: Congcong Cai Date: 2024-06-13T09:36:33+08:00 New Revision: b06da39cae0f7e2c6b8bc0bb03b734f9715c0bf3 URL: https://github.com/llvm/llvm-project/commit/b06da39cae0f7e2c6b8bc0bb03b734f9715c0bf3 DIFF: https://github.com/llvm/llvm-project/commit/b06da39cae0f7e2c6b8bc0bb03b734f9715c0bf3.diff

[clang] [clang] fix broken canonicalization of DeducedTemplateSpecializationType (PR #95202)

2024-06-12 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/95202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fuchsia] Add armv7m and armv8m runtimes to Fuchsia Clang toolchain (PR #95337)

2024-06-12 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/95337 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Implement resource binding type prefix mismatch errors (PR #87578)

2024-06-12 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/87578 >From 3960050439964fe3c0536696490b284a6c470cd1 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 3 Apr 2024 13:15:59 -0700 Subject: [PATCH 01/14] implement binding type error for t/cbuffers and rwbuffers

[clang] [Fuchsia] Add armv7m and armv8m runtimes to Fuchsia Clang toolchain (PR #95337)

2024-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haowei (zeroomega) Changes This patch adds armv7m and armv8m runtimes to Fuchsia Clang toolchain configuration. --- Full diff: https://github.com/llvm/llvm-project/pull/95337.diff 1 Files Affected: - (modified) clang/cmake/caches/Fuchs

[clang] [Fuchsia] Add armv7m and armv8m runtimes to Fuchsia Clang toolchain (PR #95337)

2024-06-12 Thread via cfe-commits
https://github.com/zeroomega created https://github.com/llvm/llvm-project/pull/95337 This patch adds armv7m and armv8m runtimes to Fuchsia Clang toolchain configuration. >From 5dfd619b9a5799539606d3bb2879c9d13111a6da Mon Sep 17 00:00:00 2001 From: Haowei Wu Date: Wed, 12 Jun 2024 17:27:23 -07

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-12 Thread via cfe-commits
alexfh wrote: So, what's happening here is a significant increase in the compilation time of a pretty large source that has a large number of modular dependencies (using Clang header modules rather than C++20 modules). The times reported by `clang -ftime-report` for clang frontend change dras

[clang] ca91538 - [MC] Move AllowTemporaryLabels setting to MCContext::MCContext

2024-06-12 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-12T16:42:58-07:00 New Revision: ca91538c9c6f5328f398ac849dcc4230824b007e URL: https://github.com/llvm/llvm-project/commit/ca91538c9c6f5328f398ac849dcc4230824b007e DIFF: https://github.com/llvm/llvm-project/commit/ca91538c9c6f5328f398ac849dcc4230824b007e.diff

[clang] [HLSL] (DRAFT) Another way to implement #92071: [HLSL] Default linkage of HLSL function should be internal (PR #95331)

2024-06-12 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/95331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] (DRAFT) Another way to implement #92071: [HLSL] Default linkage of HLSL function should be internal (PR #95331)

2024-06-12 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 5d87ba1c1f584dfbd5afaf187099b43681b2206d f4fdb0eb680ab1ddf4f289bde30b1a72872b2f8d --

[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

2024-06-12 Thread Krzysztof Drewniak via cfe-commits
krzysz00 wrote: Just a note - and maybe this was already discussed above - is there good reason not to explicitly make this type a 128-bit scalar? The LLVM data layout already does this https://github.com/llvm/llvm-project/pull/94830 ___ cfe-commits

[clang] [Clang][Driver] Expose `-fno-eliminate-unused-debug-types` to clang-cl (PR #95259)

2024-06-12 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea edited https://github.com/llvm/llvm-project/pull/95259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add a builtin for llvm.amdgcn.make.buffer.rsrc intrinsic (PR #95276)

2024-06-12 Thread Krzysztof Drewniak via cfe-commits
@@ -0,0 +1,95 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -cl-std=CL2.0 -target-cpu verde -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple

[clang] [HLSL] Change default linkage of HLSL functions and `groupshared` variables (PR #93336)

2024-06-12 Thread Helena Kotas via cfe-commits
@@ -108,3 +108,16 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [Clang][Driver] Expose `-fno-eliminate-unused-debug-types` to clang-cl (PR #95259)

2024-06-12 Thread Amy Huang via cfe-commits
https://github.com/amykhuang approved this pull request. Looks reasonable to me. https://github.com/llvm/llvm-project/pull/95259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add support for Cortex-A725 and Cortex-X925 (PR #95214)

2024-06-12 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray closed https://github.com/llvm/llvm-project/pull/95214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e80c595 - [AArch64] Add support for Cortex-A725 and Cortex-X925 (#95214)

2024-06-12 Thread via cfe-commits
Author: Jonathan Thackray Date: 2024-06-13T00:00:57+01:00 New Revision: e80c59556d2d71cc2d0dcb2bd712c36cc4043025 URL: https://github.com/llvm/llvm-project/commit/e80c59556d2d71cc2d0dcb2bd712c36cc4043025 DIFF: https://github.com/llvm/llvm-project/commit/e80c59556d2d71cc2d0dcb2bd712c36cc4043025.d

[clang] Bump the DWARF version number to 5 on Darwin. (PR #95164)

2024-06-12 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: Thanks! https://github.com/llvm/llvm-project/pull/95164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][Driver] Add HIPAMD Driver support for AMDGCN flavoured SPIR-V (PR #95061)

2024-06-12 Thread Alex Voicu via cfe-commits
@@ -128,12 +128,13 @@ enum class CudaArch { GFX12_GENERIC, GFX1200, GFX1201, + AMDGCNSPIRV, Generic, // A processor model named 'generic' if the target backend defines a // public one. LAST, CudaDefault = CudaArch::SM_52, - HIPDefault = CudaArch::

[clang] Revert "Bump the DWARF version number to 5 on Darwin." (PR #95325)

2024-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Florian Mayer (fmayer) Changes Reverts llvm/llvm-project#95164 This broke a buildbot: https://lab.llvm.org/buildbot/#/builders/37/builds/35987 --- Full diff: https://github.com/llvm/llvm-project/pull/9532

[clang] Revert "Bump the DWARF version number to 5 on Darwin." (PR #95325)

2024-06-12 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/95325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fcc4935 - Revert "Bump the DWARF version number to 5 on Darwin." (#95325)

2024-06-12 Thread via cfe-commits
Author: Florian Mayer Date: 2024-06-12T15:50:30-07:00 New Revision: fcc4935560720556defff25a9bd4fc44ffa3135b URL: https://github.com/llvm/llvm-project/commit/fcc4935560720556defff25a9bd4fc44ffa3135b DIFF: https://github.com/llvm/llvm-project/commit/fcc4935560720556defff25a9bd4fc44ffa3135b.diff

[clang] Revert "Bump the DWARF version number to 5 on Darwin." (PR #95325)

2024-06-12 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/95325 Reverts llvm/llvm-project#95164 This broke a buildbot: https://lab.llvm.org/buildbot/#/builders/37/builds/35987 >From fc671bbb1ceb94f8aac63bc0e4963e5894bc660e Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: W

[clang] Bump the DWARF version number to 5 on Darwin. (PR #95164)

2024-06-12 Thread Florian Mayer via cfe-commits
fmayer wrote: This broke our buildbot: https://lab.llvm.org/buildbot/#/builders/37/builds/35987 ``` FAILED: tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Darwin.cpp.o CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /b/sanitizer-x86_64-linux/build/llvm_build0/bin/clang++

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-12 Thread Dan Liew via cfe-commits
delcypher wrote: @pdherbemont Could you take a look at this? https://github.com/llvm/llvm-project/pull/94216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-12 Thread Dan Liew via cfe-commits
delcypher wrote: Reverted in c9d580033f29196223cd56a0fa238c3ba51d23e4 https://github.com/llvm/llvm-project/pull/94216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c9d5800 - Revert "Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (#94216)"

2024-06-12 Thread Dan Liew via cfe-commits
Author: Dan Liew Date: 2024-06-12T15:43:12-07:00 New Revision: c9d580033f29196223cd56a0fa238c3ba51d23e4 URL: https://github.com/llvm/llvm-project/commit/c9d580033f29196223cd56a0fa238c3ba51d23e4 DIFF: https://github.com/llvm/llvm-project/commit/c9d580033f29196223cd56a0fa238c3ba51d23e4.diff LOG:

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-12 Thread Dan Liew via cfe-commits
delcypher wrote: @aeubanks I'll revert. Is this example C or C++? https://github.com/llvm/llvm-project/pull/94216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: reduced: ``` struct Lock {}; struct A { Lock lock; union { bool b __attribute__((guarded_by(lock))); }; }; ``` seems like a regression, can we revert for now? https://github.com/llvm/llvm-project/pull/94216

  1   2   3   4   5   >