[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] a38f201 - [CMake][Release] Add stage2-package target (#89517)

2024-04-24 Thread via cfe-commits
Author: Tom Stellard Date: 2024-04-24T07:47:42-07:00 New Revision: a38f201f1ec70c2b1f3cf46e7f291c53bb16753e URL: https://github.com/llvm/llvm-project/commit/a38f201f1ec70c2b1f3cf46e7f291c53bb16753e DIFF: https://github.com/llvm/llvm-project/commit/a38f201f1ec70c2b1f3cf46e7f291c53bb16753e.diff

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

2024-04-24 Thread Tom Stellard via cfe-commits
https://github.com/tstellar closed 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] [libcxx] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-24 Thread Aaron Ballman via cfe-commits
@@ -1792,6 +1792,11 @@ class TargetInfo : public TransferrableTargetInfo, /// Whether to support HIP image/texture API's. virtual bool hasHIPImageSupport() const { return true; } + /// The minimum offset between two objects to avoid false sharing.

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

2024-04-24 Thread Aaron Ballman via cfe-commits
@@ -1792,6 +1792,11 @@ class TargetInfo : public TransferrableTargetInfo, /// Whether to support HIP image/texture API's. virtual bool hasHIPImageSupport() const { return true; } + /// The minimum offset between two objects to avoid false sharing. + virtual unsigned

[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-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-04-24 Thread via cfe-commits
@@ -0,0 +1,66 @@ +.. title:: clang-tidy - bugprone-tagged-union-member-count + +bugprone-tagged-union-member-count +== + +Gives warnings for tagged unions, where the number of tags is +different from the number of data members inside the union. +

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

2024-04-24 Thread via cfe-commits
@@ -0,0 +1,181 @@ +// RUN: %check_clang_tidy %s bugprone-tagged-union-member-count %t + +enum tags3 { + tags3_1, EugeneZelenko wrote: Will be good idea to run Clang-format over this file. https://github.com/llvm/llvm-project/pull/89925

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

2024-04-24 Thread via cfe-commits
@@ -0,0 +1,181 @@ +// RUN: %check_clang_tidy %s bugprone-tagged-union-member-count %t + +enum tags3 { + tags3_1, + tags3_2, + tags3_3, +}; + +enum tags4 { + tags4_1, + tags4_2, + tags4_3, + tags4_4, +}; + +enum tags5 { + tags5_1, +

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

2024-04-24 Thread via cfe-commits
@@ -0,0 +1,125 @@ +//===--- TaggedUnionMemberCountCheck.cpp - clang-tidy -===// +// +// 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:

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

2024-04-24 Thread via cfe-commits
@@ -0,0 +1,125 @@ +//===--- TaggedUnionMemberCountCheck.cpp - clang-tidy -===// +// +// 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:

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

2024-04-24 Thread Haojian Wu via cfe-commits
hokein 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

[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 4cdfaf0a576d44a65484c61f5a572bed73ab0ce4 Mon Sep 17 00:00:00 2001 From: Kishan Parmar Date: Wed, 24 Apr 2024 19:06:23 +0530 Subject: [PATCH] [clang][PowerPC] Add flag to enable compatibility with GNU for

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

2024-04-24 Thread via cfe-commits
@@ -1056,11 +1056,21 @@ def ext_decl_attrs_on_lambda : ExtWarn< def ext_lambda_missing_parens : ExtWarn< "lambda without a parameter clause is a C++23 extension">, InGroup; + yronglin wrote: Here is a whitespace change.

[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 created https://github.com/llvm/llvm-project/pull/89938 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 when the

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

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

[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-04-24 Thread via cfe-commits
ldrumm wrote: I've added the natvis changes and added a couple of clangd test exceptions. For the sanity of pending reviewers, and to make rebasing this trivial I've split this into two commits: the gitattributes changes, followed by the `--renormalize` fixup. For downstreams, I'm

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

2024-04-24 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. https://github.com/llvm/llvm-project/pull/89837 ___ 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 Nico Weber via cfe-commits
nico wrote: Anyway, for this specific issue it sounds like the change here was unintentional. As suggested by mstorsjo at https://github.com/llvm/llvm-project/pull/87866#issuecomment-2073231116, I think it'd be good to revert these changes, and then make a mindful decision about this when

[clang] bd34bc6 - [Clang][AArch64] Extend diagnostics when warning non/streaming about vector size difference (#88380)

2024-04-24 Thread via cfe-commits
Author: Dinar Temirbulatov Date: 2024-04-24T14:13:47+01:00 New Revision: bd34bc6dc2e4e60813ddea31bfb4ca46d3a96013 URL: https://github.com/llvm/llvm-project/commit/bd34bc6dc2e4e60813ddea31bfb4ca46d3a96013 DIFF:

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

2024-04-24 Thread Erich Keane 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] [NFC] Prevent null pointer dereference in Sema::InstantiateFunctionDefinition (PR #89801)

2024-04-24 Thread via cfe-commits
smanna12 wrote: Thank you @tahonermann for reviews! 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] [clang-tools-extra] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-04-24 Thread via cfe-commits
https://github.com/komalverma04 updated https://github.com/llvm/llvm-project/pull/89553 >From 4a56db71e8bf2b6414cd305515d9d4434be8efc0 Mon Sep 17 00:00:00 2001 From: komalverma04 Date: Mon, 22 Apr 2024 02:37:25 +0530 Subject: [PATCH 1/4] remove IgnoreParenImpCasts() from hasArgument matcher

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

2024-04-24 Thread Troy Butler via cfe-commits
Troy-Butler wrote: > Thanks for your contribution. Will you need me to merge that for you? Yes please! I don't have merging rights. Thank you! https://github.com/llvm/llvm-project/pull/89923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[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 updated https://github.com/llvm/llvm-project/pull/89934 >From 92f8cfb255a549769c39327239c69edd6b2e947e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 24 Apr 2024 20:54:58 +0800 Subject: [PATCH] [Clang][Sema] Revisit the lambda within a type alias template

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

2024-04-24 Thread via cfe-commits
Author: Brandon Wu Date: 2024-04-24T22:43:25+08:00 New Revision: 418bdb49a758a5b3a128781a819b4e160521b7ed URL: https://github.com/llvm/llvm-project/commit/418bdb49a758a5b3a128781a819b4e160521b7ed DIFF: https://github.com/llvm/llvm-project/commit/418bdb49a758a5b3a128781a819b4e160521b7ed.diff

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

2024-04-24 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat closed 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] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Erich Keane via cfe-commits
@@ -3413,8 +3413,8 @@ StringRef BuiltinType::getName(const PrintingPolicy ) const { return "reserve_id_t"; case IncompleteMatrixIdx: return ""; - case OMPArraySection: -return ""; + case ArraySection: +return ""; erichkeane wrote:

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-04-24 Thread Jan Leyonberg via cfe-commits
@@ -607,15 +621,17 @@ class OpenMPIRBuilder { /// Generator for '#omp barrier' /// /// \param Loc The location where the barrier directive was encountered. - /// \param DK The kind of directive that caused the barrier. + /// \param Kind The kind of directive that

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

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

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

2024-04-24 Thread via cfe-commits
Author: Mike Rice Date: 2024-04-24T08:31:45-07:00 New Revision: cd3e71fb7a5fed9a7e5ee54a2f956ce33b90b90c URL: https://github.com/llvm/llvm-project/commit/cd3e71fb7a5fed9a7e5ee54a2f956ce33b90b90c DIFF: https://github.com/llvm/llvm-project/commit/cd3e71fb7a5fed9a7e5ee54a2f956ce33b90b90c.diff

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

2024-04-24 Thread Stefan Gränitz via cfe-commits
@@ -241,18 +243,13 @@ int main(int argc, const char **argv) { break; } if (Input == R"(%undo)") { -if (auto Err = Interp->Undo()) { +if (auto Err = Interp->Undo()) llvm::logAllUnhandledErrors(std::move(Err), llvm::errs(), "error:

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

2024-04-24 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail edited https://github.com/llvm/llvm-project/pull/89879 ___ 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 Stefan Gränitz via cfe-commits
https://github.com/weliveindetail approved this pull request. I assume the return code is supposed to reflect only frontend errors? (See my note inline.) From reading the test it's not obvious what is interactive mode and what is non-interactive/batch mode. Might be worth a note. Otherwise,

[clang] [Clang] Don't diagnose VLA for `-std=gnu++*` by default (PR #89943)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kolya Panchenko (nikolaypanchenko) Changes The changeset aims to keep Clang's behavior prior to `7339c0f` and to match current behavior in GCC until GCC community decides what should be default:

[clang] [Clang] Don't diagnose VLA for `-std=gnu++*` by default (PR #89943)

2024-04-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman requested changes to this pull request. This was discussed in this RFC: https://discourse.llvm.org/t/rfc-diagnosing-use-of-vlas-in-c/73109 and our decision to move forward with that is independent of what GCC does. Without more justification for walking this

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-24 Thread Jan Svoboda via cfe-commits
@@ -2220,33 +2221,40 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Erich Keane via cfe-commits
@@ -11163,7 +11163,7 @@ def err_omp_declare_mapper_redefinition : Error< "redefinition of user-defined mapper for type %0 with name %1">; def err_omp_invalid_mapper: Error< "cannot find a valid user-defined mapper for type %0 with name %1">; -def err_omp_array_section_use

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Alexey Bataev via cfe-commits
@@ -3413,8 +3413,8 @@ StringRef BuiltinType::getName(const PrintingPolicy ) const { return "reserve_id_t"; case IncompleteMatrixIdx: return ""; - case OMPArraySection: -return ""; + case ArraySection: +return ""; alexey-bataev wrote: Ok

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

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

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-24 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > > If you declare a variable as both wrapping and non-wrapping, is it wrapping? > > I am not sure how to do this. I am sure that with the magic of C anything is > possible but I can't conceive a way to have a variable both have the > attribute and not have the attribute

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-04-24 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. One final nit before you submit, though: please update the PR description and the release notes to also mention that x86 no longer modifies `-fdenormal-fp-math` based on `-ffast-math`. https://github.com/llvm/llvm-project/pull/80475

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-24 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -68,25 +68,25 @@ TEST(DxcModeTest, TargetProfileValidation) { IntrusiveRefCntPtr DiagOpts = new DiagnosticOptions(); DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagConsumer); - validateTargetProfile("-Tvs_6_0", "dxil--shadermodel6.0-vertex", +

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-04-24 Thread James Y Knight via cfe-commits
@@ -842,25 +842,6 @@ void Linux::addProfileRTLibs(const llvm::opt::ArgList , ToolChain::addProfileRTLibs(Args, CmdArgs); } -llvm::DenormalMode -Linux::getDefaultDenormalModeForType(const llvm::opt::ArgList , - const JobAction , -

[clang] [lld] [llvm] Rename -macosx_version_min to -macos_version_min (PR #88810)

2024-04-24 Thread Leland Jansen via cfe-commits
lelandjansen wrote: > How are we ending up in this code path? @JDevlieghere We're trying to build a release on macOS following [these steps](https://github.com/llvm/llvm-project/blob/5e6bb1fb885abec2e8bc85422bbd83fe4ece6d3b/llvm/docs/ReleaseProcess.rst#L54) and are getting a linker warning

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I opted to leave the type of both array sections the same as it seems like it will save a bunch of work and complexity, at the expense of 1 'print', and potentially 1 diagnostic. Let me know if you think this is an important distinction!

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

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

[clang] [llvm] [arm] Support reserving r4 and r5 alongside r9 (PR #89849)

2024-04-24 Thread via cfe-commits
https://github.com/benisxdxd updated https://github.com/llvm/llvm-project/pull/89849 >From c2485d9c97fd4f01aa68ecfea0fe92c5d039d66f Mon Sep 17 00:00:00 2001 From: benisxdxd <164242179+benisx...@users.noreply.github.com> Date: Wed, 24 Apr 2024 03:00:16 +0300 Subject: [PATCH 1/2] Support

[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)

2024-04-24 Thread Chris B via cfe-commits
@@ -68,25 +68,25 @@ TEST(DxcModeTest, TargetProfileValidation) { IntrusiveRefCntPtr DiagOpts = new DiagnosticOptions(); DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagConsumer); - validateTargetProfile("-Tvs_6_0", "dxil--shadermodel6.0-vertex", +

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

2024-04-24 Thread Matheus Izvekov 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] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Alexey Bataev via cfe-commits
@@ -443,12 +443,17 @@ ExprDependence clang::computeDependence(ObjCIndirectCopyRestoreExpr *E) { return E->getSubExpr()->getDependence(); } -ExprDependence clang::computeDependence(OMPArraySectionExpr *E) { +ExprDependence clang::computeDependence(ArraySectionExpr *E) {

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

2024-04-24 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I'd rather keep the libc++ tests green while landing this PR. I tried > something out, let's see if that works. It looks like some further adjustments may be needed as some stage1 builders are failing: ``` # .---command stderr # |

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Alexey Bataev via cfe-commits
@@ -11163,7 +11163,7 @@ def err_omp_declare_mapper_redefinition : Error< "redefinition of user-defined mapper for type %0 with name %1">; def err_omp_invalid_mapper: Error< "cannot find a valid user-defined mapper for type %0 with name %1">; -def err_omp_array_section_use

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Alexey Bataev via cfe-commits
@@ -6610,6 +6610,265 @@ class TypoExpr : public Expr { }; +/// This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', +/// with a boolean differentiator. +/// OpenMP 5.0 [2.1.5, Array Sections]. +/// To specify an array section in an OpenMP construct,

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Alexey Bataev via cfe-commits
@@ -6610,6 +6610,265 @@ class TypoExpr : public Expr { }; +/// This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', +/// with a boolean differentiator. +/// OpenMP 5.0 [2.1.5, Array Sections]. +/// To specify an array section in an OpenMP construct,

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Alexey Bataev via cfe-commits
@@ -6610,6 +6610,265 @@ class TypoExpr : public Expr { }; +/// This class represents BOTH the OpenMP Array Section and OpenACC 'subarray', +/// with a boolean differentiator. +/// OpenMP 5.0 [2.1.5, Array Sections]. +/// To specify an array section in an OpenMP construct,

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

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

[clang] [buildbot] VE builders: disable ctx_profile (PR #89969)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mircea Trofin (mtrofin) Changes Just like e.g. memprof, it is not supported. --- Full diff: https://github.com/llvm/llvm-project/pull/89969.diff 1 Files Affected: - (modified) clang/cmake/caches/VectorEngine.cmake (+2)

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-04-24 Thread via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: https://github.com/sethp approved this pull request. LGTM! Barring any objections, I'll plan to hit the squash & merge button on this one come

[clang] [Clang] Add diagnostic about "%P" specifier with Objective-C pointers (#89968) (PR #89977)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jared Grubb (jaredgrubb) Changes A Darwin extension '%P' combined with an Objective-C pointer seems to always be a bug. '%P' will dump bytes at the pointed-to address (in contrast to '%p' which dumps the pointer itself). This extension

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-04-24 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. https://github.com/llvm/llvm-project/pull/80475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [buildbot] VE builders: disable ctx_profile (PR #89969)

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

[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 54b68bdb6cdc6bdd81178e2abd78d211b6b7181a 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] [llvm] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-24 Thread Justin Bogner via cfe-commits
@@ -7334,6 +7334,100 @@ static void handleHLSLShaderAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(NewAttr); } +static void DiagnoseHLSLResourceRegType(Sema , SourceLocation , +Decl *D, StringRef ) { + // Samplers, UAVs, and

[clang] [lld] [llvm] Rename -macosx_version_min to -macos_version_min (PR #88810)

2024-04-24 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans commented: AIUI, this is straightforward case of updating tools to use new option names. I suppose there is a chance it triggers failures in e.g. older linkers that don't support the newer names, but I assume on Apple platforms there's less risk of that anyway. Do

[clang] [llvm] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-24 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,74 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// the below will cause an llvm unreachable, because RWBuffers don't have resource attributes yet +// expected-error@+1 {{invalid register name prefix 'b' for

[clang] [llvm] [clang][MBD] set up module build daemon infrastructure (PR #67562)

2024-04-24 Thread Michael Spencer via cfe-commits
@@ -0,0 +1,289 @@ +//===--- cc1modbuildd_main.cpp - Clang CC1 Module Build Daemon ===// +// +// 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:

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Erich Keane via cfe-commits
@@ -11762,20 +11770,25 @@ TreeTransform::TransformOMPArraySectionExpr(OMPArraySectionExpr *E) { } ExprResult Stride; - if (Expr *Str = E->getStride()) { -Stride = getDerived().TransformExpr(Str); -if (Stride.isInvalid()) - return ExprError(); + if

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-04-24 Thread via cfe-commits
https://github.com/zwuis updated https://github.com/llvm/llvm-project/pull/89713 >From f6fd1e5e5f42b3c72cb5aeaf9e6d4e91d5424bee Mon Sep 17 00:00:00 2001 From: YanzuoLiu Date: Tue, 23 Apr 2024 14:56:12 +0800 Subject: [PATCH 1/3] Add missing check when making pointer to member ---

[clang] [Clang] Implement P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/89942 Implement P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" https://wg21.link/P2748R5 >From 8c5f1d0f92d77bffec88759c19133a0bac130f32 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 24 Apr 2024

[clang] [Clang] Don't diagnose VLA for `-std=gnu++*` by default (PR #89943)

2024-04-24 Thread Kolya Panchenko via cfe-commits
https://github.com/nikolaypanchenko created https://github.com/llvm/llvm-project/pull/89943 The changeset aims to keep Clang's behavior prior to `7339c0f` and to match current behavior in GCC until GCC community decides what should be default:

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread via cfe-commits
@@ -8340,8 +8340,17 @@ void Sema::checkInitializerLifetime(const InitializedEntity , << Entity.getType()->isReferenceType() << CLE->getInitializer() << 2 << DiagRange; } else { -Diag(DiagLoc, diag::warn_ret_local_temp_addr_ref) -

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks for working on this. you will also need to modify cxx_status.html https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

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

[clang] [clang-scan-deps] Fix contention when updating `TrackingStatistic`s in hot code paths in `FileManager`. (PR #88427)

2024-04-24 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/88427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-24 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea created https://github.com/llvm/llvm-project/pull/89950 Previously, since response (.rsp) files weren't expanded at the very beginning of clang-scan-deps, we only parsed the command-line as provided in the Clang .cdb file. Unfortunately, when using Unreal Engine,

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

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandre Ganea (aganea) Changes Previously, since response (.rsp) files weren't expanded at the very beginning of clang-scan-deps, we only parsed the command-line as provided in the Clang .cdb file. Unfortunately, when using Unreal

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

2024-04-24 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea updated https://github.com/llvm/llvm-project/pull/89950 >From f2340c98c95e0d72516fc240ff268fead9f15391 Mon Sep 17 00:00:00 2001 From: Alexandre Ganea Date: Wed, 17 Apr 2024 16:28:21 -0400 Subject: [PATCH 1/2] [clang-scan-deps] Expand response files before the

[clang] [Clang] Don't diagnose VLA for `-std=gnu++*` by default (PR #89943)

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

[clang] [Clang] Don't diagnose VLA for `-std=gnu++*` by default (PR #89943)

2024-04-24 Thread Kolya Panchenko via cfe-commits
nikolaypanchenko wrote: @AaronBallman @erichkeane thanks for the feedback. It's safe to close the PR then https://github.com/llvm/llvm-project/pull/89943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-24 Thread Sean Perry via cfe-commits
perry-ca wrote: > We are trying to remove such cmake variables in favor of configuration file. I'm not sure which configuration file(s) you are referring to. I assume you mean the cache files in clang/cmake/caches. If so, I don't think we want to put it there because

[clang] [clang] fix(85447): clang 18.1.0 crashes in clang::ASTContext::getTypeInfoImpl (PR #89850)

2024-04-24 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/89850 >From 484100917d034bc30131ebb95578d09083a2325a Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 24 Apr 2024 03:27:52 +0300 Subject: [PATCH] fix(85447): refine handling of incomplete anonymous struct

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-04-24 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/80475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-04-24 Thread Andy Kaylor via cfe-commits
@@ -842,25 +842,6 @@ void Linux::addProfileRTLibs(const llvm::opt::ArgList , ToolChain::addProfileRTLibs(Args, CmdArgs); } -llvm::DenormalMode -Linux::getDefaultDenormalModeForType(const llvm::opt::ArgList , - const JobAction , -

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

2024-04-24 Thread Eli Friedman via cfe-commits
@@ -4781,6 +4782,7 @@ CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name, } } setDSOLocal(F); + markRegisterParameterAttributes(F); efriedma-quic wrote: Sign/zero-extend attributes led to real issues on some

[clang] [lld] [llvm] Rename -macosx_version_min to -macos_version_min (PR #88810)

2024-04-24 Thread Leland Jansen via cfe-commits
lelandjansen wrote: Ping https://github.com/llvm/llvm-project/pull/88810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] Rename -macosx_version_min to -macos_version_min (PR #88810)

2024-04-24 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere requested changes to this pull request. We should be using `-platform-version` for newer versions of the linker. How are we ending up in this code path? https://github.com/llvm/llvm-project/pull/88810 ___ cfe-commits

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-04-24 Thread via cfe-commits
no92 wrote: Ping https://github.com/llvm/llvm-project/pull/87845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Erich Keane via cfe-commits
@@ -11163,7 +11163,7 @@ def err_omp_declare_mapper_redefinition : Error< "redefinition of user-defined mapper for type %0 with name %1">; def err_omp_invalid_mapper: Error< "cannot find a valid user-defined mapper for type %0 with name %1">; -def err_omp_array_section_use

[clang] [NFC] Factor out common parts of ArraySections into its own class (PR #89639)

2024-04-24 Thread Erich Keane via cfe-commits
@@ -443,12 +443,17 @@ ExprDependence clang::computeDependence(ObjCIndirectCopyRestoreExpr *E) { return E->getSubExpr()->getDependence(); } -ExprDependence clang::computeDependence(OMPArraySectionExpr *E) { +ExprDependence clang::computeDependence(ArraySectionExpr *E) {

[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 updated https://github.com/llvm/llvm-project/pull/89934 >From 92f8cfb255a549769c39327239c69edd6b2e947e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 24 Apr 2024 20:54:58 +0800 Subject: [PATCH 1/2] [Clang][Sema] Revisit the lambda within a type alias

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes Implement P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" https://wg21.link/P2748R5 --- Full diff: https://github.com/llvm/llvm-project/pull/89942.diff 5 Files Affected: - (modified)

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/89942 ___ 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 Jan Svoboda via cfe-commits
@@ -1574,6 +1574,7 @@ bool HeaderSearch::ShouldEnterIncludeFile(Preprocessor , } } + FileInfo.IsLocallyIncluded = true; jansvoboda11 wrote: I agree, I wanted to colocate this with call to `Preprocessor::markIncluded()`. If we find a better way of

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

2024-04-24 Thread Stefan Gränitz via cfe-commits
@@ -0,0 +1,21 @@ +// REQUIRES: host-supports-jit +// UNSUPPORTED: system-aix + +// RUN: cat %s | clang-repl -Xcc -xc -Xcc -Xclang -Xcc -verify | FileCheck %s +// RUN: cat %s | clang-repl -Xcc -xc -Xcc -O2 -Xcc -Xclang -Xcc -verify| FileCheck %s +int printf(const char *, ...);

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

2024-04-24 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail commented: I am not an expert on the behavior of IdResolver, but this patch works for me. https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-04-24 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail edited 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] [clang-repl] Extend the C support. (PR #89804)

2024-04-24 Thread Stefan Gränitz via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit ) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +if (!isa(D)) + continue; +// Check if we need to clean up the

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

2024-04-24 Thread via cfe-commits
13steinj wrote: > lambda can also appear as a part of the default argument, and that would make > getTemplateInstantiationArgs provide extra template arguments in undesired > contexts. This leads to issue > https://github.com/llvm/llvm-project/issues/89853. FYI in my issue, even if the

<    1   2   3   4   5   6   >