[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Mital Ashok via cfe-commits
MitalAshok wrote: A list of places this could be used: https://eel.is/c++draft/cmp.result#1 https://eel.is/c++draft/meta.rqmts#4 https://eel.is/c++draft/execpol.type#3 https://eel.is/c++draft/format.arg#2 https://eel.is/c++draft/range.adaptor.object#5 https://eel.is/c++draft/coro.generator.class

[clang] [llvm] AMDGPU: Handle remote/fine-grained memory in atomicrmw fmin/fmax lowering (PR #96759)

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

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Mital Ashok via cfe-commits
@@ -975,6 +975,15 @@ Query for this feature with ``__has_attribute(diagnose_if)``. }]; } +def DiagnoseSpecializationsDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +``clang::diagnose_specializations`` can be appied to class templates which +should

[clang] [flang] [Flang][Driver] Introduce -fopenmp-targets offloading option (PR #100152)

2024-08-01 Thread Sergio Afonso via cfe-commits
https://github.com/skatrak updated https://github.com/llvm/llvm-project/pull/100152 >From e59c38db58ba5ca2eef66d3b3477d5ad81043228 Mon Sep 17 00:00:00 2001 From: Sergio Afonso Date: Tue, 23 Jul 2024 16:19:55 +0100 Subject: [PATCH 1/2] [Flang][Driver] Introduce -fopenmp-targets offloading optio

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 Thread via cfe-commits
@@ -684,6 +684,18 @@ bool Sema::checkFinalSuspendNoThrow(const Stmt *FinalSuspend) { return ThrowingDecls.empty(); } +// [stmt.return.coroutine]p1: +// A coroutine shall not enclose a return statement ([stmt.return]). +static void checkReturnStmtInCoroutine(Sema &S, Funct

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 Thread via cfe-commits
@@ -694,6 +706,10 @@ bool Sema::ActOnCoroutineBodyStart(Scope *SC, SourceLocation KWLoc, auto *ScopeInfo = getCurFunction(); assert(ScopeInfo->CoroutinePromise); + if (ScopeInfo->FirstCoroutineStmtLoc == KWLoc) { ivanaivanovska wrote: Done. https://git

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 Thread via cfe-commits
@@ -3,6 +3,7 @@ // RUN: %clang_cc1 -std=c++23 -fsyntax-only -verify=expected,cxx20_23,cxx23 %s -fcxx-exceptions -fexceptions -Wunused-result // RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify=expected,cxx14_20,cxx20_23 %s -fcxx-exceptions -fexceptions -Wunused-result +//

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 Thread via cfe-commits
@@ -291,6 +318,50 @@ void mixed_coreturn_template2(bool b, T) { return; // expected-error {{not allowed in coroutine}} } +struct promise_handle; + +struct Handle : std::coroutine_handle { // expected-note 4{{not viable}} +// expected-note@-1 4{{not viable}} +using

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 Thread via cfe-commits
@@ -684,6 +684,18 @@ bool Sema::checkFinalSuspendNoThrow(const Stmt *FinalSuspend) { return ThrowingDecls.empty(); } +// [stmt.return.coroutine]p1: +// A coroutine shall not enclose a return statement ([stmt.return]). +static void checkReturnStmtInCoroutine(Sema &S, Funct

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 Thread via cfe-commits
@@ -291,6 +318,50 @@ void mixed_coreturn_template2(bool b, T) { return; // expected-error {{not allowed in coroutine}} } +struct promise_handle; + +struct Handle : std::coroutine_handle { // expected-note 4{{not viable}} +// expected-note@-1 4{{not viable}} +using

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 Thread via cfe-commits
@@ -291,6 +318,50 @@ void mixed_coreturn_template2(bool b, T) { return; // expected-error {{not allowed in coroutine}} } +struct promise_handle; + +struct Handle : std::coroutine_handle { // expected-note 4{{not viable}} +// expected-note@-1 4{{not viable}} +using

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Nikolas Klauser via cfe-commits
@@ -975,6 +975,15 @@ Query for this feature with ``__has_attribute(diagnose_if)``. }]; } +def DiagnoseSpecializationsDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +``clang::diagnose_specializations`` can be appied to class templates which +should

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > Also consider adding an argument that lets you diagnose > https://eel.is/c++draft/namespace.std#2.1 > > > * the added declaration depends on at least one program-defined type, > > To diagnose specializations for `std::pair`, but allow > `std::pair`. Given that this seems

[clang] 14c8feb - [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (#97200)

2024-08-01 Thread via cfe-commits
Author: Mital Ashok Date: 2024-08-01T16:59:04+04:00 New Revision: 14c8feba4595d46d800bc8ac0c05a1a663b05002 URL: https://github.com/llvm/llvm-project/commit/14c8feba4595d46d800bc8ac0c05a1a663b05002 DIFF: https://github.com/llvm/llvm-project/commit/14c8feba4595d46d800bc8ac0c05a1a663b05002.diff L

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/101469 >From 82ab798fc72c6de64ae527d96393f0dc67307e98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 1 Aug 2024 12:30:22 +0200 Subject: [PATCH 1/2] [Clang] Add [[clang::diagnose_specializations]] --- cl

[clang] [NFC] [Clang] Some core issues have changed status from tentatively ready -> ready / review (PR #97200)

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

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Mital Ashok via cfe-commits
@@ -975,6 +975,15 @@ Query for this feature with ``__has_attribute(diagnose_if)``. }]; } +def DiagnoseSpecializationsDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +``clang::diagnose_specializations`` can be appied to class templates which +should

[clang] [Clang] Add [[clang::diagnose_specializations]] (PR #101469)

2024-08-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/101469 >From 82ab798fc72c6de64ae527d96393f0dc67307e98 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 1 Aug 2024 12:30:22 +0200 Subject: [PATCH 1/3] [Clang] Add [[clang::diagnose_specializations]] --- cl

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 Thread Ilya Biryukov via cfe-commits
@@ -694,6 +707,9 @@ bool Sema::ActOnCoroutineBodyStart(Scope *SC, SourceLocation KWLoc, auto *ScopeInfo = getCurFunction(); assert(ScopeInfo->CoroutinePromise); + if (ScopeInfo->FirstCoroutineStmtLoc == KWLoc) ilya-biryukov wrote: NIT: add a comment exp

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov requested changes to this pull request. The `assert` condition seems wrong, otherwise this should be good to go. I've also left one more suggestion to leave a comment that I missed in the original review since we need another round anyway. https://github.com/ll

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 Thread Ilya Biryukov via cfe-commits
@@ -684,6 +684,19 @@ bool Sema::checkFinalSuspendNoThrow(const Stmt *FinalSuspend) { return ThrowingDecls.empty(); } +// [stmt.return.coroutine]p1: +// A coroutine shall not enclose a return statement ([stmt.return]). +static void checkReturnStmtInCoroutine(Sema &S, Funct

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/100985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -384,5 +384,12 @@ ClangDocContext::ClangDocContext(tooling::ExecutionContext *ECtx, } } +void ScopeChildren::sort() { + std::sort(Namespaces.begin(), Namespaces.end()); ilovepi wrote: Prefer llvm::sort. https://llvm.org/docs/CodingStandards.html#bewar

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -104,6 +104,9 @@ struct Reference { bool mergeable(const Reference &Other); void merge(Reference &&I); + bool operator<(const Reference &Other) const { ilovepi wrote: How stable are usrs? Perhaps we should be sorting on another property? https://gith

[clang] Surface error for plain return statement in coroutine earlier (PR #100985)

2024-08-01 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 7088a5ed880f29129ec844c66068e8cb61ca98bf 81eeb74c688be76ee61070ba7f237a7117bcdd2c --e

[clang] [Clang] Remove __is_nullptr (PR #99038)

2024-08-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/99038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove __is_nullptr (PR #99038)

2024-08-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM (modulo whitespace nits), but please make sure the 19.x branch gets a release note officially deprecating the trait and saying it will be removed in Clang 20. https://github.com/llvm/llvm-project/pull/99038 __

[clang] [Clang] Remove __is_nullptr (PR #99038)

2024-08-01 Thread Aaron Ballman via cfe-commits
@@ -117,7 +121,7 @@ Improvements to Clang's diagnostics - Some template related diagnostics have been improved. .. code-block:: c++ - + AaronBallman wrote: Spurious whitespace change. https://github.com/llvm/llvm-project/pull/99038

[clang] [Clang] Remove __is_nullptr (PR #99038)

2024-08-01 Thread Aaron Ballman via cfe-commits
@@ -447,9 +447,9 @@ Decl *Parser::ParseLinkage(ParsingDeclSpec &DS, DeclaratorContext Context) { /// /// HLSL: Parse export function declaration. /// -/// export-function-declaration: +/// export-function-declaration: /// 'export' function-declaration -///

[clang] e145123 - [Flang][Driver] Introduce -fopenmp-targets offloading option (#100152)

2024-08-01 Thread via cfe-commits
Author: Sergio Afonso Date: 2024-08-01T14:27:29+01:00 New Revision: e1451236a0a07f1ee4ba5fe3ae2464a82a37c25c URL: https://github.com/llvm/llvm-project/commit/e1451236a0a07f1ee4ba5fe3ae2464a82a37c25c DIFF: https://github.com/llvm/llvm-project/commit/e1451236a0a07f1ee4ba5fe3ae2464a82a37c25c.diff

[clang] [flang] [Flang][Driver] Introduce -fopenmp-targets offloading option (PR #100152)

2024-08-01 Thread Sergio Afonso via cfe-commits
https://github.com/skatrak closed https://github.com/llvm/llvm-project/pull/100152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [MLIR][OpenMP] Add omp.target_triples attribute to the OffloadModuleInterface (PR #100154)

2024-08-01 Thread Sergio Afonso via cfe-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/100154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -104,6 +104,9 @@ struct Reference { bool mergeable(const Reference &Other); void merge(Reference &&I); + bool operator<(const Reference &Other) const { ilovepi wrote: My concern here is that we probably want clang-doc to output to be ordered consiste

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-08-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Please make sure 1) this gets backported to the 19.x branch (https://www.llvm.org/docs/GitHub.html#backporting-fixes-to-the-release-branches), 2) the 19.x release branch gets a release note for the pragma and command line option

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

2024-08-01 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96160 >From f891f791dfe882389d83d3c4c4fb57d67a845c04 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Tue, 18 Jun 2024 15:38:18 +0300 Subject: [PATCH 1/3] [PAC][clang][Driver] Add signed GOT flag Add `-fptrauth-el

[clang] b933517 - [AIX] Turn on `#pragma mc_func` check by default (#101336)

2024-08-01 Thread via cfe-commits
Author: Qiongsi Wu Date: 2024-08-01T09:51:07-04:00 New Revision: b9335176db718bf64c72d48107eb9dff28ed979e URL: https://github.com/llvm/llvm-project/commit/b9335176db718bf64c72d48107eb9dff28ed979e DIFF: https://github.com/llvm/llvm-project/commit/b9335176db718bf64c72d48107eb9dff28ed979e.diff LO

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-08-01 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/101336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Disable use of NRVO (PR #101038)

2024-08-01 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Should we try to convince at least the GCC folks that they're getting this > > wrong too? > > It does feel like a wider conversation is necessary, yeah. The fact that > everybody is doing this even on x86_64 where it's pretty incontrovertibly > forbidden seems signific

[clang] [clang] Fix crash with multiple non-parenthsized `sizeof` (PR #101297)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Testing for stack exhaustion is always a challenge and so it is reasonable > for this to not come with a test case. However, did you manually verify that > it fixes the crash for you? Yes, the test I originally included wasn't passing without my fix, but passed with my fix lo

[clang] 130c135 - [clang] Fix crash with multiple non-parenthsized `sizeof` (#101297)

2024-08-01 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-08-01T17:56:15+04:00 New Revision: 130c135689ec12ab78c53645808524a8d28f7cae URL: https://github.com/llvm/llvm-project/commit/130c135689ec12ab78c53645808524a8d28f7cae DIFF: https://github.com/llvm/llvm-project/commit/130c135689ec12ab78c53645808524a8d28f7cae.

[clang] [clang] Fix crash with multiple non-parenthsized `sizeof` (PR #101297)

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

[clang] [C] Disable use of NRVO (PR #101038)

2024-08-01 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Given that, I think that #100868 and #100902 should probably be handled > independently. I've reopened https://github.com/llvm/llvm-project/issues/100868 and removed the `duplicate` label for it. https://github.com/llvm/llvm-project/pull/101038

[clang] [llvm] [PPC] Implement BCD assist builtins (PR #101390)

2024-08-01 Thread Lei Huang via cfe-commits
@@ -515,6 +515,16 @@ TARGET_BUILTIN(__builtin_altivec_vctzh, "V8UsV8Us", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vctzw, "V4UiV4Ui", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vctzd, "V2ULLiV2ULLi", "", "power9-vector") +// P7 BCD builtins. +TARGET_BUI

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-08-01 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @Endilll @AaronBallman Removed the release note and the tests have passed again. Would appreciate if someone else could start the backport process afterwards since I don't know how to do it. https://github.com/llvm/llvm-project/pull/92103

[clang] [clang] Add test for CWG2091 "Deducing reference non-type template arguments" (PR #100765)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/100765 >From 22b2d8972b06cce2d97abc3f07b62aca52ece67c Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 26 Jul 2024 18:43:18 +0300 Subject: [PATCH] [clang] Add test for CWG2091 "Deducing reference non-type

[clang] 5d7357c - [Clang] Fix definition of layout-compatible to ignore empty classes (#92103)

2024-08-01 Thread via cfe-commits
Author: Mital Ashok Date: 2024-08-01T18:05:46+04:00 New Revision: 5d7357cc9ee84578e7142c5fa7c03b1331cba6d2 URL: https://github.com/llvm/llvm-project/commit/5d7357cc9ee84578e7142c5fa7c03b1331cba6d2 DIFF: https://github.com/llvm/llvm-project/commit/5d7357cc9ee84578e7142c5fa7c03b1331cba6d2.diff L

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

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

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: /cherry-pick https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Fix definition of layout-compatible to ignore empty classes (PR #92103)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: /cherry-pick 5d7357cc9ee84578e7142c5fa7c03b1331cba6d2 https://github.com/llvm/llvm-project/pull/92103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Normalize the baremetal handling of libc++ and runtimes (PR #101259)

2024-08-01 Thread Peter Smith via cfe-commits
@@ -382,38 +382,6 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, } } -void BareMetal::AddCXXStdlibLibArgs(const ArgList &Args, -ArgStringList &CmdArgs) const { - switch (GetCXXStdlibType(Args)) { - case ToolC

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-08-01 Thread Younan Zhang via cfe-commits
@@ -4006,6 +4007,37 @@ class TreeTransform { NumExpansions); } + void RebuildLambdaExprImpl(SourceLocation StartLoc, SourceLocation EndLoc, + LambdaScopeInfo *LSI) {} + + ExprResult RebuildLambdaExpr(SourceL

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-08-01 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/86265 >From 6e7b38b3e3f781e11db2fa5d552fdfb6123609df Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 22 Mar 2024 17:34:08 +0800 Subject: [PATCH 01/23] [Sema] Preserve ContainsUnexpandedParameterPack in Transfor

[clang] [Sema] Preserve ContainsUnexpandedParameterPack in TransformLambdaExpr (PR #86265)

2024-08-01 Thread Younan Zhang via cfe-commits
@@ -1105,6 +1107,8 @@ void Sema::ActOnLambdaExpressionAfterIntroducer(LambdaIntroducer &Intro, CXXMethodDecl *Method = CreateLambdaCallOperator(Intro.Range, Class); LSI->CallOperator = Method; + // Temporarily set the lexical declaration context to the current + // cont

[clang] [Clang] Implement CWG2351 `void{}` (PR #78060)

2024-08-01 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78060 >From 6ed7cad5d4993603221c3d9a777463675d69643b Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 13 Jan 2024 18:03:15 + Subject: [PATCH 1/4] [SemaCXX] Implement CWG2351 `void{}` --- clang/docs/Releas

[clang] [NFC] Move RegisterBuiltinMacro function into the Preprocessor class (PR #100142)

2024-08-01 Thread via cfe-commits
muiez wrote: Gentle ping for review :) https://github.com/llvm/llvm-project/pull/100142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5ad15e5 - [clang][NFC] Update `cxx_dr_status.html`

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2024-08-01T18:01:10+03:00 New Revision: 5ad15e58136bc80eadcc0a7fceb463bbb5317345 URL: https://github.com/llvm/llvm-project/commit/5ad15e58136bc80eadcc0a7fceb463bbb5317345 DIFF: https://github.com/llvm/llvm-project/commit/5ad15e58136bc80eadcc0a7fceb463bbb5317345.

[clang] [AArch64] Implement FP8 floating-point mode helper intrinsics (PR #100608)

2024-08-01 Thread via cfe-commits
https://github.com/SpencerAbson commented: I'm unsure as to whether the fpm format will ever be changed or extended, but there are some things to consider if it is: - using a 64 to 32-bit downcast to zero-out bits 32-37 might be a difficult bug to find, and the `__scale` parameter here is not m

[clang] [AArch64] Implement FP8 floating-point mode helper intrinsics (PR #100608)

2024-08-01 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/100608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Implement FP8 floating-point mode helper intrinsics (PR #100608)

2024-08-01 Thread via cfe-commits
@@ -2581,6 +2581,60 @@ void NeonEmitter::runVectorTypes(raw_ostream &OS) { OS << "typedef double float64_t;\n"; OS << "#endif\n\n"; + OS << R"( +typedef uint64_t fpm_t; + +enum __ARM_FPM_FORMAT { __ARM_FPM_E5M2, __ARM_FPM_E4M3 }; + +enum __ARM_FPM_OVERFLOW { __ARM_FPM_INF

[clang] [C] Disable use of NRVO (PR #101038)

2024-08-01 Thread Andrew Pinski via cfe-commits
pinskia wrote: Note the C++ issue with NRVO is https://cplusplus.github.io/CWG/issues/2868.html . https://github.com/llvm/llvm-project/pull/101038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[libcxx] [libcxxabi] [libunwind] [NFC][libc++][libc++abi][libunwind][test] Fix/unify AIX triples used in LIT tests (PR #101196)

2024-08-01 Thread Xing Xue via cfe-commits
https://github.com/xingxue-ibm milestoned https://github.com/llvm/llvm-project/pull/101196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [libcxxabi] [libunwind] [NFC][libc++][libc++abi][libunwind][test] Fix/unify AIX triples used in LIT tests (PR #101196)

2024-08-01 Thread Xing Xue via cfe-commits
xingxue-ibm wrote: /cherry-pick [2d36550](https://github.com/llvm/llvm-project/commit/2d3655037ccfa276cb0949c2ce0cff56985f6637) https://github.com/llvm/llvm-project/pull/101196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-01 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Thanks so much for continuing the effort to implement this! I haven't dived into the details yet, so here are some nits from me. (I'd also prefer the pronouns he/him if you'd like. ;) https://github.com/llvm/llvm-project/pull/101448 ___

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-01 Thread Younan Zhang via cfe-commits
@@ -487,7 +487,26 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) { } this->Indent(); -Visit(*D); + +// Group friend declarations if need be. +if (isa(*D)) { + auto *FD = cast(*D); + VisitFriendDecl(FD); + SourceLocation

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-01 Thread Younan Zhang via cfe-commits
@@ -4437,6 +4441,31 @@ ExpectedDecl ASTNodeImporter::VisitFriendDecl(FriendDecl *D) { return FrD; } +ExpectedDecl ASTNodeImporter::VisitFriendPackDecl(FriendPackDecl *D) { + // Import the major distinguishing characteristics of a declaration. + DeclContext *DC, *LexicalDC

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

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

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-01 Thread Younan Zhang via cfe-commits
@@ -754,6 +754,10 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts, Builder.defineMacro("__cpp_multidimensional_subscript", "202211L"); Builder.defineMacro("__cpp_auto_cast", "202110L"); } + // C++26 features. + if (LangOpts.CPlusPlus

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-01 Thread Younan Zhang via cfe-commits
@@ -1442,8 +1442,49 @@ Decl *TemplateDeclInstantiator::VisitFriendDecl(FriendDecl *D) { if (D->isUnsupportedFriend()) { InstTy = Ty; } else { - InstTy = SemaRef.SubstType(Ty, TemplateArgs, - D->getLocation(), DeclarationName()

[libcxx] [libcxxabi] [libunwind] [NFC][libc++][libc++abi][libunwind][test] Fix/unify AIX triples used in LIT tests (PR #101196)

2024-08-01 Thread via cfe-commits
llvmbot wrote: Failed to cherry-pick: [2d36550](https://github.com/llvm/llvm-project/commit/2d3655037ccfa276cb0949c2ce0cff56985f6637) https://github.com/llvm/llvm-project/actions/runs/10200934511 Please manually backport the fix and push it to your github fork. Once this is done, please cre

[libunwind] [RISCV] Allow libunwind to build for rv32e (PR #98855)

2024-08-01 Thread via cfe-commits
@@ -1169,7 +1169,11 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind15Registers_riscv6jumptoEv) ILOAD x\i, (RISCV_ISIZE * \i)(a0) .endr // skip a0 for now +#if defined(__riscv_abi_rve) ArcaneNibble wrote: I deliberately chose to base it on the ABI so that,

[clang] [AArch64] Implement FP8 floating-point mode helper intrinsics (PR #100608)

2024-08-01 Thread via cfe-commits
@@ -2581,6 +2581,60 @@ void NeonEmitter::runVectorTypes(raw_ostream &OS) { OS << "typedef double float64_t;\n"; OS << "#endif\n\n"; + OS << R"( +typedef uint64_t fpm_t; + +enum __ARM_FPM_FORMAT { __ARM_FPM_E5M2, __ARM_FPM_E4M3 }; + +enum __ARM_FPM_OVERFLOW { __ARM_FPM_INF

[clang] [clang] Make serialized diagnostics more reliable (PR #100681)

2024-08-01 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > > Could we simplify this even further by removing > > `DiagnosticConsumer::finish()` entirely, moving the code in > > `SDiagsWriter::finish()` to `SDiagsWriter::~SDiagsWriter()` and ensuring > > the **destructor** gets called even with `-disable-free`? > > This is doable

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-08-01 Thread Louis Dionne via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-08-01 Thread Louis Dionne via cfe-commits
@@ -1511,6 +1511,46 @@ Attributes (N2335) C2 ``#embed`` (N3017) C23 C89, C++ ===

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

2024-08-01 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/96478 >From 5399237a71c0ccd872821034d83ea2c3a04bed3f Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Fri, 21 Jun 2024 12:32:51 +0300 Subject: [PATCH 1/7] [PAC][AArch64] Support init/fini array signing If both `-f

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

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

[clang] [Modules][Diagnostic] Mention which AST file's options differ from the current TU options. (PR #101413)

2024-08-01 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > Sorry that the change is pretty big. But it is fairly mechanical. If you have > ideas about simplifying the review process, I'm open to that. Right now I'm > thinking if I should make the logical changes first, you review them, and I > commit clang-formatted change. I'd

[clang] [analyzer] Restore recognition of mutex methods (PR #101511)

2024-08-01 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/101511 Before commit 705788c the checker alpha.unix.BlockInCriticalSection "recognized" the methods `std::mutex::lock` and `std::mutex::unlock` with an extremely trivial check that accepted any function (or method)

[clang] [analyzer] Restore recognition of mutex methods (PR #101511)

2024-08-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Donát Nagy (NagyDonat) Changes Before commit 705788c the checker alpha.unix.BlockInCriticalSection "recognized" the methods `std::mutex::lock` and `std::mutex::unlock` with an extremely trivial check that accepted any fu

[clang] [clang][ASTImporter] support import return with UnaryTransformType (PR #101517)

2024-08-01 Thread Ding Fei via cfe-commits
https://github.com/danix800 created https://github.com/llvm/llvm-project/pull/101517 This fixes infinite recursion crash on return with UnaryTransformType, whose underlying type is a SubstTemplateTypeParmType which is associated with current imported function. >From 3b787c88dafc287b9a5a7aea2afb

[clang] [clang][ASTImporter] support import return with UnaryTransformType (PR #101517)

2024-08-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ding Fei (danix800) Changes This fixes infinite recursion crash on return with UnaryTransformType, whose underlying type is a SubstTemplateTypeParmType which is associated with current imported function. --- Full diff: https://github.com/l

[clang] [clang-tools-extra] [clang-tidy] Add support for bsl::optional (PR #101450)

2024-08-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. I'm fine with change, but at the same time this check should be made configurable. Also please update check documentation before committing. https://github.com/llvm/llvm-project/pull/101450 ___ c

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-08-01 Thread via cfe-commits
skc7 wrote: @vitalybuka @nikic Let me know if anything needs to be changed in this PR? Else, will merge the PR after approval. https://github.com/llvm/llvm-project/pull/99439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang][NFC] Make OffloadLTOMode getter a separate method (PR #101200)

2024-08-01 Thread via cfe-commits
https://github.com/macurtis-amd edited https://github.com/llvm/llvm-project/pull/101200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [HLSL] Implement intangible AST type (PR #97362)

2024-08-01 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/97362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Make OffloadLTOMode getter a separate method (PR #101200)

2024-08-01 Thread via cfe-commits
macurtis-amd wrote: @yxsamliu Would you mind reviewing this change? https://github.com/llvm/llvm-project/pull/101200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-08-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Changes made to AST classes should be tested in clang also. Mainly here clang/test/AST/ https://github.com/llvm/llvm-project/pull/101073 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [Driver] Normalize the baremetal handling of libc++ and runtimes (PR #101259)

2024-08-01 Thread Petr Hosek via cfe-commits
@@ -382,38 +382,6 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, } } -void BareMetal::AddCXXStdlibLibArgs(const ArgList &Args, -ArgStringList &CmdArgs) const { - switch (GetCXXStdlibType(Args)) { - case ToolC

[clang] [Driver] Normalize the baremetal handling of libc++ and runtimes (PR #101259)

2024-08-01 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek edited https://github.com/llvm/llvm-project/pull/101259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add updated FEAT_SVE_B16B16 and begin replacement of 'b16b16' flag (PR #101480)

2024-08-01 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/101480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [RISCV] Allow libunwind to build for rv32e (PR #98855)

2024-08-01 Thread Sam Elliott via cfe-commits
@@ -1169,7 +1169,11 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind15Registers_riscv6jumptoEv) ILOAD x\i, (RISCV_ISIZE * \i)(a0) .endr // skip a0 for now +#if defined(__riscv_abi_rve) lenary wrote: I don't understand how the non-e version of this list rela

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/95331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Normalize the baremetal handling of libc++ and runtimes (PR #101259)

2024-08-01 Thread Peter Smith via cfe-commits
@@ -382,38 +382,6 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, } } -void BareMetal::AddCXXStdlibLibArgs(const ArgList &Args, -ArgStringList &CmdArgs) const { - switch (GetCXXStdlibType(Args)) { - case ToolC

[clang] [clang] fix classification of a string literal expression used as initializer (PR #101447)

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

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-08-01 Thread Damyan Pepper via cfe-commits
@@ -63,5 +63,6 @@ let TargetPrefix = "spv" in { def int_spv_frac : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty]>; def int_spv_lerp : Intrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty, LLVMMatchType<0>,LLVMMatchType<0>], [IntrNoMem, IntrWillReturn] >; +

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Xiang Li via cfe-commits
@@ -967,6 +967,10 @@ static void checkUndefinedButUsed(Sema &S) { Func->getIdentifier()->isMangledOpenMPVariantName(); } } + // Do not warn on undefined internal functions in HLSL, they will get python3kgae wrote:

[libunwind] [RISCV] Allow libunwind to build for rv32e (PR #98855)

2024-08-01 Thread via cfe-commits
@@ -1169,7 +1169,11 @@ DEFINE_LIBUNWIND_FUNCTION(_ZN9libunwind15Registers_riscv6jumptoEv) ILOAD x\i, (RISCV_ISIZE * \i)(a0) .endr // skip a0 for now +#if defined(__riscv_abi_rve) ArcaneNibble wrote: In general, libunwind seems to be somewhat inconsist

[clang] [llvm] Add length HLSL function to DirectX Backend (PR #101256)

2024-08-01 Thread Farzon Lotfi via cfe-commits
@@ -63,5 +63,6 @@ let TargetPrefix = "spv" in { def int_spv_frac : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty]>; def int_spv_lerp : Intrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty, LLVMMatchType<0>,LLVMMatchType<0>], [IntrNoMem, IntrWillReturn] >; +

[clang] [llvm] AMDGPU: Handle remote/fine-grained memory in atomicrmw fmin/fmax lowering (PR #96759)

2024-08-01 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/96759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Handle new atomicrmw metadata for fadd case (PR #96760)

2024-08-01 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/96760 ___ 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   >