[clang] MIPS/Clang: Add more false option pairs into validateTarget (PR #91968)

2024-05-22 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa closed https://github.com/llvm/llvm-project/pull/91968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -4429,6 +4433,218 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +// TODO: Should FunctionEffect be located elsewhere, where Decl is not +// forw

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -352,6 +352,9 @@ let Class = FunctionProtoType in { def : Property<"AArch64SMEAttributes", UInt32> { let Read = [{ node->getAArch64SMEAttributes() }]; } + def : Property<"functionEffects", Array> { +let Read = [{ node->getFunctionEffects().serializable() }]; +

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -3144,6 +3154,9 @@ class Sema final { QualType T, TypeSourceInfo *TSInfo, StorageClass SC); + /// Potentially add a FunctionDecl or BlockDecl to DeclsWithEffectsToVerify. + void CheckAddCallableWithEffects(const

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -5016,3 +5024,254 @@ void AutoType::Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context) { Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(), getTypeConstraintConcept(), getTypeConstraintArguments()); } + +FunctionEffect::FunctionE

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -4429,6 +4433,218 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +// TODO: Should FunctionEffect be located elsewhere, where Decl is not +// forw

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -1888,6 +1888,11 @@ ExprResult Sema::BuildCaptureInit(const Capture &Cap, ExprResult Sema::ActOnLambdaExpr(SourceLocation StartLoc, Stmt *Body) { LambdaScopeInfo LSI = *cast(FunctionScopes.back()); ActOnFinishFunctionBody(LSI.CallOperator, Body); + + if (const auto FX =

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -17154,6 +17156,10 @@ ExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc, BlockScopeInfo *BSI = cast(FunctionScopes.back()); BlockDecl *BD = BSI->TheDecl; + if (const auto FX = BD->getFunctionEffects()) { +CheckAddCallableWithEffects(BD, FX); + } ---

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -4429,6 +4433,210 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +class Decl; +class CXXMethodDecl; +class FunctionEffectSet; + +/// Represents a

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -4429,6 +4434,284 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +class Decl; +class CXXMethodDecl; +class FunctionTypeEffectsRef; +class Functio

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public llvm::FoldingSetNode { } }; +// -- + +/// Represents an abstract function effect, using just an enumeration describi

[clang] [clang][FMV] Allow declaration of function versions in namespaces. (PR #93044)

2024-05-22 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/93044 Fixes a bug: ../llvm-project/clang/test/Sema/fmv-namespace.cpp:8:18: warning: attribute declaration must precede definition [-Wignored-attributes] 8 | int __attribute((target_version("sve"))) foo() { retur

[clang] [clang][FMV] Allow declaration of function versions in namespaces. (PR #93044)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandros Lamprineas (labrinea) Changes Fixes a bug: ../llvm-project/clang/test/Sema/fmv-namespace.cpp:8:18: warning: attribute declaration must precede definition [-Wignored-attributes] 8 | int __attribute((target_version("sve")))

[clang] [clang][FMV] Allow declaration of function versions in namespaces. (PR #93044)

2024-05-22 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea edited https://github.com/llvm/llvm-project/pull/93044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][FMV] Allow declaration of function versions in namespaces. (PR #93044)

2024-05-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 e5936b245e9af0cea69a7e4eae22a05b7ffcf5a3 e03d8cfdc697bf714d1f13247233cf514b77f0de --

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-22 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/93046 This DR's effects are backported to C++98. Does not affect C where integral constant expressions cannot involve pointers. >From aa5e7f71efdfcdea902ac881fd8db6b7c4f4538d Mon Sep 17 00:00:00 2001 From: Mital As

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes This DR's effects are backported to C++98. Does not affect C where integral constant expressions cannot involve pointers. --- Full diff: https://github.com/llvm/llvm-project/pull/93046.diff 7 Files Affec

[clang] 2bde13c - [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (#92852)

2024-05-22 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-05-22T12:18:44-03:00 New Revision: 2bde13cda1e389599413132028731f18fb5c03c3 URL: https://github.com/llvm/llvm-project/commit/2bde13cda1e389599413132028731f18fb5c03c3 DIFF: https://github.com/llvm/llvm-project/commit/2bde13cda1e389599413132028731f18fb5c03c3.dif

[clang] [clang-tools-extra] [clang] Implement CWG2398 provisional TTP matching to class templates (PR #92855)

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

[clang] [clang-tools-extra] [clang] NFCI: use TemplateArgumentLoc for NTTP DefaultArgument (PR #92852)

2024-05-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/92852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][FMV] Allow declaration of function versions in namespaces. (PR #93044)

2024-05-22 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/93044 >From e1de85dc4b5fe09a8b6df2e10c16e58805e8873a Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Wed, 22 May 2024 15:55:58 +0100 Subject: [PATCH] [clang][FMV] Allow declaration of function versions in

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -7973,3 +7973,20 @@ requirement: } }]; } + +def NoLockNoAllocDocs : Documentation { + let Category = DocCatType; + let Content = [{ +The ``nolock`` and ``noalloc`` attributes can be attached to functions, blocks, +function pointers, lambdas, and member functions. The

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-22 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/93046 >From e1172958f43af7490b5b6e3752a9070265ad17ca Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Wed, 22 May 2024 16:01:13 +0100 Subject: [PATCH] [Clang] CWG2749: relational operators involving pointers to voi

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-22 Thread Fanbo Meng via cfe-commits
https://github.com/fanbo-meng updated https://github.com/llvm/llvm-project/pull/91384 >From 84e5ca4d8987d071d20b9dcba673b0c856762487 Mon Sep 17 00:00:00 2001 From: Fanbo Meng Date: Tue, 7 May 2024 13:36:38 -0400 Subject: [PATCH 1/7] [SystemZ][z/OS] Implement z/OS XPLINK ABI The XPLINK calling

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-05-22 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok edited https://github.com/llvm/llvm-project/pull/93046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-22 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/91303 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
@@ -10510,6 +10512,8 @@ QualType ASTContext::mergeFunctionTypes(QualType lhs, QualType rhs, if (lproto->getMethodQuals() != rproto->getMethodQuals()) return {}; +// TODO: (nonblocking) Does anything need to be done with FunctionEffects? + dougso

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-05-22 Thread Doug Wyatt via cfe-commits
dougsonos wrote: I've been through all the feedback again and believe I have addressed everything. https://github.com/llvm/llvm-project/pull/84983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] 3c67c22 - [clang][Interp] Test non-active union access

2024-05-22 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-22T17:31:34+02:00 New Revision: 3c67c227f2e16accd3cdb3aeb4c845edabd2f6c4 URL: https://github.com/llvm/llvm-project/commit/3c67c227f2e16accd3cdb3aeb4c845edabd2f6c4 DIFF: https://github.com/llvm/llvm-project/commit/3c67c227f2e16accd3cdb3aeb4c845edabd2f6c4.diff LO

[clang] [clang][AST] Fix end location of DeclarationNameInfo on instantiated methods (PR #92654)

2024-05-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/92654 >From 3f3c98a55a6d89ddb05085c41d1fffad331595ce Mon Sep 17 00:00:00 2001 From: Alejandro _lvarez Ayll_n Date: Sat, 18 May 2024 16:53:33 +0200 Subject: [PATCH] [clang][AST] Fix end location of DeclarationNameInfo

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-05-22 Thread via cfe-commits
Sirraide wrote: Ok, the only CI failure is apparently `CoverageMapping/mcdc-system-headers.cpp`, which seems unrelated. https://github.com/llvm/llvm-project/pull/84934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-05-22 Thread via cfe-commits
Sirraide wrote: > the GNU __attribute__((assume)) spelling is no longer diagnosed as a C++23 > extension, but from what I can tell, this pr is finally done now. @erichkeane @AaronBallman Just wanted to double-check whether this is fine because I committed this change after this pr was approved

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-05-22 Thread Erich Keane via cfe-commits
erichkeane wrote: > > the GNU `__attribute__((assume))` spelling is no longer diagnosed as a > > C++23 extension > > @erichkeane @AaronBallman Just wanted to double-check whether this is fine > because I committed this change after this pr was approved. Yep, that makes sense to me. Still LGT

[clang] 919df9d - [clang][AST] Fix end location of DeclarationNameInfo on instantiated methods (#92654)

2024-05-22 Thread via cfe-commits
Author: Balazs Benics Date: 2024-05-22T17:41:31+02:00 New Revision: 919df9d75ac2a721a8072327c803f34486884571 URL: https://github.com/llvm/llvm-project/commit/919df9d75ac2a721a8072327c803f34486884571 DIFF: https://github.com/llvm/llvm-project/commit/919df9d75ac2a721a8072327c803f34486884571.diff

[clang] [clang][AST] Fix end location of DeclarationNameInfo on instantiated methods (PR #92654)

2024-05-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/92654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Allow open brace with trailing comment (no line break) (PR #89956)

2024-05-22 Thread via cfe-commits
GertyP wrote: Ping https://github.com/llvm/llvm-project/pull/89956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/93059 Adding a release note about this as discussed in #92439. (This is an NFC change, but I’m adding you as reviewers in case there is anything you want to add to this since you were involved in the discussion.) T

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes Adding a release note about this as discussed in #92439. (This is an NFC change, but I’m adding you as reviewers in case there is anything you want to add to this since you were involved in the discussion.) This

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
cor3ntin wrote: > This closes https://github.com/llvm/llvm-project/issues/92439. It does not (`s` is still not diagnosed) https://github.com/llvm/llvm-project/pull/93059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] 4fbc95d - [clang][Interp] Skip union members in default initializers

2024-05-22 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-05-22T17:57:00+02:00 New Revision: 4fbc95d1360147e9c4aceeadd1bda17d68364b85 URL: https://github.com/llvm/llvm-project/commit/4fbc95d1360147e9c4aceeadd1bda17d68364b85 DIFF: https://github.com/llvm/llvm-project/commit/4fbc95d1360147e9c4aceeadd1bda17d68364b85.diff LO

[clang] c44fa3e - [Clang] Refactor `__attribute__((assume))` (#84934)

2024-05-22 Thread via cfe-commits
Author: Sirraide Date: 2024-05-22T17:58:48+02:00 New Revision: c44fa3e8a9a44c2e9a575768a3c185354b9f6c17 URL: https://github.com/llvm/llvm-project/commit/c44fa3e8a9a44c2e9a575768a3c185354b9f6c17 DIFF: https://github.com/llvm/llvm-project/commit/c44fa3e8a9a44c2e9a575768a3c185354b9f6c17.diff LOG:

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

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

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
@@ -59,6 +59,18 @@ C++ Specific Potentially Breaking Changes - Clang now performs semantic analysis for unary operators with dependent operands that are known to be of non-class non-enumeration type prior to instantiation. + This change uncovered a bug in libstdc++ 14.1.0

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
Sirraide wrote: > > This closes #92439. > > It does not (`s` is still not diagnosed) Oh, right; this was mainly in reference to the libstdc++ bug since that’s what’s most of the discussion on that issue has been about. I’d maybe suggest moving the `s` case to a different issue? https

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/93059 >From b7fde11f08a324b00e8179253dd327724b40cdc9 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Wed, 22 May 2024 17:49:11 +0200 Subject: [PATCH 1/2] [Clang] Add release note about libstdc++ bug --- clang/docs/Rel

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
cor3ntin wrote: I would keep that issue and just remove the fixes (We can still link the issue to this PR by posting a link in a comment) https://github.com/llvm/llvm-project/pull/93059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/93059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
Sirraide wrote: > I would keep that issue and just remove the fixes Done https://github.com/llvm/llvm-project/pull/93059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
cor3ntin wrote: (I also think that the libstdc++ bug demonstrated some usefulness for a `++this` -> `++*this` fixit... maybe?) https://github.com/llvm/llvm-project/pull/93059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks for doing this! https://github.com/llvm/llvm-project/pull/93059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
Sirraide wrote: > (I also think that the libstdc++ bug demonstrated some usefulness for a > `++this` -> `++*this` fixit... maybe?) That does sound like it might be useful; I’m going to open another issue about that so we don’t forget about it. https://github.com/llvm/llvm-project/pull/93059 _

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/93064 None >From 0ed9d89d65277d5af2bad72ba7834fc0bebb7236 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 22 May 2024 12:19:49 -0400 Subject: [PATCH] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_glob

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Shilei Tian (shiltian) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/93064.diff 3 Files Affected: - (modified) clang/lib/CodeGen/CGBuiltin.cpp (+42) - (added) clang/test/CodeGenOpenCL/builtins-amdgcn-gfx940

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shilei Tian (shiltian) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/93064.diff 3 Files Affected: - (modified) clang/lib/CodeGen/CGBuiltin.cpp (+42) - (added) clang/test/CodeGenOpenCL/builtins-amdgcn-gfx940-err.cl (

[clang] [clang][FMV] Allow declaration of function versions in namespaces. (PR #93044)

2024-05-22 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/93044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Shilei Tian (shiltian) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/93064.diff 3 Files Affected: - (modified) clang/lib/CodeGen/CGBuiltin.cpp (+42) - (added) clang/test/CodeGenOpenCL/builtins-amdgcn-gfx940-

[clang] [Clang] Reuse tail-padding for more types that are not POD for the purpose of layout (PR #90462)

2024-05-22 Thread John McCall via cfe-commits
@@ -2415,46 +2415,112 @@ DiagnosticBuilder ItaniumRecordLayoutBuilder::Diag(SourceLocation Loc, return Context.getDiagnostics().Report(Loc, DiagID); } +/// https://itanium-cxx-abi.github.io/cxx-abi/abi.html#POD +/// POD for the purpose of layout +/// In general, a type is

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Matt Arsenault via cfe-commits
@@ -19040,6 +19040,48 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_s_sendmsg_rtn, {ResultType}); return Builder.CreateCall(F, {Arg}); } + case AMDGPU::BI__builtin_amdgcn_global_load_lds: { +SmallVect

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Matt Arsenault via cfe-commits
@@ -19040,6 +19040,48 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_s_sendmsg_rtn, {ResultType}); return Builder.CreateCall(F, {Arg}); } + case AMDGPU::BI__builtin_amdgcn_global_load_lds: { +SmallVect

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Matt Arsenault via cfe-commits
@@ -19040,6 +19040,48 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_s_sendmsg_rtn, {ResultType}); return Builder.CreateCall(F, {Arg}); } + case AMDGPU::BI__builtin_amdgcn_global_load_lds: { +SmallVect

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-22 Thread Fangrui Song via cfe-commits
@@ -11,6 +11,8 @@ // //===--===// +#include "clang/Config/config.h" MaskRay wrote: unneeded include https://github.com/llvm/llvm-project/pull/89854 _

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-22 Thread Fangrui Song via cfe-commits
@@ -10,6 +10,8 @@ // //===--===// +#include "clang/Config/config.h" MaskRay wrote: unneeded include https://github.com/llvm/llvm-project/pull/89854 _

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -cl-std=CL2.0 -O0 -triple amdgcn-unknown-unknown -target-cpu gfx940 -S -verify -o - %s +// REQUIRES: amdgpu-registered-target arsenm wrote: Test belongs in SemaOpenCL https://github.com/llvm/llvm-project/pull/93064 _

[clang] [Clang] Reuse tail-padding for more types that are not POD for the purpose of layout (PR #90462)

2024-05-22 Thread John McCall via cfe-commits
@@ -2415,46 +2415,112 @@ DiagnosticBuilder ItaniumRecordLayoutBuilder::Diag(SourceLocation Loc, return Context.getDiagnostics().Report(Loc, DiagID); } +/// https://itanium-cxx-abi.github.io/cxx-abi/abi.html#POD +/// POD for the purpose of layout +/// In general, a type is

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

2024-05-22 Thread via cfe-commits
Sirraide wrote: I’ve opened an issue to add a fix-it hint and tagged it as a good first issue because for once this is something that seems like it would be fairly straight-forward to do: #93066 https://github.com/llvm/llvm-project/pull/93059 ___ cfe

[clang] 4ea21a0 - [Clang] [NFC] Add release note about libstdc++ bug (#93059)

2024-05-22 Thread via cfe-commits
Author: Sirraide Date: 2024-05-22T18:32:25+02:00 New Revision: 4ea21a0261cd8599a9ffa15f5c554ab0d4bbbe27 URL: https://github.com/llvm/llvm-project/commit/4ea21a0261cd8599a9ffa15f5c554ab0d4bbbe27 DIFF: https://github.com/llvm/llvm-project/commit/4ea21a0261cd8599a9ffa15f5c554ab0d4bbbe27.diff LOG:

[clang] [Clang] [NFC] Add release note about libstdc++ bug (PR #93059)

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

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Shilei Tian via cfe-commits
@@ -19040,6 +19040,48 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_s_sendmsg_rtn, {ResultType}); return Builder.CreateCall(F, {Arg}); } + case AMDGPU::BI__builtin_amdgcn_global_load_lds: { +SmallVect

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Shilei Tian via cfe-commits
@@ -19040,6 +19040,48 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_s_sendmsg_rtn, {ResultType}); return Builder.CreateCall(F, {Arg}); } + case AMDGPU::BI__builtin_amdgcn_global_load_lds: { +SmallVect

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/93064 >From cf074221241e4d5c83426c58f70438fb592ca7ad Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 22 May 2024 12:36:33 -0400 Subject: [PATCH] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_loa

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Daniel Thornburgh via cfe-commits
mysterymath wrote: > @jasonmolenda, I am stuck. I could not find how the bot configures llvm and > lldb. I built lldb and ran `make check-lldb` but did not fail in the same > way. Can you provide a recipe to reproduce the failure? For some reason it only fails on our Mac LLDB builders, and not

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-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 4ea21a0261cd8599a9ffa15f5c554ab0d4bbbe27 cf074221241e4d5c83426c58f70438fb592ca7ad --

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Shilei Tian via cfe-commits
@@ -19040,6 +19040,48 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_s_sendmsg_rtn, {ResultType}); return Builder.CreateCall(F, {Arg}); } + case AMDGPU::BI__builtin_amdgcn_global_load_lds: { +SmallVect

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Shilei Tian via cfe-commits
@@ -19040,6 +19040,48 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_s_sendmsg_rtn, {ResultType}); return Builder.CreateCall(F, {Arg}); } + case AMDGPU::BI__builtin_amdgcn_global_load_lds: { +SmallVect

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/93064 >From 630adf5665f6e030f924b8da864b139382c30dea Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 22 May 2024 12:51:42 -0400 Subject: [PATCH] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_loa

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-22 Thread via cfe-commits
@@ -1427,8 +1429,20 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, ValidExactParamAttrs[ArgNo].getAlignment().valueOrOne()) AL = AL.removeParamAttribute(Context, I, Attribute::Alignment); + auto ExistingRange = AL.getParamRa

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-22 Thread Nick Desaulniers via cfe-commits
@@ -58016,15 +58035,27 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, break; case 'r': // GENERAL_REGS case 'l': // INDEX_REGS + if (Subtarget.useInlineAsmGPR32()) { +if (VT == MVT::i8 || VT == MVT::i1) +

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-22 Thread via cfe-commits
@@ -1427,8 +1429,20 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, ValidExactParamAttrs[ArgNo].getAlignment().valueOrOne()) AL = AL.removeParamAttribute(Context, I, Attribute::Alignment); + auto ExistingRange = AL.getParamRa

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-22 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -fsyntax-only -verify %s + +// expected-error@+1 {{'patchable_function_entry' attribute is not yet supported on AIX}} +__attribute__((patchable_function_entry(0))) void f(); nickdesaulniers wrote

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-22 Thread Nick Desaulniers via cfe-commits
@@ -909,6 +909,24 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) { // Lower multi-instruction pseudo operations. switch (MI->getOpcode()) { default: break; + case TargetOpcode::PATCHABLE_FUNCTION_ENTER: { +assert(!Subtarget->isAIXABI() && +

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-22 Thread Nick Desaulniers via cfe-commits
@@ -909,6 +909,24 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) { // Lower multi-instruction pseudo operations. switch (MI->getOpcode()) { default: break; + case TargetOpcode::PATCHABLE_FUNCTION_ENTER: { +assert(!Subtarget->isAIXABI() && +

[clang] [Clang] Reuse tail-padding for more types that are not POD for the purpose of layout (PR #90462)

2024-05-22 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/90462 >From 96ff21d5126ebb4b9a538b8eef11f8ac9e2194c5 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 29 Apr 2024 12:27:04 +0100 Subject: [PATCH 1/2] [Clang] Reuse tail-padding for more types that are not POD

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Matt Arsenault via cfe-commits
@@ -19040,6 +19040,48 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_s_sendmsg_rtn, {ResultType}); return Builder.CreateCall(F, {Arg}); } + case AMDGPU::BI__builtin_amdgcn_global_load_lds: { +SmallVect

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-22 Thread Aaron Ballman via cfe-commits
@@ -3123,10 +3172,28 @@ bool ByteCodeExprGen::VisitCallExpr(const CallExpr *E) { } } + std::optional CalleeOffset; // Add the (optional, implicit) This pointer. if (const auto *MC = dyn_cast(E)) { -if (!this->visit(MC->getImplicitObjectArgument())) - ret

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-22 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,112 @@ +//===- MemberPointer.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-22 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,112 @@ +//===- MemberPointer.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-22 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,112 @@ +//===- MemberPointer.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-22 Thread Aaron Ballman via cfe-commits
@@ -3123,10 +3172,28 @@ bool ByteCodeExprGen::VisitCallExpr(const CallExpr *E) { } } + std::optional CalleeOffset; // Add the (optional, implicit) This pointer. if (const auto *MC = dyn_cast(E)) { -if (!this->visit(MC->getImplicitObjectArgument())) - ret

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Daniel Thornburgh via cfe-commits
mysterymath wrote: I was able to verify that the revert fixed the tests at least. https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f203cb0 - Fix a benign typo in a test; NFC

2024-05-22 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-05-22T13:17:56-04:00 New Revision: f203cb03d93240cfd79e603b742006f96227a00b URL: https://github.com/llvm/llvm-project/commit/f203cb03d93240cfd79e603b742006f96227a00b DIFF: https://github.com/llvm/llvm-project/commit/f203cb03d93240cfd79e603b742006f96227a00b.diff

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-22 Thread Andreas Jonson via cfe-commits
@@ -1427,8 +1429,20 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, ValidExactParamAttrs[ArgNo].getAlignment().valueOrOne()) AL = AL.removeParamAttribute(Context, I, Attribute::Alignment); + auto ExistingRange = AL.getParamRa

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-22 Thread Sean Perry via cfe-commits
@@ -11,6 +11,8 @@ // //===--===// +#include "clang/Config/config.h" perry-ca wrote: This is needed for the change in SystemZ.h to replace the hard coded `"z10"` string with the CLANG_SYSTEM

[clang] [lld] [llvm] Run ObjCContractPass in Default Codegen Pipeline (PR #92331)

2024-05-22 Thread Nuri Amari via cfe-commits
https://github.com/NuriAmari edited https://github.com/llvm/llvm-project/pull/92331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Clarify assume diagnostic (PR #93077)

2024-05-22 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/93077 Currently, if the argument to `__builtin_assume` and friends contains side-effects, we issue the following diagnostic: ``` :1:34: warning: the argument to '__builtin_assume' has side effects that will be discar

[clang] [Clang] [NFC] Clarify assume diagnostic (PR #93077)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes Currently, if the argument to `__builtin_assume` and friends contains side-effects, we issue the following diagnostic: ``` :1:34: warning: the argument to '__builtin_assume' has side effects that will be di

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Yaxun Liu via cfe-commits
@@ -19040,6 +19040,48 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, CGM.getIntrinsic(Intrinsic::amdgcn_s_sendmsg_rtn, {ResultType}); return Builder.CreateCall(F, {Arg}); } + case AMDGPU::BI__builtin_amdgcn_global_load_lds: { +SmallVect

[clang] [clang-scan-deps] Expand response files before the argument adjuster (PR #89950)

2024-05-22 Thread Alexandre Ganea via cfe-commits
aganea wrote: @jansvoboda11 Do you see any further changes for this PR? Can I land it? https://github.com/llvm/llvm-project/pull/89950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-22 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet created https://github.com/llvm/llvm-project/pull/93079 Prevent OOB access. Fixes https://github.com/llvm/llvm-project/issues/93076 From 7840ea2b16863ee7057f3b1239c59b6be06cbd42 Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Wed, 22 May 2024 19:37:18 +0200 S

[clang] [clang][Sema] Fix crash when diagnosing candidates with parameter packs (PR #93079)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: kadir çetinkaya (kadircet) Changes Prevent OOB access. Fixes https://github.com/llvm/llvm-project/issues/93076 --- Full diff: https://github.com/llvm/llvm-project/pull/93079.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaOverl

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-22 Thread Andreas Jonson via cfe-commits
@@ -1427,8 +1429,20 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, ValidExactParamAttrs[ArgNo].getAlignment().valueOrOne()) AL = AL.removeParamAttribute(Context, I, Attribute::Alignment); + auto ExistingRange = AL.getParamRa

<    1   2   3   4   >