[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/150744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Björn Schäpers via cfe-commits
@@ -2639,32 +2639,42 @@ class Formatter : public TokenAnalyzer { int countVariableAlignments(const SmallVectorImpl &Lines) { int AlignmentDiff = 0; + for (const AnnotatedLine *Line : Lines) { AlignmentDiff += countVariableAlignments(Line->Children); - fo

[clang-tools-extra] [clang-tidy] Add handling of type aliases in `use-designated-initializers` check (PR #150842)

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

[clang-tools-extra] [clang-tidy] Add handling of type aliases in `use-designated-initializers` check (PR #150842)

2025-07-27 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny closed https://github.com/llvm/llvm-project/pull/150842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 0afb303 - [clang-tidy] Add handling of type aliases in `use-designated-initializers` check (#150842)

2025-07-27 Thread via cfe-commits
Author: Danny Mösch Date: 2025-07-28T07:37:16+02:00 New Revision: 0afb30311d2858af4134d55af927ba0266b8e505 URL: https://github.com/llvm/llvm-project/commit/0afb30311d2858af4134d55af927ba0266b8e505 DIFF: https://github.com/llvm/llvm-project/commit/0afb30311d2858af4134d55af927ba0266b8e505.diff L

[clang] 2e71bf0 - [RISCV] Split the pre-defined macro tests for xthead* extensions to riscv-target-features-thead.c. NFC.

2025-07-27 Thread Jim Lin via cfe-commits
Author: Jim Lin Date: 2025-07-28T13:08:07+08:00 New Revision: 2e71bf01330d986c28dec47a7f8506021028450f URL: https://github.com/llvm/llvm-project/commit/2e71bf01330d986c28dec47a7f8506021028450f DIFF: https://github.com/llvm/llvm-project/commit/2e71bf01330d986c28dec47a7f8506021028450f.diff LOG:

[clang] ee3cf12 - [RISCV] Add pre-defined macro test for XCVmem. NFC.

2025-07-27 Thread Jim Lin via cfe-commits
Author: Jim Lin Date: 2025-07-28T13:08:07+08:00 New Revision: ee3cf1252a0763e56c28592edec96b029c884bba URL: https://github.com/llvm/llvm-project/commit/ee3cf1252a0763e56c28592edec96b029c884bba DIFF: https://github.com/llvm/llvm-project/commit/ee3cf1252a0763e56c28592edec96b029c884bba.diff LOG:

[clang] 8c8b3cd - [RISCV] Split the pre-defined macro tests for xcv* extensions to riscv-target-features-cv.c. NFC.

2025-07-27 Thread Jim Lin via cfe-commits
Author: Jim Lin Date: 2025-07-28T13:08:07+08:00 New Revision: 8c8b3cd28b52a98383b6875d045bdf1f4d9a3a2f URL: https://github.com/llvm/llvm-project/commit/8c8b3cd28b52a98383b6875d045bdf1f4d9a3a2f DIFF: https://github.com/llvm/llvm-project/commit/8c8b3cd28b52a98383b6875d045bdf1f4d9a3a2f.diff LOG:

[clang] 0242624 - [RISCV] Split the pre-defined macro tests for SiFive extensions to riscv-target-features-sifive.c. NFC.

2025-07-27 Thread Jim Lin via cfe-commits
Author: Jim Lin Date: 2025-07-28T13:08:07+08:00 New Revision: 024262421dc7f1900a28b3a4a5d4380925fd96b8 URL: https://github.com/llvm/llvm-project/commit/024262421dc7f1900a28b3a4a5d4380925fd96b8 DIFF: https://github.com/llvm/llvm-project/commit/024262421dc7f1900a28b3a4a5d4380925fd96b8.diff LOG:

[clang] refactor(libclang): add CXS_StringRef (PR #139093)

2025-07-27 Thread via cfe-commits
https://github.com/illusory0x0 closed https://github.com/llvm/llvm-project/pull/139093 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

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

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/150744 >From 7418fe966ff3a3e9f3c6c431beafbdde47a1de30 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 26 Jul 2025 01:56:52 -0700 Subject: [PATCH 1/3] [clang-format] Fix a bug in `DerivePointerAlignment: true` This

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2025-07-27 Thread Yanzuo Liu via cfe-commits
zwuis wrote: > Then what is the benefits? Adding `__builtin_lambda_this()` is prerequisite of fixing the issue which this PR tries to fix, because we cannot access the caller of lambda `operator()` without adding compiler magic such as builtin functions. > Whatever it is, I feel this can/shou

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2025-07-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Would you like to give a brief introduction for your design. I didn't > > figure it out. > > * The function signature of `__builtin_lambda_this()` is `void*()`. > * Sema part: if it is a non-staic lambda expression (similar with this PR), > create an expression `static_ca

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2025-07-27 Thread Yanzuo Liu via cfe-commits
zwuis wrote: > Would you like to give a brief introduction for your design. I didn't figure > it out. - The function signature of `__builtin_lambda_this()` is `void*()`. - Sema part: if it is a non-staic lambda expression (similar with this PR), create an expression `static_cast(__builtin_lamb

[clang] [clang] Diagnose [[nodiscard]] return types in Objective-C++ (PR #142541)

2025-07-27 Thread via cfe-commits
halbi2 wrote: @Sirraide will you merge this for me please? https://github.com/llvm/llvm-project/pull/142541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Diagnose [[nodiscard]] return types in Objective-C++ (PR #142541)

2025-07-27 Thread via cfe-commits
https://github.com/halbi2 updated https://github.com/llvm/llvm-project/pull/142541 >From c683b2aa84cba1b7057592e50c542cd5645adde5 Mon Sep 17 00:00:00 2001 From: halbi2 Date: Mon, 26 May 2025 15:35:13 -0400 Subject: [PATCH 1/5] [clang] [test] More coverage of [[nodiscard]] --- clang/test/SemaC

[clang] 1b4db78 - [C++20] [Modules] Implement diagnose for exposured partially

2025-07-27 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-07-28T09:58:38+08:00 New Revision: 1b4db78d2eaa070b3f364a2d2b2b826a5439b892 URL: https://github.com/llvm/llvm-project/commit/1b4db78d2eaa070b3f364a2d2b2b826a5439b892 DIFF: https://github.com/llvm/llvm-project/commit/1b4db78d2eaa070b3f364a2d2b2b826a5439b892.diff LO

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2025-07-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Hi. I tried to fix this issue locally by adding a function > `__builtin_lambda_this()` and it seems to work. I can create PR if you think > this is a good approach. And I have some questions: > > 1. Should this builtin function handle lambda expression only? What about > `

[clang] [Serialization] Fix crash while lazy-loading template specializations (PR #150430)

2025-07-27 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Thank you all for the reviews. I don’t have commit access, so I’ll need > someone to merge this for me eventually. I’ll be away for the next week and > won’t be able to respond to any regressions or follow-ups during that time. > > If you’re comfortable merging it as is, pl

[clang] [RISCV] Add negative pre-defined macro test for XSfmm* extension. NFC. (PR #150596)

2025-07-27 Thread Jim Lin via cfe-commits
https://github.com/tclin914 closed https://github.com/llvm/llvm-project/pull/150596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4510466 - [RISCV] Add negative pre-defined macro test for XSfmm* extension. NFC. (#150596)

2025-07-27 Thread via cfe-commits
Author: Jim Lin Date: 2025-07-28T09:31:37+08:00 New Revision: 45104662c086b4e194a23c63760096dd11edd935 URL: https://github.com/llvm/llvm-project/commit/45104662c086b4e194a23c63760096dd11edd935 DIFF: https://github.com/llvm/llvm-project/commit/45104662c086b4e194a23c63760096dd11edd935.diff LOG:

[clang] [flang] [mlir] [flang][MLIR][OpenMP][llvm]Atomic Control Support (PR #150860)

2025-07-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir Author: Anchu Rajendran S (anchuraj) Changes Atomic Control Options are used to specify architectural characteristics to help lowering of atomic operations. The options used are: `-f[no-]atomic-remote-memory`, `-f[no-]atomic-fine-grained-memory`,

[clang] [flang] [mlir] [flang][MLIR][OpenMP][llvm]Atomic Control Support (PR #150860)

2025-07-27 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj created https://github.com/llvm/llvm-project/pull/150860 Atomic Control Options are used to specify architectural characteristics to help lowering of atomic operations. The options used are: `-f[no-]atomic-remote-memory`, `-f[no-]atomic-fine-grained-memory`, `-f[no

[clang] Thread safety analysis: Don't warn on acquiring reentrant capability (PR #150857)

2025-07-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Aaron Puchert (aaronpuchert) Changes The point of reentrant capabilities is that they can be acquired multiple times, so they should probably be excluded from requiring a negative capability on acquisition via -Wthread-safety-neg

[clang] Thread safety analysis: Don't warn on acquiring reentrant capability (PR #150857)

2025-07-27 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert created https://github.com/llvm/llvm-project/pull/150857 The point of reentrant capabilities is that they can be acquired multiple times, so they should probably be excluded from requiring a negative capability on acquisition via -Wthread-safety-negative. Howev

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

2025-07-27 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph approved this pull request. https://github.com/llvm/llvm-project/pull/150805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Very basic capability alias-analysis (PR #142955)

2025-07-27 Thread Aaron Puchert via cfe-commits
@@ -241,7 +242,21 @@ CapabilityExpr SExprBuilder::translateAttrExpr(const Expr *AttrExp, return CapabilityExpr(E, AttrExp->getType(), Neg); } -til::LiteralPtr *SExprBuilder::createVariable(const VarDecl *VD) { +til::SExpr *SExprBuilder::translateVarDecl(const VarDecl *VD, +

[clang] Thread Safety Analysis: Very basic capability alias-analysis (PR #142955)

2025-07-27 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: Sorry for the delay, but I still need to wrap my head around this. For now just some very high-level comments. https://github.com/llvm/llvm-project/pull/142955 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] Thread Safety Analysis: Very basic capability alias-analysis (PR #142955)

2025-07-27 Thread Aaron Puchert via cfe-commits
@@ -1012,6 +1030,107 @@ void SExprBuilder::exitCFG(const CFGBlock *Last) { IncompleteArgs.clear(); } +bool SExprBuilder::isVariableReassigned(const VarDecl *VD) { + // Note: The search is performed lazily per-variable and result is cached. An + // alternative would have be

[clang] Thread Safety Analysis: Very basic capability alias-analysis (PR #142955)

2025-07-27 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/142955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clangd] introduce doxygen parser (PR #150790)

2025-07-27 Thread via cfe-commits
tcottin wrote: Yes, as I wrote, this is the expected output for this PR. Before rebasing the next patch I would like to get this PR reviewed. If there is something bigger we need to change, I think it is easier to first change it for this PR only and then rebase the last patch. https://github.

[clang] Thread safety analysis: Allocate FactEntrys with BumpPtrAllocator (PR #149660)

2025-07-27 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > Overall compilation before the change takes 327,801,317 instructions, and > 327,433,878 after the change Accidentally left assertions on. Without it's 277,111,134 versus 276,855,186, but this is also 0.1%, and Thread Safety Analysis is still roughly 1% of the overall com

[clang] [clang-tools-extra] [llvm] [clangd] introduce doxygen parser (PR #150790)

2025-07-27 Thread via cfe-commits
mccakit wrote: Yeah, that changed the output though I'm still seeing this ``` /** * @brief Adds two numbers * @param a First number * @param b Second number * @return The sum */ int add(int a, int b); -> ``` /** function add → int Parameters: int a - First number int b - Second

[clang] [clang-tools-extra] [llvm] [clangd] introduce doxygen parser (PR #150790)

2025-07-27 Thread via cfe-commits
tcottin wrote: > Hey, I merged this PR into main and build it, but doxygen comments don't > work. Am I supposed to tweak something in my .clangd config? Or do you intend > on enabling doxygen hower on the third patch? Yes, you need to enable this in your `.clangd` config: ```yaml Documentatio

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

2025-07-27 Thread Ivan Butygin via cfe-commits
https://github.com/Hardcode84 edited https://github.com/llvm/llvm-project/pull/150805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

2025-07-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-core @llvm/pr-subscribers-clang Author: Ivan Butygin (Hardcode84) Changes `InitAll***` functions are used by `opt`-style tools to init all MLIR dialects/passes/extensions. Currently they are implemeted as inline functions and include essentially t

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

2025-07-27 Thread Ivan Butygin via cfe-commits
https://github.com/Hardcode84 ready_for_review https://github.com/llvm/llvm-project/pull/150805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

2025-07-27 Thread Ivan Butygin via cfe-commits
@@ -20,3 +20,18 @@ add_subdirectory(Target) add_subdirectory(Tools) add_subdirectory(Transforms) add_subdirectory(ExecutionEngine) + +get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS) +get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS) +get_property(e

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

2025-07-27 Thread Ivan Butygin via cfe-commits
https://github.com/Hardcode84 updated https://github.com/llvm/llvm-project/pull/150805 >From 746c0d5891721b7be7f28cd9c9d35a89a941d741 Mon Sep 17 00:00:00 2001 From: Ivan Butygin Date: Sun, 27 Jul 2025 00:39:56 +0200 Subject: [PATCH 1/2] [mlir][core] Move `InitAll***` implementation into static

[clang] [clang-tools-extra] [llvm] [clangd] introduce doxygen parser (PR #150790)

2025-07-27 Thread via cfe-commits
mccakit wrote: Hey, I merged this PR into main and build it, but doxygen comments don't work. Am I supposed to tweak something in my .clangd config? Or do you intend on enabling doxygen hower on the third patch? https://github.com/llvm/llvm-project/pull/150790 ___

[clang] Thread safety analysis: Allocate FactEntrys with BumpPtrAllocator (PR #149660)

2025-07-27 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > Does this have measurable performance impacts? Or was there some other > benefit driving the change? Thread Safety Analysis is not very expensive overall. I just benchmarked compilation of `clang/test/SemaCXX/warn-thread-safety-analysis.cpp` and it comes out at around 1%

[clang-tools-extra] [clang-tidy] Add handling of type aliases in `use-designated-initializers` check (PR #150842)

2025-07-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/150842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Compare values of literals (PR #148551)

2025-07-27 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: @rupprecht, maybe you want to try this out? https://github.com/llvm/llvm-project/pull/148551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Compare values of literals (PR #148551)

2025-07-27 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/148551 ___ 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 handling of type aliases in `use-designated-initializers` check (PR #150842)

2025-07-27 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/150842 From b9e0047f9f504352d855538568c14eb6e14e5e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sun, 27 Jul 2025 18:47:31 +0200 Subject: [PATCH] [clang-tidy] Add handling of type aliases in

[clang] Thread Safety Analysis: Compare values of literals (PR #148551)

2025-07-27 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert updated https://github.com/llvm/llvm-project/pull/148551 >From b6bd8b5da8007b28469011989171cd050ba60113 Mon Sep 17 00:00:00 2001 From: Aaron Puchert Date: Sun, 13 Jul 2025 23:48:49 +0200 Subject: [PATCH] Thread Safety Analysis: Compare values of literals The typ

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

2025-07-27 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph edited https://github.com/llvm/llvm-project/pull/150805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

2025-07-27 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph edited https://github.com/llvm/llvm-project/pull/150805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

2025-07-27 Thread Mehdi Amini via cfe-commits
@@ -20,3 +20,18 @@ add_subdirectory(Target) add_subdirectory(Tools) add_subdirectory(Transforms) add_subdirectory(ExecutionEngine) + +get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS) +get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS) +get_property(e

[clang] Thread safety analysis: Allocate FactEntrys with BumpPtrAllocator (PR #149660)

2025-07-27 Thread Aaron Puchert via cfe-commits
@@ -941,43 +966,68 @@ class LockableFactEntry : public FactEntry { } }; -class ScopedLockableFactEntry : public FactEntry { +enum UnderlyingCapabilityKind { + UCK_Acquired, ///< Any kind of acquired capability. + UCK_ReleasedShared,///< Shared capability that

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Owen Pan via cfe-commits
@@ -2639,32 +2639,42 @@ class Formatter : public TokenAnalyzer { int countVariableAlignments(const SmallVectorImpl &Lines) { int AlignmentDiff = 0; + for (const AnnotatedLine *Line : Lines) { AlignmentDiff += countVariableAlignments(Line->Children); - fo

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/150744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Owen Pan via cfe-commits
@@ -2639,32 +2639,42 @@ class Formatter : public TokenAnalyzer { int countVariableAlignments(const SmallVectorImpl &Lines) { int AlignmentDiff = 0; + for (const AnnotatedLine *Line : Lines) { AlignmentDiff += countVariableAlignments(Line->Children); - fo

[clang-tools-extra] [clang-tidy] Add handling of type aliases in `use-designated-initializers` check (PR #150842)

2025-07-27 Thread Baranov Victor via cfe-commits
@@ -224,3 +224,22 @@ std::array a{1,2,3}; std::array b{10, 11}; using array = std::array; array c{10, 11}; + vbvictor wrote: I think this still needs case like `S18 s183{.a=1, .b=2} // no warning at all` Probably good to have one nested like ```cpp struct S20

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Björn Schäpers via cfe-commits
@@ -2639,32 +2639,42 @@ class Formatter : public TokenAnalyzer { int countVariableAlignments(const SmallVectorImpl &Lines) { int AlignmentDiff = 0; + for (const AnnotatedLine *Line : Lines) { AlignmentDiff += countVariableAlignments(Line->Children); - fo

[clang-tools-extra] [clang-tidy] Add handling of type aliases in `use-designated-initializers` check (PR #150842)

2025-07-27 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny edited https://github.com/llvm/llvm-project/pull/150842 ___ 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 handling of type aliases in use-designated-initializers check (PR #150842)

2025-07-27 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny edited https://github.com/llvm/llvm-project/pull/150842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Take type aliases into account (PR #150842)

2025-07-27 Thread Danny Mösch via cfe-commits
@@ -224,3 +224,22 @@ std::array a{1,2,3}; std::array b{10, 11}; using array = std::array; array c{10, 11}; + SimplyDanny wrote: Done. Can you think of even more test cases? https://github.com/llvm/llvm-project/pull/150842 _

[clang-tools-extra] [clang-tidy] Take type aliases into account (PR #150842)

2025-07-27 Thread Danny Mösch via cfe-commits
@@ -224,3 +224,22 @@ std::array a{1,2,3}; std::array b{10, 11}; using array = std::array; array c{10, 11}; + +struct S16 { +int a; +int b; +}; + +using S17 = S16; + +S17 s171{1, 2}; SimplyDanny wrote: There are. It's just that the test infrastructure d

[clang-tools-extra] [clang-tidy] Take type aliases into account (PR #150842)

2025-07-27 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/150842 From d209f10977e816769065476ad1d9e517bd224431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sun, 27 Jul 2025 18:47:31 +0200 Subject: [PATCH] [clang-tidy] Add handling of type aliases in

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Owen Pan via cfe-commits
@@ -2639,32 +2639,42 @@ class Formatter : public TokenAnalyzer { int countVariableAlignments(const SmallVectorImpl &Lines) { int AlignmentDiff = 0; + for (const AnnotatedLine *Line : Lines) { AlignmentDiff += countVariableAlignments(Line->Children); - fo

[clang-tools-extra] [clang-tidy] Take type aliases into account (PR #150842)

2025-07-27 Thread Baranov Victor via cfe-commits
@@ -224,3 +224,22 @@ std::array a{1,2,3}; std::array b{10, 11}; using array = std::array; array c{10, 11}; + +struct S16 { +int a; +int b; +}; + +using S17 = S16; + +S17 s171{1, 2}; vbvictor wrote: Just to double check, there are no fix-its for aliases

[clang-tools-extra] [clang-tidy] Take type aliases into account (PR #150842)

2025-07-27 Thread Baranov Victor via cfe-commits
@@ -224,3 +224,22 @@ std::array a{1,2,3}; std::array b{10, 11}; using array = std::array; array c{10, 11}; + vbvictor wrote: Please add tests with: - alias with all fields using designated-init - alias with some field using designated-init https://github.com

[clang-tools-extra] [clang-tidy] Take type aliases into account (PR #150842)

2025-07-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: Please add release notes and check name in PR title like "Add handling of type aliases in use-designated-initializers" https://github.com/llvm/llvm-project/pull/150842 ___ cfe-commits mailing list cfe-commits@lis

[clang-tools-extra] [clang-tidy] Take type aliases into account (PR #150842)

2025-07-27 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/150842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Take type aliases into account (PR #150842)

2025-07-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Danny Mösch (SimplyDanny) Changes Resolves #150782. --- Full diff: https://github.com/llvm/llvm-project/pull/150842.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/modernize/UseDesignatedInitializersCheck.c

[clang-tools-extra] [clang-tidy] Take type aliases into account (PR #150842)

2025-07-27 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny created https://github.com/llvm/llvm-project/pull/150842 Resolves #150782. From ddd53a7ef58db084fe36212f486be2c19f24b8e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sun, 27 Jul 2025 18:47:31 +0200 Subject: [PATCH] [clang-tidy] Take type al

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

2025-07-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds support for mul op for ComplexType https://github.com/llvm/llvm-project/issues/141365 --- Patch is 39.94 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

2025-07-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes This change adds support for mul op for ComplexType https://github.com/llvm/llvm-project/issues/141365 --- Patch is 39.94 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-pr

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

2025-07-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150834 This change adds support for mul op for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 59063f1e4e73eb0c4dfe6d74393ed496c2c3e7be Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun,

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

2025-07-27 Thread via cfe-commits
moorabbit wrote: Ping. https://github.com/llvm/llvm-project/pull/148281 ___ 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 `-std` argument in `check_clang_tidy.py` for C files (PR #150791)

2025-07-27 Thread Baranov Victor via cfe-commits
@@ -5,14 +5,14 @@ // parsing and preprocessor state will not have that case. // UNSUPPORTED: target={{.*-(ps4|ps5)}} // -// RUN: %check_clang_tidy -check-suffix=WITH-ANNEX-K%s bugprone-unsafe-functions %t -- -- -D__STDC_LIB_EXT1__=1 -D__STDC_WANT_LIB_EXT1__=1 -//

[clang-tools-extra] [clang-tidy] Add `-std` argument in `check_clang_tidy.py` for C files (PR #150791)

2025-07-27 Thread Baranov Victor via cfe-commits
@@ -1,6 +1,5 @@ -// RUN: %check_clang_tidy %s readability-magic-numbers %t -- +// RUN: %check_clang_tidy -std=c23-or-later %s readability-magic-numbers %t // Don't crash _BitInt(128) A = 4533629751480627964421wb; -// CHECK-MESSAGES: warning vbvictor wrote:

[clang-tools-extra] [clang-tidy] Add `-std` argument in `check_clang_tidy.py` for C files (PR #150791)

2025-07-27 Thread Baranov Victor via cfe-commits
@@ -5,14 +5,14 @@ // parsing and preprocessor state will not have that case. // UNSUPPORTED: target={{.*-(ps4|ps5)}} // -// RUN: %check_clang_tidy -check-suffix=WITH-ANNEX-K%s bugprone-unsafe-functions %t -- -- -D__STDC_LIB_EXT1__=1 -D__STDC_WANT_LIB_EXT1__=1 -//

[clang] [clang] Fix constant evaluation of member pointer access into sibling class. (PR #150829)

2025-07-27 Thread via cfe-commits
https://github.com/keinflue edited https://github.com/llvm/llvm-project/pull/150829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix constant evaluation of member pointer access into sibling class. (PR #150829)

2025-07-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (keinflue) Changes HandleMemberPointerAccess considered whether the lvalue path in a member pointer access matched the bases of the containing class of the member, but neglected to check the same for the containing class of the membe

[clang] [clang] Fix constant evaluation of member pointer access into sibling class. (PR #150829)

2025-07-27 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 constant evaluation of member pointer access into sibling class. (PR #150829)

2025-07-27 Thread via cfe-commits
https://github.com/keinflue created https://github.com/llvm/llvm-project/pull/150829 HandleMemberPointerAccess considered whether the lvalue path in a member pointer access matched the bases of the containing class of the member, but neglected to check the same for the containing class of the

[clang-tools-extra] [clang-tidy] Add `-std` argument in `check_clang_tidy.py` for C files (PR #150791)

2025-07-27 Thread Baranov Victor via cfe-commits
@@ -19,13 +18,16 @@ void notRelated(int A, int B) {} int addedTogether(int A, int B) { return add(A, B); } // NO-WARN: Passed to same function. +// FIXME: This triggers a false positive: the "passed to same function" heuristic +// can't map the parameter index 1 to A and B

[clang-tools-extra] [clang-tidy] Add `-std` argument in `check_clang_tidy.py` for C files (PR #150791)

2025-07-27 Thread Baranov Victor via cfe-commits
@@ -19,13 +18,16 @@ void notRelated(int A, int B) {} int addedTogether(int A, int B) { return add(A, B); } // NO-WARN: Passed to same function. +// FIXME: This triggers a false positive: the "passed to same function" heuristic +// can't map the parameter index 1 to A and B

[clang-tools-extra] [clang-tidy] Add `-std` argument in `check_clang_tidy.py` for C files (PR #150791)

2025-07-27 Thread Baranov Victor via cfe-commits
@@ -374,15 +373,25 @@ def parse_arguments() -> Tuple[argparse.Namespace, List[str]]: parser.add_argument( "-std", type=csv, -default=["c++11-or-later"], +default=None, help="Passed to clang. Special -or-later values are expanded.",

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2025-07-27 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Hi. I tried to fix this issue locally by adding a function `__builtin_lambda_this()` and it seems to work. I can create PR if you think this is a good approach. And I have some questions: 1. Should this builtin function handle lambda expression only? What about `__builtin_member_

[clang-tools-extra] [clang-tidy] Make `modernize-use-using`'s fix-its more robust (PR #149694)

2025-07-27 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Does it fix #150276 also? https://github.com/llvm/llvm-project/pull/149694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Make `modernize-use-using`'s fix-its more robust (PR #149694)

2025-07-27 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/149694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add poison attribute (PR #150760)

2025-07-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-b-1` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/20474 Here is the relevant

[clang] [CIR] Add poison attribute (PR #150760)

2025-07-27 Thread Sirui Mu via cfe-commits
https://github.com/Lancern closed https://github.com/llvm/llvm-project/pull/150760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e2b4ba0 - [CIR] Add poison attribute (#150760)

2025-07-27 Thread via cfe-commits
Author: Sirui Mu Date: 2025-07-27T19:30:37+08:00 New Revision: e2b4ba04140ecbd2367247334b04490ef9537c7a URL: https://github.com/llvm/llvm-project/commit/e2b4ba04140ecbd2367247334b04490ef9537c7a DIFF: https://github.com/llvm/llvm-project/commit/e2b4ba04140ecbd2367247334b04490ef9537c7a.diff LOG:

[clang] [CIR][NFC] Fix an unused variable warning (PR #150758)

2025-07-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-fast` running on `sanitizer-buildbot4` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/13344 Here is the relevant piece

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Björn Schäpers via cfe-commits
@@ -2639,32 +2639,42 @@ class Formatter : public TokenAnalyzer { int countVariableAlignments(const SmallVectorImpl &Lines) { int AlignmentDiff = 0; + for (const AnnotatedLine *Line : Lines) { AlignmentDiff += countVariableAlignments(Line->Children); - fo

[clang-tools-extra] [clang-tidy] Speed up `misc-header-include-cycle` (PR #148757)

2025-07-27 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/148757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Fix an unused variable warning (PR #150758)

2025-07-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/24161 Here is the relevant piece of the build log fo

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/150744 >From 7418fe966ff3a3e9f3c6c431beafbdde47a1de30 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 26 Jul 2025 01:56:52 -0700 Subject: [PATCH 1/2] [clang-format] Fix a bug in `DerivePointerAlignment: true` This

[clang] [CIR][NFC] Fix an unused variable warning (PR #150758)

2025-07-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/150758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cf1abe6 - [CIR][NFC] Fix an unused variable warning (#150758)

2025-07-27 Thread via cfe-commits
Author: Amr Hesham Date: 2025-07-27T11:54:38+02:00 New Revision: cf1abe67b9c6881527e42c1f6571665bb506b708 URL: https://github.com/llvm/llvm-project/commit/cf1abe67b9c6881527e42c1f6571665bb506b708 DIFF: https://github.com/llvm/llvm-project/commit/cf1abe67b9c6881527e42c1f6571665bb506b708.diff LO

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/150744 >From 7418fe966ff3a3e9f3c6c431beafbdde47a1de30 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 26 Jul 2025 01:56:52 -0700 Subject: [PATCH 1/2] [clang-format] Fix a bug in `DerivePointerAlignment: true` This

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

2025-07-27 Thread Ivan Butygin via cfe-commits
https://github.com/Hardcode84 edited https://github.com/llvm/llvm-project/pull/150805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [mlir][core] Move `InitAll***` implementation into static library. (PR #150805)

2025-07-27 Thread Ivan Butygin via cfe-commits
https://github.com/Hardcode84 edited https://github.com/llvm/llvm-project/pull/150805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/150744 >From 7418fe966ff3a3e9f3c6c431beafbdde47a1de30 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 26 Jul 2025 01:56:52 -0700 Subject: [PATCH 1/2] [clang-format] Fix a bug in `DerivePointerAlignment: true` This

[clang] [clang-format] Fix a bug in `DerivePointerAlignment: true` (PR #150744)

2025-07-27 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/150744 >From 7418fe966ff3a3e9f3c6c431beafbdde47a1de30 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 26 Jul 2025 01:56:52 -0700 Subject: [PATCH 1/2] [clang-format] Fix a bug in `DerivePointerAlignment: true` This

  1   2   >