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

2025-03-01 Thread via cfe-commits
https://github.com/khuldraeseth created https://github.com/llvm/llvm-project/pull/129406 Adds an option `modernize-use-trailing-return-type.EvenWhenVoid` that when `true` enforces this check for declarations like `void foo();`. Default is `false` to preserve existing behavior. >From cd7e8c60f

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-03-01 Thread Erich Keane via cfe-commits
@@ -12806,6 +12810,19 @@ namespace { HandleValue(Arg->IgnoreParenImpCasts()); } +void VisitLambdaExpr(LambdaExpr *E) { + if (!isInCXXOperatorCall) { +Inherited::VisitLambdaExpr(E); +return; + } + + for (const auto &init : E->captu

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

2025-03-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (khuldraeseth) Changes Adds an option `modernize-use-trailing-return-type.EvenWhenVoid` that when `true` enforces this check for declarations like `void foo();`. Default is `false` to preserve existing behavior. --- Full diff:

[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)

2025-03-01 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/128265 >From dc4d30261101f6fc186b828b9230752316ffdd76 Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Sat, 1 Mar 2025 17:06:34 +0100 Subject: [PATCH] [clang][diagnostics] a

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

2025-03-01 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] [CIR] Upstream func args alloca handling (PR #129167)

2025-03-01 Thread Erich Keane via cfe-commits
@@ -52,6 +52,14 @@ class Address { elementType); } + Address(mlir::Value pointer, clang::CharUnits alignment) + : Address(pointer, +mlir::cast(pointer.getType()).getPointee(), erichkeane wrote: Got it, thanks for the clarifi

[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)

2025-03-01 Thread Richard Smith via cfe-commits
@@ -257,7 +257,10 @@ static bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, // preprocessor keywords and it wasn't macro expanded, it turns // into a simple 0 if (ValueLive) { - PP.Diag(PeekTok, diag::warn_pp_undef_ident

[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)

2025-03-01 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/128265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)

2025-03-01 Thread Richard Smith via cfe-commits
@@ -791,6 +791,8 @@ def ReservedIdAsMacroAlias : DiagGroup<"reserved-id-macro", [ReservedIdAsMacro]> def ReservedAttributeIdentifier : DiagGroup<"reserved-attribute-identifier">; def RestrictExpansionMacro : DiagGroup<"restrict-expansion">; def FinalMacro : DiagGroup<"final-ma

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread David Rivera via cfe-commits
@@ -202,7 +208,13 @@ void UseDefaultMemberInitCheck::registerMatchers(MatchFinder *Finder) { unaryOperator(hasAnyOperatorName("+", "-"), hasUnaryOperand(floatLiteral())), cxxBoolLiteral(), cxxNullPtrLiteralExpr(), implicitValue

[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)

2025-03-01 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Thanks! https://github.com/llvm/llvm-project/pull/128265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From 39900908f047c2c067eea93855a5e6f644d13830 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 02:09:02 -0500 Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list in

[clang] [sanitizer] Apply AlwaysIn/Out in parseSanitizeArgs (PR #129405)

2025-03-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Thurston Dang (thurstond) Changes For backwards compatibility, `parseSanitizeArgs`/`parseSanitizeTrapArgs` had an incomplete refactoring in https://github.com/llvm/llvm-project/pull/119819, in order to accommodate the special case

[clang] [sanitizer] Apply AlwaysIn/Out in parseSanitizeArgs (PR #129405)

2025-03-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Thurston Dang (thurstond) Changes For backwards compatibility, `parseSanitizeArgs`/`parseSanitizeTrapArgs` had an incomplete refactoring in https://github.com/llvm/llvm-project/pull/119819, in order to accommodate the special case of vptr

[clang] [sanitizer] Apply AlwaysIn/Out in parseSanitizeArgs (PR #129405)

2025-03-01 Thread Thurston Dang via cfe-commits
https://github.com/thurstond created https://github.com/llvm/llvm-project/pull/129405 For backwards compatibility, `parseSanitizeArgs`/`parseSanitizeTrapArgs` had an incomplete refactoring in https://github.com/llvm/llvm-project/pull/119819, in order to accommodate the special case of vptr in

[clang] Add support for dynamic libraries in CLANG_BOLT (PR #127020)

2025-03-01 Thread Tom Stellard via cfe-commits
https://github.com/tstellar approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/127020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread David Rivera via cfe-commits
https://github.com/RiverDave deleted https://github.com/llvm/llvm-project/pull/129370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-03-01 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/121115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 038731c - [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (#121115)

2025-03-01 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-03-01T13:21:47-08:00 New Revision: 038731c709c665634714275996559c21f36372f2 URL: https://github.com/llvm/llvm-project/commit/038731c709c665634714275996559c21f36372f2 DIFF: https://github.com/llvm/llvm-project/commit/038731c709c665634714275996559c21f36372f2.diff L

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-03-01 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/120920 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)

2025-03-01 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/128265 >From 6f08928c9d031ad4850f6f535003627441869712 Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Sat, 1 Mar 2025 17:06:34 +0100 Subject: [PATCH] [clang][diagnostics] a

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-03-01 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/120920 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)

2025-03-01 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/128265 >From 7f7d4a5a0293c3fc6f2c31341ae88302d49f3f6f Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Sat, 1 Mar 2025 17:06:34 +0100 Subject: [PATCH] [clang][diagnostics] a

[clang] 304c053 - [cindex] Add API to query the class methods of a type (#123539)

2025-03-01 Thread via cfe-commits
Author: Trevor Laughlin Date: 2025-03-02T00:59:26+04:00 New Revision: 304c053a5c7b8a67f6f3fddf9492971a57901715 URL: https://github.com/llvm/llvm-project/commit/304c053a5c7b8a67f6f3fddf9492971a57901715 DIFF: https://github.com/llvm/llvm-project/commit/304c053a5c7b8a67f6f3fddf9492971a57901715.dif

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-03-01 Thread via cfe-commits
github-actions[bot] wrote: @trelau Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

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

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-03-01 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/120920 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/129370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2025-03-01 Thread Trevor Gross via cfe-commits
tgross35 wrote: In either case, I need to have the module flags available pretty early and I'm not sure how to do that. Ideally they would be available when `TargetLowering` is constructed or sometime before it is used for lowering, but it only gets a `TargetMachine` as a paremeter. All values

[clang] [SystemZ] Add header guard macros to vecintrin.h (PR #129170)

2025-03-01 Thread Ulrich Weigand via cfe-commits
uweigand wrote: /cherry-pick https://github.com/llvm/llvm-project/commit/ddaa5b3bfb2980f79c6f277608ad33a6efe8d554 https://github.com/llvm/llvm-project/pull/129170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)

2025-03-01 Thread Richard Smith via cfe-commits
@@ -393,6 +393,9 @@ def pp_macro_not_used : Warning<"macro is not used">, DefaultIgnore, def warn_pp_undef_identifier : Warning< "%0 is not defined, evaluates to 0">, InGroup>, DefaultIgnore; +def warn_pp_undef_true_identifier : Warning< + "'true' is not defined, evaluate

[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)

2025-03-01 Thread Richard Smith via cfe-commits
@@ -260,7 +260,8 @@ static bool EvaluateValue(PPValue &Result, Token &PeekTok, DefinedTracker &DT, PP.Diag(PeekTok, diag::warn_pp_undef_identifier) << II; const DiagnosticsEngine &DiagEngine = PP.getDiagnostics(); - // If 'Wundef' is enabled, do n

[clang] [HLSL] select scalar overloads for vector conditions (PR #129396)

2025-03-01 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff b65e0947cade9bd39036a7700b54c1df4ec00756 999c9253dc69c43f2d5d686bb4e9a9fd2f8783d4 --e

[clang] [HLSL] select scalar overloads for vector conditions (PR #129396)

2025-03-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Chris B (llvm-beanz) Changes This PR adds scalar/vector overloads for vector conditions to the `select` builtin, and updates the sema checking and codegen to allow scalars to extend to vectors. Fixes #126570 --- Full diff: https

[clang] [HLSL] select scalar overloads for vector conditions (PR #129396)

2025-03-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes This PR adds scalar/vector overloads for vector conditions to the `select` builtin, and updates the sema checking and codegen to allow scalars to extend to vectors. Fixes #126570 --- Full diff: https://githu

[clang] [HLSL] select scalar overloads for vector conditions (PR #129396)

2025-03-01 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/129396 This PR adds scalar/vector overloads for vector conditions to the `select` builtin, and updates the sema checking and codegen to allow scalars to extend to vectors. Fixes #126570 >From 999c9253dc69c43f2d5d

[clang] [llvm] [HLSL][RootSignature] Implement Parsing of Descriptor Tables (PR #122982)

2025-03-01 Thread Chris B via cfe-commits
@@ -0,0 +1,375 @@ +//=== ParseHLSLRootSignatureTest.cpp - Parse Root Signature tests -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. llvm-beanz wro

[clang] [llvm] [HLSL][RootSignature] Implement Parsing of Descriptor Tables (PR #122982)

2025-03-01 Thread Chris B via cfe-commits
@@ -0,0 +1,417 @@ +#include "clang/Parse/ParseHLSLRootSignature.h" llvm-beanz wrote: This is the file with the missing license header that @bob80905 pointed out. https://github.com/llvm/llvm-project/pull/122982 ___ cfe

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/129370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread David Rivera via cfe-commits
@@ -202,7 +208,13 @@ void UseDefaultMemberInitCheck::registerMatchers(MatchFinder *Finder) { unaryOperator(hasAnyOperatorName("+", "-"), hasUnaryOperand(floatLiteral())), cxxBoolLiteral(), cxxNullPtrLiteralExpr(), implicitValue

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/129370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From b46375a39104f967bdb3b6a9bd3214545a5965cf Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 02:09:02 -0500 Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list in

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From be9f035f738c8ea2771c9e79d4c22ff0fa82542e Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 02:09:02 -0500 Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list in

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread David Rivera via cfe-commits
@@ -137,6 +137,10 @@ Changes in existing checks ` check by fixing false negatives on ternary operators calling ``std::move``. +- Improved :doc:`modernize-use-default-member-init RiverDave wrote: Thx for pointing out, It's fixed now. https://github.com/l

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From 6dff411516cb4c0e807307fd36d15955e805d5c4 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 02:09:02 -0500 Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list in

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-03-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Is this ready to be merged? @trelau https://github.com/llvm/llvm-project/pull/123539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy]: `misc-unused-using-decls`: add correct handling of `operator""` with template parametes (PR #129392)

2025-03-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Baranov Victor (vbvictor) Changes Fixes false-positives when operator"" has template paremetes, e.g. ```cpp template int operator""_r() { return {}; } ``` --- Full diff: https://github.com/llvm/llvm-proj

[clang-tools-extra] [clang-tidy]improve performance-unnecessary-value-param performance (PR #128383)

2025-03-01 Thread Baranov Victor via cfe-commits
@@ -110,6 +110,11 @@ Changes in existing checks ` check by providing additional examples and fixing some macro related false positives. +- Improved :doc:`performance/unnecessary-value-param vbvictor wrote: nit: `performance/unnecessary-value-param` should

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-03-01 Thread Trevor Laughlin via cfe-commits
trelau wrote: @DeinAlptraum ok now i think it's ready https://github.com/llvm/llvm-project/pull/123539 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] `misc-unused-using-decls`: add correct handling of `operator""` with template parametes (PR #129392)

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

[clang-tools-extra] [clang-tidy]: `misc-unused-using-decls`: add correct handling of `operator""` with template parametes (PR #129392)

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

[clang-tools-extra] [clang-tidy]: `misc-unused-using-decls`: add correct handling of `operator""` with template parametes (PR #129392)

2025-03-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Baranov Victor (vbvictor) Changes Fixes false-positives when operator"" has template paremetes, e.g. ```cpp template int operator""_r() { return {}; } ``` --- Full diff: https://github.com/llvm/llvm-project/pul

[clang-tools-extra] [clang-tidy]: `misc-unused-using-decls`: add correct handling of `operator""` with template parametes (PR #129392)

2025-03-01 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/129392 Fixes false-positives when operator"" has template paremetes, e.g. ```cpp template int operator""_r() { return {}; } ``` >From eac5105574e6144eb702e75b21d00203706c6ada Mon Sep 17 00:00:00 2001 From:

[clang] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-03-01 Thread via cfe-commits
@@ -0,0 +1,38 @@ +//===--- TrueMacroCheck.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] [cindex] Add API to query the class methods of a type (PR #123539)

2025-03-01 Thread Trevor Laughlin via cfe-commits
https://github.com/trelau updated https://github.com/llvm/llvm-project/pull/123539 >From bb0542e8f2ad50892ee9d2c1f76ec1def85c3e56 Mon Sep 17 00:00:00 2001 From: Trevor Laughlin Date: Sun, 19 Jan 2025 19:21:10 -0500 Subject: [PATCH 1/6] [cindex] Add API to query the class methods of a type ---

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

2025-03-01 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/121291 >From 099aacc263f70301efefa722d49874a47b0054a9 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 1 Mar 2025 18:05:54 +0300 Subject: [PATCH] add ambigous-smartptr-reset-call check --- .../AmbiguousSmart

[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)

2025-03-01 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/128265 >From 3a528edbf5c63ac0e47530feffe309a1a51e9c93 Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Sat, 1 Mar 2025 17:06:34 +0100 Subject: [PATCH] [clang][diagnostics] a

[clang] [clang][diagnostics] add '-Wundef-true' warning option (PR #128265)

2025-03-01 Thread via cfe-commits
https://github.com/isuckatcs edited https://github.com/llvm/llvm-project/pull/128265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-03-01 Thread via cfe-commits
isuckatcs wrote: As per the discussion above, I move the check from `clang-tidy` into `clang` itself. https://github.com/llvm/llvm-project/pull/128265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-03-01 Thread Nhat Nguyen via cfe-commits
@@ -0,0 +1,646 @@ +// -*- 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

[clang] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-03-01 Thread via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %check_clang_tidy -std=c99 %s bugprone-true-macro %t +// RUN: %check_clang_tidy -std=c11 %s bugprone-true-macro %t +// RUN: %check_clang_tidy -std=c17 %s bugprone-true-macro %t isuckatcs wrote: I added such option in the new, clang diagn

[clang] [clang-tidy] warn when `true` is used as a preprocessor keyword in C (PR #128265)

2025-03-01 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/128265 >From 794e45b99711ebb72be1e4e6263f7f67f5da8545 Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Sat, 1 Mar 2025 17:06:34 +0100 Subject: [PATCH] [clang][diagnostics] a

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-01 Thread via cfe-commits
@@ -137,6 +137,10 @@ Changes in existing checks ` check by fixing false negatives on ternary operators calling ``std::move``. +- Improved :doc:`modernize-use-default-member-init EugeneZelenko wrote: Please keep alphabetical order (by check name) in this

[clang] [clang] more useful error message for decomposition declaration missing initializer (PR #127924)

2025-03-01 Thread Younan Zhang via cfe-commits
@@ -140,18 +140,23 @@ namespace Template { template auto [a, b, c] = n; // expected-error {{decomposition declaration template not supported}} } +#define MYC C + namespace Init { - void f() { + template T f(T t) { int arr[1]; struct S { int n; }; -auto &[ba

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

2025-03-01 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/126434 >From 2c2738704e5fd2e402b75021341a47413e6bfe39 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 1 Mar 2025 18:11:30 +0300 Subject: [PATCH] add scoped-lock-check --- .../clang-tidy/modernize/CMakeLists

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-03-01 Thread Trevor Laughlin via cfe-commits
https://github.com/trelau updated https://github.com/llvm/llvm-project/pull/123539 >From bb0542e8f2ad50892ee9d2c1f76ec1def85c3e56 Mon Sep 17 00:00:00 2001 From: Trevor Laughlin Date: Sun, 19 Jan 2025 19:21:10 -0500 Subject: [PATCH 1/5] [cindex] Add API to query the class methods of a type ---

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-03-01 Thread Sam Elliott via cfe-commits
@@ -974,17 +974,20 @@ void RISCVFrameLowering::emitPrologue(MachineFunction &MF, emitCFIForCSI(MBB, MBBI, getUnmanagedCSI(MF, CSI)); // Generate new FP. - if (hasFP(MF) && RVFI->getPushPopKind(MF) != - RISCVMachineFunctionInfo::PushPopKind::VendorXqc

[clang] [cindex] Add API to query the class methods of a type (PR #123539)

2025-03-01 Thread Trevor Laughlin via cfe-commits
https://github.com/trelau updated https://github.com/llvm/llvm-project/pull/123539 >From bb0542e8f2ad50892ee9d2c1f76ec1def85c3e56 Mon Sep 17 00:00:00 2001 From: Trevor Laughlin Date: Sun, 19 Jan 2025 19:21:10 -0500 Subject: [PATCH 1/4] [cindex] Add API to query the class methods of a type ---

[clang] Revert "[clang][HIP] Make some math not not work with AMDGCN SPIR-V" (PR #129280)

2025-03-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Alex Voicu (AlexVlx) Changes Reverts llvm/llvm-project#128360 pending resolution of odd test break. --- Patch is 183.19 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/129280.diff 3 File

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-03-01 Thread via cfe-commits
@@ -387,6 +405,25 @@ let SMETargetGuard = "sme2" in { def SVBMOPS : Inst<"svbmops_za32[_{d}]_m", "viPPdd", "iUi", MergeNone, "aarch64_sme_bmops_za32", [IsInOutZA, IsStreaming], [ImmCheck<0, ImmCheck0_3>]>; Lukacma wrote: Looking at rest of arm_sme.td file w

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-03-01 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/129209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen][OpenCL] Fix `alloca` handling (PR #113930)

2025-03-01 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/113930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen][OpenCL] Fix `alloca` handling (PR #113930)

2025-03-01 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/113930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen][OpenCL] Fix `alloca` handling when compiling for (PR #113930)

2025-03-01 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/113930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2025-03-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll since there hasn't been a reply in months, do you think it's > appropriate to close this? Our existing practice is that PRs remain to linger like this until someone picks them up. Closing it would be "we don't want this" answer, and it wouldn't be correct. That's ho

[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)

2025-03-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll @LecrisUT what else do you think needs to be done here to get this > approved? I still would like to hear from @sighingnow. One of the reasons is that I think I've seen them attending one of the open meetings we have, so they might be around somewhere. Also I barely

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2025-03-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Okay, thanks for the explanation & review :D I guess I might take this over if I have time then, which might be some time late in April (work is extremely busy) https://github.com/llvm/llvm-project/pull/120590 ___ cfe-commits mail

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2025-03-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/120590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2025-03-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: Even though this PR is rather small, it is still a bunch of changes here and there. I'd prefer it to be split up into multiple focused PRs. https://github.com/llvm/llvm-project/pull/120590 ___ cfe-commits mailing

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2025-03-01 Thread Vlad Serebrennikov via cfe-commits
@@ -2022,6 +2025,14 @@ def lexical_parent(self): return self._lexical_parent +@property +def specialized_template(self): +"""Return the base template that this cursor is a specialization of, if any.""" Endilll wrote: I wonder if "bas

[clang] [Clang] Treat constexpr-unknown value as invalid in `EvaluateAsInitializer` (PR #128409)

2025-03-01 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > If I am reading the code correctly there should be some constexpr cases that > generate a diagnostic, can we verify that with a test? It has been tested by the following case: ``` extern int &Recurse1; int &Recurse2 = Recurse1; int &Recurse1 = Recurse2; constexpr int &Recurse3

[clang] 39edcf9 - [WebAssembly] Make WASI -threads environment behave as -pthread (#129164)

2025-03-01 Thread via cfe-commits
Author: R Date: 2025-03-01T12:53:57Z New Revision: 39edcf9126ee1709753728205d2ed211aac4f7b3 URL: https://github.com/llvm/llvm-project/commit/39edcf9126ee1709753728205d2ed211aac4f7b3 DIFF: https://github.com/llvm/llvm-project/commit/39edcf9126ee1709753728205d2ed211aac4f7b3.diff LOG: [WebAssembl

[clang] [WebAssembly] Make WASI -threads environment behave as -pthread (PR #129164)

2025-03-01 Thread via cfe-commits
https://github.com/ArcaneNibble closed https://github.com/llvm/llvm-project/pull/129164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MC/DC] Update CoverageMapping tests (PR #125404)

2025-03-01 Thread NAKAMURA Takumi via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -fcoverage-mcdc -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only %s 2> %t.stderr.txt | FileCheck %s chapuni wrote: Nah, wrong. I've removed another.

[clang] [clang-format] Fix a bug in wrapping function return type (PR #129374)

2025-03-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #113766 --- Full diff: https://github.com/llvm/llvm-project/pull/129374.diff 4 Files Affected: - (modified) clang/lib/Format/ContinuationIndenter.cpp (+4) - (modified) clang/lib/Format/FormatToken

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2025-03-01 Thread Kees Cook via cfe-commits
@@ -8663,31 +8663,95 @@ static const RecordDecl *GetEnclosingNamedOrTopAnonRecord(const FieldDecl *FD) { return RD; } -static bool -CheckCountExpr(Sema &S, FieldDecl *FD, Expr *E, - llvm::SmallVectorImpl &Decls) { +enum class CountedByInvalidPointeeTypeKind {

[clang] [clang] Pass fp128 indirectly and return in xmm0 on Windows (PR #115052)

2025-03-01 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 edited https://github.com/llvm/llvm-project/pull/115052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-03-01 Thread Amr Hesham via cfe-commits
@@ -85,7 +85,7 @@ void f(int x, int y, int z) { if ((ayy y < z' don't have their mathematical meaning}} AmrDeveloper wrote: Yes, I got your point also it will not be great with large expressions :D, I am thinking should we change the message to be different

[clang] [clang][bytecode] Explicitly composite array descriptor types (PR #129376)

2025-03-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes When creating descriptor for array element types, we only save the original source, e.g. int[2][2][2]. So later calls to getType() of the element descriptors will also return int[2][2][2], instead of e.g. in

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-03-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/129304 >From d13f2d0d40987302243efad7304a1a006fdb2dde Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 28 Feb 2025 21:42:36 +0100 Subject: [PATCH 1/2] [CIR] Upstream floating point literal expressions ---

[clang] [CIR] Upstream floating point literal expressions (PR #129304)

2025-03-01 Thread Amr Hesham via cfe-commits
@@ -57,3 +57,15 @@ bool boolfunc() { return true; } // CHECK: %0 = cir.const #true // CHECK: cir.return %0 : !cir.bool // CHECK: } + +float floatfunc() { return 42.42f; } +// CHECK: cir.func @floatfunc() -> !cir.float { +// CHECK: %0 = cir.const #cir.fp<4.242000e+01> : !c

[clang] [clang][bytecode] Explicitly composite array descriptor types (PR #129376)

2025-03-01 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/129376 When creating descriptor for array element types, we only save the original source, e.g. int[2][2][2]. So later calls to getType() of the element descriptors will also return int[2][2][2], instead of e.g. int[

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2025-03-01 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: @Endilll since there hasn't been a reply in months, do you think it's appropriate to close this? https://github.com/llvm/llvm-project/pull/120590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [clang-format] Fix a bug in wrapping function return type (PR #129374)

2025-03-01 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/129374 >From 24b77153d8f65bdf3282a8f25fbc87b619a736f6 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 1 Mar 2025 01:53:01 -0800 Subject: [PATCH] [clang-format] Fix a bug in wrapping function return type Fixes #11376

[clang] [MC/DC] Refactor MCDC::State::Decision. NFC. (PR #125408)

2025-03-01 Thread NAKAMURA Takumi via cfe-commits
@@ -30,8 +32,20 @@ struct State { unsigned BitmapBits = 0; struct Decision { +using IndicesTy = llvm::SmallVector>; +static constexpr auto InvalidID = std::numeric_limits::max(); + unsigned BitmapIdx; -llvm::SmallVector> Indices; +IndicesTy Indices; +

[clang] [clang] more useful error message for decomposition declaration missing initializer (PR #127924)

2025-03-01 Thread via cfe-commits
https://github.com/kbrav updated https://github.com/llvm/llvm-project/pull/127924 >From 7f7b9b3f2e7324bd290decb7151c9432875b1dd6 Mon Sep 17 00:00:00 2001 From: kbrav Date: Wed, 19 Feb 2025 19:05:05 -0500 Subject: [PATCH 1/4] [clang] more useful error message for decomposition declaration missi

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-03-01 Thread via cfe-commits
@@ -12796,6 +12799,7 @@ namespace { } void VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) { + llvm::SaveAndRestore cxxOpCallScope(isInCXXOperatorCall, true); zhaohuiw42 wrote: Fixed. https://github.com/llvm/llvm-project/pull/129198 ___

[clang] [clang-format] Fix a bug in wrapping function return type (PR #129374)

2025-03-01 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/129374 Fixes #113766 >From 5bfc03509419452a22f2c9c663e53152390a310a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 1 Mar 2025 01:53:01 -0800 Subject: [PATCH] [clang-format] Fix a bug in wrapping function return typ

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

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

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

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

  1   2   >