[clang] [OpenMP] [Debug] Debug support for work sharing iterator variable (PR #122047)

2025-01-14 Thread Alok Kumar Sharma via cfe-commits
alokkrsharma wrote: > Maybe it fixes debug info, but definitely breaks some of the OpenMP support Thanks for your comment. Though I intend to delete only unused instructions but it is possible that I have overlooked something. Would you please help me with some example, I will improve the fix

[clang] [OpenMP] [Debug] Debug support for work sharing iterator variable (PR #122047)

2025-01-14 Thread Alok Kumar Sharma via cfe-commits
alokkrsharma wrote: > The fix doesn't look right to me... Thanks for your comment [shiltian](https://github.com/shiltian). I would love to address your concern and improve the patch. Please help me with the example. https://github.com/llvm/llvm-project/pull/122047 _

[clang] [clang-format] Fix greatergreater (PR #122282)

2025-01-14 Thread Owen Pan via cfe-commits
@@ -28188,6 +28188,17 @@ TEST_F(FormatTest, BreakBinaryOperations) { " | byte_buffer[2] << 16\n" " | byte_buffer[3] << 24;", Style); owenca wrote: ```suggestion Style

[clang] [clang-format] Fix greatergreater (PR #122282)

2025-01-14 Thread Owen Pan via cfe-commits
@@ -28188,6 +28188,16 @@ TEST_F(FormatTest, BreakBinaryOperations) { " | byte_buffer[2] << 16\n" " | byte_buffer[3] << 24;", Style); + + Style.BreakBinaryOperations = FormatStyle::BBO_OnePerLine; +

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

2025-01-14 Thread via cfe-commits
higher-performance wrote: Fantastic, thank you! Could we merge it? https://github.com/llvm/llvm-project/pull/102040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Don't set strictfp on irrelevant calls (PR #122735)

2025-01-14 Thread Eli Friedman via cfe-commits
@@ -66,6 +66,12 @@ bool IntrinsicInst::mayLowerToFunctionCall(Intrinsic::ID IID) { } } +bool IntrinsicInst::canAccessFPEnvironment(LLVMContext &C, Intrinsic::ID IID) { + AttributeList Attrs = Intrinsic::getAttributes(C, IID); + MemoryEffects ME = Attrs.getMemoryEffects();

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2025-01-14 Thread Nicolas van Kempen via cfe-commits
@@ -0,0 +1,785 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Driver] Fix hardcoding of NEON FPU for armv8 (PR #122969)

2025-01-14 Thread Sharjeel Khan via cfe-commits
https://github.com/Sharjeel-Khan created https://github.com/llvm/llvm-project/pull/122969 Android hardcoded NEON FPU for armv7 that is now causing issues with 32-bit builds for armv8. >From 1115ca7a28c092d4fc68ef5481cc58a1655d458d Mon Sep 17 00:00:00 2001 From: Sharjeel Khan Date: Tue, 14 Ja

[clang] [Driver] Fix hardcoding of NEON FPU for armv8 (PR #122969)

2025-01-14 Thread Sharjeel Khan via cfe-commits
https://github.com/Sharjeel-Khan edited https://github.com/llvm/llvm-project/pull/122969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix hardcoding of NEON FPU for armv8 (PR #122969)

2025-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sharjeel Khan (Sharjeel-Khan) Changes Android hardcoded NEON FPU for armv7 that is now causing issues with 32-bit builds for armv8 on Android. --- Full diff: https://github.com/llvm/llvm-project/pull/122969.diff 2 Files Affected: - (m

[clang] [Driver] Fix hardcoding of NEON FPU for armv8 (PR #122969)

2025-01-14 Thread Sharjeel Khan via cfe-commits
https://github.com/Sharjeel-Khan edited https://github.com/llvm/llvm-project/pull/122969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3d24c77 - [clang][DebugInfo] Emit DW_AT_object_pointer on function definitions with explicit `this` (#122897)

2025-01-14 Thread via cfe-commits
Author: Michael Buch Date: 2025-01-14T21:12:13Z New Revision: 3d24c77f14d42721226b31d7e5d08f853cfc92f1 URL: https://github.com/llvm/llvm-project/commit/3d24c77f14d42721226b31d7e5d08f853cfc92f1 DIFF: https://github.com/llvm/llvm-project/commit/3d24c77f14d42721226b31d7e5d08f853cfc92f1.diff LOG:

[clang] [clang][DebugInfo] Emit DW_AT_object_pointer on function definitions with explicit `this` (PR #122897)

2025-01-14 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/122897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2025-01-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,114 @@ +//===--- Mustache.h -*- 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: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2025-01-14 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,114 @@ +//===--- Mustache.h -*- 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: Ap

[clang] [llvm] [HLSL][RootSignature] Implement parsing of `RootFlags` (PR #121799)

2025-01-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/121799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Emit DW_AT_object_pointer on function definitions with explicit `this` (PR #122897)

2025-01-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/13812 Here is the releva

[clang] [llvm] [HLSL][RootSignature] Implement parsing of `RootParameter`s (PR #121803)

2025-01-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/121803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Implement parsing of `RootParameter`s (PR #121803)

2025-01-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/121803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "[sanitizer][NFCI] Add Options parameter to LowerAllowCheckPass" (#122833) (PR #122994)

2025-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Thurston Dang (thurstond) Changes This reverts commit 1515caf7a59dc20cb932b724b2ef5c1d1a593427 (https://github.com/llvm/llvm-project/pull/122833) i.e., relands 7d8b4eb0ead277f41ff69525ed807f9f6e227f37 (https://github.com/llvm/llvm-project

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-14 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-14 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang-tools-extra] [clang-tidy] Add a release note about unchecked-optional-access smart pointer caching (PR #122290)

2025-01-14 Thread Jan Voung via cfe-commits
https://github.com/jvoung updated https://github.com/llvm/llvm-project/pull/122290 >From 342ff1a05caa6943fe8a86415f30b433ac30106f Mon Sep 17 00:00:00 2001 From: Jan Voung Date: Thu, 9 Jan 2025 14:10:30 + Subject: [PATCH 1/5] [clang-tidy] Add a release note about unchecked-optional-access s

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-14 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-14 Thread Nick Desaulniers via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[clang] [clang-tools-extra] Clang/Preprocessor: Not add headers of __has_include into DepColloctor (PR #120673)

2025-01-14 Thread Michael Spencer via cfe-commits
Bigcheese wrote: It's intentional that Clang reports these as dependencies. What issue do you have where you think this is the wrong behavior? More specifically, https://reviews.llvm.org/D30882 originally added the behavior. This references an internal Apple bug that occurred when you have co

[clang] Add 'enum_select' diagnostic selection to clang. (PR #122505)

2025-01-14 Thread Erich Keane via cfe-commits
@@ -886,6 +909,11 @@ struct DiagTextDocPrinter : DiagTextVisitor { makeRowSeparator(RST[I]); } + void VisitEnumSelect(EnumSelectPiece *P) { +// For now, document this as if it were a 'select'. erichkeane wrote: I don't think so? Actually, the '

[clang] Add 'enum_select' diagnostic selection to clang. (PR #122505)

2025-01-14 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: clang-tblgen --gen-clang-diags-enums -I%S %s 2>&1 | FileCheck %s +include "DiagnosticBase.inc" + +def DupeNames1 : Error<"%enum_select{}0">; +def DupeNames2 : Error<"%enum_select{}0">; +// CHECK: error: Duplicate enumeration name 'DupeName' +// CHECK-NEXT

[clang] Add 'enum_select' diagnostic selection to clang. (PR #122505)

2025-01-14 Thread Aaron Ballman via cfe-commits
@@ -886,6 +909,11 @@ struct DiagTextDocPrinter : DiagTextVisitor { makeRowSeparator(RST[I]); } + void VisitEnumSelect(EnumSelectPiece *P) { +// For now, document this as if it were a 'select'. AaronBallman wrote: I think that makes sense -- let'

[clang] 5deabab - Rename [[clang::requires_explicit_initialization]] to [[clang::require_explicit_initialization]] (#122947)

2025-01-14 Thread via cfe-commits
Author: higher-performance Date: 2025-01-14T14:43:41-05:00 New Revision: 5deabab06087e5bb7292e75347baacd63f3d4bde URL: https://github.com/llvm/llvm-project/commit/5deabab06087e5bb7292e75347baacd63f3d4bde DIFF: https://github.com/llvm/llvm-project/commit/5deabab06087e5bb7292e75347baacd63f3d4bde.

[clang] Rename [[clang::requires_explicit_initialization]] to [[clang::require_explicit_initialization]] (PR #122947)

2025-01-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/122947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-01-14 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: Patch rebased and updated. -- Saw two failing compiler-rt tests now: ``` Failed Tests (2): Builtins-s390x-linux :: clear_cache_test.c Builtins-s390x-linux :: enable_execute_stack_test.c ``` clear_cache_test.c contains a call to the compiler-rt clear_cache() function. Fr

[clang] [llvm] [clang] Implement pragma clang section on COFF targets (PR #112714)

2025-01-14 Thread Vinicius Tadeu Zein via cfe-commits
@@ -1,4 +1,5 @@ ;RUN: llc -mtriple=armv7-eabi %s -o - | FileCheck %s +;RUN: llc -mtriple=armv7-msvc %s -o - | FileCheck %s vtz wrote: Changed to x86. I hope this is fine. https://github.com/llvm/llvm-project/pull/112714 _

[clang] [CUDA][HIP] Support CUID in new driver (PR #122859)

2025-01-14 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/122859 >From 38939c7ecd5b29d92cffcb4fa3911159bd37d0e5 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Mon, 13 Jan 2025 14:12:52 -0500 Subject: [PATCH] [CUDA][HIP] Support CUID in new driver CUID is needed by C

[clang] [HLSL] Implement HLSL Flat casting (excluding splat cases) (PR #118842)

2025-01-14 Thread Chris B via cfe-commits
@@ -2752,7 +2787,17 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { llvm::Value *Zero = llvm::Constant::getNullValue(CGF.SizeTy); return Builder.CreateExtractElement(Vec, Zero, "cast.vtrunc"); } + case CK_HLSLAggregateCast: { +RValue RV = CGF.EmitAnyEx

[clang] [HLSL] Implement HLSL Flat casting (excluding splat cases) (PR #118842)

2025-01-14 Thread Chris B via cfe-commits
@@ -491,6 +491,81 @@ static bool isTrivialFiller(Expr *E) { return false; } +// emit a flat cast where the RHS is a scalar, including vector +static void EmitHLSLScalarFlatCast(CodeGenFunction &CGF, Address DestVal, + QualType DestTy, llvm::

[clang] [HLSL] Implement HLSL Flat casting (excluding splat cases) (PR #118842)

2025-01-14 Thread Chris B via cfe-commits
@@ -6358,3 +6359,89 @@ RValue CodeGenFunction::EmitPseudoObjectRValue(const PseudoObjectExpr *E, LValue CodeGenFunction::EmitPseudoObjectLValue(const PseudoObjectExpr *E) { return emitPseudoObjectExpr(*this, E, true, AggValueSlot::ignored()).LV; } + +void CodeGenFunction::Fl

[clang] [HLSL] Implement HLSL Flat casting (excluding splat cases) (PR #118842)

2025-01-14 Thread Chris B via cfe-commits
@@ -2412,6 +2412,102 @@ bool SemaHLSL::CheckCompatibleParameterABI(FunctionDecl *New, return HadError; } +// Generally follows PerformScalarCast, with cases reordered for +// clarity of what types are supported +bool SemaHLSL::CanPerformScalarCast(QualType SrcTy, QualType D

[clang] [HLSL] Implement HLSL Flat casting (excluding splat cases) (PR #118842)

2025-01-14 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/118842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement HLSL Flat casting (excluding splat cases) (PR #118842)

2025-01-14 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: I want to spend a little more time going over the tests, but I had a few small comments. This seems to be mostly right from my initial review. https://github.com/llvm/llvm-project/pull/118842 ___ cfe-commits ma

[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

2025-01-14 Thread Jason Rice via cfe-commits
ricejasonf wrote: @erichkeane, thanks for the approval. Does that mean I should stop making changes to this PR? I was messing with a more rangey interface for `flat_bindings`, but for some reason the `llvm::concat` range was referring to uninitialized memory when used as a temporary in a for l

[clang] [CUDA][HIP] Support CUID in new driver (PR #122859)

2025-01-14 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Can we get a new test showing CUDA? CUDA uses the new driver by default so > cuid stuff will be missing there. Added. https://github.com/llvm/llvm-project/pull/122859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [llvm] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2025-01-14 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman @erichkeane I’ve switched back to the version without the std check. should the diagnostic group be changed? https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [llvm] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2025-01-14 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman @erichkeane I’ve switched back to the version without the std check. should the diagnostic group be changed? https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2025-01-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk ready_for_review https://github.com/llvm/llvm-project/pull/106036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-reorder-fields] Move trailing comments. (PR #122918)

2025-01-14 Thread Alexander Shaposhnikov via cfe-commits
@@ -116,26 +118,78 @@ findMembersUsedInInitExpr(const CXXCtorInitializer *Initializer, return Results; } -/// Returns the full source range for the field declaration up to (not -/// including) the trailing semicolumn, including potential macro invocations, -/// e.g. `int a

[clang-tools-extra] [clang-reorder-fields] Move trailing comments. (PR #122918)

2025-01-14 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov approved this pull request. LG https://github.com/llvm/llvm-project/pull/122918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2025-01-14 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/120055 >From 8b2dc9adf4fae2065823e5beb3a1cd851686913c Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Mon, 16 Dec 2024 08:24:14 +0100 Subject: [PATCH 01/11] [clang-tidy] Add readability-string-view-substr chec

[clang] [flang] [Flang][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-14 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/122144 >From 483501549b910d1e91dab05cce65793c44aaa6f6 Mon Sep 17 00:00:00 2001 From: Kiran Chandramohan Date: Wed, 8 Jan 2025 17:26:24 + Subject: [PATCH 1/5] [Flang][Driver] Add a flag to control zero ini

[clang] [SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)

2025-01-14 Thread Helena Kotas via cfe-commits
@@ -5362,6 +5362,23 @@ LangAS CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D) { if (OpenMPRuntime->hasAllocateAttributeForGlobalVar(D, AS)) return AS; } + + if (LangOpts.HLSL) { +if (D == nullptr) + return LangAS::hlsl_private; + +// Except

[clang] [SPIR-V] Add hlsl_private address space for HLSL/SPIR-V (PR #122103)

2025-01-14 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/122103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-14 Thread Michael Flanders via cfe-commits
https://github.com/Flandini created https://github.com/llvm/llvm-project/pull/123003 This trait associates MemSpaceRegions with MemRegions to allow refining or changing information known about memory regions after they are created, since they are immutable. This commit is an intermediate step

[clang] [analyzer] Add MemSpace trait to program state (PR #123003)

2025-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Flanders (Flandini) Changes This trait associates MemSpaceRegions with MemRegions to allow refining or changing information known about memory regions after they are created, since they are immutable. This commit is an intermediat

[clang] [clang][Sema] Move computing enum width and type to a separate function (PR #120965)

2025-01-14 Thread via cfe-commits
@@ -20099,73 +20095,12 @@ void Sema::ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange, BestPromotionType = BestType; BestWidth = Context.getIntWidth(BestType); - } - else if (NumNegativeBits) { -// If there is a negative value, figure out the small

[clang] [clang][Sema] Move computing enum width and type to a separate function (PR #120965)

2025-01-14 Thread via cfe-commits
@@ -1726,6 +1726,12 @@ class ASTContext : public RefCountedBase { QualType getEnumType(const EnumDecl *Decl) const; + /// Compute BestType and BestPromotionType for an enum based on the highest + /// number of negative and positive bits of its elements. + bool computeBes

[clang] [clang][modules] Fix local submodule visibility of macros from transitive import (PR #122955)

2025-01-14 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir created https://github.com/llvm/llvm-project/pull/122955 When we mark a module visible, we normally mark all of its non-explicit submodules and other exports as visible. However, when we first enter a submodule we should not make them visible to the submodule its

[clang] [clang][modules] Fix local submodule visibility of macros from transitive import (PR #122955)

2025-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-modules Author: Ben Langmuir (benlangmuir) Changes When we mark a module visible, we normally mark all of its non-explicit submodules and other exports as visible. However, when we first enter a submodule we should not

[clang] [Clang] FunctionEffects: Correctly navigate through array types in FunctionEffectsRef::get(). (PR #121525)

2025-01-14 Thread via cfe-commits
@@ -8836,13 +8836,22 @@ void FixedPointValueToString(SmallVectorImpl &Str, llvm::APSInt Val, unsigned Scale); inline FunctionEffectsRef FunctionEffectsRef::get(QualType QT) { + const Type *TypePtr = QT.getTypePtr(); while (true) { -QualTyp

[clang] [HLSL] cbuffer: Create host layout struct and add resource handle to AST (PR #122820)

2025-01-14 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/122820 >From 71ddb5a2b4cc8a9609410b436e896484401f5e90 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 13 Jan 2025 15:03:12 -0800 Subject: [PATCH 1/3] [HLSL] cbuffer: Create host layout struct and add resource ha

[clang] [llvm] [SPIRV] add pre legalization instruction combine (PR #122839)

2025-01-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/122839 >From ae1a274f856518d710cffba324c603d9e95adf54 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 9 Jan 2025 19:19:27 -0500 Subject: [PATCH] [SPIRV] add pre legalization instruction combine - Add the boiler

[clang] [llvm] [HLSL] Implement the `reflect` HLSL function (PR #122992)

2025-01-14 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/122992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement `reflect` HLSL function (PR #122992)

2025-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Deric Cheung (Icohedron) Changes Fixes #99152 Tasks completed: - Implement `reflect` in `clang/lib/Headers/hlsl/hlsl_intrinsics.h` - Implement the `reflect` SPIR-V target built-in in `clang/include/clang/Basic/BuiltinsSPIRV.td` -

[clang] [llvm] [HLSL] Implement `reflect` HLSL function (PR #122992)

2025-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Deric Cheung (Icohedron) Changes Fixes #99152 Tasks completed: - Implement `reflect` in `clang/lib/Headers/hlsl/hlsl_intrinsics.h` - Implement the `reflect` SPIR-V target built-in in `clang/include/clang/Basic/BuiltinsSPIRV.td` - Add a S

[clang] [llvm] [HLSL] Implement `reflect` HLSL function (PR #122992)

2025-01-14 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron created https://github.com/llvm/llvm-project/pull/122992 Fixes #99152 Tasks completed: - Implement `reflect` in `clang/lib/Headers/hlsl/hlsl_intrinsics.h` - Implement the `reflect` SPIR-V target built-in in `clang/include/clang/Basic/BuiltinsSPIRV.td` - Add a SPIR

[clang] [llvm] [HLSL] Implement `reflect` HLSL function (PR #122992)

2025-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Deric Cheung (Icohedron) Changes Fixes #99152 Tasks completed: - Implement `reflect` in `clang/lib/Headers/hlsl/hlsl_intrinsics.h` - Implement the `reflect` SPIR-V target built-in in `clang/include/clang/Basic/BuiltinsSPIRV.td` - Add a SP

[clang] [llvm] [HLSL] Implement `reflect` HLSL function (PR #122992)

2025-01-14 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/122992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "[sanitizer][NFCI] Add Options parameter to LowerAllowCheckPass" (#122833) (PR #122994)

2025-01-14 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/122994 This reverts commit 1515caf7a59dc20cb932b724b2ef5c1d1a593427 (https://github.com/llvm/llvm-project/pull/122833) i.e., relands 7d8b4eb0ead277f41ff69525ed807f9f6e227f37 (https://github.com/llvm/llvm-project/pul

[clang] [llvm] [SPIRV] add pre legalization instruction combine (PR #122839)

2025-01-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl ready_for_review https://github.com/llvm/llvm-project/pull/122839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-14 Thread Bill Wendling via cfe-commits
@@ -1060,238 +1061,348 @@ CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type, return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true); } -const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset( -ASTContext &Ctx, const

[compiler-rt] [libunwind] [libunwind][cmake] Compile _Unwind* routines with -fexceptions (PR #121819)

2025-01-14 Thread Paul Kirth via cfe-commits
ilovepi wrote: Hmm, the failing bot seems to be some kind of configuration error on the bot (or issue w/ the docker daemon?) https://github.com/llvm/llvm-project/actions/runs/12775719644/job/35614829092 https://github.com/llvm/llvm-project/pull/121819 __

[clang] [llvm] Reapply "[sanitizer][NFCI] Add Options parameter to LowerAllowCheckPass" (#122833) (PR #122994)

2025-01-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 6e14f9b40e15600ae7832826b47a7f0c0503a1d7 02c3d9ef1eb15b0d7ebe7511f200b7c00d52d6c9 --e

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
@@ -145,12 +146,18 @@ class ExternalASTSource : public RefCountedBase { /// Find all declarations with the given name in the given context, /// and add them to the context by calling SetExternalVisibleDeclsForName /// or SetNoExternalVisibleDeclsForName. - /// \return \

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/122887 >From 0e49792900783f442da68b89fc3b4b3e013d18d3 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 26 Dec 2024 16:00:51 +0800 Subject: [PATCH] [C++20] [Modules] Support module level lookup Close https://git

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
@@ -145,12 +146,18 @@ class ExternalASTSource : public RefCountedBase { /// Find all declarations with the given name in the given context, /// and add them to the context by calling SetExternalVisibleDeclsForName /// or SetNoExternalVisibleDeclsForName. - /// \return \

[clang] 7201cae - [C++20] [Modules] Support module level lookup (#122887)

2025-01-14 Thread via cfe-commits
Author: Chuanqi Xu Date: 2025-01-15T15:15:35+08:00 New Revision: 7201cae106260aeb3e97d5291ff30f05076a URL: https://github.com/llvm/llvm-project/commit/7201cae106260aeb3e97d5291ff30f05076a DIFF: https://github.com/llvm/llvm-project/commit/7201cae106260aeb3e97d5291ff30f05076a.diff LO

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/122887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [C++20] [Modules] Support module level lookup (PR #122887)

2025-01-14 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Now CI passes. I want to land this in 20.x and give it some baking times so that we can find issues in it if any. Post commit review comments are welcomed as always. https://github.com/llvm/llvm-project/pull/122887 ___ cfe-commits

[clang] [llvm] [IR] Don't set strictfp on irrelevant calls (PR #122735)

2025-01-14 Thread Serge Pavlov via cfe-commits
@@ -66,6 +66,12 @@ bool IntrinsicInst::mayLowerToFunctionCall(Intrinsic::ID IID) { } } +bool IntrinsicInst::canAccessFPEnvironment(LLVMContext &C, Intrinsic::ID IID) { + AttributeList Attrs = Intrinsic::getAttributes(C, IID); + MemoryEffects ME = Attrs.getMemoryEffects();

[clang] [clang-format] Fix greatergreater (PR #122282)

2025-01-14 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/122282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP]Initial parsing/sema support for target_device selector set (PR #118471)

2025-01-14 Thread via cfe-commits
Ritanya-B-Bharadwaj wrote: ping https://github.com/llvm/llvm-project/pull/118471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > From the commit message, it sounds like this might introduce warnings that > `-Werror` doesn't turn into warnings. Is that correct? FWIW, that's already the case today (which we found out in the previous iteration of this): https://godbolt.org/z/nG4oWvv3s I think the com

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/119712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes generally LGTM but I'd really love to hear from @kadircet as to whether this PR fully addresses the issues found before: https://github.com/llvm/llvm-project/pull/70976#discussion_r1775918960 https://github.com/llvm/llvm-project/pull/11971

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-14 Thread Aaron Ballman via cfe-commits
@@ -892,6 +894,8 @@ class DiagnosticsEngine : public RefCountedBase { /// \param FormatString A fixed diagnostic format string that will be hashed /// and mapped to a unique DiagID. template + // TODO: Deprecate this once all uses are removed from LLVM + // [[deprecat

[clang] [clang-tools-extra] [flang] [clang] Extend diagnose_if to accept more detailed warning information, take 2 (PR #119712)

2025-01-14 Thread Aaron Ballman via cfe-commits
@@ -577,7 +577,17 @@ std::vector StoreDiags::take(const clang::tidy::ClangTidyContext *Tidy) { for (auto &Diag : Output) { if (const char *ClangDiag = getDiagnosticCode(Diag.ID)) { // Warnings controlled by -Wfoo are better recognized by that name. - StringRef

[clang] Rename [[clang::requires_explicit_initialization]] to [[clang::require_explicit_initialization]] (PR #122947)

2025-01-14 Thread via cfe-commits
https://github.com/higher-performance created https://github.com/llvm/llvm-project/pull/122947 This makes it consistent with `[[clang::require_constant_initialization]]`. (The attribute was just added to Clang a few minutes ago, so there are no users yet.) >From aa4620ccd4bab97c176ca41aab1a4c

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

2025-01-14 Thread via cfe-commits
higher-performance wrote: Opened #122947 for this, sorry for the oversight. https://github.com/llvm/llvm-project/pull/102040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rename [[clang::requires_explicit_initialization]] to [[clang::require_explicit_initialization]] (PR #122947)

2025-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (higher-performance) Changes This makes it consistent with `[[clang::require_constant_initialization]]`. (The attribute was just added to Clang a few minutes ago, so there are no users yet.) --- Full diff: https://github.com/llvm/ll

[clang] [llvm] [clang] Implement pragma clang section on COFF targets (PR #112714)

2025-01-14 Thread Felipe Magno de Almeida via cfe-commits
https://github.com/felipealmeida updated https://github.com/llvm/llvm-project/pull/112714 >From 4cba74354f3fb59a47e7da142a43701e889d9b4b Mon Sep 17 00:00:00 2001 From: Vinicius Tadeu Zein Date: Mon, 13 Jan 2025 16:15:33 -0500 Subject: [PATCH] [llvm] Implement pragma clang section on COFF target

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-01-14 Thread Jonas Paulsson via cfe-commits
@@ -446,10 +448,11 @@ ABIArgInfo SystemZABIInfo::classifyArgumentType(QualType Ty) const { // The structure is passed as an unextended integer, a float, or a double. if (isFPArgumentType(SingleElementTy)) { - assert(Size == 32 || Size == 64); + assert(Size =

[clang] [llvm] [HLSL][RootSignature] Implement Parsing of Descriptor Tables (PR #122982)

2025-01-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic ready_for_review https://github.com/llvm/llvm-project/pull/122982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rename [[clang::requires_explicit_initialization]] to [[clang::require_explicit_initialization]] (PR #122947)

2025-01-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-libcxx` running on `linaro-flang-aarch64-libcxx` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/89/builds/14362 Here is the relev

[clang] [llvm] [clang] Implement pragma clang section on COFF targets (PR #112714)

2025-01-14 Thread Eli Friedman via cfe-commits
@@ -1,4 +1,5 @@ ;RUN: llc -mtriple=armv7-eabi %s -o - | FileCheck %s +;RUN: llc -mtriple=armv7-msvc %s -o - | FileCheck %s efriedma-quic wrote: That's fine. But the CHECK lines in the new test don't look right (`nobits` etc. are ELF-specific). https://github.

[clang] [Clang] FunctionEffects: Correctly navigate through array types in FunctionEffectsRef::get(). (PR #121525)

2025-01-14 Thread via cfe-commits
@@ -8836,13 +8836,22 @@ void FixedPointValueToString(SmallVectorImpl &Str, llvm::APSInt Val, unsigned Scale); inline FunctionEffectsRef FunctionEffectsRef::get(QualType QT) { + const Type *TypePtr = QT.getTypePtr(); while (true) { -QualTyp

[compiler-rt] [libunwind] [libunwind][cmake] Compile _Unwind* routines with -fexceptions (PR #121819)

2025-01-14 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/121819 >From 9f952de3cb3e973f17121c057089a28bf4c6e5e0 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Mon, 6 Jan 2025 11:15:35 -0800 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8

[clang-tools-extra] [clang-tidy] add AllowedTypes to misc-const-correctness (PR #122951)

2025-01-14 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/122951 This PR add option `AllowedTypes` which allow users to specify types they want to exclude from const-correctness check. Small real-world example: ```cpp #include int main() { std::mutex m; std::lock_guar

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2025-01-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: > I will try to get back on this PR tomorrow though so it doesn't stagnate much > longer. I guess that didn't work out as planned, but I got to it today. :-D FWIW, this is a case where fuzz testing may help shake out parser issues. https://github.com

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2025-01-14 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,114 @@ +//===--- Mustache.h -*- 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: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2025-01-14 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,785 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2025-01-14 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,785 @@ +//===-- Mustache.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

<    1   2   3   4   5   6   >