[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread Jason Rice via cfe-commits
@@ -3492,10 +3492,13 @@ VarDecl *BindingDecl::getHoldingVar() const { return VD; } -llvm::ArrayRef BindingDecl::getBindingPackExprs() const { +llvm::ArrayRef BindingDecl::getBindingPackDecls() const { assert(Binding && "expecting a pack expr"); - auto *RP = cast(Binding)

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread Owen Anderson via cfe-commits
https://github.com/resistor created https://github.com/llvm/llvm-project/pull/125448 Per the ELF spec, section groups may only contain local symbols if those symbols are only referenced from within the section group. [1] In the case of template parameter objects, they can be referenced from ou

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Owen Anderson (resistor) Changes Per the ELF spec, section groups may only contain local symbols if those symbols are only referenced from within the section group. [1] In the case of template parameter objects, they can be referenced fro

[clang-tools-extra] [clang-tidy] Add performance-redundant-lookup check (PR #125420)

2025-02-02 Thread Oliver Stöneberg via cfe-commits
@@ -0,0 +1,147 @@ +.. title:: clang-tidy - performance-redundant-lookup + +performance-redundant-lookup + + +This check warns about potential redundant container lookup operations within +a function. + +Examples + + +.. code-block:: c++ + +i

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

2025-02-02 Thread via cfe-commits
@@ -11220,6 +11220,333 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + // Begin with tests covering the case where there is no constr

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

2025-02-02 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/16] [clang-format] Add BreakBeforeTemplateClose option --- clang/d

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

2025-02-02 Thread via cfe-commits
@@ -11220,6 +11220,333 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateCloser) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + // Begin with tests covering the case where there is no constr

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-02-02 Thread Owen Pan via cfe-commits
@@ -412,6 +414,15 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeLeft( // The case `const long long volatile int` -> `const volatile long long int` // The case `long volatile long int const` -> `const volatile long long int` if (TypeToken->isTypeName(Lang

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread Jason Rice via cfe-commits
https://github.com/ricejasonf updated https://github.com/llvm/llvm-project/pull/125394 >From a323e058b2c8adf97f7f9a55a9187f74de9b8d17 Mon Sep 17 00:00:00 2001 From: Jason Rice Date: Sun, 2 Feb 2025 00:52:47 -0800 Subject: [PATCH 1/2] [Clang][P1061] Consolidate ResolvedUnexpandedPackExpr into F

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread Jason Rice via cfe-commits
ricejasonf wrote: @cor3ntin Sorry, I tried "Commit suggestion", but it didn't look like you can cast like that so I just reverted. https://github.com/llvm/llvm-project/pull/125394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-02-02 Thread Owen Pan via cfe-commits
@@ -412,6 +414,15 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeLeft( // The case `const long long volatile int` -> `const volatile long long int` // The case `long volatile long int const` -> `const volatile long long int` if (TypeToken->isTypeName(Lang

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

2025-02-02 Thread Matheus Izvekov via cfe-commits
@@ -2298,6 +2298,13 @@ class FunctionDecl : public DeclaratorDecl, FunctionDeclBits.IsLateTemplateParsed = ILT; } + bool isInstantiatedFromMemberTemplate() const { +return FunctionDeclBits.IsInstantiatedFromMemberTemplate; + } + void setInstantiatedFromMemberTempl

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

2025-02-02 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/125266 ___ 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 performance-redundant-lookup check (PR #125420)

2025-02-02 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,147 @@ +.. title:: clang-tidy - performance-redundant-lookup + +performance-redundant-lookup + + +This check warns about potential redundant container lookup operations within +a function. + +Examples + + +.. code-block:: c++ + +i

[clang-tools-extra] [clang-tidy] Add performance-redundant-lookup check (PR #125420)

2025-02-02 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,147 @@ +.. title:: clang-tidy - performance-redundant-lookup + +performance-redundant-lookup + + +This check warns about potential redundant container lookup operations within +a function. + +Examples + + +.. code-block:: c++ + +i

[clang-tools-extra] [clang-tidy] Add performance-redundant-lookup check (PR #125420)

2025-02-02 Thread Oliver Stöneberg via cfe-commits
@@ -0,0 +1,147 @@ +.. title:: clang-tidy - performance-redundant-lookup + +performance-redundant-lookup + + +This check warns about potential redundant container lookup operations within +a function. + +Examples + + +.. code-block:: c++ + +i

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

2025-02-02 Thread Matheus Izvekov via cfe-commits
@@ -2298,6 +2298,13 @@ class FunctionDecl : public DeclaratorDecl, FunctionDeclBits.IsLateTemplateParsed = ILT; } + bool isInstantiatedFromMemberTemplate() const { +return FunctionDeclBits.IsInstantiatedFromMemberTemplate; + } + void setInstantiatedFromMemberTempl

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

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

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread Owen Anderson via cfe-commits
https://github.com/resistor updated https://github.com/llvm/llvm-project/pull/125448 >From fabd1f091d018e76d59777ce29a9d16ef6abb48f Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Mon, 3 Feb 2025 15:41:20 +1300 Subject: [PATCH] [clang] Do not emit template parameter objects as COMDATs when

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread Owen Anderson via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -emit-llvm -std=c++20 -triple x86_64-unknown-linux-gnu %s -o - | FileCheck %s + +// COMDAT groups in ELF objects are not permitted to contain local symbols. While template parameter +// objects are normally emitted in COMDATs, we shouldn't do

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread Owen Anderson via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -emit-llvm -std=c++20 -triple x86_64-unknown-linux-gnu %s -o - | FileCheck %s resistor wrote: Done https://github.com/llvm/llvm-project/pull/125448 ___ cfe-commits mailing list cfe

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 Thread Wael Yehia via cfe-commits
https://github.com/w2yehia edited https://github.com/llvm/llvm-project/pull/125388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 Thread Wael Yehia via cfe-commits
@@ -239,6 +239,9 @@ append_list_if(SANITIZER_LIMIT_FRAME_SIZE -Wframe-larger-than=570 append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors SANITIZER_CFLAGS) +# Suppress -Watomic-alignment warnings by not treating them as errors ---

[clang] [llvm] [Hexagon] Set the default compilation target to V68 (PR #125239)

2025-02-02 Thread Brian Cain via cfe-commits
androm3da wrote: @iajbar can you add this change to the 21.0 release notes, since it's something that would impact users? https://github.com/llvm/llvm-project/pull/125239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 Thread Wael Yehia via cfe-commits
@@ -239,6 +239,9 @@ append_list_if(SANITIZER_LIMIT_FRAME_SIZE -Wframe-larger-than=570 append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors SANITIZER_CFLAGS) +# Suppress -Watomic-alignment warnings by not treating them as errors ---

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-02 Thread Wael Yehia via cfe-commits
@@ -338,6 +338,10 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-lpthread"); } const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath()); + + if (Sanitize.hasAnySanitizer() && IsArch32Bit) { w2yehia

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125457)

2025-02-02 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/125457 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] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125457)

2025-02-02 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] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #125457)

2025-02-02 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/125457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread Owen Anderson via cfe-commits
https://github.com/resistor updated https://github.com/llvm/llvm-project/pull/125448 >From 8d2ed55358510e45c03934aaaffccbf12d0bffce Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Mon, 3 Feb 2025 15:41:20 +1300 Subject: [PATCH] [clang] Do not emit template parameter objects as COMDATs when

[clang] [compiler-rt] [profile] Add `%b` `LLVM_PROFILE_FILE` option for binary ID (PR #123963)

2025-02-02 Thread Sinkevich Artem via cfe-commits
ArtSin wrote: PTAL @ZequanWu @david-xl https://github.com/llvm/llvm-project/pull/123963 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/125448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-02 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/125421 ___ 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 performance-redundant-lookup check (PR #125420)

2025-02-02 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: @steakhal I just tried this PR on the LLVM code base (that is, `llvm-project/llvm`). I'm impressed how many real issues it finds. Thank you so much! https://github.com/llvm/llvm-project/pull/125420 ___ cfe-commits mailing list

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-02 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/124754 >From 960eb5de4abcf21dec34e8932c94621733b9d11b Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Mon, 3 Feb 2025 10:57:17 +0530 Subject: [PATCH 1/4] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpe

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

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

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/125394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do not emit template parameter objects as COMDATs when they have internal linkage. (PR #125448)

2025-02-02 Thread Owen Anderson via cfe-commits
https://github.com/resistor updated https://github.com/llvm/llvm-project/pull/125448 >From b3078fa4389f6be3f0b8c463ab9e79f1b4a9d23b Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Mon, 3 Feb 2025 15:41:20 +1300 Subject: [PATCH] [clang] Do not emit template parameter objects as COMDATs when

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread via cfe-commits
cor3ntin wrote: @ricejasonf yeah... really not a fan but i played with it an i don't see a way to meaningfully improve it. Thanks for trying though https://github.com/llvm/llvm-project/pull/125394 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

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

[clang] [clang] print correct context for diagnostics suppressed by deduction (PR #125453)

2025-02-02 Thread Richard Smith via cfe-commits
zygoloid wrote: Thank you for tackling this longstanding issue! How much does saving this extra state add to the runtime and memory usage on a template-heavy compilation? If the cost is concerning, one other option we could consider here would be performing pending local instantiations eagerly

[clang] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpenMPToolChain. (PR #124754)

2025-02-02 Thread Amit Kumar Pandey via cfe-commits
https://github.com/ampandey-1995 updated https://github.com/llvm/llvm-project/pull/124754 >From 960eb5de4abcf21dec34e8932c94621733b9d11b Mon Sep 17 00:00:00 2001 From: Amit Pandey Date: Mon, 3 Feb 2025 10:57:17 +0530 Subject: [PATCH 1/4] [OpenMP][ASan] Enable ASan Instrumentation for AMDGPUOpe

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread via cfe-commits
Sirraide wrote: > @Sirraide I did try it and the bug persists. The `LHS` is a RecoveryExpr, so > I am not sure how to approach that. Yeah, that one did look like the problem is probably elsewhere; thanks for trying though! https://github.com/llvm/llvm-project/pull/125394 _

[clang] [clang][bytecode][NFC] Only call getSource() when necessary (PR #125419)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/125419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c475356 - [clang][bytecode][NFC] Only call getSource() when necessary (#125419)

2025-02-02 Thread via cfe-commits
Author: Timm Baeder Date: 2025-02-03T08:51:30+01:00 New Revision: c475356603cd33ead378a9db00b7e579c9da366e URL: https://github.com/llvm/llvm-project/commit/c475356603cd33ead378a9db00b7e579c9da366e DIFF: https://github.com/llvm/llvm-project/commit/c475356603cd33ead378a9db00b7e579c9da366e.diff L

[clang] [Driver] Enable IBT by default on OpenBSD/am64 (PR #125395)

2025-02-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/125395 >From 904d9b04d07e42f38f2b479882682b5a40f4b90a Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 2 Feb 2025 05:25:18 -0500 Subject: [PATCH] [Driver] Enable IBT by default on OpenBSD/amd64 --- clang/lib/Driver

[clang] [Driver] Enable IBT by default on OpenBSD/am64 (PR #125395)

2025-02-02 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 1eac7cd5d1a3738f43d737d74ea299e08a1c3b61 a4270081b061b75ce70eb61feff5e5b1119dcda5 --e

[clang] [clang][bytecode][NFC] Add a FunctionKind enum (PR #125391)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/125391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-02-02 Thread via cfe-commits
@@ -146,6 +147,8 @@ class ReadabilityModule : public ClangTidyModule { "readability-static-definition-in-anonymous-namespace"); CheckFactories.registerCheck( "readability-string-compare"); +CheckFactories.registerCheck( 4m4n-x-B4w4ne wro

[clang] [Driver] Enable IBT by default on OpenBSD/amd64 (PR #125395)

2025-02-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/125395 >From 0f4a9508206b4918a47fc6bc2659a766206b5d5e Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 2 Feb 2025 05:25:18 -0500 Subject: [PATCH] [Driver] Enable IBT by default on OpenBSD/amd64 --- clang/lib/Driver

[clang] [Driver] Enable IBT by default on OpenBSD/amd64 (PR #125395)

2025-02-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/125395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Add a FunctionKind enum (PR #125391)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/125391 >From df8e464c9d99d65f4c171c9de7000febd438d441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 2 Feb 2025 10:45:24 +0100 Subject: [PATCH] [clang][bytecode][NFC] Add a FunctionKind enum

[clang] [clang][bytecode][NFC] Add a FunctionKind enum (PR #125391)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/125391 >From 5fea55e25705386d1415478c1ed2b21909b3e708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 2 Feb 2025 10:45:24 +0100 Subject: [PATCH] [clang][bytecode][NFC] Add a FunctionKind enum

[clang] Reapply "[analyzer] Handle [[assume(cond)]] as __builtin_assume(cond)" (PR #125348)

2025-02-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/125348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Add a FunctionKind enum (PR #125391)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125391 Some function types are special to us, so add an enum and determinte the function kind once when creating the function, instead of looking at the Decl every time we need the information. >From d0925d241a8c7da

[clang] [clang][bytecode][NFC] Add a FunctionKind enum (PR #125391)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Some function types are special to us, so add an enum and determinte the function kind once when creating the function, instead of looking at the Decl every time we need the information. --- Full diff: http

[clang] [PAC][Driver] Enable BTI and PAC by default on OpenBSD/aarch64 (PR #125392)

2025-02-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/125392 None >From 2c3d81ae56975f9aa2aa8ad7476e482fd77ab355 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 2 Feb 2025 05:09:59 -0500 Subject: [PATCH] [PAC][Driver] Enable BTI and PAC by default on OpenBSD/aarch64

[clang] [PAC][Driver] Enable BTI and PAC by default on OpenBSD/aarch64 (PR #125392)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brad Smith (brad0) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125392.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/Clang.cpp (+12-3) - (modified) clang/test/Driver/openbsd.c (+5) ``di

[clang] [PAC][Driver] Enable BTI and PAC by default on OpenBSD/aarch64 (PR #125392)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Brad Smith (brad0) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125392.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/Clang.cpp (+12-3) - (modified) clang/test/Driver/openbsd.c (+5) `

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread Jason Rice via cfe-commits
https://github.com/ricejasonf created https://github.com/llvm/llvm-project/pull/125394 This merges the functionality of ResolvedUnexpandedPackExpr into FunctionParmPackExpr. I also added a test to show that https://github.com/llvm/llvm-project/issues/125103 should be fixed with this. I put th

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jason Rice (ricejasonf) Changes This merges the functionality of ResolvedUnexpandedPackExpr into FunctionParmPackExpr. I also added a test to show that https://github.com/llvm/llvm-project/issues/125103 should be fixed with this. I put t

[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jason Rice (ricejasonf) Changes This merges the functionality of ResolvedUnexpandedPackExpr into FunctionParmPackExpr. I also added a test to show that https://github.com/llvm/llvm-project/issues/125103 should be fixed with this.

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-02-02 Thread Björn Schäpers via cfe-commits
@@ -412,6 +414,15 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeLeft( // The case `const long long volatile int` -> `const volatile long long int` // The case `long volatile long int const` -> `const volatile long long int` if (TypeToken->isTypeName(Lang

[clang] [clang-format] Hanlde qualified type name for `QualifierAlignment` (PR #125327)

2025-02-02 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/125327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Enable IBT by default on OpenBSD/am64 (PR #125395)

2025-02-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/125395 None >From a4270081b061b75ce70eb61feff5e5b1119dcda5 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 2 Feb 2025 05:25:18 -0500 Subject: [PATCH] [Driver] Enable IBT by default on OpenBSD/am64 --- clang/lib/D

[clang] [Driver] Enable IBT by default on OpenBSD/am64 (PR #125395)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brad Smith (brad0) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125395.diff 2 Files Affected: - (modified) clang/lib/Driver/ToolChains/Clang.cpp (+6) - (modified) clang/test/Driver/openbsd.c (+5) ``diff

[clang] [clang-format] Add null-terminated path option (#123921) (PR #123926)

2025-02-02 Thread Björn Schäpers via cfe-commits
@@ -260,15 +265,13 @@ def main(): "Ignoring the following files (wrong extension, symlink, or " "ignored by clang-format):" ) -for filename in ignored_files: -print("%s" % filename) +print_f

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-02-02 Thread Oleksandr T. via cfe-commits
@@ -50,8 +50,8 @@ struct testRecoverStrictnessStruct { }; #pragma clang attribute pop -#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to = any(function, record(unless(is_union)), variable, enum)) -// expected-error@-1 {{attribute 'abi_tag' cannot be appli

[clang-tools-extra] [clang-tidy] Add performance-redundant-lookup check (PR #125420)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Balazs Benics (steakhal) Changes Finds redundant lookups to set|map containers. For example: `map.count(key) && map[key] < threshold` --- I've implemented this check in the Clang Static Analyzer, but it didn't really bring much valu

[clang-tools-extra] [clang-tidy] Add performance-redundant-lookup check (PR #125420)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Balazs Benics (steakhal) Changes Finds redundant lookups to set|map containers. For example: `map.count(key) && map[key] < threshold` --- I've implemented this check in the Clang Static Analyzer, but it didn't really bring mu

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-02 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/125421 Summary: Currently, `-Xarch_` is used to forward argument specially to certain toolchains. Currently, this is only supported by the Darwin toolchain. We want to be able to use this generically, and for offloading

[clang] [Clang] Make `-Xarch_` handling generic for all toolchains (PR #125421)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: Currently, `-Xarch_` is used to forward argument specially to certain toolchains. Currently, this is only supported by the Darwin toolchain. We want to be able to use this generically, and for offload

[clang-tools-extra] [clang-tidy] Add performance-redundant-lookup check (PR #125420)

2025-02-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/125420 Finds redundant lookups to set|map containers. For example: `map.count(key) && map[key] < threshold` --- I've implemented this check in the Clang Static Analyzer, but it didn't really bring much value compare

[clang] [clang][bytecode][NFC] Only call getSource() when necessary (PR #125419)

2025-02-02 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/125419 None >From 6b3952c8fc1ba420e27ea376e01113c1160b4dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 2 Feb 2025 17:44:19 +0100 Subject: [PATCH] [clang][bytecode][NFC] Only call getSource

[clang] [clang][bytecode][NFC] Only call getSource() when necessary (PR #125419)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125419.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.cpp (+3-3) ``diff diff --git a/clang/lib/AST/ByteCode/Interp.cp

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

2025-02-02 Thread Matheus Izvekov via cfe-commits
@@ -2298,6 +2298,13 @@ class FunctionDecl : public DeclaratorDecl, FunctionDeclBits.IsLateTemplateParsed = ILT; } + bool isInstantiatedFromMemberTemplate() const { +return FunctionDeclBits.IsInstantiatedFromMemberTemplate; + } + void setInstantiatedFromMemberTempl

[clang-tools-extra] [clang-tidy] Add performance-redundant-lookup check (PR #125420)

2025-02-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/125420 >From 78390b2af01fcd5acfbd2a313852962c873e5611 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sun, 2 Feb 2025 17:35:39 +0100 Subject: [PATCH 1/4] [clang-tidy] Add performance-redundant-lookup check Finds r

[clang] Reland: [clang] Track function template instantiation from definition (PR #125266)

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

<    1   2