[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] [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

[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-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 ) { -Offset = getIndentOffset(*Line.First); +const auto *Tok = Line.First; +if

[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

[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
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-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-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] 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

[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

[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:

[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 , Value *Ptr, QualType Ty, size_t CurrentStartOffset, size_t

[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 , 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 , Value *Ptr, QualType Ty, size_t CurrentStartOffset, size_t

[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

[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][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

[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
@@ -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 { +

[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] [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

[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

[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-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

[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.

[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

[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

[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] 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:

[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] [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)

[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 :

[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 ---

[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] 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] [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] [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

[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] 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

[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

[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] 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] [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] [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]+]]{{[^ ]*}} =

[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:

[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:

[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 + //

[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 + //

[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:

[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 baa19285069854598437694cb2094283598cf8c2 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 14 Jun 2024 12:58:08 -0400 Subject: [PATCH] [Clang][AMDGPU] Add a new builtin type for buffer rsrc ---

[clang] Make diagnostic pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9a92f2f - Make diagnostic pragma override -Werror=foo and DefaultError warnings

2024-06-14 Thread via cfe-commits
Author: Fangrui Song Date: 2024-06-14T09:57:21-07:00 New Revision: 9a92f2f742347d9b31470349f3b777ecab580ac1 URL: https://github.com/llvm/llvm-project/commit/9a92f2f742347d9b31470349f3b777ecab580ac1 DIFF: https://github.com/llvm/llvm-project/commit/9a92f2f742347d9b31470349f3b777ecab580ac1.diff

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

2024-06-14 Thread Balázs Kéri via cfe-commits
@@ -393,6 +401,173 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext , return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder =

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

2024-06-14 Thread Vikram Hegde via cfe-commits
https://github.com/vikramRH 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] [llvm] [AMDGPU] Extend readlane, writelane and readfirstlane intrinsic lowering for generic types (PR #89217)

2024-06-14 Thread Vikram Hegde 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]+]]{{[^ ]*}} =

[clang] Make diagnostic pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/93647 >From 9770644e7db88cff2c16109ceb8cb446741d53ea Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 28 May 2024 21:33:55 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[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]+]]{{[^ ]*}} =

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

2024-06-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. 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] [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
@@ -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 { +

[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-format] Handle AttributeMacro before access modifiers (PR #95503)

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

[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

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

2024-06-14 Thread Vikram Hegde 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]+]]{{[^ ]*}} =

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

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

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

2024-06-14 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. 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] [HLSL] Use hlsl vector template in type printer (PR #95489)

2024-06-14 Thread David Peixotto via cfe-commits
https://github.com/dmpots approved this pull request. LGTM 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-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 updated https://github.com/llvm/llvm-project/pull/95434 >From ecbd726bb937361b243ea4433e8c597c8d30f857 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 14 Jun 2024 00:50:04 +0800 Subject: [PATCH 1/2] [clang-tidy] avoid false positive when overload for

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

2024-06-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -834,5 +834,4 @@ typedef struct {} empty; empty empty_record_test(void) { // CHECK-LABEL: define{{.*}} void @empty_record_test() return va_arg(the_list, empty); -// CHECK: [[GR_OFFS:%[a-z_0-9]+]] = load ptr, ptr @the_list Fznamznon wrote: Well, there is

[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 :

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

2024-06-14 Thread Mariya Podchishchaeva via cfe-commits
@@ -325,14 +325,19 @@ Address SparcV9ABIInfo::EmitVAArg(CodeGenFunction , Address VAListAddr, break; case ABIArgInfo::Ignore: -return Address(llvm::UndefValue::get(ArgPtrTy), ArgTy, TypeInfo.Align); +return CGF.EmitLoadOfAnyValue( +CGF.MakeAddrLValue(

[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 :

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

2024-06-14 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/75371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-06-14 Thread Louis Dionne 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:

[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

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

2024-06-14 Thread Jon Roelofs via cfe-commits
@@ -521,7 +521,14 @@ inline constexpr CpuInfo CpuInfos[] = { AArch64::ExtensionBitset({AArch64::AEK_AES, AArch64::AEK_SHA2, AArch64::AEK_SHA3, AArch64::AEK_FP16, AArch64::AEK_FP16FML})}, - +// Technically

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-06-14 Thread Pierre d'Herbemont via cfe-commits
@@ -3330,6 +3340,118 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// GuardedBy attributes (e.g., guarded_by): +/// AttrName '(' expression ')' +void Parser::ParseGuardedByAttribute( +IdentifierInfo , SourceLocation AttrNameLoc, +ParsedAttributes ,

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-06-14 Thread Pierre d'Herbemont via cfe-commits
https://github.com/pdherbemont updated https://github.com/llvm/llvm-project/pull/95455 >From db251415e4e8c110d8842b1242d51d6ec5e839e5 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Wed, 12 Jun 2024 20:20:05 +0200 Subject: [PATCH] Support `guarded_by` attribute and related attributes

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-14 Thread Paul Walker via cfe-commits
@@ -559,31 +559,76 @@ SemaARM::ArmStreamingType getArmStreamingFnType(const FunctionDecl *FD) { return SemaARM::ArmNonStreaming; } -static void checkArmStreamingBuiltin(Sema , CallExpr *TheCall, - const FunctionDecl *FD, -

[clang-tools-extra] [clang-tidy] Clarify diagnostics of bugprone-sizeof-expression (PR #95550)

2024-06-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Consider replacing ":" separator with "," https://github.com/llvm/llvm-project/pull/95550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-06-14 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 0a57a20aa506c5a5a8b0a8eb45446d0747493d7c 5347a0d44580167df364faf6b7a5dd60a52b9e88 --

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

2024-06-14 Thread Oleksandr T. via cfe-commits
@@ -9325,6 +9325,9 @@ bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) { Result.IsNullPtr = false; return true; } else { + if (!Value.isLValue()) a-tarasyuk wrote: @AaronBallman Thanks for the feedback . I've added all the

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-06-14 Thread Pierre d'Herbemont via cfe-commits
https://github.com/pdherbemont updated https://github.com/llvm/llvm-project/pull/95455 >From 8bfc79e42062e1343dbf96faadcd48cb55134079 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Wed, 12 Jun 2024 20:20:05 +0200 Subject: [PATCH] Support `guarded_by` attribute and related attributes

[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 edited https://github.com/llvm/llvm-project/pull/95479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 d66fdcbe0a56e17dbd25e6d2ed5bdcce1970fdea Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 14 Jun 2024 01:26:34 +0300 Subject: [PATCH 1/4] fix(95366): enhance cast operation safety with LValue

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

2024-06-14 Thread via cfe-commits
alexfh wrote: Thank you for the analysis, Ilya! Re: a possible resolution, I wonder why `llvm::hash_value` from llvm/ADT/Hashing.h is not used in `DenseSet`? In any case, if this can't be resolved quickly and needs a design discussion, it would be appropriate to revert the patch first.

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #95112)

2024-06-14 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/95112 >From e53dfbc9b2c6b7f30c1378731d7de284fa99d568 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Tue, 11 Jun 2024 14:26:38 +0100 Subject: [PATCH 1/4] [Clang] Implement CWG2813 --- clang/docs/ReleaseNotes.rst

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

2024-06-14 Thread Farzon Lotfi via cfe-commits
farzonl wrote: PR https://github.com/llvm/llvm-project/pull/95518/files should address all backends. Also SLPVectorizer was disabled for tan so I put out PR https://github.com/llvm/llvm-project/pull/95517 https://github.com/llvm/llvm-project/pull/94559

[clang-tools-extra] [clang-tidy] Clarify diagnostics of bugprone-sizeof-expression (PR #95550)

2024-06-14 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/95550 ...becasue they were strangely worded and in a few cases outright incorrect. From 06adc063c2388ea534537f5a417751fdf64b22cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Fri, 14 Jun 2024

[clang-tools-extra] [clang-tidy] Clarify diagnostics of bugprone-sizeof-expression (PR #95550)

2024-06-14 Thread Donát Nagy via cfe-commits
NagyDonat wrote: This commit is motivated by the discussion on https://github.com/llvm/llvm-project/pull/94356 . Feel free to bikeshed the messages, I'm not too attached to the new choices, I'm just unsatisfied with the old ones. https://github.com/llvm/llvm-project/pull/95550

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

2024-06-14 Thread via cfe-commits
BukeBeyond wrote: We have fast AVX256 scanners that detect data change and generate a hash in a united pass. When this code is inlined, it further optimizes to just a few instructions with constant size structures. There is a lot of optimization potential for these flat data structures. We

[clang] [flang] [flang] Implement -mcmodel flag (PR #95411)

2024-06-14 Thread Tom Eccles via cfe-commits
@@ -39,6 +39,7 @@ ENUM_CODEGENOPT(RelocationModel, llvm::Reloc::Model, 3, llvm::Reloc::PIC_) ///< ENUM_CODEGENOPT(DebugInfo, llvm::codegenoptions::DebugInfoKind, 4, llvm::codegenoptions::NoDebugInfo) ///< Level of debug info to generate ENUM_CODEGENOPT(VecLib,

[clang] (New) Add option to generate additional debug info for expression dereferencing pointer to pointers (PR #95298)

2024-06-14 Thread Stephen Tozer via cfe-commits
SLTozer wrote: Small recommendation that the [patch](https://github.com/llvm/llvm-project/pull/91724) @pogo59 mentioned above has now landed, so before merging this you should rebase and update the test accordingly. https://github.com/llvm/llvm-project/pull/95298

[clang-tools-extra] [clang-tidy] Clarify diagnostics of bugprone-sizeof-expression (PR #95550)

2024-06-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Donát Nagy (NagyDonat) Changes ...becasue they were strangely worded and in a few cases outright incorrect. --- Patch is 33.92 KiB, truncated to 20.00 KiB below, full version:

[clang] 8e0ba08 - [clang][HeaderSearch] Fix handling of relative file-paths in suggestPathToFileForDiagnostics (#95121)

2024-06-14 Thread via cfe-commits
Author: kadir çetinkaya Date: 2024-06-14T16:07:42+02:00 New Revision: 8e0ba08448d5935281e5afd007664d528dd672c4 URL: https://github.com/llvm/llvm-project/commit/8e0ba08448d5935281e5afd007664d528dd672c4 DIFF:

[clang] [llvm] [mlir] [polly] [RemoveDIs] Print IR with debug records by default (PR #91724)

2024-06-14 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer closed https://github.com/llvm/llvm-project/pull/91724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] db3a47c - Fix silent truncation of inline ASM `srcloc` cookie when going through a `DiagnosticInfoSrcMgr` (#84559)

2024-06-14 Thread via cfe-commits
Author: beetrees Date: 2024-06-14T15:05:57+01:00 New Revision: db3a47c810639388c80ed173dda3623dac00ce0a URL: https://github.com/llvm/llvm-project/commit/db3a47c810639388c80ed173dda3623dac00ce0a DIFF: https://github.com/llvm/llvm-project/commit/db3a47c810639388c80ed173dda3623dac00ce0a.diff

[clang] [llvm] Fix silent truncation of inline ASM `srcloc` cookie when going through a `DiagnosticInfoSrcMgr` (PR #84559)

2024-06-14 Thread via cfe-commits
github-actions[bot] wrote: @beetrees Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] [llvm] Fix silent truncation of inline ASM `srcloc` cookie when going through a `DiagnosticInfoSrcMgr` (PR #84559)

2024-06-14 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm closed https://github.com/llvm/llvm-project/pull/84559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   8   9   10   >