[clang] [Clang][NFCI] Prefer non-canonical template arguments for synthesized CTAD guides (PR #99840)

2024-07-22 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thanks for the prompt review. > There is an ambiguous case that I'm a little concerned about: if the alias > template parameter and the underlying template parameter have the same name, > the synthesized deduction guide may end up with two template parameters with > the same na

[clang] c7bfc41 - [Clang][NFCI] Prefer non-canonical template arguments for synthesized CTAD guides (#99840)

2024-07-22 Thread via cfe-commits
Author: Younan Zhang Date: 2024-07-22T16:37:05+08:00 New Revision: c7bfc41860a6abe5c92dc5afb47348b0c9e69963 URL: https://github.com/llvm/llvm-project/commit/c7bfc41860a6abe5c92dc5afb47348b0c9e69963 DIFF: https://github.com/llvm/llvm-project/commit/c7bfc41860a6abe5c92dc5afb47348b0c9e69963.diff

[clang] [Clang][NFCI] Prefer non-canonical template arguments for synthesized CTAD guides (PR #99840)

2024-07-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/99840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-07-22 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Ping: would be glad to see feedback on the changes from those who are interested. Tagging @MaskRay @smithp35 https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang][CodeGen] Don't crash on sizeless output. (PR #99849)

2024-07-22 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk created https://github.com/llvm/llvm-project/pull/99849 This fixes issue #63878 caused by creating an integer with zero bitwidth. >From 44a0091b3e28b5c36f2eebe9e91d5c57f25a5d32 Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Mon, 22 Jul 2024 01:18:51 -0700 Subject: [

[clang] [clang][CodeGen] Don't crash on sizeless output. (PR #99849)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Yeting Kuo (yetingk) Changes This fixes issue #63878 caused by creating an integer with zero bitwidth. --- Full diff: https://github.com/llvm/llvm-project/pull/99849.diff 2 Files Affected: - (modified) clang/lib/CodeGen/CGStmt.

[clang] [clang][CodeGen] Don't crash on sizeless output. (PR #99849)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yeting Kuo (yetingk) Changes This fixes issue #63878 caused by creating an integer with zero bitwidth. --- Full diff: https://github.com/llvm/llvm-project/pull/99849.diff 2 Files Affected: - (modified) clang/lib/CodeGen/CGStmt.cpp (+4-

[clang] 20d3815 - [clang] Fix assertion failure in `injectEmbedTokens` (#99624)

2024-07-22 Thread via cfe-commits
Author: Mariya Podchishchaeva Date: 2024-07-22T10:46:29+02:00 New Revision: 20d38158ffbe1e01b74e39d36d4b3bc5e7a63d66 URL: https://github.com/llvm/llvm-project/commit/20d38158ffbe1e01b74e39d36d4b3bc5e7a63d66 DIFF: https://github.com/llvm/llvm-project/commit/20d38158ffbe1e01b74e39d36d4b3bc5e7a63d

[clang] [clang] Fix assertion failure in `injectEmbedTokens` (PR #99624)

2024-07-22 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/99624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-07-22 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Ping: would be glad to see feedback on the changes from those who are interested. https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [llvm] Revert "[PS4/PS5][Driver][DWARF] Always emit .debug_aranges for SCE t… (PR #99711)

2024-07-22 Thread Edd Dawson via cfe-commits
playstation-edd wrote: Apologies - will do. For the record, there was a failure on builder llvm-clang-x86_64-sie-win. https://lab.llvm.org/buildbot/#/builders/46/builds/1956 https://github.com/llvm/llvm-project/pull/99711 ___ cfe-commits mailing list

[clang] [analyzer] Improve bug report hashing, merge similar reports (PR #98621)

2024-07-22 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. LGTM. I only had one minor question inline. https://github.com/llvm/llvm-project/pull/98621 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [analyzer] Improve bug report hashing, merge similar reports (PR #98621)

2024-07-22 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: @@ -2213,7 +2213,7 @@ void BasicBugReport::Profile(llvm::FoldingSetNodeID& hash) const { void PathSensitiveBugReport::Profile(llvm::FoldingSetNodeID &hash) const { hash.AddInteger(static_cast(getKind())); hash.AddPointer(&

[clang] [analyzer] Improve bug report hashing, merge similar reports (PR #98621)

2024-07-22 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/98621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-22 Thread Kristóf Umann via cfe-commits
@@ -363,6 +397,18 @@ class LazyCompoundVal : public NonLoc { /// It might return null. const void *getStore() const; + /// This function itself is immaterial. It is only an implementation detail. + /// LazyCompoundVal represents only the rvalue, the data (known or unknow

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-22 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/97407 From 9fed2b7dc5395f487cb91c10eb076bb87e05e9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Tue, 2 Jul 2024 12:58:19 +0200 Subject: [PATCH 1/6] [analyzer][NFC] Add some docs for LazyComp

[clang] [analyzer] Improve bug report hashing, merge similar reports (PR #98621)

2024-07-22 Thread Donát Nagy via cfe-commits
@@ -2213,7 +2213,7 @@ void BasicBugReport::Profile(llvm::FoldingSetNodeID& hash) const { void PathSensitiveBugReport::Profile(llvm::FoldingSetNodeID &hash) const { hash.AddInteger(static_cast(getKind())); hash.AddPointer(&BT); - hash.AddString(Description); + hash.AddStr

[clang] [analyzer] Improve bug report hashing, merge similar reports (PR #98621)

2024-07-22 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/98621 From 2765bc97d3242d50fd73aedb9e9d38dfdcef814c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Fri, 12 Jul 2024 13:57:53 +0200 Subject: [PATCH 1/3] [analyzer] Don't display the offset value in

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-07-22 Thread Owen Pan via cfe-commits
@@ -9337,6 +9337,32 @@ TEST_F(FormatTest, AlignsAfterOpenBracket) { "\n" ");", Style); + verifyFormat("bool aaa(\n" + "const bool &a, const void *aa\n" + ") const {\n"

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-07-22 Thread Owen Pan via cfe-commits
@@ -9337,6 +9337,32 @@ TEST_F(FormatTest, AlignsAfterOpenBracket) { "\n" ");", Style); + verifyFormat("bool aaa(\n" + "const bool &a, const void *aa\n" + ") const {\n"

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-22 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/99477 >From b423b26cba90288912b3377c39ab4207c9fc95dc Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Thu, 18 Jul 2024 11:47:56 + Subject: [PATCH 1/3] [clang-tidy][cppcoreguidelines-missing-std-forward] Do

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-22 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/98788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-22 Thread Haojian Wu via cfe-commits
@@ -0,0 +1,260 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++23 -verify %s + +namespace test1 { + template struct Base { +template requires true +Base(T); + }; + + template struct InheritsCtors : public Base { +using Base::Base; + }; + + InheritsCtors inheritsCtors

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-22 Thread Haojian Wu via cfe-commits
@@ -1426,6 +1727,34 @@ void Sema::DeclareImplicitDeductionGuides(TemplateDecl *Template, if (!AddedAny) Transform.buildSimpleDeductionGuide(std::nullopt); + // FIXME: Handle explicit deduction guides from inherited constructors + // when the base deduction guides are

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-22 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: I haven't finished the review yet, some initial comments. https://github.com/llvm/llvm-project/pull/98788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-22 Thread Haojian Wu via cfe-commits
@@ -936,19 +940,21 @@ Expr *buildIsDeducibleConstraint(Sema &SemaRef, Context.DeclarationNames.getCXXDeductionGuideName(AliasTemplate)); }; + TemplateDecl *TD = DeducingTemplate ? DeducingTemplate : AliasTemplate; + SmallVector IsDeducibleTypeTraitArgs = {

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-22 Thread Haojian Wu via cfe-commits
@@ -0,0 +1,260 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++23 -verify %s + hokein wrote: Can you add testcases for the template parameter packs? e.g. ``` template struct B { B(T...); }; template struct C : public B { using B::B; }; C c(1); ``` https://

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-22 Thread Haojian Wu via cfe-commits
@@ -1957,17 +1957,26 @@ class CXXDeductionGuideDecl : public FunctionDecl { ExplicitSpecifier ES, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, SourceLocation EndLocation, -

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-22 Thread Haojian Wu via cfe-commits
@@ -0,0 +1,260 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++23 -verify %s hokein wrote: nit: you need to adjust the diagnostic messages after the https://github.com/llvm/llvm-project/commit/c7bfc41860a6abe5c92dc5afb47348b0c9e69963 https://github.com/llvm/llvm-p

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-22 Thread Haojian Wu via cfe-commits
@@ -980,19 +986,69 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +// Build the type for a deduction guide generated from an inherited constructor +// [over.match.class.deduct]p1.10: +// ... the

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-07-22 Thread Haojian Wu via cfe-commits
@@ -980,19 +986,69 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +// Build the type for a deduction guide generated from an inherited constructor +// [over.match.class.deduct]p1.10: +// ... the

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-22 Thread Clement Courbet via cfe-commits
@@ -129,15 +129,19 @@ void MissingStdForwardCheck::registerMatchers(MatchFinder *Finder) { unless(anyOf(hasAncestor(typeLoc()), hasAncestor(expr(hasUnevaluatedContext()); + auto StaticCast = cxxStaticCastExpr( + hasSourceExpression(declRefEx

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-22 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/99477 >From b423b26cba90288912b3377c39ab4207c9fc95dc Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Thu, 18 Jul 2024 11:47:56 + Subject: [PATCH 1/4] [clang-tidy][cppcoreguidelines-missing-std-forward] Do

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-22 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle edited https://github.com/llvm/llvm-project/pull/99477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][cppcoreguidelines-missing-std-forward] Do not warn when the parameter is used in a `static_cast`. (PR #99477)

2024-07-22 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 7e6a73959ae97b1f9476a90290a492ba90cb950d 43b51e07cbd5d575a82f345913cf663b988907c6 --e

[clang] [clang] Fix assertion failure in `injectEmbedTokens` (PR #99624)

2024-07-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot1` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/1938 Here is the relevant piece of the bu

[clang] 2bc38dc - [analyzer] Improve bug report hashing, merge similar reports (#98621)

2024-07-22 Thread via cfe-commits
Author: Donát Nagy Date: 2024-07-22T11:44:20+02:00 New Revision: 2bc38dc30bc9baad610925d7e90e724a9d09ee7d URL: https://github.com/llvm/llvm-project/commit/2bc38dc30bc9baad610925d7e90e724a9d09ee7d DIFF: https://github.com/llvm/llvm-project/commit/2bc38dc30bc9baad610925d7e90e724a9d09ee7d.diff LO

[clang] [analyzer] Improve bug report hashing, merge similar reports (PR #98621)

2024-07-22 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/98621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add _MM_FROUND_TIES_TO_EVEN to avx512fintrin.h (PR #99691)

2024-07-22 Thread Simon Pilgrim via cfe-commits
@@ -43,6 +43,7 @@ typedef unsigned short __mmask16; /* Rounding mode macros. */ #define _MM_FROUND_TO_NEAREST_INT 0x00 +#define _MM_FROUND_TIES_TO_EVEN 0x00 RKSimon wrote: (very pedantic) but _MM_FROUND_TO_NEAREST_TIES_EVEN would more closely keep to

[clang-tools-extra] [IncludeCleaner] Also check for spellings of physical headers (PR #99843)

2024-07-22 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/99843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-22 Thread via cfe-commits
https://github.com/CarolineConcatto approved this pull request. https://github.com/llvm/llvm-project/pull/98624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] libclc: add half version of 'sign' (PR #99841)

2024-07-22 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/99841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-22 Thread via cfe-commits
https://github.com/Lukacma updated https://github.com/llvm/llvm-project/pull/98624 >From bbb844893d973f67ecc130595bfe4fe36b2cb707 Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Fri, 12 Jul 2024 12:17:29 + Subject: [PATCH 1/2] [Clang][NEON] Add neon target guard to intrinsics --- clang/

[libclc] libclc: add half version of 'sign' (PR #99841)

2024-07-22 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/99841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 46223b5 - libclc: add half version of 'sign' (#99841)

2024-07-22 Thread via cfe-commits
Author: Romaric Jodin Date: 2024-07-22T11:08:56+01:00 New Revision: 46223b5eae1ae25ad0d8ca47ea210c1781cb03fc URL: https://github.com/llvm/llvm-project/commit/46223b5eae1ae25ad0d8ca47ea210c1781cb03fc DIFF: https://github.com/llvm/llvm-project/commit/46223b5eae1ae25ad0d8ca47ea210c1781cb03fc.diff

[clang] [analyzer][NFC] Add some docs for LazyCompoundValue (PR #97407)

2024-07-22 Thread Balazs Benics via cfe-commits
=?utf-8?q?Krist=C3=B3f?= Umann , =?utf-8?q?Krist=C3=B3f?= Umann , =?utf-8?q?Krist=C3=B3f?= Umann , =?utf-8?q?Krist=C3=B3f?= Umann , =?utf-8?q?Krist=C3=B3f?= Umann Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/97407 _

[clang] Fix #99858 (PR #99859)

2024-07-22 Thread Ahmet Faruk Aktaş via cfe-commits
https://github.com/ahfakt created https://github.com/llvm/llvm-project/pull/99859 Fix crash caused by template parameter pack expansion when no instantiation exist. From a84e2af497f827996afe9a820904f9f1d2f9fb22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Faruk=20Akta=C5=9F?= Date: Mon, 2

[clang] Fix #99858 (PR #99859)

2024-07-22 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Fix #99858 (PR #99859)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ahmet Faruk Aktaş (ahfakt) Changes Fix crash caused by template parameter pack expansion when no instantiation exist. --- Full diff: https://github.com/llvm/llvm-project/pull/99859.diff 1 Files Affected: - (modified) clang/lib/Sema/Sem

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -89,6 +89,9 @@ namespace llvm { /// info. Return true if module is modified. bool UpgradeDebugInfo(Module &M); + /// Copies module attributes to the functions in the module. + void CopyModuleAttrToFunctions(Module &M); kovdan01 wrote: Nit: it's proba

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s + +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -5278,6 +5278,106 @@ void llvm::UpgradeFunctionAttributes(Function &F) { } } +// Check if the module attribute is present and set to one. +static bool isModuleAttributeOne(Module &M, const StringRef &ModAttr) { + const auto *Attr = + mdconst::extract_or_null(M.getMo

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s kovdan01 wrote: I suppose it migh

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -5278,6 +5278,106 @@ void llvm::UpgradeFunctionAttributes(Function &F) { } } +// Check if the module attribute is present and set to one. +static bool isModuleAttributeOne(Module &M, const StringRef &ModAttr) { + const auto *Attr = + mdconst::extract_or_null(M.getMo

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. kovdan01 wrote: Nit: in llvm/test/Bitcode/upgrade-branch-protection.ll, you use ';;' for actual comments and ';' for special RUN and CHECK lines. New

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,86 @@ +;; Test verifies inlining happens cross module when module flags are upgraded. +;; `foo` and `main` are both old semantic while bar is the new semantic. +;; Regression test for #82763 + +; RUN: split-file %s %t +; RUN: opt -module-summary %t/foo.s -o %t/foo.o +;

[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)

2024-07-22 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,35 @@ +; This file contains the new semantic of the branch-target-enforcement, sign-return-address. +; Used for test mixing a mixed link case and also verify the import too in llc. + +; RUN: llc %s -o - | FileCheck %s + +target datalayout = "e-m:e-i8:8:32-i16:16:32-i64

[clang] [libcxx] [llvm] Reapply "[Clang] Implement resolution for CWG1835 (#92957)" (PR #98547)

2024-07-22 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > > I'm also seeing a hard "missing 'template' keyword prior to dependent > > template name" error when building the 510.parest_r benchmark from SPEC CPU > > 2017 > > Hitting this same error compiling the ares emulator on 19. Could either of you provide an example @KyunLFA @

[clang] [Clang][Sema] Disallow applying `onwership_returns` to functions that return non-pointers (PR #99564)

2024-07-22 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: This looks good to me as far as the current use/behavior is concerned. That being said, I think these annotations make sense to some non-pointer types as well, e.g., integer handles to other system resources. I did not find any test/functionality for this scenario, so I am OK

[clang] [Clang] Remove NetBSD/i386 workaround for FP eval method with older versions (PR #74025)

2024-07-22 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/74025 >From efc4bab5c06cb9655912da9ca7e25e5fd73e2318 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 30 Nov 2023 20:50:01 -0500 Subject: [PATCH] [Clang] Remove NetBSD/i386 workaround for FP eval method with older ve

[clang] [libcxx] [llvm] Reapply "[Clang] Implement resolution for CWG1835 (#92957)" (PR #98547)

2024-07-22 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: > Independent of the other issues, it looks like this also re-introduces #98878 @nico #98878 still occurs without this patch applied: ```cpp struct A { void f(); }; template int g(T t) { using U = A; // clang 18.1: 'warning: unused type alias 'U'' t.U::f(); } ```

[clang] dc82c77 - [Clang][NEON] Add neon target guard to intrinsics (#98624)

2024-07-22 Thread via cfe-commits
Author: Lukacma Date: 2024-07-22T12:03:59+01:00 New Revision: dc82c774a74ad7e94d4c555e4cae1025e30f3876 URL: https://github.com/llvm/llvm-project/commit/dc82c774a74ad7e94d4c555e4cae1025e30f3876 DIFF: https://github.com/llvm/llvm-project/commit/dc82c774a74ad7e94d4c555e4cae1025e30f3876.diff LOG:

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-22 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/98624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [WIP] Added builtin_alloca right Address Space for OpenCL (PR #95750)

2024-07-22 Thread Matt Arsenault via cfe-commits
@@ -1983,17 +1983,14 @@ static bool OpenCLBuiltinToAddr(Sema &S, unsigned BuiltinID, CallExpr *Call) { // In OpenCL, __builtin_alloca_* should return a pointer to address space // that corresponds to the stack address space i.e private address space. -static bool OpenCLBuilti

[clang] [Clang] [WIP] Added builtin_alloca right Address Space for OpenCL (PR #95750)

2024-07-22 Thread Matt Arsenault via cfe-commits
@@ -2625,8 +2622,10 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, case Builtin::BI__builtin_alloca_uninitialized: Diag(TheCall->getBeginLoc(), diag::warn_alloca) << TheCall->getDirectCallee(); -if (OpenCLBuiltinAllocaAddrSpace(*th

[clang] Fix #99858 (PR #99859)

2024-07-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Do you have a test against your changes? This also needs a release note. https://github.com/llvm/llvm-project/pull/99859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/2858 H

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-22 Thread via cfe-commits
yronglin wrote: > > It would be nice to have a reproducer. I can't tell the root cause from > > this error, so I can't use it to strengthen the current tests. > > I intend to provide a reproducer. I just can't do it today. So don't wait on > it as a justification to avoid reverting. The PR ha

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ve-ninja` running on `hpce-ve-main` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/12/builds/2363 Here is the relevant piece of the build log for the

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang` at step 6 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/2667 Here is th

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `arc-builder` running on `arc-worker` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/1862 Here is the relevant piece of t

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 7 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/2343 Here is the relev

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` running on `sie-win-worker` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/2030 Here is the

[clang] [PS5] Adopt new compiler-rt naming scheme for the profile library. (PR #99862)

2024-07-22 Thread via cfe-commits
https://github.com/goussepi created https://github.com/llvm/llvm-project/pull/99862 Changes the driver to look for libclang_rt.profile_nosubmission.a instead of libclang_rt.profile-x86_64_nosubmission.a >From 8e2d2037bb8c81191e821e0af186c327d6ff4d0a Mon Sep 17 00:00:00 2001 From: Pierre Gousse

[clang] [PS5] Adopt new compiler-rt naming scheme for the profile library. (PR #99862)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: None (goussepi) Changes Changes the driver to look for libclang_rt.profile_nosubmission.a instead of libclang_rt.profile-x86_64_nosubmission.a --- Full diff: https://github.com/llvm/llvm-project/pull/9986

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/1973 Here is the relevant piec

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-22 Thread Egor Zhdan via cfe-commits
@@ -456,6 +458,7 @@ template <> struct MappingTraits { IO.mapOptional("EnumKind", T.EnumConvenienceKind); IO.mapOptional("SwiftCopyable", T.SwiftCopyable); IO.mapOptional("Methods", T.Methods); +IO.mapOptional("Tags", T.Tags); egorzhdan wrote:

[clang] [APINotes] Support nested tags (PR #99655)

2024-07-22 Thread Egor Zhdan via cfe-commits
@@ -783,51 +783,76 @@ static void ProcessVersionedAPINotes( } } +static std::optional +UnwindNamespaceContext(DeclContext *DC, api_notes::APINotesManager &APINotes) { + if (auto NamespaceContext = dyn_cast(DC)) { +for (auto Reader : APINotes.findAPINotes(NamespaceContex

[clang] Revert "[Clang][NEON] Add neon target guard to intrinsics" (PR #99864)

2024-07-22 Thread via cfe-commits
https://github.com/Lukacma created https://github.com/llvm/llvm-project/pull/99864 Reverts llvm/llvm-project#98624 >From 9fb427c61f9444e90bad89b14723f1c369f67aad Mon Sep 17 00:00:00 2001 From: Lukacma Date: Mon, 22 Jul 2024 12:32:23 +0100 Subject: [PATCH] Revert "[Clang][NEON] Add neon target

[clang] c1622ca - Revert "[Clang][NEON] Add neon target guard to intrinsics" (#99864)

2024-07-22 Thread via cfe-commits
Author: Lukacma Date: 2024-07-22T12:32:47+01:00 New Revision: c1622cae10c953f327c7ef24d57508eebd84f244 URL: https://github.com/llvm/llvm-project/commit/c1622cae10c953f327c7ef24d57508eebd84f244 DIFF: https://github.com/llvm/llvm-project/commit/c1622cae10c953f327c7ef24d57508eebd84f244.diff LOG:

[clang] Revert "[Clang][NEON] Add neon target guard to intrinsics" (PR #99864)

2024-07-22 Thread via cfe-commits
https://github.com/Lukacma closed https://github.com/llvm/llvm-project/pull/99864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][NEON] Add neon target guard to intrinsics" (PR #99864)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Lukacma) Changes Reverts llvm/llvm-project#98624 --- Full diff: https://github.com/llvm/llvm-project/pull/99864.diff 4 Files Affected: - (modified) clang/include/clang/Basic/arm_neon.td (+32-32) - (modified) clang/include/clang/B

[clang] [llvm] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-07-22 Thread Peter Smith via cfe-commits
https://github.com/smithp35 commented: Does this need a clang command line option at this point? Would it be possible to live with a {{-mllvm}} option to turn on signed GOT? I would expect signed GOT (or not) would be part of a higher-level signing schema and not toggled at a low-level via cla

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hexagon-elf` running on `hexagon-build-02` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/40/builds/698 Here is the relevant piece of the build

[clang] Fix #99858 (PR #99859)

2024-07-22 Thread Ahmet Faruk Aktaş via cfe-commits
ahfakt wrote: I tried to represent the error with a sample code but can not reproduce. It may be removed because of unused template function optimization. In my project it is in a template library which is not a compiled context. I just wanted to point the issue so someone who is experienced i

[clang] [llvm] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-07-22 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > Does this need a clang command line option at this point? Would it be > possible to live with a {{-mllvm}} option to turn on signed GOT? I would > expect signed GOT (or not) would be part of a higher-level signing schema and > not toggled at a low-level via clang. > > I know

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-22 Thread via cfe-commits
ofAlpaca wrote: It looks like my release note has conflict. Should I edit the file through `resolve conflits` and hit `commit merge`? https://github.com/llvm/llvm-project/pull/99542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-22 Thread via cfe-commits
cor3ntin wrote: When you create a new PR, can you try to preserve the history of your commits, so that we can easily see what you changed? Thanks https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [CLANG][AArch64]Add Neon vectors for fpm8_t (PR #99865)

2024-07-22 Thread via cfe-commits
https://github.com/CarolineConcatto created https://github.com/llvm/llvm-project/pull/99865 This patch adds these new vector sizes for neon: fpm8x16_t and fpm8x8_t According to the ARM ACLE PR#323[1]. [1] ARM-software/acle#323 >From fbeca5c357b1a5589757bbb2cac8208f8c9027ab Mon

[clang] [CLANG][AArch64]Add Neon vectors for fpm8_t (PR #99865)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: None (CarolineConcatto) Changes This patch adds these new vector sizes for neon: fpm8x16_t and fpm8x8_t According to the ARM ACLE PR#323[1]. [1] ARM-software/acle#323 --- Patch is 49.87 Ki

[clang] clang: Allow targets to set custom metadata on atomics (PR #96906)

2024-07-22 Thread Matt Arsenault via cfe-commits
arsenm wrote: ping https://github.com/llvm/llvm-project/pull/96906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/99866 None >From e0d76b97e386421ac2e653c206f49f827b24e65b Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Mon, 22 Jul 2024 12:16:48 + Subject: [PATCH] Record mainfile name in the Frontend time trace --- clang/l

[clang-tools-extra] [clang-tidy][performance-unnecessary-value-param] Make `handleMoveFix` virtual (PR #99867)

2024-07-22 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle created https://github.com/llvm/llvm-project/pull/99867 ... so that downstream checks can override behaviour to do additional processing. Refactor the rest of the logic to `handleConstRefFix` (which is also `virtual`). This is otherwise and NFC. This is simila

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/99866.diff 2 Files Affected: - (modified) clang/lib/Parse/ParseAST.cpp (+7-1) - (modified) clang/unittests/Support/TimeProfilerTest.cpp (+3-4)

[clang-tools-extra] [clang-tidy][performance-unnecessary-value-param] Make `handleMoveFix` virtual (PR #99867)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Clement Courbet (legrosbuffle) Changes ... so that downstream checks can override behaviour to do additional processing. Refactor the rest of the logic to `handleConstRefFix` (which is also `virtual`). This is otherwise and NFC. Th

[clang] Record mainfile name in the Frontend time trace (PR #99866)

2024-07-22 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/99866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-22 Thread via cfe-commits
yronglin wrote: > When you create a new PR, can you try to preserve the history of your > commits, so that we can easily see what you changed? Thanks Sure, I'd be happy to do that! I will put the new changes in a separate commit. 😁 https://github.com/llvm/llvm-project/pull/90574 _

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #99870)

2024-07-22 Thread via cfe-commits
https://github.com/Lukacma created https://github.com/llvm/llvm-project/pull/99870 This patch improves reported error when NEON intrinsics are used without neon target feature. >From 8e4c016a2ce0cf8dcbd8dc75f080058bb8d814fe Mon Sep 17 00:00:00 2001 From: Marian Lukac Date: Fri, 12 Jul 2024 12

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #99870)

2024-07-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Lukacma) Changes This patch improves reported error when NEON intrinsics are used without neon target feature. --- Full diff: https://github.com/llvm/llvm-project/pull/99870.diff 4 Files Affected: - (modified) clang/include/clang

[clang] [clang] [C++20] Defaulted operator== doesn't lookup in using-directive properly #97087 (PR #99542)

2024-07-22 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only %s +// expected-no-diagnostics +struct X {}; +namespace NS { +bool operator==(X, X); +} +using namespace NS; +struct Y { +X x; +friend bool operator==(Y, Y); +}; +bool operator==(Y, Y) = default; --

<    1   2   3   4   5   6   7   >