[clang] [clang][bytecode] Implement __builtin_{memchr,strchr,char_memchr} (PR #130420)

2025-03-09 Thread Timm Baeder via cfe-commits
@@ -1960,13 +1960,103 @@ static bool interp__builtin_memcmp(InterpState &S, CodePtr OpPC, // However, if we read all the available bytes but were instructed to read // even more, diagnose this as a "read of dereferenced one-past-the-end - // pointer". This is what would

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-03-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Thanks for you contributions! Some tips: 1. run git-clang-format -f before commit change 2. actually you don't need to rebase often. but in past several weeks we have a major release and it causes release notes are cleared. in this case, rebase is needed. 3. After several s

[clang-tools-extra] 2a3e782 - [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (#127162)

2025-03-09 Thread via cfe-commits
Author: Andrewyuan34 Date: 2025-03-09T20:09:59+08:00 New Revision: 2a3e782f4053d8ecb98dc110ebb6bacdb7bb17c7 URL: https://github.com/llvm/llvm-project/commit/2a3e782f4053d8ecb98dc110ebb6bacdb7bb17c7 DIFF: https://github.com/llvm/llvm-project/commit/2a3e782f4053d8ecb98dc110ebb6bacdb7bb17c7.diff

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-03-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/127162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix getting pointer element type in __builtin_memcmp (PR #130485)

2025-03-09 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/8940 Here is the relevant piece of the build log fo

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-03-09 Thread via cfe-commits
github-actions[bot] wrote: @Andrewyuan34 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 b

[clang-tools-extra] [clang-tidy] 'modernize-use-starts-ends-with': fixed false positives on `find` and `rfind` (PR #129564)

2025-03-09 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/129564 >From c3f21bb654d2980955f2c37a5dc7a02a1ced7891 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 3 Mar 2025 21:00:32 +0300 Subject: [PATCH 1/5] [clang-tidy] fixed false positives on find and rfind ---

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

2025-03-09 Thread Baranov Victor via cfe-commits
@@ -132,11 +132,15 @@ Changes in existing checks ` check by providing additional examples and fixing some macro related false positives. +- Improved :doc:`modernize-use-default-member-init vbvictor wrote: Please place this below `misc-use-internal-linkage

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

2025-03-09 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

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

2025-03-09 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, but please address a nit 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-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 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] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-09 Thread via cfe-commits
@@ -11363,14 +11363,17 @@ class Sema final : public SemaBase { /// The context in which we are checking a template parameter list. enum TemplateParamListContext { -TPC_ClassTemplate, -TPC_VarTemplate, +// For this context, Class, Variable, TypeAlias, and non-pa

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-03-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/123667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-09 Thread Matheus Izvekov via cfe-commits
@@ -11363,14 +11363,17 @@ class Sema final : public SemaBase { /// The context in which we are checking a template parameter list. enum TemplateParamListContext { -TPC_ClassTemplate, -TPC_VarTemplate, +// For this context, Class, Variable, TypeAlias, and non-pa

[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-03-09 Thread Yutong Zhu via cfe-commits
YutongZhuu wrote: > Can you update the first comment on this PR to reflect what you want to be in > the commit message? I notice that it doesn't describe what you're doing with > negation yet. Thanks! Addressed https://github.com/llvm/llvm-project/pull/126846 _

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 Thread Vinay Deshmukh via cfe-commits
https://github.com/vinay-deshmukh updated https://github.com/llvm/llvm-project/pull/129979 >From e9c7869550d9fd1eba4d4d42ee644540e6b6d445 Mon Sep 17 00:00:00 2001 From: Vinay Deshmukh <32487576+vinay-deshm...@users.noreply.github.com> Date: Tue, 4 Mar 2025 22:30:34 -0500 Subject: [PATCH 1/5] add

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-03-09 Thread Ryosuke Niwa via cfe-commits
@@ -3487,6 +3487,18 @@ Raw pointers and references to an object which supports CheckedPtr or CheckedRef See `WebKit Guidelines for Safer C++ Programming `_ for details. +alpha.webkit.UnretainedLambdaCapturesChecker

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

2025-03-09 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/129396 >From 7620f9fac9932a13f1da0468b02c1aeceb212a0b Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 19 Feb 2025 17:18:20 -0600 Subject: [PATCH 1/6] [HLSL] select scalar overloads for vector conditions Th

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-03-09 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/128651 >From dc53e0602fcec63bdd1bc84325ecc16a3f3e293b Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 24 Feb 2025 23:39:13 -0800 Subject: [PATCH 1/3] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit ch

[clang] a7d5b3f - [HLSL] Disallow virtual inheritance and functions (#127346)

2025-03-09 Thread via cfe-commits
Author: Chris B Date: 2025-03-09T12:18:44-05:00 New Revision: a7d5b3f711b7c852aa1337e329661dd36025865a URL: https://github.com/llvm/llvm-project/commit/a7d5b3f711b7c852aa1337e329661dd36025865a DIFF: https://github.com/llvm/llvm-project/commit/a7d5b3f711b7c852aa1337e329661dd36025865a.diff LOG:

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 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 91aac7c379fb92348593d51e3f2d9e490ff67526 160d719b7ed5997d39accb110df873e6200991d4 --e

[clang] [clang][NFC] Clean up Expr::EvaluateAsConstantExpr (PR #130498)

2025-03-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The Info.EnableNewConstInterp case is already handled above. --- Full diff: https://github.com/llvm/llvm-project/pull/130498.diff 1 Files Affected: - (modified) clang/lib/AST/ExprConstant.cpp (+12-17) `

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-09 Thread Vinay Deshmukh via cfe-commits
vinay-deshmukh wrote: I'm a bit confused about the whole what is not UB/IFNDR in C89, but is in C99. Based on my current understanding the simplest way to resolve the issue seems to what I've done as of: 7572c21 Is not define builtins for symbols available in C89? let me know if that looks

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-09 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: There will be two upcoming patches. 1 - Initializing const array and zero initializing support (Depends on upstreaming `ConstantEmitter` and `ZeroAttr`) 2 - Dynamic-size arrays, and accessing arrays using the `cir.ptr_stride` operation (Depends on upstreaming `CastOp`) ht

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

2025-03-09 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/129396 >From 7620f9fac9932a13f1da0468b02c1aeceb212a0b Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 19 Feb 2025 17:18:20 -0600 Subject: [PATCH 1/5] [HLSL] select scalar overloads for vector conditions Th

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/130502 This change adds the basic support for ArrayType Issue #130197 >From 0b00b1b477f7d81220350669ecb43f87d2667a6d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 9 Mar 2025 19:14:34 +0100 Subject: [PAT

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-09 Thread Matheus Izvekov via cfe-commits
@@ -11363,14 +11363,17 @@ class Sema final : public SemaBase { /// The context in which we are checking a template parameter list. enum TemplateParamListContext { -TPC_ClassTemplate, -TPC_VarTemplate, +// For this context, Class, Variable, TypeAlias, and non-pa

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-09 Thread Younan Zhang via cfe-commits
@@ -11363,14 +11363,17 @@ class Sema final : public SemaBase { /// The context in which we are checking a template parameter list. enum TemplateParamListContext { -TPC_ClassTemplate, -TPC_VarTemplate, +// For this context, Class, Variable, TypeAlias, and non-pa

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-09 Thread Younan Zhang via cfe-commits
@@ -11363,14 +11363,17 @@ class Sema final : public SemaBase { /// The context in which we are checking a template parameter list. enum TemplateParamListContext { -TPC_ClassTemplate, -TPC_VarTemplate, +// For this context, Class, Variable, TypeAlias, and non-pa

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130492)

2025-03-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: * **#130492** https://app.graphite.dev/github/pr/llvm/llvm-project/130492?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/130228 >From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 7 Mar 2025 11:38:11 +0800 Subject: [PATCH 1/3] [Clang] Implement P0963R3 "Structured binding declaration as

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-09 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: > > If this is not set, you need to figure out why it is not using the correct > host compiler. I think it should be using the clang built from the same > sources, which _should_ now support `_Float16` - if it doesn't, this may > cause other problems, potentially even explain

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-09 Thread Younan Zhang via cfe-commits
@@ -11363,14 +11363,17 @@ class Sema final : public SemaBase { /// The context in which we are checking a template parameter list. enum TemplateParamListContext { -TPC_ClassTemplate, -TPC_VarTemplate, +// For this context, Class, Variable, TypeAlias, and non-pa

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

2025-03-09 Thread David Rivera via cfe-commits
@@ -132,11 +132,15 @@ Changes in existing checks ` check by providing additional examples and fixing some macro related false positives. +- Improved :doc:`modernize-use-default-member-init RiverDave wrote: Done https://github.com/llvm/llvm-project/pull/1

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130492)

2025-03-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/130492.diff 9 Files Affected: - (modified) clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp (+103-55) - (modified) cla

[clang] [clang] Reject constexpr-unknown values as constant expressions more consistently (PR #129952)

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

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130492)

2025-03-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 ready_for_review https://github.com/llvm/llvm-project/pull/130492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/130447 >From b225cdcfcb008ffa80b6f48476665980de66eac0 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 8 Mar 2025 20:32:14 -0300 Subject: [PATCH] [clang] fix matching of nested template template parameters W

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/130447 >From 0a41cc6f9e931df2a7dcbcf0ec35b2b7af8ad0d7 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 8 Mar 2025 20:32:14 -0300 Subject: [PATCH] [clang] fix matching of nested template template parameters W

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130492)

2025-03-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/130492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC]clean ConstCorrectnessCheck (PR #130493)

2025-03-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 ready_for_review https://github.com/llvm/llvm-project/pull/130493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-09 Thread via cfe-commits
@@ -11363,14 +11363,17 @@ class Sema final : public SemaBase { /// The context in which we are checking a template parameter list. enum TemplateParamListContext { -TPC_ClassTemplate, -TPC_VarTemplate, +// For this context, Class, Variable, TypeAlias, and non-pa

[clang-tools-extra] [clang-tidy][NFC]clean ConstCorrectnessCheck (PR #130493)

2025-03-09 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: * **#130494** https://app.graphite.dev/github/pr/llvm/llvm-project/130494?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> * **#130493** https://app.graphite.dev/github/pr/llvm/l

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

2025-03-09 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From 08049760b837d026fe9a69b8b6019c6d2bed06b1 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] [clang] fix matching of nested template template parameters (PR #130447)

2025-03-09 Thread Matheus Izvekov via cfe-commits
@@ -11363,14 +11363,17 @@ class Sema final : public SemaBase { /// The context in which we are checking a template parameter list. enum TemplateParamListContext { -TPC_ClassTemplate, -TPC_VarTemplate, +// For this context, Class, Variable, TypeAlias, and non-pa

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130492)

2025-03-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/130492 >From cf55439ce8af415138e618f2d8b4af1180319586 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 9 Mar 2025 16:05:52 + Subject: [PATCH 1/2] [clang-tidy][NFC]clean ConstCorrectnessCheck --- .../cla

[clang-tools-extra] [clang-tidy][NFC]clean ConstCorrectnessCheck (PR #130493)

2025-03-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/130493.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp (+6-8) ``diff dif

[clang-tools-extra] [clang-tidy][NFC]clean ConstCorrectnessCheck (PR #130493)

2025-03-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/130493 None >From cf55439ce8af415138e618f2d8b4af1180319586 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 9 Mar 2025 16:05:52 + Subject: [PATCH] [clang-tidy][NFC]clean ConstCorrectnessCheck --- .../c

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

2025-03-09 Thread David Rivera via cfe-commits
RiverDave wrote: > LGTM, but please address a nit Should be done now, thanks! 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] [HLSL] select scalar overloads for vector conditions (PR #129396)

2025-03-09 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/129396 >From 7620f9fac9932a13f1da0468b02c1aeceb212a0b Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Wed, 19 Feb 2025 17:18:20 -0600 Subject: [PATCH 1/4] [HLSL] select scalar overloads for vector conditions Th

[clang] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (PR #128641)

2025-03-09 Thread Ryosuke Niwa via cfe-commits
@@ -0,0 +1,57 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.NoUnretainedMemberChecker -verify %s + +#include "objc-mock-types.h" + +namespace members { + + struct Foo { + private: +SomeObj* a = nullptr; +// expected-warning@-1{{Member variable 'a' in 'member

[clang] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (PR #128641)

2025-03-09 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/128641 >From a4cd301d6176a8ee3441d0c74f6d2c4e32a50cdd Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 24 Feb 2025 23:01:31 -0800 Subject: [PATCH 1/3] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit chec

[clang] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (PR #128641)

2025-03-09 Thread Ryosuke Niwa via cfe-commits
@@ -3487,6 +3487,19 @@ Raw pointers and references to an object which supports CheckedPtr or CheckedRef See `WebKit Guidelines for Safer C++ Programming `_ for details. +alpha.webkit.NoUnretainedMemberChecker +

[clang] [clang][NFC] Clean up Expr::EvaluateAsConstantExpr (PR #130498)

2025-03-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/130498 The Info.EnableNewConstInterp case is already handled above. >From c3a736fbd6f6844053c31fc4599053d1ed647706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 9 Mar 2025 18:05:48 +0100 Sub

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-03-09 Thread via cfe-commits
Andrewyuan34 wrote: @HerrCai0907 Sorry for requesting your approval again, I really have no experience sending a PR. I appreciate your patience and feedback on my changes. Let me know if there's anything else I should improve. Thanks for your time! 😊 https://github.com/llvm/llvm-project/pu

[clang] Forbid co_await and co_yield in invalid expr contexts (PR #130455)

2025-03-09 Thread via cfe-commits
https://github.com/NewSigma updated https://github.com/llvm/llvm-project/pull/130455 >From 85a40587375533ac8fcd842395c923895c5debaf Mon Sep 17 00:00:00 2001 From: NewSigma Date: Sun, 9 Mar 2025 10:27:24 +0800 Subject: [PATCH 1/2] Fobbid co_await in invalid expr context --- clang/lib/Sema/Sema

[clang] Forbid co_await and co_yield in invalid expr contexts (PR #130455)

2025-03-09 Thread via cfe-commits
NewSigma wrote: Of course. Please feel free to remind me if I forget anything. https://github.com/llvm/llvm-project/pull/130455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix getting pointer element type in __builtin_memcmp (PR #130485)

2025-03-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/130485 When such a pointer is heap allocated, the type we get is a pointer type. Take the pointee type in that case. >From eb19b865be45021df556d5dfa247abfb6e129e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3

[clang] [clang][bytecode] Fix getting pointer element type in __builtin_memcmp (PR #130485)

2025-03-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes When such a pointer is heap allocated, the type we get is a pointer type. Take the pointee type in that case. --- Full diff: https://github.com/llvm/llvm-project/pull/130485.diff 2 Files Affected: - (modi

[clang] [clang][bytecode] Fix getting pointer element type in __builtin_memcmp (PR #130485)

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

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-03-09 Thread Younan Zhang via cfe-commits
@@ -309,6 +309,7 @@ Bug Fixes to AST Handling ^ - Fixed type checking when a statement expression ends in an l-value of atomic type. (#GH106576) - Fixed uninitialized use check in a lambda within CXXOperatorCallExpr. (#GH129198) +- Clang now correctly

[clang] [clang][WebAssembly] Support the `-m(no-)red-zone` flag. (PR #119997)

2025-03-09 Thread Alex Rønne Petersen via cfe-commits
alexrp wrote: @sunfishcode would you mind reviewing this one? (I've pinged a few times here but I'm not sure any of the relevant WASM folks are actually seeing it due to the labels...) https://github.com/llvm/llvm-project/pull/119997 ___ cfe-commits

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-03-09 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/123667 >From 00b8b64879ad3ae35a0a671da563ac876ffaf228 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 20 Jan 2025 22:51:00 +0200 Subject: [PATCH 1/6] [Clang] use constant evaluation context for constexpr if c

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-03-09 Thread Oleksandr T. via cfe-commits
@@ -309,6 +309,7 @@ Bug Fixes to AST Handling ^ - Fixed type checking when a statement expression ends in an l-value of atomic type. (#GH106576) - Fixed uninitialized use check in a lambda within CXXOperatorCallExpr. (#GH129198) +- Clang now correctly

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-03-09 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/123667 >From 00b8b64879ad3ae35a0a671da563ac876ffaf228 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 20 Jan 2025 22:51:00 +0200 Subject: [PATCH 1/7] [Clang] use constant evaluation context for constexpr if c

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-03-09 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/128651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Disallow virtual inheritance and functions (PR #127346)

2025-03-09 Thread Chris B via cfe-commits
@@ -1817,5 +1817,9 @@ def ext_hlsl_access_specifiers : ExtWarn< InGroup; def err_hlsl_unsupported_component : Error<"invalid component '%0' used; expected 'x', 'y', 'z', or 'w'">; def err_hlsl_packoffset_invalid_reg : Error<"invalid resource class specifier '%0' for packoff

[clang] [HLSL] Disallow virtual inheritance and functions (PR #127346)

2025-03-09 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/127346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-03-09 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/128651 >From dc53e0602fcec63bdd1bc84325ecc16a3f3e293b Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 24 Feb 2025 23:39:13 -0800 Subject: [PATCH 1/3] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit ch

[clang] [HLSL] Disallow virtual inheritance and functions (PR #127346)

2025-03-09 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` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/13464 Here is the relevant pie

[clang] [clang] Fix typos in options text. (PR #130129)

2025-03-09 Thread Ryan Mansfield via cfe-commits
https://github.com/rjmansfield created https://github.com/llvm/llvm-project/pull/130129 None >From 1e3acaedf9e6a163c737c7ae279339be8d2ec7bc Mon Sep 17 00:00:00 2001 From: Ryan Mansfield Date: Thu, 6 Mar 2025 11:03:22 -0500 Subject: [PATCH] [clang] Fix typos in options text. --- clang/include

[clang] [llvm] [Support] Remove output file checks from `LockFileManager` (PR #130395)

2025-03-09 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm. This makes a lot more sense. https://github.com/llvm/llvm-project/pull/130395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] Fix mtp (PR #130022)

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

[clang] [clang][bytecode] Implement __builtin_{memchr,strchr,char_memchr} (PR #130420)

2025-03-09 Thread Nikolas Klauser via cfe-commits
@@ -1960,13 +1960,103 @@ static bool interp__builtin_memcmp(InterpState &S, CodePtr OpPC, // However, if we read all the available bytes but were instructed to read // even more, diagnose this as a "read of dereferenced one-past-the-end - // pointer". This is what would

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-03-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: This needs a rebase, I believe because of one of my patches. Just remove the call to 'S.NoteTemplateParameterLocation(*ParamD);', since that note is now emitted automatically. https://github.com/llvm/llvm-project/pull/122754 __

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-03-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-03-09 Thread Matheus Izvekov via cfe-commits
@@ -35,31 +35,27 @@ namespace ConstDestruction { constexpr ~D() { if (!can_destroy) -throw "oh no"; // expected-note {{subexpression not valid}} +throw "oh no"; } }; - template - void f() {} // expected-note 2{{invalid explicitly-specified

[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-09 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM, few nits https://github.com/llvm/llvm-project/pull/129406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-09 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/130458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0f73248 - [clang][bytecode] Fix getting pointer element type in __builtin_memcmp (#130485)

2025-03-09 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-09T12:57:42+01:00 New Revision: 0f732481acccb3ac22b70e326feae854cf972126 URL: https://github.com/llvm/llvm-project/commit/0f732481acccb3ac22b70e326feae854cf972126 DIFF: https://github.com/llvm/llvm-project/commit/0f732481acccb3ac22b70e326feae854cf972126.diff L

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-03-09 Thread Matheus Izvekov via cfe-commits
@@ -3572,10 +3572,17 @@ TemplateDeductionResult Sema::SubstituteExplicitTemplateArguments( SugaredBuilder, CanonicalBuilder, /*UpdateArgsWithConversions=*/false) || Trap.hasErrorOccurred()) { + unsigned

[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-09 Thread Baranov Victor via cfe-commits
@@ -25,6 +25,14 @@ transforms to: inline auto f2(int arg) -> int noexcept; virtual auto f3() const && -> float = delete; +Options +--- + +.. option:: WarnOnNontrailingVoid + + If the option is set to `true`, the check will apply even to function signatures --

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

2025-03-09 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping @HerrCai0907, could you please address https://github.com/llvm/llvm-project/pull/121291#issuecomment-2702153354. Thank you! Can I ask someone to grant me write access to repository? Since you basically the only one who merges PRs of other people, this could lower amount of

[clang] Forbid co_await and co_yield in invalid expr contexts (PR #130455)

2025-03-09 Thread via cfe-commits
cor3ntin wrote: Can you add some tests? Thanks! https://github.com/llvm/llvm-project/pull/130455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Forbid co_await and co_yield in invalid expr contexts (PR #130455)

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

[clang] [clang][analyzer][NFC] Fix typos in comments (PR #130456)

2025-03-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ben Shi (benshi001) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/130456.diff 6 Files Affected: - (modified) clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h (+3-3) - (modifi

[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-09 Thread Baranov Victor via cfe-commits
@@ -1,4 +1,12 @@ -// RUN: %check_clang_tidy -std=c++14-or-later %s modernize-use-trailing-return-type %t -- -- -fdeclspec -fexceptions -DCOMMAND_LINE_INT=int +// RUN: %check_clang_tidy \ +// RUN: -std=c++14-or-later %

[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-09 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/129406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] 'modernize-use-starts-ends-with': fixed false positives on `find` and `rfind` (PR #129564)

2025-03-09 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/129564 >From c3f21bb654d2980955f2c37a5dc7a02a1ced7891 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 3 Mar 2025 21:00:32 +0300 Subject: [PATCH 1/6] [clang-tidy] fixed false positives on find and rfind ---

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

2025-03-09 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. LGTM 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] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-09 Thread Yanzuo Liu via cfe-commits
@@ -8361,6 +8361,17 @@ class ExprEvaluatorBase return false; } +// If an assertion fails during constant evaluation, give a specific note explaining that +if (FD->getName() == "__assert_fail") { zwuis wrote: The name of corresponding func

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-09 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: Thank you for the patch! You should add a release note in clang/docs/ReleaseNotes.rst so that users can know the improvement. https://github.com/llvm/llvm-project/pull/130458 ___ cfe-commits mailing list cfe-commits

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/130228 >From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 7 Mar 2025 11:38:11 +0800 Subject: [PATCH 1/2] [Clang] Implement P0963R3 "Structured binding declaration as

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-09 Thread Younan Zhang via cfe-commits
@@ -4285,6 +4290,8 @@ class DecompositionDecl final std::move(Bindings)); } + bool isDecisionVariable() const { return IsDecisionVariable; } zyn0217 wrote: Done, I was referring to https://eel.is/c++draft/dcl.str

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-09 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/130228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-09 Thread Jonas Paulsson via cfe-commits
@@ -0,0 +1,27 @@ +//===-- lib/extendhfdf2.c - half -> single conversion -*- 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] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-03-09 Thread Trevor Gross via cfe-commits
tgross35 wrote: > > By the way, these sites are pretty helpful for double checking float reprs > > https://float.exposed https://weitz.de/ieee/. > > I tried float.exposed but I couldn't really convert an f16 hex to a double > hex. Is it supposed to be able to do this? It should, on the `half`

[clang] [HLSL] Disallow virtual inheritance and functions (PR #127346)

2025-03-09 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux-lnt` running on `systemz-1` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/136/builds/3085 Here is the relevant piece of the build

[clang-tools-extra] added Conflicting Global Accesses checker (PR #130421)

2025-03-09 Thread via cfe-commits
https://github.com/ConcreteCactus updated https://github.com/llvm/llvm-project/pull/130421 >From 290d0db1ddad65a4162bca367dd0807c039d8a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ron=20H=C3=A1rn=C3=A1si?= Date: Fri, 22 Nov 2024 21:43:04 +0100 Subject: [PATCH] Added Conflicting Global Acce

[clang] [flang] [lldb] [llvm] [mlir] [polly] [IR] Store Triple in Module (NFC) (PR #129868)

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

  1   2   >