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

2024-04-23 Thread Harmen Stoppels via cfe-commits
haampie wrote: Users of `GCC_INSTALL_PREFIX` typically have GCC installed in a unique, non-standard prefix, where clang's default search just worked. Now those users have to generate config files for post-install, AND figure out how to make clang behave correctly when building runtimes. That's

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

2024-04-23 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 converted_to_draft https://github.com/llvm/llvm-project/pull/89557 ___ 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-23 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: I'm planning to revise the patch to make the following changes: 1. Put the new behaviour behind a config option (I'm thinking `Hover` --> `ShowFields`) 2. Add C language mode tests 3. Use `PrintingCallbacks` instead of a `PrintingPolicy` flag https://github.com/llvm/ll

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

2024-04-23 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I have a few questions: > >1. Do we want an RFC in discourse for the changes in `DeclPrinter`? An RFC might be overkill, but asking for review from a clang code owner for changes to an interface such as `PrintingPolicy` or `PrintingCallbacks` is probably a good ide

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

2024-04-23 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 duplic

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

2024-04-23 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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

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

2024-04-23 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 +// PrintTagTypeCont

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

2024-04-23 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] 805d563 - [clang] Mark ill-formed partial specialization as invalid (#89536)

2024-04-23 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: https://github.com/llvm/llvm-project/commit/805d5637a0d50caa073f435b55940c1338aae0fc.

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

2024-04-23 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 AST/DeclID

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

2024-04-23 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] [llvm] [InstCombine] Swap out range metadata to range attribute for cttz/ctlz/ctpop (PR #88776)

2024-04-23 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-repl] Fix the process return code if diagnostics occurred. (PR #89879)

2024-04-23 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 occ

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

2024-04-23 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/test/Interpreter/fail.c

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

2024-04-23 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 wh

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

2024-04-23 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 + Subje

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

2024-04-23 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] [clang][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

2024-04-23 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][Sema] Improve error recovery for id-expressions referencing invalid decls (PR #81662)

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

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

2024-04-23 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 re

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

2024-04-23 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] Preserve the initializer of invalid VarDecls (PR #88645)

2024-04-23 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] Preserve the initializer of invalid VarDecls (PR #88645)

2024-04-23 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] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-04-23 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 (`##`), there

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

2024-04-23 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] [Clang][AArch64] Extend diagnostics when warning non/streaming about … (PR #88380)

2024-04-23 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] [WebAssembly] Enable multivalue and reference-types in generic CPU config (PR #80923)

2024-04-23 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 enabl

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

2024-04-23 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] [llvm] [ARM] Armv8-R does not require fp64 or neon. (PR #88287)

2024-04-23 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][RISCV] Remove LMUL=8 scalar input for some vector crypto instructions (PR #89867)

2024-04-23 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] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-23 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] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

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

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

2024-04-23 Thread via cfe-commits
@@ -519,13 +571,45 @@ DeduceTemplateArguments(Sema &S, 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-23 Thread via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema &S, NamedDecl *A, + T

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

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

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

2024-04-23 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) co

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

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

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

2024-04-23 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-23 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 https://github.com/llvm/llvm-proje

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

2024-04-23 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] [RISCV] Teach .option arch to support experimental extensions. (PR #89727)

2024-04-23 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 &&Feature = RISCVISAInfo::getT

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

2024-04-23 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] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-23 Thread A. Jiang via cfe-commits
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo &Info, 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

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

2024-04-23 Thread Craig Topper 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 &&Feature = RISCVISAInfo::getT

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

2024-04-23 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk edited https://github.com/llvm/llvm-project/pull/89727 ___ 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-23 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk edited https://github.com/llvm/llvm-project/pull/89727 ___ 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-23 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 &&Feature = RISCVISAInfo::getT

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

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chuanqi Xu (ChuanqiXu9) Changes Previously, the DeclID is defined in serialization/ASTBitCodes.h under clang::serialization namespace. However, actually the DeclID is not purely used in serialization part. The DeclID is already widely use

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

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 ready_for_review https://github.com/llvm/llvm-project/pull/89873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/89873 Previously, the DeclID is defined in serialization/ASTBitCodes.h under clang::serialization namespace. However, actually the DeclID is not purely used in serialization part. The DeclID is already widely used

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

