[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-01-13 Thread via cfe-commits
@@ -4034,6 +4034,12 @@ class Sema final : public SemaBase { void MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, LookupResult &OldDecls); + /// RetireNodesFromMergedDecl - We have just merged the decl 'New' by making + /// another definitio

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-13 Thread via cfe-commits
Sirraide wrote: > I seem to be running into a problem where some of my replies to comments are > not showing up in the conversation tab. Yeah, I prefer looking at the flood of emails I get from GitHub, because those pretty consistently *do* include every comment. https://github.com/llvm/llvm-

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-01-13 Thread via cfe-commits
https://github.com/cor3ntin commented: This flew under the radar, sorry about that and thanks for your patience Just a couple questions/comments. Also, can you add an entry in `clang/docs/ReleaseNotes.rst` ? Thanks https://github.com/llvm/llvm-project/pull/114240 __

[clang] [Clang][Comments] Allow HTML tags across multiple lines (PR #120843)

2025-01-13 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/120843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Comments] Allow HTML tags across multiple lines (PR #120843)

2025-01-13 Thread via cfe-commits
@@ -1453,6 +1453,129 @@ TEST_F(CommentLexerTest, HTML19) { ASSERT_EQ(tok::newline, Toks[2].getKind()); } +TEST_F(CommentLexerTest, HTML20) { cor3ntin wrote: can we add tests for ```< a > ``` To make sure we don;t do something unreasonable - even thoug

[clang] [NFC][AArch64] Add relnote saying SVE2.1 and SME2.1 now fully implemented by ACLE (PR #122705)

2025-01-13 Thread Jonathan Thackray via cfe-commits
@@ -1045,6 +1045,9 @@ X86 Support Arm and AArch64 Support ^^^ +- Support for SVE2.1 and SME2.1 using the Arm C Language Extensions (ACLE) is jthackray wrote: Done. https://github.com/llvm/llvm-project/pull/122705 _

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-13 Thread via cfe-commits
@@ -0,0 +1,584 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fexperimental-late-parse-attributes -fsyntax-only -verify %s + +#define __counted_by(f) __attribute__((counted_by(f))) + +// =

[clang] [NFC][AArch64] Add relnote saying SVE2.1 and SME2.1 now fully implemented by ACLE (PR #122705)

2025-01-13 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray updated https://github.com/llvm/llvm-project/pull/122705 >From 4206edb54ccad4012970ec1b14748f81ccf5b01c Mon Sep 17 00:00:00 2001 From: Jonathan Thackray Date: Mon, 13 Jan 2025 13:23:20 + Subject: [PATCH 1/2] [NFC][AArch64] Add relnote saying SVE2.1 and SME2.1 no

[clang] [clang-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

2025-01-13 Thread David Blaikie via cfe-commits
dwblaikie wrote: > Anyway, my main point was that there are people who care about performance on > Windows, so please don't treat it as a second-class citizen. Yeah, I don't want to treat folks on Windows as second class citizens by any means - but I wouldn't mind/hope we can treat folks who c

[clang] [llvm] [AArch64] Add Neon FP8 conversion intrinsics (PR #119033)

2025-01-13 Thread Momchil Velikov via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -target-feature +bf16 -target-feature +faminmax -emit-llvm -verify %s -o /dev/null momchil-velikov wrote: No, they are both required by `fp8`. https://github.com/llvm/llvm-pro

[clang] [clang-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

2025-01-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Anyway, my main point was that there are people who care about performance > > on Windows, so please don't treat it as a second-class citizen. > > Yeah, I don't want to treat folks on Windows as second class citizens by any > means - but I wouldn't mind/hope we can trea

[clang] Fixed some warn-override tests in SemaCXX (PR #122680)

2025-01-13 Thread via cfe-commits
2LoS wrote: @cor3ntin , is sufficient what I wrote in the comment above? https://github.com/llvm/llvm-project/pull/122680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow the use of asterisks preceding constructor and destructor names (PR #122621)

2025-01-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/122621 >From b2c656afdf99eff52d019b68fcbbc6ce4bbdd7d3 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 12 Jan 2025 00:51:47 +0200 Subject: [PATCH 1/6] [Clang] disallow the use of asterisks preceding constructo

[clang] [Clang] disallow the use of asterisks preceding constructor and destructor names (PR #122621)

2025-01-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/122621 >From b2c656afdf99eff52d019b68fcbbc6ce4bbdd7d3 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 12 Jan 2025 00:51:47 +0200 Subject: [PATCH 1/7] [Clang] disallow the use of asterisks preceding constructo

[clang] [NFC][AArch64] Add relnote saying SVE2.1 and SME2.1 now fully implemented by ACLE (PR #122705)

2025-01-13 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. Thank you Jonathan! https://github.com/llvm/llvm-project/pull/122705 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixed some warn-override tests in SemaCXX (PR #122680)

2025-01-13 Thread via cfe-commits
https://github.com/2LoS edited https://github.com/llvm/llvm-project/pull/122680 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][LLVM][AArch64]Add new feature SSVE-BitPerm (PR #121947)

2025-01-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/12730 Here

[clang] [llvm] [LLVM][AArch64] Add new feature +sme-mop4 and +sme-tmop (PR #121935)

2025-01-13 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 9256485043fe5cc3a24dba649deef8ae69e6d702 14cd654f51405aaff6cf5a07e72edd8c61cc5c54 --e

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-13 Thread via cfe-commits
@@ -186,4 +218,188 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +static void EmitIncompleteCountedByPointeeNotes(Sema &S, +const CountAttributedType *CATy, +

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-13 Thread via cfe-commits
https://github.com/Sirraide commented: Alright, there are a few minor things I pointed out here, but nothing major. I think we should be able to land this soon barring any unforeseen complications ;Þ https://github.com/llvm/llvm-project/pull/106321 _

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-13 Thread via cfe-commits
@@ -186,4 +218,188 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +static void EmitIncompleteCountedByPointeeNotes(Sema &S, +const CountAttributedType *CATy, +

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-13 Thread via cfe-commits
@@ -186,4 +218,188 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +static void EmitIncompleteCountedByPointeeNotes(Sema &S, +const CountAttributedType *CATy, +

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-13 Thread via cfe-commits
@@ -186,4 +218,188 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, return false; } +static void EmitIncompleteCountedByPointeeNotes(Sema &S, +const CountAttributedType *CATy, +

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-13 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/106321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-13 Thread via cfe-commits
@@ -2068,13 +2068,57 @@ class Sema final : public SemaBase { bool CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, bool OrNull); + /// Perform Bounds Safety Semantic checks for assigning to a `__counted_by` or + /// `__

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-01-13 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/106321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2025-01-13 Thread via cfe-commits
@@ -7806,6 +7815,261 @@ bool AArch64AsmParser::parseDirectiveSEHSaveAnyReg(SMLoc L, bool Paired, return false; } +bool AArch64AsmParser::parseDirectiveAeabiSubSectionHeader(SMLoc L) { + // Expecting 3 AsmToken::Identifier after '.aeabi_subsection', a name and 2 + // param

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2025-01-13 Thread via cfe-commits
@@ -7806,6 +7815,261 @@ bool AArch64AsmParser::parseDirectiveSEHSaveAnyReg(SMLoc L, bool Paired, return false; } +bool AArch64AsmParser::parseDirectiveAeabiSubSectionHeader(SMLoc L) { + // Expecting 3 AsmToken::Identifier after '.aeabi_subsection', a name and 2 + // param

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-01-13 Thread Shilei Tian via cfe-commits
shiltian wrote: > So at least a few direct users this may break things for. There are also > users that call the OffloadBundler API instead of directly calling > clang-offload-bundler that this may impact. For the API usage there will be no issue because we enforce it in the code already. The

[clang] [z/OS] add tail padding to TypeLoc if needed (PR #122761)

2025-01-13 Thread Sean Perry via cfe-commits
https://github.com/perry-ca created https://github.com/llvm/llvm-project/pull/122761 The code in getLocalDataSize() returns the sum of the size of the LocalData plus the size of the extra data. The start of the extra data is padded so it starts on a multiple of it's alignment. We also need t

[clang] [z/OS] add tail padding to TypeLoc if needed (PR #122761)

2025-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sean Perry (perry-ca) Changes The code in getLocalDataSize() returns the sum of the size of the LocalData plus the size of the extra data. The start of the extra data is padded so it starts on a multiple of it's alignment. We also need

[clang-tools-extra] Add bugprone-sprintf-argument-overlap (PR #114244)

2025-01-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/114244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add bugprone-sprintf-argument-overlap (PR #114244)

2025-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,106 @@ +//===--- SprintfArgumentOverlapCheck.cpp - clang-tidy ===// +// +// 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: Apac

[clang-tools-extra] Add bugprone-sprintf-argument-overlap (PR #114244)

2025-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,40 @@ +//===--- SprintfArgumentOverlapCheck.h - clang-tidy -*- 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] disallow the use of asterisks preceding constructor and destructor names (PR #122621)

2025-01-13 Thread via cfe-commits
@@ -96,3 +96,49 @@ namespace PR38286 { template struct C; // expected-note {{non-type declaration found}} template C::~C() {} // expected-error {{identifier 'C' after '~' in destructor name does not name a type}} } + +namespace GH121706 { cor3ntin wrote:

[clang-tools-extra] Add bugprone-sprintf-argument-overlap (PR #114244)

2025-01-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/114244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I saw this got updates over break. Did LWG make its decision already? Are you > expecting re-review? I didn't see anything go across my emails about LWG, but > I could definitely have missed it. The LWG issue is still open: https://cplusplus.github.io/LWG/issue4149 but d

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

2025-01-13 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/4] [clang-tidy] Add a release note about unchecked-optional-access s

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

2025-01-13 Thread Jan Voung via cfe-commits
@@ -81,10 +81,12 @@ Exception: accessor methods The check assumes *accessor* methods of a class are stable, with a heuristic to determine which methods are accessors. Specifically, parameter-free ``const`` -methods are treated as accessors. Note that this is not guaranteed to

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2025-01-13 Thread via cfe-commits
@@ -7806,6 +7815,261 @@ bool AArch64AsmParser::parseDirectiveSEHSaveAnyReg(SMLoc L, bool Paired, return false; } +bool AArch64AsmParser::parseDirectiveAeabiSubSectionHeader(SMLoc L) { + // Expecting 3 AsmToken::Identifier after '.aeabi_subsection', a name and 2 + // param

[clang] [clang-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

2025-01-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > Just that the last bit of performance > > > > > > Maybe we're talking about different situations; I may have missed some > > context in the discussion of this PR. I didn't see this as being about the > > last bit of performance. It sounded like this was going to know

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

2025-01-13 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] [Clang][counted_by] Refactor __builtin_dynamic_object_size on FAMs (PR #122198)

2025-01-13 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna commented: Thanks for addressing comments! LGTM. You may still need to wait on Clang code owners review though. https://github.com/llvm/llvm-project/pull/122198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

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

2025-01-13 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,217 @@ +//===--- StringViewSubstrCheck.cpp - clang-tidy--*- 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] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2025-01-13 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: You can move even more into the matchers. Here is a mock-up of what I mean (untested): ``` m cxxMemberCallExpr( anyOf( cxxMemberCallExpr( argumentCountIs(1) # is substr, and bind arg 1 ), cxxMemberCallExpr( argumentCoun

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

2025-01-13 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,217 @@ +//===--- StringViewSubstrCheck.cpp - clang-tidy--*- 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] [clang-tidy] Add readability-string-view-substr check (PR #120055)

2025-01-13 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/120055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement gcc_struct attribute on Itanium targets (PR #71148)

2025-01-13 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-linux-gnu %s +// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-linux-gnu -fms-layout-compatibility=microsoft %s +// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-windows-gnu %s +// RUN: %clang_cc1 -emi

[clang] [clang] Implement gcc_struct attribute on Itanium targets (PR #71148)

2025-01-13 Thread Eli Friedman via cfe-commits
@@ -997,6 +997,9 @@ def warn_npot_ms_struct : Warning< "data types with sizes that aren't a power of two">, DefaultError, InGroup; +def err_itanium_layout_unimplemented : Error< + "Itanium-compatible layout for the Microsoft C++ ABI is not yet supported">; ---

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-01-13 Thread Jacob Lambert via cfe-commits
lamb-j wrote: https://github.com/search?q=org%3AROCm%20clang-offload-bundler&type=code So at least a few direct users this may break things for. There are also users that call the OffloadBundler API instead of directly calling clang-offload-bundler that this may impact. Could we assume "gfx *

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

2025-01-13 Thread via cfe-commits
@@ -20008,6 +20008,87 @@ bool Sema::IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val, return !(FlagMask & Val) || (AllowMask && !(FlagMask & ~Val)); } +bool Sema::ComputeBestEnumProperties(ASTContext &Context, EnumDecl *Enum, +

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

2025-01-13 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: > -fno-init-global-zero Thanks @tarunprabhu @jeanPerier, Changed to `fno-init-global-zero` and also added a positive version`-fno-init-global-zero`. https://github.com/llvm/llvm-project/pull/122144 ___ cfe-commits mailing lis

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

2025-01-13 Thread via cfe-commits
@@ -20099,73 +20179,13 @@ 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-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

2025-01-13 Thread David Blaikie via cfe-commits
dwblaikie wrote: > > > Anyway, my main point was that there are people who care about > > > performance on Windows, so please don't treat it as a second-class > > > citizen. > > > > > > Yeah, I don't want to treat folks on Windows as second class citizens by > > any means - but I wouldn't mi

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 1/9] [clang-format] Add BreakBeforeTemplateClose option --- clang/doc

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

2025-01-13 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/2] [Flang][Driver] Add a flag to control zero ini

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread via cfe-commits
leijurv wrote: Oh gosh, that's embarrassing. It looks like I was so focused on the column limit that I didn't cover cases where the column limit doesn't break the template fully. In other words, I would just type "Fooo" and force it onto the next line, without noticing that

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

2025-01-13 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 29ed6000d21edd1a88b2daad242e1f356cafbaca 0887ccae49760f8ea93d6c3fffdc247855f861f1 --e

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

2025-01-13 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/120965 ___ 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-13 Thread Eli Friedman via cfe-commits
@@ -66,6 +66,17 @@ bool IntrinsicInst::mayLowerToFunctionCall(Intrinsic::ID IID) { } } +bool IntrinsicInst::canAccessFPEnvironment(Intrinsic::ID IID) { + switch (IID) { +#define DAG_INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC, DAGN) \ +case Intrinsic::INTR

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread via cfe-commits
https://github.com/leijurv updated https://github.com/llvm/llvm-project/pull/118046 >From 1caf823165b16f6701993d586df51d5cdbf0885e Mon Sep 17 00:00:00 2001 From: Leijurv Date: Fri, 29 Nov 2024 21:54:36 -0600 Subject: [PATCH 01/10] [clang-format] Add BreakBeforeTemplateClose option --- clang/d

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

2025-01-13 Thread via cfe-commits
@@ -20008,6 +20008,90 @@ bool Sema::IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val, return !(FlagMask & Val) || (AllowMask && !(FlagMask & ~Val)); } +bool Sema::ComputeBestEnumProperties(ASTContext &Context, bool isPacked, +

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread via cfe-commits
@@ -2252,6 +2252,25 @@ struct FormatStyle { /// \version 16 BreakBeforeInlineASMColonStyle BreakBeforeInlineASMColon; + /// If ``true``, a line break will be placed before the ``>`` in a multiline + /// template declaration. + /// \code + ///true: + ///templat

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2025-01-13 Thread via cfe-commits
https://github.com/leijurv edited https://github.com/llvm/llvm-project/pull/118046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-01-13 Thread Shilei Tian via cfe-commits
shiltian wrote: > Could we assume "gfx * -generic" is a single Target ID, and check for/parse > that separately before doing rsplit on "-"? I was thinking about it the other day but eventually gave up on it, because I want to keep this part as generic as possible instead of adding AMD special

[clang] 380bb51 - [HLSL] Adding Flatten and Branch if attributes with test fixes (#122157)

2025-01-13 Thread via cfe-commits
Author: joaosaffran Date: 2025-01-13T10:31:25-08:00 New Revision: 380bb51b70b6d9f3da07a87f56fc3fe44bc78691 URL: https://github.com/llvm/llvm-project/commit/380bb51b70b6d9f3da07a87f56fc3fe44bc78691 DIFF: https://github.com/llvm/llvm-project/commit/380bb51b70b6d9f3da07a87f56fc3fe44bc78691.diff L

[clang] [clang-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

2025-01-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Just that the last bit of performance Maybe we're talking about different situations; I may have missed some context in the discussion of this PR. I didn't see this as being about the last bit of performance. It sounded like this was going to knowingly introduce a perfor

[clang] [HLSL] Implement D3DCOLORtoUBYTE4 intrinsic (PR #122202)

2025-01-13 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/122202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes with test fixes (PR #122157)

2025-01-13 Thread via cfe-commits
https://github.com/joaosaffran closed https://github.com/llvm/llvm-project/pull/122157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2025-01-13 Thread via cfe-commits
@@ -7806,6 +7815,261 @@ bool AArch64AsmParser::parseDirectiveSEHSaveAnyReg(SMLoc L, bool Paired, return false; } +bool AArch64AsmParser::parseDirectiveAeabiSubSectionHeader(SMLoc L) { + // Expecting 3 AsmToken::Identifier after '.aeabi_subsection', a name and 2 + // param

[clang] [Static analysis] Encodes a filename before inserting it into a URL. (PR #120810)

2025-01-13 Thread Brianna Fan via cfe-commits
@@ -1465,6 +1466,17 @@ sub HtmlEscape { return $tmp; } +#### +# URLEscape - encode characters that are special in URLs +###

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2025-01-13 Thread via cfe-commits
@@ -7806,6 +7815,261 @@ bool AArch64AsmParser::parseDirectiveSEHSaveAnyReg(SMLoc L, bool Paired, return false; } +bool AArch64AsmParser::parseDirectiveAeabiSubSectionHeader(SMLoc L) { + // Expecting 3 AsmToken::Identifier after '.aeabi_subsection', a name and 2 + // param

[clang] [llvm] [sanitizer][NFCI] Add Options parameter to LowerAllowCheckPass (PR #122765)

2025-01-13 Thread Thurston Dang via cfe-commits
https://github.com/thurstond updated https://github.com/llvm/llvm-project/pull/122765 >From 261f722bcdefc143ceb25bd6d8e5499e189fc647 Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Mon, 13 Jan 2025 18:38:14 + Subject: [PATCH 1/2] [sanitizer][NFCI] Add Options to LowerAllowCheckPass This

[clang] [llvm] [sanitizer][NFCI] Add Options parameter to LowerAllowCheckPass (PR #122765)

2025-01-13 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/122765 This is glue code to convert LowerAllowCheckPass from a FUNCTION_PASS to FUNCTION_PASS_WITH_PARAMS. The parameters are currently unused. Future work will plumb `-fsanitize-skip-hot-cutoff` (introduced in htt

[clang] [CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #122778)

2025-01-13 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/122778 Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Literal migration

[clang] [CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #122778)

2025-01-13 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/122778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] __has_builtin should return false for aux triple builtins (PR #121839)

2025-01-13 Thread Nick Sarnie via cfe-commits
sarnex wrote: > I believe the conclusion was that we should emit the builtin functions, but > `__has_builtin` should return false for builtins only present in the aux > triple. For the one test that complicates this behavior, I don't think the > use-case is completely well-formed but was hopin

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

2025-01-13 Thread via cfe-commits
higher-performance wrote: Hi @AaronBallman~ would you have a chance to do a final review? :) 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-co

[clang] [CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #122778)

2025-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast Litera

[clang] [CodeGen] Migrate away from PointerUnion::dyn_cast (NFC) (PR #122778)

2025-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-01-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/118568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-01-13 Thread Piotr Zegar via cfe-commits
@@ -173,22 +200,27 @@ static void removeFunctionArgs(DiagnosticBuilder &Diag, const CallExpr &Call, for (unsigned Index : Sorted) { const Expr *Arg = Call.getArg(Index); if (Commas[Index]) { - if (Index >= Commas.size()) { -Diag << FixItHint::CreateRemov

[clang] [clang-tools-extra] Remove `StringLiteral` in favor of `StringRef` (PR #122366)

2025-01-13 Thread David Blaikie via cfe-commits
dwblaikie wrote: > > Just that the last bit of performance > > Maybe we're talking about different situations; I may have missed some > context in the discussion of this PR. I didn't see this as being about the > last bit of performance. It sounded like this was going to knowingly > introduce

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-01-13 Thread Piotr Zegar via cfe-commits
@@ -164,6 +164,33 @@ void UseRangesCheck::registerMatchers(MatchFinder *Finder) { static void removeFunctionArgs(DiagnosticBuilder &Diag, const CallExpr &Call, ArrayRef Indexes, const ASTContext &Ctx) { + auto GetC

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-01-13 Thread Piotr Zegar via cfe-commits
@@ -356,6 +356,11 @@ Changes in existing checks ` check to validate ``namespace`` aliases. +- Improved :doc:`modernize-use-ranges PiotrZSL wrote: move to line 307, and best would be to split it into 2 entry, one for boost, and other for modernize https:

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-01-13 Thread Piotr Zegar via cfe-commits
@@ -164,6 +164,33 @@ void UseRangesCheck::registerMatchers(MatchFinder *Finder) { static void removeFunctionArgs(DiagnosticBuilder &Diag, const CallExpr &Call, ArrayRef Indexes, const ASTContext &Ctx) { + auto GetC

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-01-13 Thread Piotr Zegar via cfe-commits
@@ -164,6 +164,33 @@ void UseRangesCheck::registerMatchers(MatchFinder *Finder) { static void removeFunctionArgs(DiagnosticBuilder &Diag, const CallExpr &Call, ArrayRef Indexes, const ASTContext &Ctx) { + auto GetC

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-01-13 Thread Piotr Zegar via cfe-commits
@@ -164,6 +164,33 @@ void UseRangesCheck::registerMatchers(MatchFinder *Finder) { static void removeFunctionArgs(DiagnosticBuilder &Diag, const CallExpr &Call, ArrayRef Indexes, const ASTContext &Ctx) { + auto GetC

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2025-01-13 Thread Piotr Zegar via cfe-commits
@@ -164,6 +164,33 @@ void UseRangesCheck::registerMatchers(MatchFinder *Finder) { static void removeFunctionArgs(DiagnosticBuilder &Diag, const CallExpr &Call, ArrayRef Indexes, const ASTContext &Ctx) { + auto GetC

[clang] [llvm] [AArch64] Change feature dependencies of fp8 features (PR #122280)

2025-01-13 Thread Carlos Seo via cfe-commits
ceseo wrote: This is breaking the AArch64 2-stage buildbot: https://lab.llvm.org/buildbot/#/builders/84/builds/1005 https://github.com/llvm/llvm-project/pull/122280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang] disallow the use of asterisks preceding constructor and destructor names (PR #122621)

2025-01-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/122621 >From b2c656afdf99eff52d019b68fcbbc6ce4bbdd7d3 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 12 Jan 2025 00:51:47 +0200 Subject: [PATCH 1/7] [Clang] disallow the use of asterisks preceding constructo

[clang] [clang] Refine the temporay object member access filtering for GSL pointer (PR #122088)

2025-01-13 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/122088 >From aee3d1a6f5782bb68547679505571cd4b56f3573 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 17 Dec 2024 14:28:00 +0100 Subject: [PATCH 1/3] [clang] Refine the temporay object member access filtering for

[clang] [clang] Refine the temporay object member access filtering for GSL pointer (PR #122088)

2025-01-13 Thread Haojian Wu via cfe-commits
@@ -1103,6 +1094,8 @@ shouldLifetimeExtendThroughPath(const IndirectLocalPath &Path) { for (auto Elem : Path) { if (Elem.Kind == IndirectLocalPathEntry::DefaultInit) return PathLifetimeKind::Extend; +if (Elem.Kind == IndirectLocalPathEntry::MemberExpr) + c

[clang] [llvm] [RISCV] Add Qualcomm uC Xqciint (Interrupts) extension (PR #122256)

2025-01-13 Thread via cfe-commits
@@ -313,6 +313,7 @@ enum OperandType : unsigned { OPERAND_UIMM8_LSB000, OPERAND_UIMM8_GE32, OPERAND_UIMM9_LSB000, + OPERAND_UIMM10, hchandel wrote: I added the Case statement you asked for in the required function in RISCVInstrInfo.cpp file. https://g

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

2025-01-13 Thread 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] [clang-format] Fix greatergreater (PR #122282)

2025-01-13 Thread 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] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-13 Thread via cfe-commits
https://github.com/gbMattN updated https://github.com/llvm/llvm-project/pull/119387 >From 8781ff2355750ae61d140620b1f6862537de07e3 Mon Sep 17 00:00:00 2001 From: gbMattN Date: Tue, 10 Dec 2024 15:01:37 + Subject: [PATCH 1/9] [ASan] Add metadata to renamed instructions so ASan doesn't use t

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-13 Thread via cfe-commits
@@ -137,6 +137,10 @@ llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, Alloca = new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(), ArraySize, Name, AllocaInsertPt->getIterator()); + if (Alloca->getName

[clang] [Clang] raise extension warning for unknown namespaced attributes (PR #120925)

2025-01-13 Thread Aaron Ballman via cfe-commits
@@ -179,6 +179,8 @@ def err_opencl_unknown_type_specifier : Error< def warn_unknown_attribute_ignored : Warning< "unknown attribute %0 ignored">, InGroup; +def ext_unknown_attribute_ignored : Extension< + "unknown attribute %0 ignored">, InGroup; AaronBallm

[clang] [llvm] [OffloadBundler] Rework the ctor of `OffloadTargetInfo` to support AMDGPU's generic target (PR #122629)

2025-01-13 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: Did you try this patch with internal PSDB? Does it break any existing HIP apps or libraries? https://github.com/llvm/llvm-project/pull/122629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

<    1   2   3   4   5   >