[clang] [flang] [llvm] Introduce -fexperimental-loop-fuse to clang and flang (PR #142686)

2025-08-19 Thread Madhur Amilkanthwar via cfe-commits
madhur13490 wrote: Gentle ping! https://github.com/llvm/llvm-project/pull/142686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement -Walloc-size diagnostic option (PR #150028)

2025-08-19 Thread Vladimir Vuksanovic via cfe-commits
https://github.com/vvuksanovic updated https://github.com/llvm/llvm-project/pull/150028 >From 1f03a09bac08c70183d2a04fcbced83179cad414 Mon Sep 17 00:00:00 2001 From: Vladimir Vuksanovic Date: Mon, 7 Jul 2025 06:17:19 -0700 Subject: [PATCH 1/5] [clang] Implement -Walloc-size diagnostic option W

[libclc] [libclc] Only create a target per each compile command for cmake MSVC generator (PR #154479)

2025-08-19 Thread Wenju He via cfe-commits
https://github.com/wenju-he edited https://github.com/llvm/llvm-project/pull/154479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread via cfe-commits
https://github.com/snarkmaster edited https://github.com/llvm/llvm-project/pull/152623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread Chuanqi Xu via cfe-commits
@@ -401,36 +432,85 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); + Calls.UseAwaitSuspendDestroy = false; CallExpr *AwaitSuspend = cast_or_null( BuildSubExpr(ACT::AC

[clang-tools-extra] [llvm] [WIP] Add clang tidy premerge CI [WIP] (PR #154223)

2025-08-19 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/154223 >From 9c1c60147968df4d411f013378618b5d72313456 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 19 Aug 2025 02:02:16 +0300 Subject: [PATCH 01/22] test clang-tidy violation --- .../clang-tidy/performan

[clang] [Sema] Compare canonical conversion function (PR #154158)

2025-08-19 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo updated https://github.com/llvm/llvm-project/pull/154158 >From 25ca9b45bfad32d0c273950ce5607fc3172d2145 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Tue, 19 Aug 2025 14:21:11 +0200 Subject: [PATCH 1/2] [Sema] Compare canonical conversion function With lazy temp

[clang] [lanai] Add back the ability to set the memory model with --mcmodel. (PR #150575)

2025-08-19 Thread Jacques Pienaar via cfe-commits
@@ -3125,6 +3125,8 @@ void tools::addMCModel(const Driver &D, const llvm::opt::ArgList &Args, else if (CM == "medany") CM = "large"; Ok = CM == "small" || CM == "medium" || CM == "large"; +} else if (Triple.getArch() == llvm::Triple::lanai) { --

[clang] [lanai] Add back the ability to set the memory model with --mcmodel. (PR #150575)

2025-08-19 Thread Jacques Pienaar via cfe-commits
https://github.com/jpienaar approved this pull request. https://github.com/llvm/llvm-project/pull/150575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Only create a target per each compile command for cmake MSVC generator (PR #154479)

2025-08-19 Thread Wenju He via cfe-commits
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/154479 libclc sequential build issue addressed in commit 0c21d6b4c8ad is specific to cmake MSVC generator. Therefore, this PR avoids creating a large number of targets when a non-MSVC generator is used, such as the N

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread via cfe-commits
@@ -401,36 +432,85 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); + Calls.UseAwaitSuspendDestroy = false; CallExpr *AwaitSuspend = cast_or_null( BuildSubExpr(ACT::AC

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/153760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread Chuanqi Xu via cfe-commits
@@ -401,36 +432,85 @@ static ReadySuspendResumeResult buildCoawaitCalls(Sema &S, VarDecl *CoroPromise, return Calls; } Expr *CoroHandle = CoroHandleRes.get(); + Calls.UseAwaitSuspendDestroy = false; CallExpr *AwaitSuspend = cast_or_null( BuildSubExpr(ACT::AC

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread Chuanqi Xu via cfe-commits
@@ -284,11 +284,41 @@ static ExprResult buildCoroutineHandle(Sema &S, QualType PromiseType, return S.BuildCallExpr(nullptr, FromAddr.get(), Loc, FramePtr, Loc); } +// To support [[clang::coro_await_suspend_destroy]], this builds +// *static_cast( +// __builtin_coro_

[clang] [clang-tools-extra] [clang] Include explicit object methods in overload suggestions (PR #154041)

2025-08-19 Thread Nathan Ridge via cfe-commits
@@ -3410,9 +3418,36 @@ static void AddQualifierToCompletionString(CodeCompletionBuilder &Result, Result.AddTextChunk(Result.getAllocator().CopyString(PrintedNNS)); } +// Sets the function qualifiers completion string by inspecting the explicit +// object +static void AddC

[clang] [clang-tools-extra] [clang] Include explicit object methods in overload suggestions (PR #154041)

2025-08-19 Thread Nathan Ridge via cfe-commits
@@ -1428,10 +1428,18 @@ void ResultBuilder::AddResult(Result R, DeclContext *CurContext, AdjustResultPriorityForDecl(R); + // Account for explicit object parameter + const auto getQualifiers = [&](const CXXMethodDecl *MethodDecl) { +if (MethodDecl->isExplicitObjectMe

[clang] [clang-tools-extra] [clang] Include explicit object methods in overload suggestions (PR #154041)

2025-08-19 Thread Nathan Ridge via cfe-commits
@@ -1428,10 +1428,18 @@ void ResultBuilder::AddResult(Result R, DeclContext *CurContext, AdjustResultPriorityForDecl(R); + // Account for explicit object parameter + const auto getQualifiers = [&](const CXXMethodDecl *MethodDecl) { HighCommander4 wrote:

[clang] [clang-format] Add option to omit wrapping for empty records (PR #151970)

2025-08-19 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina Message-ID: In-Reply

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread Chuanqi Xu via cfe-commits
@@ -9363,6 +9363,126 @@ Example: }]; } +def CoroAwaitSuspendDestroyDoc : Documentation { + let Category = DocCatFunction; + let Content = [{ + +The ``[[clang::coro_await_suspend_destroy]]`` attribute applies to an +``await_suspend(std::coroutine_handle)`` member function of

[clang] [clang] Proofread StandardCPlusPlusModules.rst (PR #154474)

2025-08-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/154474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9411347 - [clang] Proofread StandardCPlusPlusModules.rst (#154474)

2025-08-19 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-08-19T22:45:19-07:00 New Revision: 9411347e8c809382b649de35fae6e5ccdee50f09 URL: https://github.com/llvm/llvm-project/commit/9411347e8c809382b649de35fae6e5ccdee50f09 DIFF: https://github.com/llvm/llvm-project/commit/9411347e8c809382b649de35fae6e5ccdee50f09.diff L

[clang] Update test added in #154418 to work when the default is C++20. (PR #154463)

2025-08-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `arc-builder` running on `arc-worker` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/20819 Here is the relevant piece of

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/153760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d0cde32 - [clang][CodeComplete] Do not suggest unqualified members in explicit-object member functions (#153760)

2025-08-19 Thread via cfe-commits
Author: Mythreya Kuricheti Date: 2025-08-20T01:24:04-04:00 New Revision: d0cde323c3e34c9c1fd348ebdbb212d6bba0f225 URL: https://github.com/llvm/llvm-project/commit/d0cde323c3e34c9c1fd348ebdbb212d6bba0f225 DIFF: https://github.com/llvm/llvm-project/commit/d0cde323c3e34c9c1fd348ebdbb212d6bba0f225.

[clang] [clang] Proofread StandardCPlusPlusModules.rst (PR #154474)

2025-08-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/154474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add builtins for masked vector loads / stores (PR #154464)

2025-08-19 Thread Timm Baeder via cfe-commits
@@ -1232,6 +1232,18 @@ def ConvertVector : Builtin { let Prototype = "void(...)"; } +def MaskedLoad : Builtin { + let Spellings = ["__builtin_masked_load"]; + let Attributes = [NoThrow, Const, CustomTypeChecking, Constexpr]; tbaederr wrote: There's no con

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread via cfe-commits
https://github.com/snarkmaster edited https://github.com/llvm/llvm-project/pull/152623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 32ba045 - [clang][bytecode] Fix comparing pointers to union members (#154342)

2025-08-19 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-20T07:09:20+02:00 New Revision: 32ba045bea95442e37302c17b344f7695b6520e7 URL: https://github.com/llvm/llvm-project/commit/32ba045bea95442e37302c17b344f7695b6520e7 DIFF: https://github.com/llvm/llvm-project/commit/32ba045bea95442e37302c17b344f7695b6520e7.diff L

[clang] [clang][bytecode] Fix comparing pointers to union members (PR #154342)

2025-08-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/154342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-08-19 Thread via cfe-commits
@@ -679,11 +685,17 @@ static void DiagnoseLabelFollowedByDecl(Parser &P, const Stmt *SubStmt) { } } -StmtResult Parser::ParseLabeledStatement(ParsedAttributes &Attrs, - ParsedStmtContext StmtCtx) { +StmtResult +Parser::ParseLabeledSta

[clang] [clang] Proofread StandardCPlusPlusModules.rst (PR #154474)

2025-08-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/154474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread via cfe-commits
https://github.com/snarkmaster edited https://github.com/llvm/llvm-project/pull/152623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-08-19 Thread via cfe-commits
@@ -3282,9 +3282,50 @@ static void CheckJumpOutOfSEHFinally(Sema &S, SourceLocation Loc, } } -StmtResult -Sema::ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope) { - Scope *S = CurScope->getContinueParent(); +Scope *FindLabeledBreakContinueScope(Sema &S, Scope

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread via cfe-commits
https://github.com/snarkmaster edited https://github.com/llvm/llvm-project/pull/152623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-08-19 Thread Shafik Yaghmour via cfe-commits
@@ -3282,9 +3282,50 @@ static void CheckJumpOutOfSEHFinally(Sema &S, SourceLocation Loc, } } -StmtResult -Sema::ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope) { - Scope *S = CurScope->getContinueParent(); +Scope *FindLabeledBreakContinueScope(Sema &S, Scope

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-08-19 Thread Shafik Yaghmour via cfe-commits
@@ -716,7 +732,8 @@ StmtResult Parser::ParseLabeledStatement(ParsedAttributes &Attrs, StmtVector Stmts; ParsedAttributes EmptyCXX11Attrs(AttrFactory); SubStmt = ParseStatementOrDeclarationAfterAttributes( - Stmts, StmtCtx, nullptr, EmptyCXX11Attrs, T

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-08-19 Thread Shafik Yaghmour via cfe-commits
@@ -3282,9 +3282,50 @@ static void CheckJumpOutOfSEHFinally(Sema &S, SourceLocation Loc, } } -StmtResult -Sema::ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope) { - Scope *S = CurScope->getContinueParent(); +Scope *FindLabeledBreakContinueScope(Sema &S, Scope

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-08-19 Thread Shafik Yaghmour via cfe-commits
@@ -679,11 +685,17 @@ static void DiagnoseLabelFollowedByDecl(Parser &P, const Stmt *SubStmt) { } } -StmtResult Parser::ParseLabeledStatement(ParsedAttributes &Attrs, - ParsedStmtContext StmtCtx) { +StmtResult +Parser::ParseLabeledSta

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread via cfe-commits
@@ -9363,6 +9363,126 @@ Example: }]; } +def CoroAwaitSuspendDestroyDoc : Documentation { + let Category = DocCatFunction; + let Content = [{ + +The ``[[clang::coro_await_suspend_destroy]]`` attribute applies to an +``await_suspend(std::coroutine_handle)`` member function of

[clang] Skip test added in #154418 to work when the default is C++20. (PR #154463)

2025-08-19 Thread via cfe-commits
dyung wrote: > Any other alternative would be preferable over skipping the test altogether. > > My suggestion is to disable that warning on the command line and then simply > delete that expected-warning line. Oh thanks, I didn't realize this was just testing for a crash rather than conforman

[clang] [Clang] Add builtins for masked vector loads / stores (PR #154464)

2025-08-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/154464 >From f95f62320b3fb7525a34e49571e2519ec0b78ccd Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 19 Aug 2025 23:01:03 -0500 Subject: [PATCH] [Clang] Add builtins for masked vector loads / stores Summary: C

[clang] Skip test added in #154418 to work when the default is C++20. (PR #154463)

2025-08-19 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: That's also better than disabling the test, but we don't need to test that we produce this warning, this test is not about that. It's a regression test for a crash and the warning is irrelevant. https://github.com/llvm/llvm-project/pull/154463

[clang] [Clang] Add builtins for masked vector loads / stores (PR #154464)

2025-08-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Joseph Huber (jhuber6) Changes Summary: Clang has support for boolean vectors, these builtins expose the LLVM instruction of the same name. This differs from a manual load and select by potentially suppressing traps from deactivated

[clang] [Clang] Add builtins for masked vector loads / stores (PR #154464)

2025-08-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: Clang has support for boolean vectors, these builtins expose the LLVM instruction of the same name. This differs from a manual load and select by potentially suppressing traps from deactivated lanes.

[clang] Skip test added in #154418 to work when the default is C++20. (PR #154463)

2025-08-19 Thread Yanzuo Liu via cfe-commits
zwuis wrote: We can add `-std=c++17` and change `-verify` to `-verify=expected,cxx17` so that we can use `// cxx17-warning {{...}}` instead of adding `#if` block for some test cases. See . https://gith

[clang] [Clang] Add builtins for masked vector loads / stores (PR #154464)

2025-08-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/154464 Summary: Clang has support for boolean vectors, these builtins expose the LLVM instruction of the same name. This differs from a manual load and select by potentially suppressing traps from deactivated lanes. Fi

[clang] Skip test added in #154418 to work when the default is C++20. (PR #154463)

2025-08-19 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Any other alternative would be preferable over skipping the test altogether. My suggestion is to disable that warning on the command line and then simply delete that expected-warning line. https://github.com/llvm/llvm-project/pull/154463

[clang] Skip test added in #154418 to work when the default is C++20. (PR #154463)

2025-08-19 Thread via cfe-commits
https://github.com/dyung edited https://github.com/llvm/llvm-project/pull/154463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix test added in #154418 to work when the default is C++20. (PR #154463)

2025-08-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (dyung) Changes The test added for #154418 specifically tests for a warning that the compiler should emit informing the user that a feature is a C++20 extension, but the compiler does not emit that when the default is C++20, so we sh

[clang] Fix test added in #154418 to work when the default is C++20. (PR #154463)

2025-08-19 Thread via cfe-commits
https://github.com/dyung created https://github.com/llvm/llvm-project/pull/154463 The test added for #154418 specifically tests for a warning that the compiler should emit informing the user that a feature is a C++20 extension, but the compiler does not emit that when the default is C++20, so

[clang] 2db239a - [C++20] [Modules] Improve the import-and-include pattern

2025-08-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-08-20T11:47:00+08:00 New Revision: 2db239acd1e4cb61e8c5c55dcc4b08c7d64919b6 URL: https://github.com/llvm/llvm-project/commit/2db239acd1e4cb61e8c5c55dcc4b08c7d64919b6 DIFF: https://github.com/llvm/llvm-project/commit/2db239acd1e4cb61e8c5c55dcc4b08c7d64919b6.diff LO

[clang] [Clang] Reapply "Only remove lambda scope after computing evaluation context" (PR #154458)

2025-08-19 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/154458 >From befaf0fa99bfcdd09434345e93fc24765c70d243 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 18 Aug 2025 20:16:14 +0800 Subject: [PATCH 1/3] [Clang] Only remove lambda scope after computing evaluation

[clang] [Clang] Reapply "Only remove lambda scope after computing evaluation context" (PR #154458)

2025-08-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes The immediate evaluation context needs the lambda scope info to propagate some flags, however that LSI was removed in ActOnFinishFunctionBody which happened before rebuilding a lambda expression. This also

[clang] [Clang] Reapply "Only remove lambda scope after computing evaluation context" (PR #154458)

2025-08-19 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/154458 The immediate evaluation context needs the lambda scope info to propagate some flags, however that LSI was removed in ActOnFinishFunctionBody which happened before rebuilding a lambda expression. This also con

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-initialization: Enhance the check for the scenario with MemberExpr initialization. (PR #151936)

2025-08-19 Thread via cfe-commits
https://github.com/movie-travel-code updated https://github.com/llvm/llvm-project/pull/151936 >From 9407d65c12f95e961354e39df4357db850dd2f4f Mon Sep 17 00:00:00 2001 From: wangliushuai Date: Mon, 4 Aug 2025 17:45:38 +0800 Subject: [PATCH 01/10] [clang-tidy] Enhance the check for unnecessary cop

[clang] [Sema] Compare canonical conversion function (PR #154158)

2025-08-19 Thread via cfe-commits
@@ -4404,14 +4404,19 @@ CompareImplicitConversionSequences(Sema &S, SourceLocation Loc, Result = CompareStandardConversionSequences(S, Loc, ICS1.Standard, ICS2.Standard); else if (ICS1.isUserDefined()) { +auto ConvFunc1

[clang] [clang] [Sema] Enable nodiscard warnings for function pointers (PR #154250)

2025-08-19 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. LGTM, though it still needs a release note https://github.com/llvm/llvm-project/pull/154250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-08-19 Thread via cfe-commits
@@ -3084,35 +3090,48 @@ class ContinueStmt : public Stmt { const_child_range children() const { return const_child_range(const_child_iterator(), const_child_iterator()); } + + static bool classof(const Stmt *T) { +StmtClass Class = T->getStmtClass(); +return Cl

[clang] [llvm] [LLVM] Introduce 'llvm-offload-wrapper' tool (PR #153504)

2025-08-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-latest-gcc` running on `linaro-flang-aarch64-latest-gcc` while building `clang,llvm` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/130/builds/15023 Her

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-08-19 Thread via cfe-commits
@@ -0,0 +1,147 @@ +// RUN: %clang_cc1 -std=c2y -verify -fsyntax-only -fblocks %s +// RUN: %clang_cc1 -std=c23 -verify -fsyntax-only -fblocks -fnamed-loops %s +// RUN: %clang_cc1 -x c++ -verify -fsyntax-only -fblocks -fnamed-loops %s + +void f1() { + l1: while (true) { +break

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread Chuanqi Xu via cfe-commits
@@ -9363,6 +9363,126 @@ Example: }]; } +def CoroAwaitSuspendDestroyDoc : Documentation { + let Category = DocCatFunction; + let Content = [{ + +The ``[[clang::coro_await_suspend_destroy]]`` attribute applies to an +``await_suspend(std::coroutine_handle)`` member function of

[clang] [clang] Frontend: Destroy compiling compiler instance before read (PR #154455)

2025-08-19 Thread Anthony Latsis via cfe-commits
https://github.com/AnthonyLatsis edited https://github.com/llvm/llvm-project/pull/154455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Frontend] Destroy compiling compiler instance before read (PR #154455)

2025-08-19 Thread Anthony Latsis via cfe-commits
https://github.com/AnthonyLatsis updated https://github.com/llvm/llvm-project/pull/154455 >From ef9764a255c47b2cc8fac486193b563d7fd6925b Mon Sep 17 00:00:00 2001 From: Ben Barham Date: Tue, 1 Jul 2025 18:06:27 -0700 Subject: [PATCH] [clang] Frontend: Destroy compiling compiler instance before

[clang] [Frontend] Destroy compiling compiler instance before read (PR #154455)

2025-08-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Anthony Latsis (AnthonyLatsis) Changes Upstreams https://github.com/swiftlang/llvm-project/pull/10943. https://github.com/llvm/llvm-project/pull/134887 added a clone for the compiler instance in `compileModuleAndReadASTImpl`, which would

[clang] [CIR] Handle FunctionToPointerDecay casts (#153657) (PR #154060)

2025-08-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM with the other proposed changes https://github.com/llvm/llvm-project/pull/154060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [CIR] Implement codegen for inline assembly with output operands (PR #154014)

2025-08-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -26,6 +28,98 @@ static AsmFlavor inferFlavor(const CIRGenModule &cgm, const AsmStmt &s) { return isa(&s) ? AsmFlavor::x86_intel : gnuAsmFlavor; } +// FIXME(cir): This should be a common helper between CIRGen bcardosolopes wrote: Works for me! https://g

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/153834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Handle FunctionToPointerDecay casts (#153657) (PR #154060)

2025-08-19 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > On a C level, what is the expected behaviour when you cast a function pointer > declared as taking no parameters void f(void) to one taking one int param and > call it? I'm pretty sure that's undefined behavior. In general, the compiler tolerates a lot of things like this

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-19 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha approved this pull request. https://github.com/llvm/llvm-project/pull/153722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-19 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153722 >From 0cbb0846f270c6d6cb15492ba34ff9ae2ed33f67 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 14 Aug 2025 17:43:03 -0700 Subject: [PATCH 1/8] [clang][PAC][darwin] Set correct default ptrauth features for

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

2025-08-19 Thread via cfe-commits
abhijeetsharma200 wrote: @cor3ntin ping for review https://github.com/llvm/llvm-project/pull/152888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Handle FunctionToPointerDecay casts (#153657) (PR #154060)

2025-08-19 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s andykaylor wrote: > clang: > /home/justin/code/llvm-project/mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp:219: > static LLVMFunctionType > mlir::LLVM::L

[clang] [Clang] Fix to diagnose_as_builtin memset (PR #154432)

2025-08-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (tynasello) Changes The diagnose_as_builtin attribute can be used to request that Clang diagnose the annotated function as though it was a (user-specified) builtin. This doesn't apply for -Wmemset-transposed-args as seen [here](http

[clang] [Clang] Fix to diagnose_as_builtin memset (PR #154432)

2025-08-19 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Clang] Fix to diagnose_as_builtin memset (PR #154432)

2025-08-19 Thread via cfe-commits
https://github.com/tynasello created https://github.com/llvm/llvm-project/pull/154432 The diagnose_as_builtin attribute can be used to request that Clang diagnose the annotated function as though it was a (user-specified) builtin. This doesn't apply for -Wmemset-transposed-args as seen [here]

[clang] [clang-tools-extra] [clang-tidy] fix misc-unconventional-assign-operator entity match (PR #154430)

2025-08-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Matheus Izvekov (mizvekov) Changes Makes sure UnconventionalAssignOperatorCheck checks if the types reference the same entity, not the exact declaration. This adds a new matcher to support this check. This fixes a regression

[clang] [clang-tools-extra] [clang-tidy] fix misc-unconventional-assign-operator entity match (PR #154430)

2025-08-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Matheus Izvekov (mizvekov) Changes Makes sure UnconventionalAssignOperatorCheck checks if the types reference the same entity, not the exact declaration. This adds a new matcher to support this check. This fixes a regression introdu

[clang] [clang-tools-extra] [clang-tidy] fix misc-unconventional-assign-operator entity match (PR #154430)

2025-08-19 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/154430 Makes sure UnconventionalAssignOperatorCheck checks if the types reference the same entity, not the exact declaration. This adds a new matcher to support this check. This fixes a regression introduced by #147

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-19 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: git-clang-format uses the "--lines" option to clang-format restrict formatting updates. If that isn't working correctly, please file a bug. You can ignore the bot after that. https://github.com/llvm/llvm-project/pull/152623 ___

[clang] [clang][timers][modules] Fix a timer being started when it's running (PR #154231)

2025-08-19 Thread Alan Zhao via cfe-commits
@@ -11003,8 +11003,9 @@ void ASTReader::diagnoseOdrViolations() { } void ASTReader::StartedDeserializing() { - if (++NumCurrentElementsDeserializing == 1 && ReadTimer.get()) -ReadTimer->startTimer(); + if (llvm::Timer *T = ReadTimer.get(); alanzhao1 wrot

[clang-tools-extra] [clang-tidy][docs] Add documentation for Clang-Tidy Automation (PR #153166)

2025-08-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running on `linaro-clang-armv8-quick` while building `clang-tools-extra` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/20436 Here is the rel

[clang] [clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-19 Thread via cfe-commits
@@ -0,0 +1,47 @@ +//==-- AvoidPlatformSpecificFundamentalTypesCheck.h - clang-tidy -*- C++ -*-==// EugeneZelenko wrote: ```suggestion //===--===// ``` https://github.com/llvm/llvm-project/pull/

[clang] [clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-19 Thread via cfe-commits
@@ -0,0 +1,183 @@ +//===--- AvoidPlatformSpecificFundamentalTypesCheck.cpp - clang-tidy --===// EugeneZelenko wrote: ```suggestion //===--===// ``` Emacs tags a no longer needed. See #15394

[clang] [clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,241 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Detects fundamental types (``int``, ``short``, ``long``, ``long long`

[clang] [clang][timers][modules] Fix a timer being started when it's running (PR #154231)

2025-08-19 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 edited https://github.com/llvm/llvm-project/pull/154231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][timers][modules] Fix a timer being started when it's running (PR #154231)

2025-08-19 Thread Alan Zhao via cfe-commits
@@ -11003,8 +11003,9 @@ void ASTReader::diagnoseOdrViolations() { } void ASTReader::StartedDeserializing() { - if (++NumCurrentElementsDeserializing == 1 && ReadTimer.get()) -ReadTimer->startTimer(); + if (llvm::Timer *T = ReadTimer.get(); + ++NumCurrentElementsDese

[clang] [clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,183 @@ +//===--- AvoidPlatformSpecificFundamentalTypesCheck.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: Ap

[clang] [clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,241 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Detects fundamental types (``int``, ``short``, ``long``, ``long long`

[clang] [clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,183 @@ +//===--- AvoidPlatformSpecificFundamentalTypesCheck.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: Ap

[clang] [clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,241 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Detects fundamental types (``int``, ``short``, ``long``, ``long long`

[clang] [clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,241 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Detects fundamental types (``int``, ``short``, ``long``, ``long long`

[clang] [clang-tools-extra] [clang-tidy] Add portability-avoid-platform-specific-fundamental-types (PR #146970)

2025-08-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,241 @@ +.. title:: clang-tidy - portability-avoid-platform-specific-fundamental-types + +portability-avoid-platform-specific-fundamental-types += + +Detects fundamental types (``int``, ``short``, ``long``, ``long long`

[clang] [clang] fix runtime check for NNS transform (PR #154418)

2025-08-19 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/154418 >From a657d37fdcceab2f0f1848c508cd8e3d9b875528 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 19 Aug 2025 17:07:07 -0300 Subject: [PATCH] [clang] fix runtime check for NNS transform A SubstTemplateT

[clang] [clang] fix runtime check for NNS transform (PR #154418)

2025-08-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes A SubstTemplateTypeParmPackType is one of the types which may appear in a NestedNameSpecifier, so add it to the list of expected types in TreeTransform. This fixes a regression introduced in #147835, whi

[clang] [clang] fix runtime check for NNS transform (PR #154418)

2025-08-19 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/154418 A SubstTemplateTypeParmPackType is one of the types which may appear in a NestedNameSpecifier, so add it to the list of expected types in TreeTransform. This fixes a regression introduced in #147835, which has

[clang] [CIR] Fix access to bitfields inside a union (PR #154398)

2025-08-19 Thread via cfe-commits
@@ -372,9 +372,11 @@ Address CIRGenFunction::getAddrOfBitFieldStorage(LValue base, unsigned index) { mlir::Location loc = getLoc(field->getLocation()); cir::PointerType fieldPtr = cir::PointerType::get(fieldType); + auto re

[clang] [CIR] Fix access to bitfields inside a union (PR #154398)

2025-08-19 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/154398 >From 9627944cba4f3a2b33c64bcfc9ea654d56d008a3 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Tue, 19 Aug 2025 12:49:41 -0500 Subject: [PATCH 1/2] [CIR] Fix access to bitfields inside a union --

[clang] [CIR] Fix access to bitfields inside a union (PR #154398)

2025-08-19 Thread via cfe-commits
@@ -372,9 +372,11 @@ Address CIRGenFunction::getAddrOfBitFieldStorage(LValue base, unsigned index) { mlir::Location loc = getLoc(field->getLocation()); cir::PointerType fieldPtr = cir::PointerType::get(fieldType); + auto re

[clang-tools-extra] [llvm] [WIP] Add clang tidy premerge CI [WIP] (PR #154223)

2025-08-19 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/154223 >From 9c1c60147968df4d411f013378618b5d72313456 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 19 Aug 2025 02:02:16 +0300 Subject: [PATCH 01/21] test clang-tidy violation --- .../clang-tidy/performan

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-08-19 Thread via cfe-commits
https://github.com/moorabbit updated https://github.com/llvm/llvm-project/pull/148281 >From 029d9fce6cdb75ea4819a107c7ed9f074bb36678 Mon Sep 17 00:00:00 2001 From: moorabbit <215698969+moorab...@users.noreply.github.com> Date: Mon, 7 Jul 2025 09:25:46 -0400 Subject: [PATCH 01/12] [Clang] Add `__

  1   2   3   4   5   >