[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/89807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread via cfe-commits
https://github.com/cor3ntin commented: I'm pretty happy with the direction this is going in. I'd like to see the specific test in https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2398, the ones we exchanged by mails and some tests with constraints

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A, cor3ntin wrote: This

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread via cfe-commits
@@ -1133,8 +1133,8 @@ C++17 implementation status Matching template template parameters to compatible arguments - https://wg21.link/p0522r0;>P0522R0 - Partial (10) + https://wg21.link/p0522r0;>P0522R0 (DR) + Clang 4 (10)

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A, +

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A, +

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread via cfe-commits
@@ -519,13 +571,45 @@ DeduceTemplateArguments(Sema , TemplateParameterList *TemplateParams, return TemplateDeductionResult::Success; } - if (TemplateTemplateParmDecl *TempParam -= dyn_cast(ParamDecl)) { + if (auto *TempParam = dyn_cast(ParamDecl)) { //

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema , NamedDecl *A, +

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread via cfe-commits
@@ -8343,58 +8343,52 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, // C++1z [temp.arg.template]p3: (DR 150) // A template-argument matches a template template-parameter P when P // is at least as specialized as the template-argument A.

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread Wentao Zhang via cfe-commits
https://github.com/whentojump edited https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM] Armv8-R does not require fp64 or neon. (PR #88287)

2024-04-24 Thread David Green via cfe-commits
davemgreen wrote: I'm not sure I would make this change, mostly due to it potentially causing a break for existing users and making performance worse, but can see the reasoning. I am willing to defer to others if they have an opinion. https://github.com/llvm/llvm-project/pull/88287

[clang] [clang][Sema] Preserve the initializer of invalid VarDecls (PR #88645)

2024-04-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/88645 >From c24e79da57fc69d2f353a5533a3cc26313301a71 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 14 Apr 2024 02:41:48 -0400 Subject: [PATCH] [clang][Sema] Preserve the initializer of invalid VarDecls

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/81662 >From 480cabcfeb42542746026bba753b4170e08bb8ae Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 13 Feb 2024 12:26:17 -0500 Subject: [PATCH] [clang][Sema] Improve error recovery for id-expressions

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread Wentao Zhang via cfe-commits
https://github.com/whentojump edited https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-24 Thread Tobias Hieta via cfe-commits
tru wrote: I agree that if downstream want to change stuff, they need to engage. We can't guess what microsoft wants to do (or sony) unless we have a discussion about it. This is also documented in the developer policy. If there are missed release notes, they need to be added of course. That

[clang] [clang-tools-extra] [clangd] Show struct fields and enum members in hovers (PR #89557)

2024-04-24 Thread Nathan Ridge via cfe-commits
@@ -474,6 +477,17 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) { for (DeclContext::decl_iterator D = DC->decls_begin(), DEnd = DC->decls_end(); D != DEnd; ++D) { +// Print enum members and public struct fields when +//

[clang] 805d563 - [clang] Mark ill-formed partial specialization as invalid (#89536)

2024-04-24 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-24T10:45:38+04:00 New Revision: 805d5637a0d50caa073f435b55940c1338aae0fc URL: https://github.com/llvm/llvm-project/commit/805d5637a0d50caa073f435b55940c1338aae0fc DIFF:

[clang] [clang] Mark ill-formed partial specialization as invalid (PR #89536)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/89536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-24 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/89727 >From a43014cf3daa1b0fd9092bfe41da979205ba64aa Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Tue, 23 Apr 2024 02:16:04 -0700 Subject: [PATCH 1/3] [RISCV] Teach .option arch to support experimental extensions.

[clang] [llvm] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-24 Thread Yeting Kuo via cfe-commits
@@ -2824,8 +2827,12 @@ bool RISCVAsmParser::parseDirectiveOption() { break; } - auto Ext = llvm::lower_bound(RISCVFeatureKV, Arch); - if (Ext == std::end(RISCVFeatureKV) || StringRef(Ext->Key) != Arch || + std::string & =

[clang] [clang][RISCV] Remove LMUL=8 scalar input for some vector crypto instructions (PR #89867)

2024-04-24 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread Wentao Zhang via cfe-commits
https://github.com/whentojump ready_for_review https://github.com/llvm/llvm-project/pull/89869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-24 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/80923 >From d6fd48794112d6c140024d7cd55b5fe5e55e Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 6 Feb 2024 00:31:59 + Subject: [PATCH 1/5] [WebAssembly] Add more features to generic CPU config This

[clang] [Clang][AArch64] Extend diagnostics when warning non/streaming about … (PR #88380)

2024-04-24 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/88380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Swap out range metadata to range attribute for cttz/ctlz/ctpop (PR #88776)

2024-04-24 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] Show struct fields and enum members in hovers (PR #89557)

2024-04-24 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > > 3. Regarding the implementation approach, is it fine to add a flag to > > `PrintingPolicy` (which is a clang utility class used in a variety of > > places) for a clangd-specific use case like this? I did it this way because > > the alternative seemed to involve

[clang] [MC/DC][Coverage] Workaround for `##` conditions (PR #89573)

2024-04-24 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @whentojump Thanks. Would you like to take this over? Then I will close this. https://github.com/llvm/llvm-project/pull/89573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Wentao Zhang (whentojump) Changes The problematic program is as follows: ```shell #define pre_a 0 #define PRE(x) pre_##x void f(void) { PRE(a) 0; } int main(void) { return 0; } ``` in which after token concatenation

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Wentao Zhang (whentojump) Changes The problematic program is as follows: ```shell #define pre_a 0 #define PRE(x) pre_##x void f(void) { PRE(a) 0; } int main(void) { return 0; } ``` in which after token concatenation (`##`),

[clang] [clang][Sema] Preserve the initializer of invalid VarDecls (PR #88645)

2024-04-24 Thread Nathan Ridge via cfe-commits
@@ -13435,16 +13435,18 @@ void Sema::checkNonTrivialCUnion(QualType QT, SourceLocation Loc, void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { // If there is no declaration, there was an error parsing it. Just ignore // the initializer. - if

[clang] [clang][Sema] Preserve the initializer of invalid VarDecls (PR #88645)

2024-04-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/88645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-24 Thread Nathan Ridge via cfe-commits
@@ -3453,6 +3453,10 @@ ExprResult Sema::BuildDeclarationNameExpr(const CXXScopeSpec , NeedsADL, R.isOverloadedResult(), R.begin(), R.end()); + if (ULE && R.isSingleResult() &&

[clang] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-24 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: (OpenMP failure still remains to be fixed.) https://github.com/llvm/llvm-project/pull/81662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix the process return code if diagnostics occurred. (PR #89879)

2024-04-24 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev created https://github.com/llvm/llvm-project/pull/89879 Should fix the failure seen in the pre-merge infrastructure of #89804. >From 066029973ac937f3a810bd4aefaed8c8f6e0af51 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Wed, 24 Apr 2024 06:30:55 +

[clang] [llvm] [ARM] Armv8-R does not require fp64 or neon. (PR #88287)

2024-04-24 Thread Chris Copeland via cfe-commits
chrisnc wrote: @davemgreen which change? Specifying `-mcpu=cortex-r52` will behave the same way as before. The original manual for the R52 provided for a no-neon sp-only variant, and they exist in the wild, and this lets "architecture-generic" builds automatically support both. One example

[clang] [clang-repl] Fix the process return code if diagnostics occurred. (PR #89879)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vassil Vassilev (vgvassilev) Changes Should fix the failure seen in the pre-merge infrastructure of #89804. --- Full diff: https://github.com/llvm/llvm-project/pull/89879.diff 2 Files Affected: - (modified)

[clang] [clang-repl] Fix the process return code if diagnostics occurred. (PR #89879)

2024-04-24 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89879 >From d6b3d2a7b93399f8e895118e9f43378a2efa21f1 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Wed, 24 Apr 2024 06:30:55 + Subject: [PATCH] [clang-repl] Fix the process return code if diagnostics

[clang] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (PR #89873)

2024-04-24 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/89873 >From d83b9cda6c7d943e90c324fa2c1c7e7ffaf88e1c Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 24 Apr 2024 13:35:01 +0800 Subject: [PATCH] [NFC] Move DeclID from serialization/ASTBitCodes.h to

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-24 Thread Kishan Parmar via cfe-commits
https://github.com/Long5hot updated https://github.com/llvm/llvm-project/pull/77732 >From b5746d24130b9595762d85f4da7169d7b7a801f0 Mon Sep 17 00:00:00 2001 From: Kishan Parmar Date: Wed, 24 Apr 2024 18:01:23 +0530 Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU for

[clang] 2bcbe40 - [clang][ExtractAPI] Fix handling of anonymous TagDecls (#87772)

2024-04-24 Thread via cfe-commits
Author: Daniel Grumberg Date: 2024-04-24T13:53:29+01:00 New Revision: 2bcbe40f8a1c6cc9a256711261d8aa8fde50f7b3 URL: https://github.com/llvm/llvm-project/commit/2bcbe40f8a1c6cc9a256711261d8aa8fde50f7b3 DIFF:

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-24 Thread Daniel Grumberg via cfe-commits
https://github.com/daniel-grumberg closed https://github.com/llvm/llvm-project/pull/87772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][Release] Add stage2-package target (PR #89517)

2024-04-24 Thread Tobias Hieta via cfe-commits
https://github.com/tru approved this pull request. https://github.com/llvm/llvm-project/pull/89517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-24 Thread Tobias Hieta via cfe-commits
tru wrote: And I think it's better to revert it all instead of implementing this half-revert in this PR in that case and then we should discuss how to move forward. https://github.com/llvm/llvm-project/pull/89775 ___ cfe-commits mailing list

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-24 Thread David Truby via cfe-commits
https://github.com/DavidTruby updated https://github.com/llvm/llvm-project/pull/89938 >From 88db34e906f6eb104f8d84fa9ad4f0aa49607c68 Mon Sep 17 00:00:00 2001 From: David Truby Date: Wed, 24 Apr 2024 14:35:23 + Subject: [PATCH 1/2] [flang] Generate main only when a Fortran program

[clang] [clang][Lex] Reformat suspicious condition (PR #89923)

2024-04-24 Thread Troy Butler via cfe-commits
https://github.com/Troy-Butler created https://github.com/llvm/llvm-project/pull/89923 Addresses issue #89805. Assignment + comparison performed in conditional statement. Resolved by parenthesizing comparison operation. >From cde48906d4b9a08dc436ab94f183c124ee336e5a Mon Sep 17 00:00:00 2001

[clang] [clang][Lex] Reformat suspicious condition (PR #89923)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Troy Butler (Troy-Butler) Changes Addresses issue #89805. Assignment + comparison performed in conditional statement. Resolved by parenthesizing comparison operation. --- Full diff: https://github.com/llvm/llvm-project/pull/89923.diff

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-24 Thread via cfe-commits
github-actions[bot] wrote: :white_check_mark: With the latest revision this PR passed the C/C++ code formatter. https://github.com/llvm/llvm-project/pull/89938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 62549db - [AMDGPU] Correctly determine the toolchain linker (#89803)

2024-04-24 Thread via cfe-commits
Author: Joseph Huber Date: 2024-04-24T06:46:31-05:00 New Revision: 62549dbbf286823e400e07cff5ae219e48c175d2 URL: https://github.com/llvm/llvm-project/commit/62549dbbf286823e400e07cff5ae219e48c175d2 DIFF: https://github.com/llvm/llvm-project/commit/62549dbbf286823e400e07cff5ae219e48c175d2.diff

[clang] [AMDGPU] Correctly determine the toolchain linker (PR #89803)

2024-04-24 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/89803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Initialize pointer field in StreamOperationEvaluator (PR #89837)

2024-04-24 Thread Balázs Kéri via cfe-commits
https://github.com/balazske approved this pull request. Probably add [clang] tag to the title. https://github.com/llvm/llvm-project/pull/89837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-04-24 Thread via cfe-commits
https://github.com/tigbr created https://github.com/llvm/llvm-project/pull/89925 This patch introduces a new check to find mismatches between the number of data members in a union and the number enum values present in variant-like structures. Variant-like types can look something like this:

[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (tigbr) Changes This patch introduces a new check to find mismatches between the number of data members in a union and the number enum values present in variant-like structures. Variant-like types can look something like this:

[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-04-24 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I disagree, `--gcc-install-dir` is sure an improvement over > `--gcc-toolchain`, but they're both weaker than the compile time option > `GCC_INSTALL_PREFIX` because of runtimes. > > You're looking to remove `GCC_INSTALL_PREFIX`, then give a clear alternative > that's

[clang] [clang-tools-extra] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-04-24 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 21ef187654c819fd097171afcc6c9855dccdb36d 82bf13532bb3980fbe55c56c2977c5dcbb654c80 --

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-04-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/89934 Previously commited as https://github.com/llvm/llvm-project/issues/82310. In the last patch, we used template depths to tell if such alias decls contain lambdas, which is wrong because the lambda can also

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-04-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/89934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-24 Thread via cfe-commits
yronglin wrote: Thank you working on this. I'd very like this feature! I've a question, do we have any further plans to support GNU extension attributes(e.g. `__attribute__((aligned))`)? Although it is not included in the paper. https://github.com/llvm/llvm-project/pull/89906

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-04-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/89934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-04-24 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I didn't add a release note because the previous patch has not been released yet. https://github.com/llvm/llvm-project/pull/89934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-24 Thread Zahira Ammarguellat via cfe-commits
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo , const BinaryOperator *E, // If during the evaluation of an expression, the result is not // mathematically defined [...], the behavior is undefined. // FIXME: C++ rules require us to not conform to

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-24 Thread via cfe-commits
@@ -317,7 +317,7 @@ void Declarator::setDecompositionBindings( new DecompositionDeclarator::Binding[Bindings.size()]; cor3ntin wrote: Note I'm not super fan of the hidden vector implementation here. It forces Binding to be default constructible.

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-24 Thread via cfe-commits
https://github.com/zmodem updated https://github.com/llvm/llvm-project/pull/89751 >From 33b07efe6d68cb4d17e96349b552ef5e5901d8c6 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 26 Mar 2024 15:04:35 +0100 Subject: [PATCH 1/4] stuff --- clang/lib/CodeGen/CGCoroutine.cpp |

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-24 Thread via cfe-commits
@@ -1523,24 +1442,16 @@ struct SwitchCoroutineSplitter { createResumeEntryBlock(F, Shape); auto *ResumeClone = -createClone(F, ".resume", Shape, CoroCloner::Kind::SwitchResume); +createClone(F, ".resume", Shape, CoroCloner::Kind::SwitchResume, TTI);

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-24 Thread via cfe-commits
zmodem wrote: > The higher level idea looks fine. Thanks! > A detail is that, in this patch, we must not mark > `llvm.coro.await.suspend.handle` as nounwind. Previously, > `llvm.coro.await.suspend.handle` may be marked as nounwind if the > `await_suspend` is noexcept. But we can't do it in

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-24 Thread Tobias Hieta via cfe-commits
tru wrote: Honestly - I think going back to *one* style of runtime path is to be preferred now. But I don't think it's fair to say that it doesn't solve any problems, because we switched to it so that we could ship more platforms in one toolchain package without having to add cfg files and

[clang] [CMake][Release] Refactor cache file and use two stages for non-PGO builds (PR #89812)

2024-04-24 Thread Tobias Hieta via cfe-commits
https://github.com/tru approved this pull request. I find changes to the multi-stage build caches a bit confusing to review without being able to see the cache that's generated. But I trust that you have tested this and it works as expected, In that case you can merge this.

[clang-tools-extra] [clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists (PR #85572)

2024-04-24 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/85572 ___ 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 new check bugprone-tagged-union-member-count (PR #89925)

2024-04-24 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,

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Xiang Li via cfe-commits
https://github.com/python3kgae updated https://github.com/llvm/llvm-project/pull/89836 >From 4d8c72688656fe3b2ce8817087d8cf7352b5876b Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 23 Apr 2024 17:49:02 -0400 Subject: [PATCH 1/2] [HLSL] Support packoffset attribute in AST Add

[clang] [clang][NFC] Reformat suspicious condition (PR #89923)

2024-04-24 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/89923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Reformat suspicious condition (PR #89923)

2024-04-24 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks for your contribution. Will you need me to merge that for you? https://github.com/llvm/llvm-project/pull/89923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][dataflow] Don't propagate result objects in nested declarations. (PR #89903)

2024-04-24 Thread via cfe-commits
https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/89903 Trying to do so can cause crashes -- see newly added test and the comments in the fix. >From 0ed905fc227bc58f3ae8f5ead856bba7e8376e3c Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Wed, 24 Apr 2024

[clang] [clang][dataflow] Don't propagate result objects in nested declarations. (PR #89903)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: None (martinboehme) Changes Trying to do so can cause crashes -- see newly added test and the comments in the fix. --- Full diff: https://github.com/llvm/llvm-project/pull/89903.diff 2 Files

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-04-24 Thread via cfe-commits
cor3ntin wrote: > Ah, I see. I haven't tried that, but one downside I can see is that it will > make diagnostics for CTAD worse, we need to spell the type trait name in > error messages when the __is_deducible trait fails. I think we should have a custom diag for that anyway "is not deducible

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-24 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/88636 >From ab87ad179f385934e2ec17517b47da33d29eb256 Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Sat, 13 Apr 2024 23:36:12 +0300 Subject: [PATCH] readability-string-compare: check std::string_view, allow

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-24 Thread Sam McCall via cfe-commits
@@ -1574,6 +1574,7 @@ bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor , } } + FileInfo.IsLocallyIncluded = true; sam-mccall wrote: I'd consider placing this at the end of HandleHeaderIncludeOrImport rather than here: - it looks like there

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-24 Thread Sam McCall via cfe-commits
@@ -2057,9 +2065,12 @@ void ASTWriter::WriteHeaderSearch(const HeaderSearch ) { // it as a header file (in which case HFI will be null) or if it hasn't // changed since it was loaded. Also skip it if it's for a modular header // from a different module; in that

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-24 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-24 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall approved this pull request. Thanks, LGTM https://github.com/llvm/llvm-project/pull/89441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eaa2eac - [AMDGPU] Fix linker test on platforms without BFD

2024-04-24 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-04-24T07:03:51-05:00 New Revision: eaa2eac8ec73a0473655f2da73f347906d14b00f URL: https://github.com/llvm/llvm-project/commit/eaa2eac8ec73a0473655f2da73f347906d14b00f DIFF: https://github.com/llvm/llvm-project/commit/eaa2eac8ec73a0473655f2da73f347906d14b00f.diff

[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-24 Thread Aaron Ballman via cfe-commits
@@ -89,6 +89,19 @@ sections with improvements to Clang's support for those languages. C++ Language Changes +C++17 Feature Support +^ +- Clang now exposes ``__GCC_DESTRUCTIVE_SIZE`` and ``__GCC_CONSTRUCTIVE_SIZE`` + predefined macros

[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-24 Thread via cfe-commits
cor3ntin wrote: For the record, I am fairly opposed to a warning on normal use of a standard function. I'm not very concerned about users using different target flags across TUs because this is already a massive foot gun and I do not buy that we are making things materially worse. Instead,

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-04-24 Thread Kishan Parmar via cfe-commits
@@ -0,0 +1,350 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 + +// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -fcomplex-ppc-gnu-abi \ +// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-GNU-DEF +//

[clang] [clang][dataflow] Don't propagate result objects in nested declarations. (PR #89903)

2024-04-24 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/89903 >From 0ed905fc227bc58f3ae8f5ead856bba7e8376e3c Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Wed, 24 Apr 2024 09:41:18 + Subject: [PATCH 1/2] [clang][dataflow] Don't propagate result objects in

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-04-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/89934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-24 Thread Yaxun Liu via cfe-commits
@@ -54,3 +56,289 @@ void SPIRV64TargetInfo::getTargetDefines(const LangOptions , BaseSPIRVTargetInfo::getTargetDefines(Opts, Builder); DefineStd(Builder, "SPIRV64", Opts); } + +static constexpr Builtin::Info BuiltinInfo[] = { +#define BUILTIN(ID, TYPE, ATTRS)

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lld @llvm/pr-subscribers-lld-coff @llvm/pr-subscribers-flang-fir-hlfir Author: David Truby (DavidTruby) Changes This patch changes the behaviour for flang to only create and link to a `main` entry point when the Fortran code has a program statement in

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: David Truby (DavidTruby) Changes This patch changes the behaviour for flang to only create and link to a `main` entry point when the Fortran code has a program statement in it. This means that flang-new can be used to link even

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-24 Thread David Truby via cfe-commits
https://github.com/DavidTruby edited https://github.com/llvm/llvm-project/pull/89938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-24 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/89906 https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p0609r3.pdf We support this feature in all language mode. maybe_unused applied to a binding makes the whole declaration unused. There maybe something

[clang] [Clang][AArch64] Extend diagnostics when warning non/streaming about … (PR #88380)

2024-04-24 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/88380 >From 552c73fa0e8b9c393a19c5c13c371d375b015ecd Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Thu, 11 Apr 2024 10:59:49 + Subject: [PATCH 1/4] [Clang][AArch64] Extend diagnostics when warning

[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p0609r3.pdf We support this feature in all language mode. maybe_unused applied to a binding makes the whole declaration unused. There maybe something

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-24 Thread Nico Weber via cfe-commits
nico wrote: > My recollection of the past discussions is that we want users to switch to > the new hierarchy. FWIW this doesn't match my understanding. phosek added the new hierarchy to Fuchsia, maskray put in some work to enable it elsewhere, but it's a huge headache, and we've forcibly

[clang] [llvm] [CLANG][LLVM][AArch64]Add SME2.1 intrinsics for MOVAZ tile to vector,… (PR #88499)

2024-04-24 Thread Momchil Velikov via cfe-commits
@@ -2832,6 +2832,23 @@ AArch64TargetLowering::EmitTileLoad(unsigned Opc, unsigned BaseReg, return BB; } +MachineBasicBlock * +AArch64TargetLowering::EmitTileMovaz(unsigned Opc, unsigned BaseReg, momchil-velikov wrote: This function looks almost identical

[clang] [llvm] [CLANG][LLVM][AArch64]Add SME2.1 intrinsics for MOVAZ tile to vector,… (PR #88499)

2024-04-24 Thread Momchil Velikov via cfe-commits
@@ -104,6 +104,13 @@ class sme2_move_to_tile_pseudo +: SMEPseudo2Instr, momchil-velikov wrote: This is not needed. https://github.com/llvm/llvm-project/pull/88499 ___ cfe-commits mailing list

[clang] [llvm] [CLANG][LLVM][AArch64]Add SME2.1 intrinsics for MOVAZ tile to vector,… (PR #88499)

2024-04-24 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov edited https://github.com/llvm/llvm-project/pull/88499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Prevent null pointer dereference in Sema::InstantiateFunctionDefinition (PR #89801)

2024-04-24 Thread via cfe-commits
https://github.com/smanna12 closed https://github.com/llvm/llvm-project/pull/89801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e58dcf1 - [Clang] [NFC] Prevent null pointer dereference in Sema::InstantiateFunctionDefinition (#89801)

2024-04-24 Thread via cfe-commits
Author: smanna12 Date: 2024-04-24T08:41:51-05:00 New Revision: e58dcf135f3a6e453e7b123642675e39b8527f2d URL: https://github.com/llvm/llvm-project/commit/e58dcf135f3a6e453e7b123642675e39b8527f2d DIFF: https://github.com/llvm/llvm-project/commit/e58dcf135f3a6e453e7b123642675e39b8527f2d.diff

[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-04-24 Thread Harmen Stoppels via cfe-commits
haampie wrote: I disagree, `--gcc-install-dir` is sure an improvement over `--gcc-toolchain`, but they're both weaker than the compile time option `GCC_INSTALL_PREFIX` because of runtimes. You're looking to remove `GCC_INSTALL_PREFIX`, then give a clear alternative that's equivalent. The

[clang] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-24 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I don't think this feature warrants deviating from our policy that on-by > default warnings should be actionable and have a low false-positive rate, nor > the complexity to actually produce the warning. Specific to this point, what concerns me is that there are uses

  1   2   3   4   5   6   >