[clang] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and older (PR #141401)

2025-06-04 Thread via cfe-commits
https://github.com/Un1q32 updated https://github.com/llvm/llvm-project/pull/141401 >From 3cf20444591e70a8a6d8782048ca4f6c0e22 Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Mon, 27 Jan 2025 18:00:34 -0500 Subject: [PATCH 1/4] [Clang] Link libgcc_s.1.dylib when building for macOS 10.5 and olde

[clang] [llvm] [MemProf] Split MemProfiler into Instrumentation and Use. (PR #142811)

2025-06-04 Thread Kazu Hirata via cfe-commits
@@ -90,4 +66,4 @@ computeUndriftMap(Module &M, IndexedInstrProfReader *MemProfReader, } // namespace memprof } // namespace llvm -#endif +#endif kazutakahirata wrote: nit: could we end with a newline here? A diff involving an unterminated line looks ugly.

[clang] [llvm] [MemProf] Split MemProfiler into Instrumentation and Use. (PR #142811)

2025-06-04 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata edited https://github.com/llvm/llvm-project/pull/142811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MemProf] Split MemProfiler into Instrumentation and Use. (PR #142811)

2025-06-04 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. LGTM. Thanks for doing this! https://github.com/llvm/llvm-project/pull/142811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] 478bdd8 - [clang][bytecode] Save Constexpr bit in Function (#142793)

2025-06-04 Thread via cfe-commits
Author: Timm Baeder Date: 2025-06-05T06:38:48+02:00 New Revision: 478bdd8b9023612a4ef25d50973064e699a95d5b URL: https://github.com/llvm/llvm-project/commit/478bdd8b9023612a4ef25d50973064e699a95d5b DIFF: https://github.com/llvm/llvm-project/commit/478bdd8b9023612a4ef25d50973064e699a95d5b.diff L

[clang] [clang][bytecode] Save Constexpr bit in Function (PR #142793)

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

[clang] [llvm] [llvm][RISCV] Make zvknhb imply zvknha (PR #142896)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Brandon Wu (4vtomat) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/142896.diff 5 Files Affected: - (modified) clang/include/clang/Basic/riscv_vector.td (+3-3) - (modified) clang/test/Driver/print-enabled-ex

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Ziqing Luo (ziqingluo-90) Changes `checkIncorrectLogicOperator` checks if an expression, for example `x != 0 || x != 1.0`, is always true or false by comparing the two literals `0` and `1.0`. But in case `x` is a 16-bit float, t

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-04 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/142897 `checkIncorrectLogicOperator` checks if an expression, for example `x != 0 || x != 1.0`, is always true or false by comparing the two literals `0` and `1.0`. But in case `x` is a 16-bit float, the two lit

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ziqing Luo (ziqingluo-90) Changes `checkIncorrectLogicOperator` checks if an expression, for example `x != 0 || x != 1.0`, is always true or false by comparing the two literals `0` and `1.0`. But in case `x` is a 16-bit float, the two li

[clang] [clang][CFG] Fix assertion failure in checkIncorrectLogicOperator (PR #142897)

2025-06-04 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Godbolt example: https://godbolt.org/z/6dv3Kearx CC @YutongZhuu as this issue was first introduced in https://github.com/YutongZhuu/llvm-project/commit/9ae3368b3b912ae425b2fbe9a59949979286744f https://github.com/llvm/llvm-project/pull/142897

[clang] [llvm] [llvm][RISCV] Make zvknhb imply zvknha (PR #142896)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brandon Wu (4vtomat) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/142896.diff 5 Files Affected: - (modified) clang/include/clang/Basic/riscv_vector.td (+3-3) - (modified) clang/test/Driver/print-enabled-extensions/

[clang] [llvm] [llvm][RISCV] Make zvknhb imply zvknha (PR #142896)

2025-06-04 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/142896 None >From f8279f47ea299ba45496c7146ace152fd3715d48 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Wed, 4 Jun 2025 21:41:46 -0700 Subject: [PATCH] [llvm][RISCV] Make zvknhb imply zvknha --- clang/include/cla

[clang-tools-extra] [clang-tidy] Add check for assignment or comparision operators' operand in `readability-math-missing-parentheses` (PR #141345)

2025-06-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: @flovent, please change email from private to public in github settings If you wish to have actual email written in commit. https://github.com/llvm/llvm-project/pull/141345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [Modules] Don't fail when an unused textual header is missing. (PR #138227)

2025-06-04 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: I'll be busy during WWDC week too, so no real changes are expected in the next 2 weeks. https://github.com/llvm/llvm-project/pull/138227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-04 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: CC @dtarditi https://github.com/llvm/llvm-project/pull/142722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][RISCV] Make zvknhb imply zvknha (PR #142896)

2025-06-04 Thread Jim Lin via cfe-commits
https://github.com/tclin914 approved this pull request. Refer to https://github.com/riscv/riscv-crypto/blob/main/doc/vector/riscv-crypto-vector-zvknh.adoc. LGTM https://github.com/llvm/llvm-project/pull/142896 ___ cfe-commits mailing list cfe-commits

[clang] [StaticAnalyzer] Fix tryExpandAsInteger's failures on PCH macros (PR #142722)

2025-06-04 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/142722 >From 3bd12ac6bb3c47b5e977cffec019df15a15426fc Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Wed, 4 Jun 2025 12:29:53 +0800 Subject: [PATCH 1/2] [StaticAnalyzer] Fix tryExpandAsInteger's failures on macr

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

2025-06-04 Thread via cfe-commits
https://github.com/someoneinjd created https://github.com/llvm/llvm-project/pull/142903 This PR adds support for the `positionEncoding` client capability introduced in LSP 3.17. Clangd can now negotiate the position encoding with the client during initialization. >From 5717ca8166a019e4c00709

[clang-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

2025-06-04 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-tools-extra] [clangd] Implement LSP 3.17 positionEncoding (PR #142903)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: someoneinjd (someoneinjd) Changes This PR adds support for the `positionEncoding` client capability introduced in LSP 3.17. Clangd can now negotiate the position encoding with the client during initialization. --- Full diff:

[clang] [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (PR #142749)

2025-06-04 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 closed https://github.com/llvm/llvm-project/pull/142749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-06-04 Thread Thorsten Klein via cfe-commits
https://github.com/thorsten-klein updated https://github.com/llvm/llvm-project/pull/124265 >From b1bfe0682f9889ae792ada546d3e4f1cd86acf69 Mon Sep 17 00:00:00 2001 From: "Klein, Thorsten (GDE-EDSI1)" Date: Fri, 24 Jan 2025 13:46:24 +0100 Subject: [PATCH] added option AllowNoNamespaceComments for

[clang] [llvm] Add -funique-source-file-identifier flag. (PR #142901)

2025-06-04 Thread Fangrui Song via cfe-commits
MaskRay wrote: Should call this "option". Within LLVM, we use flag for options without a value. https://github.com/llvm/llvm-project/pull/142901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] 627e49e - [AST] Fix an unused-function warning (NFC)

2025-06-04 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2025-06-05T14:11:30+08:00 New Revision: 627e49e2491ab7750501d84a5804632074c6af54 URL: https://github.com/llvm/llvm-project/commit/627e49e2491ab7750501d84a5804632074c6af54 DIFF: https://github.com/llvm/llvm-project/commit/627e49e2491ab7750501d84a5804632074c6af54.diff LOG: [

[clang] [llvm] Add -funique-source-file-identifier flag. (PR #142901)

2025-06-04 Thread Peter Collingbourne via cfe-commits
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/142901 >From 74acb06bb339909bc2950cecb95eb61df49c0379 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 4 Jun 2025 22:37:09 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-06-04 Thread Henrich Lauko via cfe-commits
xlauko wrote: Since https://github.com/llvm/llvm-project/pull/14/ was merged, please mirror additional changes from https://github.com/llvm/clangir/pull/1626 before merging. https://github.com/llvm/llvm-project/pull/139827 ___ cfe-commits mailing

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-04 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/142393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-04 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7ca7bcb - [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (#142749)

2025-06-04 Thread via cfe-commits
Author: Anutosh Bhat Date: 2025-06-05T11:23:50+05:30 New Revision: 7ca7bcb7d8dcf26fc0281697fe47aa6cdb3884c0 URL: https://github.com/llvm/llvm-project/commit/7ca7bcb7d8dcf26fc0281697fe47aa6cdb3884c0 DIFF: https://github.com/llvm/llvm-project/commit/7ca7bcb7d8dcf26fc0281697fe47aa6cdb3884c0.diff

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-04 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. Thanks for the PR, LGTM I'll merge this once you've checked the private email setting as described in the bot comment. CC @Endilll : Seems like we're missing a bunch of `TypeKind`s, currently missing 33 - 39 and 179 - 181 enum variant

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-04 Thread via cfe-commits
Himadhith wrote: @lei137 @amy-kwan @tonykuttai https://github.com/llvm/llvm-project/pull/142723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix crash on template-specialization (PR #142338)

2025-06-04 Thread Mark de Wever via cfe-commits
@@ -160,7 +160,7 @@ template struct X; // Make sure that the instantiated constructor initializes start and // end properly. -// CHECK-LABEL: define linkonce_odr void @_ZN1XIiEC2ERKS0_(ptr {{[^,]*}} %this, ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %othe

[clang] [PAuth] Use different discriminators for __int128_t / __uint128_t / _BitInt(n) (PR #140276)

2025-06-04 Thread Oliver Hunt via cfe-commits
@@ -4451,6 +4451,8 @@ defm ptrauth_init_fini_address_discrimination : OptInCC1FFlag<"ptrauth-init-fini "Enable address discrimination of function pointers in init/fini arrays">; defm ptrauth_elf_got : OptInCC1FFlag<"ptrauth-elf-got", "Enable authentication of pointers from G

[clang] [PAuth] Use different discriminators for __int128_t / __uint128_t / _BitInt(n) (PR #140276)

2025-06-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt commented: This basically looks good to me, sans the "can this just be on by default for elf/linux/etc" question https://github.com/llvm/llvm-project/pull/140276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [PAuth] Use different discriminators for __int128_t / __uint128_t / _BitInt(n) (PR #140276)

2025-06-04 Thread Oliver Hunt via cfe-commits
@@ -1883,6 +1883,9 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args, Args.addOptInFlag( CmdArgs, options::OPT_fptrauth_function_pointer_type_discrimination, options::OPT_fno_ptrauth_function_pointer_type_discrimination); + Args.addOptInFlag( --

[clang] [clang][PAC] Add __builtin_get_vtable_pointer (PR #139790)

2025-06-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt closed https://github.com/llvm/llvm-project/pull/139790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-06-04 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: Could someone with commit access please merge this? Thanks! https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-reorder-fields] Use expanded location for macros (PR #142147)

2025-06-04 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle approved this pull request. https://github.com/llvm/llvm-project/pull/142147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAuth] Use different discriminators for __int128_t / __uint128_t / _BitInt(n) (PR #140276)

2025-06-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/140276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Seems like we're missing a bunch of `TypeKind`s, currently missing 33 - 39 > and 179 - 181 enum variants. 180 and 181 were only added the other day, we > might want to look into some way to test these automatically to ensure that > any additions are also added on Python side i

[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)

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

[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)

2025-06-04 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseEnumClassCheck.h - clang-tidy ---*- C++ -*-===// +// +// 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: Apa

[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)

2025-06-04 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, few nits with docs. Ping, @HerrCai0907, @carlosgalvezp, @PiotrZSL if you wish to leave a review. I suppose in 1-2 weeks I'll land the PR. https://github.com/llvm/llvm-project/pull/138282 __

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-04 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: > Time to put libclang to use, and parse cindex.h? Probably, though I'll check if there are any more direct options first. I don't quite like the idea of hardcoding source file paths in the tests of a binding. https://github.com/llvm/llvm-project/pull/142634 ___

[clang] b36e161 - [clang][bytecode][NFC] Cache more integer type sizes (#142720)

2025-06-04 Thread via cfe-commits
Author: Timm Baeder Date: 2025-06-04T10:07:48+02:00 New Revision: b36e161a09bdebbabe159598778abb011303a9eb URL: https://github.com/llvm/llvm-project/commit/b36e161a09bdebbabe159598778abb011303a9eb DIFF: https://github.com/llvm/llvm-project/commit/b36e161a09bdebbabe159598778abb011303a9eb.diff L

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-06-04 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/142120 >From 4669be22f731faf9ce0985aa634166c30c7025c6 Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Fri, 30 May 2025 19:54:15 +0900 Subject: [PATCH] [libclang/python] Derive library function types from anno

[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)

2025-06-04 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseEnumClassCheck.h - clang-tidy ---*- C++ -*-===// +// +// 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: Apa

[clang] 93314bd - [clang][PAC] Add __builtin_get_vtable_pointer (#139790)

2025-06-04 Thread via cfe-commits
Author: Oliver Hunt Date: 2025-06-04T00:21:20-07:00 New Revision: 93314bd9462d5c41a23fb402be7ae0c7d099e274 URL: https://github.com/llvm/llvm-project/commit/93314bd9462d5c41a23fb402be7ae0c7d099e274 DIFF: https://github.com/llvm/llvm-project/commit/93314bd9462d5c41a23fb402be7ae0c7d099e274.diff L

[clang] [clang][bytecode][NFC] Cache more integer type sizes (PR #142720)

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

[clang] [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (PR #142749)

2025-06-04 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/142749 As can be seen through the docs (https://github.com/llvm/llvm-project/blob/7e1fa09ce2a228c949ce4490c98f2c73ed8ada00/clang/docs/LanguageExtensions.rst#c-keywords-supported-in-all-language-modes), Clang suppor

[clang-tools-extra] [clang-tidy][performance-unnecessary-value-param] Avoid in coroutines (PR #140912)

2025-06-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: I have a mixed feeling about whether we should always exclude all coroutines by default or not. When a coroutine has only one `co-operator` and nothing else should be safe to use a reference parameter? Am I wrong? So I think to be "on a safe side" I'd suggest a new option "Ingo

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-06-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: @stellar-aria, 21th LLVM release will be soon and the PR is 95% ready to land even if some corner-cases are not matched. Do you wish to rebase on fresh main and after a quick re-review the check should be ready to land. https://github.com/llvm/llvm-project/pull/127430 _

[clang] [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (PR #142749)

2025-06-04 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: On **Main** ``` anutosh491@vv-nuc:/build/anutosh491/llvm-project/build/bin$ ./clang-repl clang-repl> _Alignas(16) int x; clang-repl> int align = _Alignof(double); clang-repl> _Atomic int atomic_var = 0; clang-repl> _Complex double complex_val = 1.0 + 2.0i; clang-repl> _Float16 f

[clang] [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (PR #142749)

2025-06-04 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: The error comes from here to be precise https://github.com/llvm/llvm-project/blob/41841e625db8d14d6701e7cb211b2fcab6a32a50/clang/lib/Parse/Parser.cpp#L1026-L1028 `IsDeclarationStatement` should be true but return false enabling a faulty call to `ParseTopLevelStmtDecl` https:/

[clang] [llvm] [HLSL][SPIR-V] Implement vk::ext_builtin_input attribute (PR #138530)

2025-06-04 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/138530 From 8c405fefdb31200930b9a690df635aff7775f602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Wed, 30 Apr 2025 11:06:55 +0200 Subject: [PATCH 1/8] [HLSL] Implement vk::ext_builtin_input attr

[clang] [llvm] [HLSL][SPIR-V] Implement vk::ext_builtin_input attribute (PR #138530)

2025-06-04 Thread Nathan Gauër via cfe-commits
@@ -140,6 +140,11 @@ def SharedVar : SubsetSubjecthasGlobalStorage() && !S->getTLSKind()}], "global variables">; +def HLSLInputBuiltin : SubsetSubjecthasGlobalStorage() && +S->getStorageClass()==StorageClass::SC_Static && +

[clang] [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (PR #142749)

2025-06-04 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Should help us in the long run and fix the errors we see while including input/output based header on xeus-cpp-lite (happens cause these internally reference `_Noreturn` that clang-repl currently fails to understand) ![image](https://github.com/user-attachments/assets/d5da48b

[clang-tools-extra] [clang-tidy] Add ClangQueryChecks config option (PR #123734)

2025-06-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: @DeNiCoN, do you mind if this PR would be closed (or converted to draft at least)? I'm in the process of reviewing old PR to lower the number of open ones for ease of tracking. This PR could be reopened if needed. https://github.com/llvm/llvm-project/pull/123734 ___

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-06-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: @thorsten-klein, gentle ping, do you still wish to work on this check? 21th LLVM release will be soon, If you wish to have your changes in the upcoming release please rebase on main and fix issues suggested by HerrCai0907. https://github.com/llvm/llvm-project/pull/124265 ___

[clang] 4d6e44d - [CIR] Fix missing return value warning in maybePromoteBoolResult (#142673)

2025-06-04 Thread via cfe-commits
Author: Morris Hafner Date: 2025-06-04T11:52:47+02:00 New Revision: 4d6e44db8726d32e0edd47f41baf157986412858 URL: https://github.com/llvm/llvm-project/commit/4d6e44db8726d32e0edd47f41baf157986412858 DIFF: https://github.com/llvm/llvm-project/commit/4d6e44db8726d32e0edd47f41baf157986412858.diff

[clang] [CIR] Fix missing return value warning in maybePromoteBoolResult (PR #142673)

2025-06-04 Thread Morris Hafner via cfe-commits
https://github.com/mmha closed https://github.com/llvm/llvm-project/pull/142673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][Clang] Update new Neon vector element types. (PR #142760)

2025-06-04 Thread David Green via cfe-commits
https://github.com/davemgreen created https://github.com/llvm/llvm-project/pull/142760 This updates the element types used in the new __Int8x8_t types added in #126945, mostly to allow C++ name mangling in ItaniumMangling mangleAArch64VectorBase to work correctly. Char is replaced by SignedCha

[clang] [AArch64][Clang] Update new Neon vector element types. (PR #142760)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Green (davemgreen) Changes This updates the element types used in the new __Int8x8_t types added in #126945, mostly to allow C++ name mangling in ItaniumMangling mangleAArch64VectorBase to work correctly. Char is replaced by SignedCh

[clang] ac42923 - Reapply "[KeyInstr][Clang] For range stmt atoms" (#142630)

2025-06-04 Thread Orlando Cazalet-Hyams via cfe-commits
Author: Orlando Cazalet-Hyams Date: 2025-06-04T10:53:29+01:00 New Revision: ac42923c2defe51fcc9220f68d50b33b5e872933 URL: https://github.com/llvm/llvm-project/commit/ac42923c2defe51fcc9220f68d50b33b5e872933 DIFF: https://github.com/llvm/llvm-project/commit/ac42923c2defe51fcc9220f68d50b33b5e8729

[clang] [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (PR #142749)

2025-06-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Anutosh Bhat (anutosh491) Changes As can be seen through the docs (https://github.com/llvm/llvm-project/blob/7e1fa09ce2a228c949ce4490c98f2c73ed8ada00/clang/docs/LanguageExtensions.rst#c-keywords-supported-in-all-language-modes), Clang sup

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-06-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: Gentle ping @PiotrZSL https://github.com/llvm/llvm-project/pull/126434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Add more -fsanitize-annotate-debug-info checks (PR #141997)

2025-06-04 Thread Michael Buch via cfe-commits
Michael137 wrote: > While logically correct I think we might have to teach LLDB how to handle > this. LLDB has a special "frame recognizer" where it looks for frames using > this fake debug info mechanism (e.g. __builtin_verbose_trap) and it assumes > the frame below it is the real source code

[clang-tools-extra] [clang-tidy] Add ClangQueryChecks config option (PR #123734)

2025-06-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: Closed as further review happens in https://github.com/llvm/llvm-project/pull/131804 https://github.com/llvm/llvm-project/pull/123734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang-tools-extra] [clang-tidy] Add ClangQueryChecks config option (PR #123734)

2025-06-04 Thread via cfe-commits
https://github.com/DeNiCoN closed https://github.com/llvm/llvm-project/pull/123734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Added TypeKind.FLOAT16 for 32 in cindex.py (PR #142634)

2025-06-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > > Time to put libclang to use, and parse cindex.h? > > Probably, though I'll check if there are any more direct options first. I > don't quite like the idea of hardcoding source file paths in bindings tests. If that helps, it should be available using a relatively stable path,

[clang] Introduce intra-procedural lifetime analysis in Clang (PR #142313)

2025-06-04 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/142313 ___ 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 AllowFalseEvaluated flag to clang-tidy noexcept-move-constructor check (PR #126897)

2025-06-04 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,63 @@ +// RUN: %check_clang_tidy %s performance-noexcept-move-constructor %t -- -- -fexceptions + +// RUN: %check_clang_tidy -check-suffix=CONFIG %s performance-noexcept-move-constructor,performance-noexcept-destructor %t -- \ +// RUN: -config="{CheckOptions: {perfor

[clang-tools-extra] [clang-tidy] Add AllowFalseEvaluated flag to clang-tidy noexcept-move-constructor check (PR #126897)

2025-06-04 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,63 @@ +// RUN: %check_clang_tidy %s performance-noexcept-move-constructor %t -- -- -fexceptions vbvictor wrote: Generally with options-test-file we do not need to check basic functionality since it should be covered in main test file https://github

[clang-tools-extra] [clang-tidy] Add AllowFalseEvaluated flag to clang-tidy noexcept-move-constructor check (PR #126897)

2025-06-04 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: @Nechda, gentle ping, do you still wish to work on this PR? 21th LLVM release will be soon, If you wish to have your changes in the upcoming release please rebase on main and fix suggestions. https://github.com/llvm/llvm-project/pull/126897 __

[clang-tools-extra] [clang-tidy] `modernize-use-trailing-return-type`: add an option to apply to `void`-returning functions as well (PR #129406)

2025-06-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: @khuldraeseth, gentle ping, do you still wish to work on this check? 21th LLVM release will be soon, If you wish to have your changes in the upcoming release please rebase on main and fix suggested issues https://github.com/llvm/llvm-project/pull/129406

[clang-tools-extra] [clang-tidy] Add AllowFalseEvaluated flag to clang-tidy noexcept-move-constructor check (PR #126897)

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

[clang] [llvm] [HLSL][SPIR-V] Implement vk::ext_builtin_input attribute (PR #138530)

2025-06-04 Thread Nathan Gauër via cfe-commits
Keenuts wrote: There is one failure on the CI, in lldb, an unrelated timeout https://github.com/llvm/llvm-project/pull/138530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIR-V] Implement vk::ext_builtin_input attribute (PR #138530)

2025-06-04 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts closed https://github.com/llvm/llvm-project/pull/138530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIR-V] Handle SV_Postion builtin in PS (PR #141759)

2025-06-04 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/141759 From 4653aca0444c9ce14893e877eeb88241c9b01934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Mon, 5 May 2025 18:01:17 +0200 Subject: [PATCH] [HLSL][SPIR-V] Handle SV_Postion builtin in PS

[clang] [HLSL][SPIR-V] Handle SV_Postion builtin in PS (PR #141759)

2025-06-04 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts edited https://github.com/llvm/llvm-project/pull/141759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Introduce cir::RecordKind::Class (PR #142690)

2025-06-04 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/142690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Introduce cir::RecordKind::Class (PR #142690)

2025-06-04 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/142690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix bad error recovery when classes are defined inside template (PR #142278)

2025-06-04 Thread Artyom Zabroda via cfe-commits
https://github.com/ArtyomZabroda updated https://github.com/llvm/llvm-project/pull/142278 >From 6fc280bb5583ee4f1713cb1447b8b86993b7abb7 Mon Sep 17 00:00:00 2001 From: Artyom Zabroda Date: Sat, 31 May 2025 18:44:21 +0300 Subject: [PATCH 1/2] [clang] Fix bad error recovery when classes are defin

[clang] [clang] Fix bad error recovery when classes are defined inside template (PR #142278)

2025-06-04 Thread Artyom Zabroda via cfe-commits
@@ -220,6 +220,14 @@ static ExprResult EvaluateAtomicConstraint( if (Inst.isInvalid()) return ExprError(); +if (const TemplateTypeParmType *TTPT = + dyn_cast(AtomicExpr->getType().getDesugaredType(S.Context))) { + TemplateTypeParmDecl *TTPD = TTPT->

[clang] [clang] Fix bad error recovery when classes are defined inside template (PR #142278)

2025-06-04 Thread Artyom Zabroda via cfe-commits
https://github.com/ArtyomZabroda edited https://github.com/llvm/llvm-project/pull/142278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix bad error recovery when classes are defined inside template (PR #142278)

2025-06-04 Thread Artyom Zabroda via cfe-commits
https://github.com/ArtyomZabroda edited https://github.com/llvm/llvm-project/pull/142278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-04 Thread via cfe-commits
https://github.com/vortex73 updated https://github.com/llvm/llvm-project/pull/140112 >From 322c1cfb925f3073f3d3b30abe1b2e35ae7745f3 Mon Sep 17 00:00:00 2001 From: Narayan Sreekumar Date: Thu, 15 May 2025 23:13:50 +0530 Subject: [PATCH 1/6] [LLVM ABI] The Typesystem --- llvm/include/llvm/ABI/T

[clang] [clang][python][test] Check if libclang.so is loadable (PR #142353)

2025-06-04 Thread Rainer Orth via cfe-commits
rorth wrote: > and couldn't find much on it either, but that sounds like > > > Alternatively, as I suggested, one could wrap the actual python -m unittest > > discover invocation with a check if libclang.so is loadable at all, only > > then running the actual test. Indeed: one should move the

[clang] [clang][python][test] Check if libclang.so is loadable (PR #142353)

2025-06-04 Thread Rainer Orth via cfe-commits
rorth wrote: > @rorth Now that #142371 is merged, can you re-evaluate this PR and update the > description? This PR changed the output from completely silent to excessively verbose: I now get ``` FAILED: tools/clang/bindings/python/tests/CMakeFiles/check-clang-python /var/llvm/local-i386-rele

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-04 Thread Nikita Popov via cfe-commits
@@ -136,9 +136,69 @@ const llvm::abi::Type *QualTypeMapper::convertRecordType(const RecordType *RT) { if (RD->isUnion()) return convertUnionType(RD); + + // Handle C++ classes with base classes + auto *const CXXRd = dyn_cast(RD); + if (CXXRd && (CXXRd->getNumBases()

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-04 Thread Nikita Popov via cfe-commits
@@ -136,9 +136,69 @@ const llvm::abi::Type *QualTypeMapper::convertRecordType(const RecordType *RT) { if (RD->isUnion()) return convertUnionType(RD); + + // Handle C++ classes with base classes + auto *const CXXRd = dyn_cast(RD); + if (CXXRd && (CXXRd->getNumBases()

[clang] [C2y] Handle FP-suffixes on prefixed octals (#141230) (PR #141695)

2025-06-04 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: Ping https://github.com/llvm/llvm-project/pull/141695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-04 Thread via cfe-commits
@@ -136,9 +136,69 @@ const llvm::abi::Type *QualTypeMapper::convertRecordType(const RecordType *RT) { if (RD->isUnion()) return convertUnionType(RD); + + // Handle C++ classes with base classes + auto *const CXXRd = dyn_cast(RD); + if (CXXRd && (CXXRd->getNumBases()

[clang] [llvm] [SimplifyCFG] Extend jump-threading to allow live local defs (PR #135079)

2025-06-04 Thread via cfe-commits
LU-JOHN wrote: @dtcxzyw can you please review? Thanks. https://github.com/llvm/llvm-project/pull/135079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][performance-unnecessary-value-param] Avoid in coroutines (PR #140912)

2025-06-04 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: @HerrCai0907 @carlosgalvezp @PiotrZSL one more friendly ping. Please take a look, the change is benign and trivial one liner + test. I think it will really improve this check and avoid long hours for developers to figure out dangling references. https://github.com/llvm/llvm-

[clang] Ast importer visitors (PR #138838)

2025-06-04 Thread via cfe-commits
https://github.com/ganenkokb-yandex updated https://github.com/llvm/llvm-project/pull/138838 >From 0a5beb71cb46ad5ef2df753098a6742ffeef3a71 Mon Sep 17 00:00:00 2001 From: Evianaive <153540...@qq.com> Date: Tue, 25 Mar 2025 01:54:06 +0800 Subject: [PATCH 1/5] Implement missing visit function ---

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-04 Thread Nikita Popov via cfe-commits
@@ -136,9 +136,69 @@ const llvm::abi::Type *QualTypeMapper::convertRecordType(const RecordType *RT) { if (RD->isUnion()) return convertUnionType(RD); + + // Handle C++ classes with base classes + auto *const CXXRd = dyn_cast(RD); + if (CXXRd && (CXXRd->getNumBases()

[clang] [CIR] Introduce cir::RecordKind::Class (PR #142690)

2025-06-04 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/142690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add check 'cppcoreguidelines-use-enum-class' (PR #138282)

2025-06-04 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,35 @@ +.. title:: clang-tidy - cppcoreguidelines-use-enum-class + +cppcoreguidelines-use-enum-class + + +Finds unscoped (non-class) ``enum`` declarations and suggests using +``enum class`` instead. + +This check implements `Enum.3 ---

  1   2   3   4   >