2024-04-23 Thread via cfe-commits
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo &Info, 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

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-04-23 Thread Daniil Kovalev via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %clang --target=aarch64-linux -S -emit-llvm -o - \ kovdan01 wrote: Fixed, thanks, see fdb26a14024f5f8297480a74982a37ee988cd30f https://github.com/llvm/llvm-project/pull/85235 ___ cfe-commits m

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-04-23 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/85235 >From 919af72c09216838bfe586c3da503f5d74104a7d Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 19 Mar 2024 23:57:06 +0300 Subject: [PATCH 1/8] [PAC][clang] Define ptrauth driver flags and preprocessor

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

2024-04-23 Thread Yeting Kuo via cfe-commits
@@ -51,6 +51,9 @@ STATISTIC(RISCVNumInstrsCompressed, static cl::opt AddBuildAttributes("riscv-add-build-attributes", cl::init(false)); +static cl::opt +DisableExperimentalExtension("riscv-disable-experimental-ext",

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

2024-04-23 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 enabl

[clang] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-23 Thread Nikita Popov via cfe-commits
@@ -944,43 +943,18 @@ Constant *SymbolicallyEvaluateGEP(const GEPOperator *GEP, return ConstantExpr::getIntToPtr(C, ResTy); } - // Otherwise form a regular getelementptr. Recompute the indices so that - // we eliminate over-indexing of the notional static type array bo

[clang] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-systemz @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-function-specialization Author: Nikita Popov (nikic) Changes This patch canonicalizes constant expression GEPs to use i8 source element type, aka ptradd. This is the ConstantFoldin

[clang] 88b6186 - [WebAssembly] Tidy up wasm-target-features.c (#89778)

2024-04-23 Thread via cfe-commits
Author: Heejin Ahn Date: 2024-04-24T14:26:09+09:00 New Revision: 88b6186af3908c55b357858eb348b5143f21c289 URL: https://github.com/llvm/llvm-project/commit/88b6186af3908c55b357858eb348b5143f21c289 DIFF: https://github.com/llvm/llvm-project/commit/88b6186af3908c55b357858eb348b5143f21c289.diff LO

[clang] [WebAssembly] Tidy up wasm-target-features.c (PR #89778)

2024-04-23 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/89778 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-23 Thread via cfe-commits
@@ -4684,6 +4684,29 @@ LValue CodeGenFunction::EmitLValueForLambdaField(const FieldDecl *Field, else LambdaLV = MakeAddrLValue(AddrOfExplicitObject, D->getType().getNonReferenceType()); + +// Make sure we have an lvalue to the lamb

[clang] [WebAssembly] Fix uses of -DAG and -NOT in wasm-target-features.c (PR #89777)

2024-04-23 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/89777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c8c1e4e - [WebAssembly] Fix uses of -DAG and -NOT in wasm-target-features.c (#89777)

2024-04-23 Thread via cfe-commits
Author: Heejin Ahn Date: 2024-04-24T14:23:54+09:00 New Revision: c8c1e4e0e576f6e735a55dca4a2eb75ce73ee1db URL: https://github.com/llvm/llvm-project/commit/c8c1e4e0e576f6e735a55dca4a2eb75ce73ee1db DIFF: https://github.com/llvm/llvm-project/commit/c8c1e4e0e576f6e735a55dca4a2eb75ce73ee1db.diff LO

[clang] [Clang] Improve testing for the flexible array member (PR #89462)

2024-04-23 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Annotate enum braces as BK_Block (PR #89871)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #89759. --- Full diff: https://github.com/llvm/llvm-project/pull/89871.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+12-12) - (modified) clang/unittests/Format/Tok

[clang] [clang-format] Annotate enum braces as BK_Block (PR #89871)

2024-04-23 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/89871 Fixes #89759. >From dfd275f3d2f89e2cabffcc0d573f2b4571c0ead4 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 23 Apr 2024 21:59:43 -0700 Subject: [PATCH] [clang-format] Annotate enum braces as BK_Block Fixes #

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

2024-04-23 Thread Craig Topper 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 &&Feature = RISCVISAInfo::getT

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

2024-04-23 Thread Craig Topper via cfe-commits
@@ -51,6 +51,9 @@ STATISTIC(RISCVNumInstrsCompressed, static cl::opt AddBuildAttributes("riscv-add-build-attributes", cl::init(false)); +static cl::opt +DisableExperimentalExtension("riscv-disable-experimental-ext",

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-04-23 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %clang --target=aarch64-linux -S -emit-llvm -o - \ MaskRay wrote: We prefer `%clang_cc1` for codegen tests. `%clang` is not used in clang/test/Driver https://github.com/llvm/llvm-project/pull/85235 _

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

2024-04-23 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/2] [RISCV] Teach .option arch to support experimental extensions.

[clang] [llvm] [CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (PR #89707)

2024-04-23 Thread Eli Friedman via cfe-commits
@@ -4781,6 +4782,7 @@ CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name, } } setDSOLocal(F); + markRegisterParameterAttributes(F); efriedma-quic wrote: To clarify, the code in llvm/ still needs to exist beca

[clang] d9715c6 - [RISCV] Don't make Zacas or Zabha imply A in RISCVISAInfo.cpp

2024-04-23 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2024-04-23T21:34:04-07:00 New Revision: d9715c698c4940e65e9bd036e22fb5cab3aa2c6f URL: https://github.com/llvm/llvm-project/commit/d9715c698c4940e65e9bd036e22fb5cab3aa2c6f DIFF: https://github.com/llvm/llvm-project/commit/d9715c698c4940e65e9bd036e22fb5cab3aa2c6f.diff

[clang] [llvm] [CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (PR #89707)

2024-04-23 Thread Eli Friedman via cfe-commits
@@ -4781,6 +4782,7 @@ CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name, } } setDSOLocal(F); + markRegisterParameterAttributes(F); efriedma-quic wrote: Zero/sign-extend attributes are also missing, I think.

[clang] [clang-format] Correctly annotate list init braces of class types (PR #89706)

2024-04-23 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/89706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 469c8a0 - [clang-format] Correctly annotate list init braces of class types (#89706)

2024-04-23 Thread via cfe-commits
Author: Owen Pan Date: 2024-04-23T21:27:27-07:00 New Revision: 469c8a0a4ef9edae4e236d554901e60b2adca074 URL: https://github.com/llvm/llvm-project/commit/469c8a0a4ef9edae4e236d554901e60b2adca074 DIFF: https://github.com/llvm/llvm-project/commit/469c8a0a4ef9edae4e236d554901e60b2adca074.diff LOG:

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

2024-04-23 Thread Wentao Zhang via cfe-commits
https://github.com/whentojump updated https://github.com/llvm/llvm-project/pull/89869 >From 968ef430dd09ee4545323426d0c5b550c6a0f690 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 19 Apr 2024 15:16:05 +0900 Subject: [PATCH 1/2] [MC/DC][Coverage] Workaround for `##` conditions A synt

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

2024-04-23 Thread Wentao Zhang via cfe-commits
whentojump wrote: @chapuni Would you please take a look at #89869? Specifically, the extra one commit atop yours. Essentially I did similar things to `getIncludeOrExpansionLoc()`. https://github.com/llvm/llvm-project/pull/89573 ___ cfe-commits mail

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

2024-04-23 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 92631a4824a91f3268a5716dd3459df8dc6bfb63 2010fb3d7da4790985e16aabc634a50e9562bad3 --

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

2024-04-23 Thread Wentao Zhang via cfe-commits
https://github.com/whentojump created https://github.com/llvm/llvm-project/pull/89869 None >From 968ef430dd09ee4545323426d0c5b550c6a0f690 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 19 Apr 2024 15:16:05 +0900 Subject: [PATCH 1/2] [MC/DC][Coverage] Workaround for `##` conditions

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-23 Thread via cfe-commits
@@ -4684,6 +4684,29 @@ LValue CodeGenFunction::EmitLValueForLambdaField(const FieldDecl *Field, else LambdaLV = MakeAddrLValue(AddrOfExplicitObject, D->getType().getNonReferenceType()); + +// Make sure we have an lvalue to the lamb

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-23 Thread Eli Friedman via cfe-commits
@@ -4684,6 +4684,29 @@ LValue CodeGenFunction::EmitLValueForLambdaField(const FieldDecl *Field, else LambdaLV = MakeAddrLValue(AddrOfExplicitObject, D->getType().getNonReferenceType()); + +// Make sure we have an lvalue to the lamb

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

2024-04-23 Thread Madhur Amilkanthwar via cfe-commits
madhur13490 wrote: Thanks for fixing this after our discord chats! 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] [clang][RISCV] Remove LMUL=8 scalar input for some vector crypto instructions (PR #89867)

2024-04-23 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/89867 >From 4db9d00610f110a163a1b7d5b168461f6a91f4ed Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Tue, 23 Apr 2024 20:42:33 -0700 Subject: [PATCH] [clang][RISCV] Remove LMUL=8 scalar input for some vector crypto in

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

2024-04-23 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat edited 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] [clang][RISCV] Remove LMUL=8 scalar input for some vector crypto instructions (PR #89867)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Brandon Wu (4vtomat) Changes Since the minimum requirement is EEW=32, it's impossible that EGW=128 needs LMUL=8. --- Patch is 28.63 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/8986

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

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brandon Wu (4vtomat) Changes Since the minimum requirement is EEW=32, it's impossible that EGW=128 needs LMUL=8. --- Patch is 28.63 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/89867.diff

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

2024-04-23 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/89867 Since the minimum requirement is EEW=32, it's impossible that EGW=128 needs LMUL=8. >From 1ed74c3732194512da7eee2e16bc252269f0e6ef Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Tue, 23 Apr 2024 20:42:33 -0700

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

2024-04-23 Thread Madhur Amilkanthwar via cfe-commits
@@ -24,3 +24,9 @@ // RUN: -L. -fconvergent-functions %s 2>&1 | FileCheck -check-prefix=MCPU %s // LTO: clang{{.*}} "-flto=full"{{.*}}"-fconvergent-functions" // MCPU: ld.lld{{.*}}"-L."{{.*}}"-plugin-opt=mcpu=gfx906" + +// We do not suppor the BFD linker, but we should be able

[clang] [Clang][Sema] fix a bug on template partial specialization (PR #89862)

2024-04-23 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes attempt to fix https://github.com/llvm/llvm-project/issues/68885#issuecomment-1764201896 Deduction of NTTP whose type is `decltype(auto)` would create an implicit cast expression to dependent type and makes the t

[clang] [Clang][Sema] fix a bug on template partial specialization (PR #89862)

2024-04-23 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/89862 attempt to fix https://github.com/llvm/llvm-project/issues/68885#issuecomment-1764201896 Deduction of NTTP whose type is `decltype(auto)` would create an implicit cast expression to dependent type and makes the t

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-23 Thread via cfe-commits
@@ -4684,6 +4684,29 @@ LValue CodeGenFunction::EmitLValueForLambdaField(const FieldDecl *Field, else LambdaLV = MakeAddrLValue(AddrOfExplicitObject, D->getType().getNonReferenceType()); + +// Make sure we have an lvalue to the lamb

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-23 Thread John McCall via cfe-commits
@@ -4684,6 +4684,29 @@ LValue CodeGenFunction::EmitLValueForLambdaField(const FieldDecl *Field, else LambdaLV = MakeAddrLValue(AddrOfExplicitObject, D->getType().getNonReferenceType()); + +// Make sure we have an lvalue to the lamb

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-23 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @rjmccall @dwblaikie ping https://github.com/llvm/llvm-project/pull/75912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-23 Thread Fangrui Song via cfe-commits
MaskRay wrote: We are trying to remove such cmake variables in favor of configuration file. https://github.com/llvm/llvm-project/pull/89854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [AArch64][PAC][clang][ELF] Support PAuth ABI core info (PR #85235)

2024-04-23 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @MaskRay Please see fixes for your previous comments in several latest commits. Would be glad to see new feedback on the PR. Note: the buildkite failure on Windows is flang-related and not related to these changes. https://github.com/llvm/llvm-project/pull/85235 ___

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-23 Thread via cfe-commits
@@ -4684,6 +4684,29 @@ LValue CodeGenFunction::EmitLValueForLambdaField(const FieldDecl *Field, else LambdaLV = MakeAddrLValue(AddrOfExplicitObject, D->getType().getNonReferenceType()); + +// Make sure we have an lvalue to the lamb

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-23 Thread John McCall via cfe-commits
@@ -4684,6 +4684,29 @@ LValue CodeGenFunction::EmitLValueForLambdaField(const FieldDecl *Field, else LambdaLV = MakeAddrLValue(AddrOfExplicitObject, D->getType().getNonReferenceType()); + +// Make sure we have an lvalue to the lamb

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

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: The higher level idea looks fine. https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-23 Thread Chuanqi Xu 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-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   >