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

2024-06-14 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,21 @@ +//===-- AMDGPUTypes.def - Metadata about AMDGPU types ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

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

2024-06-14 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,84 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature + // REQUIRES: amdgpu-registered-target + // RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu verde -emit-llvm -o - %s | FileCheck %s + // RUN

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

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

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

2024-06-14 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,21 @@ +//===-- AMDGPUTypes.def - Metadata about AMDGPU types ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

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

2024-06-14 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,21 @@ +//===-- AMDGPUTypes.def - Metadata about AMDGPU types ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-06-14 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,65 @@ +; RUN: llc -stop-after=amdgpu-isel -mtriple=amdgcn-- -mcpu=gfx1100 -verify-machineinstrs -o - %s | FileCheck --check-prefixes=CHECK,ISEL %s + +; CHECK-LABEL: name:basic_readfirstlane_i64 +; CHECK:[[TOKEN:%[0-9]+]]{{[^ ]*}} = CONVERGENCECTRL

[clang] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

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

[clang] [Clang] Fix potential null pointer dereferences in retain cycle detection (PR #95192)

2024-06-14 Thread John McCall via cfe-commits
rjmccall wrote: Do you have a test case? https://github.com/llvm/llvm-project/pull/95192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-06-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/94830 >From 7b31bbbd9efd13ea78d1a7bfef00cbd943e27876 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 14 Jun 2024 13:22:17 -0400 Subject: [PATCH] [Clang][AMDGPU] Add a new builtin type for buffer rsrc --- clang

[clang] [Clang] Fix potential null pointer dereferences in retain cycle detection (PR #95192)

2024-06-14 Thread via cfe-commits
smanna12 wrote: > Do you have a test case? Thanks @rjmccall for reviews. No I do not have any test case. The issue is reported by static analyzer tool. https://github.com/llvm/llvm-project/pull/95192 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang] Implement CWG2877 "Type-only lookup for using-enum-declarator" (PR #95399)

2024-06-14 Thread via cfe-commits
@@ -738,16 +738,47 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration( return nullptr; } -if (!Tok.is(tok::identifier)) { +Decl *UED = nullptr; + +if (Tok.is(tok::identifier)) { cor3ntin wrote: After more tests, I realize that the h

[clang] [Clang] Fix potential null pointer dereferences in retain cycle detection (PR #95192)

2024-06-14 Thread John McCall via cfe-commits
https://github.com/rjmccall closed https://github.com/llvm/llvm-project/pull/95192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix potential null pointer dereferences in retain cycle detection (PR #95192)

2024-06-14 Thread John McCall via cfe-commits
rjmccall wrote: Okay. It looks like it's actually impossible for this to be null — since we're looking at a `super` dispatch, we must be inside an Objective-C method declaration. We do appreciate people running static analysis on our code base, but please think of analysis reports as the sta

[clang] [Clang][NFC] Avoid opening namespace std (PR #95470)

2024-06-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/95470 >From ee78c1e22b81ef3beb4e28e4ea778ab3a80b1f2d Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 13 Jun 2024 22:24:17 +0200 Subject: [PATCH] [Clang] Avoid opening namespace std --- clang/include/clan

[clang] b6fd6d4 - [HLSL] Use hlsl vector template in type printer (#95489)

2024-06-14 Thread via cfe-commits
Author: Chris B Date: 2024-06-14T13:13:25-05:00 New Revision: b6fd6d4cc53d263c586264d1476265fbdcc0ba21 URL: https://github.com/llvm/llvm-project/commit/b6fd6d4cc53d263c586264d1476265fbdcc0ba21 DIFF: https://github.com/llvm/llvm-project/commit/b6fd6d4cc53d263c586264d1476265fbdcc0ba21.diff LOG:

[clang] [HLSL] Use hlsl vector template in type printer (PR #95489)

2024-06-14 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/95489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/95579 None >From 1461be872bf26e2e0f2572f688a45af795421432 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 13 Jun 2024 10:27:52 -0700 Subject: [PATCH 1/3] [llvm][AArch64] Support -mcpu=apple-m4 --- .../llvm/Ta

[clang] [llvm] [llvm][AArch64] Support -mcpu=apple-m4 (PR #95478)

2024-06-14 Thread Jon Roelofs via cfe-commits
@@ -1010,6 +1034,9 @@ def : ProcessorModel<"apple-a16", CycloneModel, ProcessorFeatures.AppleA16, [TuneAppleA16]>; def : ProcessorModel<"apple-a17", CycloneModel, ProcessorFeatures.AppleA17, [TuneAppleA17]>; +def : ProcessorModel<"appl

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Jon Roelofs (jroelofs) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/95579.diff 5 Files Affected: - (modified) clang/test/Misc/target-invalid-cpu-note.c (+2-2) - (modified) llvm/include/llvm/TargetParser/A

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Jon Roelofs via cfe-commits
jroelofs wrote: stacked PR: https://github.com/llvm/llvm-project/pull/95478 https://github.com/llvm/llvm-project/pull/95579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-06-14 Thread via cfe-commits
Author: Akira Hatanaka Date: 2024-06-14T11:22:09-07:00 New Revision: 46c8f25b0a7d664d4ef3b8d6376815a877788463 URL: https://github.com/llvm/llvm-project/commit/46c8f25b0a7d664d4ef3b8d6376815a877788463 DIFF: https://github.com/llvm/llvm-project/commit/46c8f25b0a7d664d4ef3b8d6376815a877788463.diff

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

2024-06-14 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed 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-tools-extra] [Clang] [Sema] Diagnose unknown std::initializer_list layout in SemaInit (PR #95580)

2024-06-14 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/95580 This checks if the layout of `std::initializer_list` is something Clang can handle much earlier and deduplicates the checks in CodeGen/CGExprAgg.cpp and AST/ExprConstant.cpp Also now diagnose `union initiali

[clang] [clang-tools-extra] [Clang] [Sema] Diagnose unknown std::initializer_list layout in SemaInit (PR #95580)

2024-06-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes This checks if the layout of `std::initializer_list` is something Clang can handle much earlier and deduplicates the checks in CodeGen/CGExprAgg.cpp and AST/ExprConstant.

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

2024-06-14 Thread Alan Phipps via cfe-commits
evodius96 wrote: Somewhat related to this -- we (TI) are presently in the process of upstreaming our mod to save/restore VFP registers with the interrupt_save_fp attribute. See #89654. I think the patch needs to be updated in light of upstream changes to the Arm frame lowering code. https://

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

2024-06-14 Thread via cfe-commits
Author: Paul Kirth Date: 2024-06-14T11:35:19-07:00 New Revision: ade28a77ed17760bf2fde57c6571b69489b0bac0 URL: https://github.com/llvm/llvm-project/commit/ade28a77ed17760bf2fde57c6571b69489b0bac0 DIFF: https://github.com/llvm/llvm-project/commit/ade28a77ed17760bf2fde57c6571b69489b0bac0.diff LO

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

2024-06-14 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/95187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Map /Ot to -O3 instead of -O2 (PR #95406)

2024-06-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If we're trying to match MSVC, the amount of inlining MSVC does at /O2 is probably closer to what clang does at -O2 than -O3. Which is why it was mapped that way in 015ce0f68f791b3abec4225c1b2e532ce5020174, I think. clang's -O3 is really aggressive (which tends to look g

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-14 Thread Balazs Benics via cfe-commits
steakhal wrote: I checked out the code and gave it a test run. Across 200+ projects, it suppresses around 650 reports. I've sampled them and they appear like the FP this patch was motivated by. I don't really have the time to do the review, as I'll leave for vacation, but the intent of the pat

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Ian Anderson via cfe-commits
@@ -1313,11 +1313,19 @@ OptionalFileEntryRef HeaderSearch::LookupSubframeworkHeader( // File Info Management. //===--===// +static bool moduleMembershipNeedsMerge(const HeaderFileInfo *HFI, +

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Ian Anderson via cfe-commits
@@ -308,5 +308,73 @@ TEST_F(HeaderSearchTest, HeaderMapFrameworkLookup) { EXPECT_EQ(Search.getIncludeNameForHeader(FE), "Foo/Foo.h"); } +TEST_F(HeaderSearchTest, HeaderFileInfoMerge) { + auto AddHeader = [&](std::string HeaderPath) -> FileEntryRef { +VFS->addFile(Header

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Jan Svoboda via cfe-commits
@@ -1313,11 +1313,19 @@ OptionalFileEntryRef HeaderSearch::LookupSubframeworkHeader( // File Info Management. //===--===// +static bool moduleMembershipNeedsMerge(const HeaderFileInfo *HFI, +

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From 85df42bd55f76f8c77f44c78c8ccbe1bed8f8682 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] fix(93512): skip alignment checks on incomplete types (PR #94542)

2024-06-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/94542 >From 6044e1bcef93dd3c0bb4d1095a496afd6f17677a Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 6 Jun 2024 01:55:54 +0300 Subject: [PATCH] [Clang] fix(93512): skip alignment checks on incomplete types --

[clang] [Clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/95479 >From af6ba760826467a3ce7b7a41c18f194528a1cede Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 14 Jun 2024 01:26:34 +0300 Subject: [PATCH 1/4] [Clang] fix(95366): enhance cast operation safety with LVal

[clang] [libcxx] [clang] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -2456,6 +2461,139 @@ static RValue EmitHipStdParUnsupportedBuiltin(CodeGenFunction *CGF, return RValue::get(CGF->Builder.CreateCall(UBF, Args)); } +template +void RecursivelyClearPaddingImpl(CodeGenFunction &CGF, Value *Ptr, QualType Ty, size_t CurrentStartOffset, size

[clang] [libcxx] [clang] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -2538,6 +2539,205 @@ static RValue EmitHipStdParUnsupportedBuiltin(CodeGenFunction *CGF, return RValue::get(CGF->Builder.CreateCall(UBF, Args)); } +template +void RecursivelyClearPaddingImpl(CodeGenFunction &CGF, Value *Ptr, QualType Ty, +

[clang] [libcxx] [clang] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -2456,6 +2461,139 @@ static RValue EmitHipStdParUnsupportedBuiltin(CodeGenFunction *CGF, return RValue::get(CGF->Builder.CreateCall(UBF, Args)); } +template +void RecursivelyClearPaddingImpl(CodeGenFunction &CGF, Value *Ptr, QualType Ty, size_t CurrentStartOffset, size

[clang] [libcxx] [clang] Add builtin to clear padding bytes (prework for P0528R3) (PR #75371)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,807 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang-interp] Use -fno-sized-deallocation in two tests (PR #95546)

2024-06-14 Thread Nico Weber via cfe-commits
nico wrote: Merging to green up tests on a bot. Happy to address post-commit comments in a follow-up 🙂 https://github.com/llvm/llvm-project/pull/95546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] c63b9a5 - [clang-interp] Use -fno-sized-deallocation in two tests (#95546)

2024-06-14 Thread via cfe-commits
Author: Nico Weber Date: 2024-06-14T15:37:17-04:00 New Revision: c63b9a5af72a7d83d936c12ae4bc79828c073edf URL: https://github.com/llvm/llvm-project/commit/c63b9a5af72a7d83d936c12ae4bc79828c073edf DIFF: https://github.com/llvm/llvm-project/commit/c63b9a5af72a7d83d936c12ae4bc79828c073edf.diff LO

[clang] [clang-interp] Use -fno-sized-deallocation in two tests (PR #95546)

2024-06-14 Thread Nico Weber via cfe-commits
https://github.com/nico closed https://github.com/llvm/llvm-project/pull/95546 ___ 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-14 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/95354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Jan Svoboda via cfe-commits
@@ -84,7 +84,9 @@ struct HeaderFileInfo { LLVM_PREFERRED_TYPE(bool) unsigned isModuleHeader : 1; - /// Whether this header is a `textual header` in a module. + /// Whether this header is a `textual header` in a module. If a header is + /// textual in one module and norm

[clang] [clang-format] Handle AttributeMacro before access modifiers (PR #95503)

2024-06-14 Thread Björn Schäpers via cfe-commits
@@ -57,7 +57,10 @@ class LevelIndentTracker { /// Update the indent state given that \p Line is going to be formatted /// next. void nextLine(const AnnotatedLine &Line) { -Offset = getIndentOffset(*Line.First); +const auto *Tok = Line.First; +if (Tok->is(TT_At

[clang] Add flag to opt out of wasm-opt (PR #95208)

2024-06-14 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode approved this pull request. This looks good to me. https://github.com/llvm/llvm-project/pull/95208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] [Sema] Diagnose unknown std::initializer_list layout in SemaInit (PR #95580)

2024-06-14 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/95580 >From ef42900b5e3533839c126cb9e6b19d7dcc7806c6 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Fri, 14 Jun 2024 19:14:21 +0100 Subject: [PATCH 1/2] [Clang] [SemaCXX] Diagnose unknown std::initializer_list la

[clang] [DebugInfo] Change handling of structured bindings of bitfields (PR #94632)

2024-06-14 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/94632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] feed66f - [InstallAPI] Pick up input headers by directory traversal (#94508)

2024-06-14 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-06-14T13:08:27-07:00 New Revision: feed66f3eae5006bb05e6cb34801930fd940daa8 URL: https://github.com/llvm/llvm-project/commit/feed66f3eae5006bb05e6cb34801930fd940daa8 DIFF: https://github.com/llvm/llvm-project/commit/feed66f3eae5006bb05e6cb34801930fd940daa8.diff

[clang] [InstallAPI] Pick up input headers by directory traversal (PR #94508)

2024-06-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/94508 ___ 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-14 Thread Eli Friedman via cfe-commits
@@ -318,6 +318,9 @@ namespace { if (Diags.hasUnrecoverableErrorOccurred()) return; + if (RD->shouldEmitInExternalSource()) efriedma-quic wrote: Most of the CodeGen code surrounding vtable emission is optimizations. Specifically, to avoid

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

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -6853,6 +6853,7 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) { if (ES->hasExternalDefinitions(D) == ExternalASTSource::EK_Never) DI->completeUnusedClass(*CRD); } + efriedma-quic wrote: Unnecessary whitespace change https://github.

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

2024-06-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/75912 ___ 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-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM with one minor comment https://github.com/llvm/llvm-project/pull/75912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/94693 >From 049c29d85a06c58ed8afa689fe359e83c11dc314 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 4 Jun 2024 23:22:00 -0700 Subject: [PATCH] [Clang] Introduce [[clang::structured_concurrency]] --- cla

[clang] 4184d33 - [Clang][NFC] Avoid opening namespace std (#95470)

2024-06-14 Thread via cfe-commits
Author: Nikolas Klauser Date: 2024-06-14T22:24:40+02:00 New Revision: 4184d33369a9dce391977220683e3f1975bf1fc9 URL: https://github.com/llvm/llvm-project/commit/4184d33369a9dce391977220683e3f1975bf1fc9 DIFF: https://github.com/llvm/llvm-project/commit/4184d33369a9dce391977220683e3f1975bf1fc9.dif

[clang] [Clang][NFC] Avoid opening namespace std (PR #95470)

2024-06-14 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed https://github.com/llvm/llvm-project/pull/95470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Map /Ot to -O3 instead of -O2 (PR #95406)

2024-06-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: For reference, current MSVC has a flag /Ob3 to request more aggressive inlining. https://github.com/llvm/llvm-project/pull/95406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: @ChuanqiXu9, this is a part of the systematic changes I was talking about. At this stage I know there are quite some rough edges but would like your input on the direction here. https://github.com/llvm/llvm-project/pull/94693 __

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 ready_for_review https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -8015,6 +8015,26 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroStructuredConcurrencyDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_structured_concurrency]]`` is a class attribute whic

[clang] [clang][CodeGen] Return RValue from `EmitVAArg` (PR #94635)

2024-06-14 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. https://github.com/llvm/llvm-project/pull/94635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/95608 Use Python's builtin enum class instead of writing our own. This is preparation for passing a strict type check in PR #78114 , fixing 920 out of 1341 strict typing errors >From 35bfcfbc69ee812c59350440b7b1

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jannick Kremer (DeinAlptraum) Changes Use Python's builtin enum class instead of writing our own. This is preparation for passing a strict type check in PR #78114 , fixing 920 out of 1341 strict typing errors --- Patch is 64.63 KiB, tru

[clang] [llvm] Cleanup MC/DC intrinsics for #82448 (PR #95496)

2024-06-14 Thread Alan Phipps via cfe-commits
https://github.com/evodius96 approved this pull request. LGTM thanks https://github.com/llvm/llvm-project/pull/95496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
@@ -611,51 +612,25 @@ def register(value, name): ### Cursor Kinds ### -class BaseEnumeration: +class BaseEnumeration(Enum): """ Common base class for named enumerations held in sync with Index.h values. - -Subclasses must define their own _kinds and _name_map me

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/95608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: There is also `TokenKind`: this one does not currently inherit from `BaseEnumeration` and is defined somewhat differently, having all its variants and their IDs as a dictionary in `enumerations.py`. This seems quite arbitrary to me, is there any reaso

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
@@ -31,17 +31,9 @@ class TestCursorKind(unittest.TestCase): def test_from_id(self): """Check that kinds can be constructed from valid IDs""" for enum in self.enums: -self.assertEqual(enum.from_id(2), enum._kinds[2]) +self.assertEqual(

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
@@ -611,51 +612,25 @@ def register(value, name): ### Cursor Kinds ### -class BaseEnumeration: +class BaseEnumeration(Enum): """ Common base class for named enumerations held in sync with Index.h values. - -Subclasses must define their own _kinds and _name_map me

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
@@ -611,51 +612,25 @@ def register(value, name): ### Cursor Kinds ### -class BaseEnumeration: +class BaseEnumeration(Enum): """ Common base class for named enumerations held in sync with Index.h values. - -Subclasses must define their own _kinds and _name_map me

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/94717 >From eeb334620df72c395a5ad27f44a864a6a0c194a5 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Thu, 6 Jun 2024 23:18:12 -0400 Subject: [PATCH 1/9] [clang][clang-doc] add asset path --- .../clang-doc/tool/Cla

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -131,12 +137,55 @@ std::string GetExecutablePath(const char *Argv0, void *MainAddr) { return llvm::sys::fs::getMainExecutable(Argv0, MainAddr); } +void GetAssetFiles(clang::doc::ClangDocContext &CDCtx) { + std::error_code Code; ilovepi wrote: ```sugges

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -127,16 +135,85 @@ std::string getFormatString() { // GetMainExecutable (since some platforms don't support taking the // address of main, and some platforms can't implement GetMainExecutable // without being given the address of a function in the main executable). -std::str

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/94717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi requested changes to this pull request. https://github.com/llvm/llvm-project/pull/94717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/94717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "" > %t/compile_flags.txt +// RUN: cp "%s" "%t/test.cpp" ilovepi wrote: Why copy this file and rename it? https://github.com/llvm/llvm-project/pull/94717 _

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: rm -rf %t +// RUN: mkdir %t ilovepi wrote: These still seem to be different steps. combining them is intentional. Actually, do you even need this directory? I don't think you do. https://github.com/llvm/llvm-project/pull/94717

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -49,6 +49,8 @@ using namespace clang::ast_matchers; using namespace clang::tooling; using namespace clang; +using DirIterator = llvm::sys::fs::directory_iterator; ilovepi wrote: There is a` DirIterator` in LLVM's VFS, and it is confusing to see you reuse t

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "" > %t/compile_flags.txt +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-doc --format=html --executor=standalone -p %t %t/test.cpp -output=%t/docs > %t/output.txt ilovepi wrote: ```suggestion // R

[clang-tools-extra] [clang-doc] Add --asset option to clang-doc (PR #94717)

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "" > %t/compile_flags.txt ilovepi wrote: nit: remove. This isn't required. AFAICT its a clang-tidy/clangd thing. https://github.com/llvm/llvm-project/pull/94717 __

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
@@ -8015,6 +8015,26 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroStructuredConcurrencyDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_structured_concurrency]]`` is a class attribute whic

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-06-14 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/79867 >From 94dee94becb7d79b087e183754602e08a5c4669d Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Mon, 29 Jan 2024 11:44:25 -0500 Subject: [PATCH 1/2] [clangd] Add fix-all CodeActions --- clang-tools-extra/c

[clang-tools-extra] 3d25e5a - [clang-tidy] avoid false positive when overload for bugprone-return-const-ref-from-parameter (#95434)

2024-06-14 Thread via cfe-commits
Author: Congcong Cai Date: 2024-06-15T06:21:41+08:00 New Revision: 3d25e5ae996d709cf1496f0c6823f6a82f51831e URL: https://github.com/llvm/llvm-project/commit/3d25e5ae996d709cf1496f0c6823f6a82f51831e DIFF: https://github.com/llvm/llvm-project/commit/3d25e5ae996d709cf1496f0c6823f6a82f51831e.diff

[clang-tools-extra] [clang-tidy] avoid false positive when overload for bugprone-return-const-ref-from-parameter (PR #95434)

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

[clang] [libclang/python] Refactor enum usage (PR #95608)

2024-06-14 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll can I ask you for a review again? As a next step towards the python-bindings strict typing PR, this one captures all the enum refactoring changes necessary towards that goal. Don't be scared by the LoC changed: 90% of that is just indentation changes :) https://git

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-06-14 Thread Shafik Yaghmour via cfe-commits
@@ -3420,6 +3441,15 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, } Result = VD->getEvaluatedValue(); + + // P2280R4 If we don't have a value because this is a reference that was not + // initialized or whose lifetime began within E then create a val

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Eli Friedman via cfe-commits
@@ -8015,6 +8015,26 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroStructuredConcurrencyDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_structured_concurrency]]`` is a class attribute whic

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha approved this pull request. https://github.com/llvm/llvm-project/pull/95579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha edited https://github.com/llvm/llvm-project/pull/95579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] Rearrange Apple CPUs by generation, not product class. NFC (PR #95579)

2024-06-14 Thread Ahmed Bougacha via cfe-commits
@@ -983,50 +1007,58 @@ def : ProcessorModel<"thunderx3t110", ThunderX3T110Model, def : ProcessorModel<"tsv110", TSV110Model, ProcessorFeatures.TSV110, [TuneTSV110]>; +// iPhone, iPad, Mac and Watch CPUs ahmedbougacha wrote: Certainly mino

[clang] [llvm] [llvm][AArch64] Support -mcpu=apple-m4 (PR #95478)

2024-06-14 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha approved this pull request. https://github.com/llvm/llvm-project/pull/95478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,358 @@ +// RUN: rm -rf %t && mkdir -p %t/docs && mkdir -p %t/build ilovepi wrote: ```suggestion // RUN: rm -rf %t && mkdir -p %t/docs %t/build ``` you don't need to run `mkdir` twice. https://github.com/llvm/llvm-project/pull/93928 __

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

2024-06-14 Thread Paul Kirth via cfe-commits
@@ -299,8 +299,7 @@ Example usage for a project using a compile commands database: llvm::outs() << "Generating assets for docs...\n"; Err = G->get()->createResources(CDCtx); if (Err) { -llvm::errs() << toString(std::move(Err)) << "\n"; -return 1; +llvm::outs(

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
@@ -8015,6 +8015,26 @@ but do not pass them to the underlying coroutine or pass them by value. }]; } +def CoroStructuredConcurrencyDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``[[clang::coro_structured_concurrency]]`` is a class attribute whic

[clang] [llvm] [Clang][Coroutines] Improve CoroElide with [[clang::coro_structured_concurrency]] attribute for C++ (PR #94693)

2024-06-14 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/94693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   >