[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/117473 >From 95f2b6b0742b9b5b675f5d2f24aa4eb90c03b18c Mon Sep 17 00:00:00 2001 From: c8ef Date: Sun, 24 Nov 2024 18:14:51 +0800 Subject: [PATCH 1/4] constexpr elementwise popcount --- clang/docs/ReleaseNotes.rst

[clang-tools-extra] [clang-tidy] fix cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)

2024-11-24 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/116591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)

2024-11-24 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Consider just changing default value of WarnOnIntegerNarrowingConversion option. https://github.com/llvm/llvm-project/pull/116591 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [Sema] Migrate away from PointerUnion::{is, get} (NFC) (PR #117498)

2024-11-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/117498 Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast I'm not touching

[libunwind] [libunwind] Fix compilation for the x32 ABI. (PR #116608)

2024-11-24 Thread Alex Rønne Petersen via cfe-commits
https://github.com/alexrp updated https://github.com/llvm/llvm-project/pull/116608 From 23a2f6900fb838ffdbad177839d3f2da6d5cf52f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 18 Nov 2024 13:12:30 +0100 Subject: [PATCH] [libunwind] Fix compilation for the x32

[clang] [AST] Remove clang/AST/CommentDiagnostic.h (PR #117499)

2024-11-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/117499 Since: commit d076608d58d1ec55016eb747a995511e3a3f72aa Author: Richard Trieu Date: Sat Dec 8 05:05:03 2018 + clang/AST/CommentDiagnostic.h has been forwarding to clang/Basic/DiagnosticParse.

[clang] [AST] Remove clang/AST/CommentDiagnostic.h (PR #117499)

2024-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Since: commit d076608d58d1ec55016eb747a995511e3a3f72aa Author: Richard Trieu Date: Sat Dec 8 05:05:03 2018 + clang/AST/CommentDiagnostic.h has been forwarding to clang/B

[clang-tools-extra] [clang-tidy] fix false positive use-internal-linkage for func decl without body (PR #117490)

2024-11-24 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/117490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][analysis] refactor the unevaluated api (PR #117474)

2024-11-24 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/117474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-24 Thread Andrew Pinski via cfe-commits
pinskia wrote: >From my point of view this looks like a decent documentation of this >extension. Note I filed the original bug because I noticed both GCC and clang >didn't document this extension. (I filed GCC here: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117689 which I got try fix next

[clang] [Wunsafe-buffer-usage] Fix false positives in handling array indices that are decidably correct (PR #117370)

2024-11-24 Thread via cfe-commits
https://github.com/mxms0 updated https://github.com/llvm/llvm-project/pull/117370 >From 8fed333cf4221dbf1826351da80164db5d209c21 Mon Sep 17 00:00:00 2001 From: mxms Date: Fri, 22 Nov 2024 15:09:07 -0500 Subject: [PATCH 1/5] [Wunsafe-buffer-usage] Fix false positives in handling enums Do not w

[clang] [Wunsafe-buffer-usage] Address some positives in handling array indices that are decidably correct (PR #117370)

2024-11-24 Thread via cfe-commits
https://github.com/mxms0 edited https://github.com/llvm/llvm-project/pull/117370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Pass `--no-cuda-version-check` to test (PR #117415)

2024-11-24 Thread Kai Luo via cfe-commits
https://github.com/bzEq edited https://github.com/llvm/llvm-project/pull/117415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SanitizerCoverage] Add gated tracing callbacks support to trace-cmp (PR #113227)

2024-11-24 Thread via cfe-commits
https://github.com/thetruestblue updated https://github.com/llvm/llvm-project/pull/113227 >From 5dbb79145b669e2478b61402fa95fed0385c6a95 Mon Sep 17 00:00:00 2001 From: thetruestblue <92476612+thetruestb...@users.noreply.github.com> Date: Fri, 22 Nov 2024 14:57:40 -0800 Subject: [PATCH] [Sanitize

[clang] [llvm] [SanitizerCoverage] Add gated tracing callbacks support to trace-cmp (PR #113227)

2024-11-24 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 e26af0938c7a272cf0de11c92aa069485868e130 7c771b793b36e5c8d0d8d4963d0356123054e9e4 --e

[clang] [clang] hexagon: fix link order for libc/builtins (PR #117057)

2024-11-24 Thread Brian Cain via cfe-commits
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/117057 >From 8ec280dc6c15d7279afe332615497704739aee63 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Wed, 20 Nov 2024 13:23:39 -0800 Subject: [PATCH] [clang] hexagon: fix link order for libc/builtins When linking p

[clang] [Wunsafe-buffer-usage] Address some false positives in handling array indices that are decidably correct (PR #117370)

2024-11-24 Thread via cfe-commits
https://github.com/mxms0 edited https://github.com/llvm/llvm-project/pull/117370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement SV_GroupID semantic (PR #115911)

2024-11-24 Thread Zhengxing li via cfe-commits
https://github.com/lizhengxing updated https://github.com/llvm/llvm-project/pull/115911 >From 6418461717614d5879688d32a0ab9bf9d9137328 Mon Sep 17 00:00:00 2001 From: Zhengxing Li Date: Tue, 1 Oct 2024 15:13:34 -0700 Subject: [PATCH 1/4] [HLSL] Implement SV_GroupID semantic Support SV_GroupID a

[clang] [HLSL] Implement SV_GroupID semantic (PR #115911)

2024-11-24 Thread Zhengxing li via cfe-commits
@@ -784,6 +785,17 @@ void SemaHLSL::handleSV_DispatchThreadIDAttr(Decl *D, const ParsedAttr &AL) { HLSLSV_DispatchThreadIDAttr(getASTContext(), AL)); } +void SemaHLSL::handleSV_GroupIDAttr(Decl *D, const ParsedAttr &AL) { + auto *VD = cast(D); + if (!isLega

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-24 Thread Aidan Goldfarb via cfe-commits
AidanGoldfarb wrote: ping @pinskia @AaronBallman https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Move isLocal AST matcher to ASTMatchers for reusability (PR #117521)

2024-11-24 Thread Marie Zhussupova via cfe-commits
https://github.com/phychee created https://github.com/llvm/llvm-project/pull/117521 Fixes #<117431> >From ee0c3b11c93dc8d95f521cda7c2ac9acc7c184f7 Mon Sep 17 00:00:00 2001 From: Marie Zhussupova <102762019+phyc...@users.noreply.github.com> Date: Sun, 24 Nov 2024 22:45:11 -0600 Subject: [PATCH]

[clang] [clang-tools-extra] Move isLocal AST matcher to ASTMatchers for reusability (PR #117521)

2024-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Marie Zhussupova (phychee) Changes Fixes #<117431> --- Full diff: https://github.com/llvm/llvm-project/pull/117521.diff 2 Files Affected: - (modified) clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.cpp (-3) - (modified) c

[clang] [clang-tools-extra] Move isLocal AST matcher to ASTMatchers for reusability (PR #117521)

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

[clang] [clang-tools-extra] Move isLocal AST matcher to ASTMatchers for reusability (PR #117521)

2024-11-24 Thread Marie Zhussupova via cfe-commits
https://github.com/phychee edited https://github.com/llvm/llvm-project/pull/117521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-24 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli edited https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aidan Goldfarb (AidanGoldfarb) Changes This PR addresses #116880 Updated [LanguageExtensions.rst](https://github.com/llvm/llvm-project/blob/main/clang/docs/LanguageExtensions.rst) to include support for C++11 enumerations with a fixed u

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb ready_for_review https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-11-24 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114062 >From d2d2d3d5db3f639aab178f9ca9a20db2842d2b65 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 29 Oct 2024 14:20:44 + Subject: [PATCH 01/11] `sret` args should always point to the `alloca` AS, so we ca

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-11-24 Thread Alex Voicu via cfe-commits
@@ -5158,14 +5155,17 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, } else if (!ReturnValue.isNull()) { SRetPtr = ReturnValue.getAddress(); } else { - SRetPtr = CreateMemTemp(RetTy, "tmp", &SRetAlloca); + SRetPtr = CreateMemTempWith

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-24 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114481 >From 3ba88ce598aaab269169f0a5db5981c9a9ac8603 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 31 Oct 2024 22:38:36 + Subject: [PATCH 01/11] Add pass to handle AMDGCN pseudo-intrinsics (abstract placeh

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-11-24 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: As I prepared a piece of code which makes the `-l` flags being treated properly when read from a config file (so it won't result in unresolved symbols e.g. when used with `-static`), I realized that going the config file way still creates a problem: with `-fveclib=ArmPL -lama

[clang] [PAC][Driver] Add `-faarch64-jump-table-hardening` flag (PR #113149)

2024-11-24 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/113149 >From 06b865d888142acf2c7a66ea487a14f34169 Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Mon, 21 Oct 2024 11:32:02 +0300 Subject: [PATCH] [PAC][clang] Add `-faarch64-jump-table-hardening` driver flag

[clang-tools-extra] e3aafe4 - [clang-tidy] fix false positive use-internal-linkage for func decl without body (#117490)

2024-11-24 Thread via cfe-commits
Author: Congcong Cai Date: 2024-11-25T06:46:10+08:00 New Revision: e3aafe407af36f580148d3ceccd1aa13a490f7c9 URL: https://github.com/llvm/llvm-project/commit/e3aafe407af36f580148d3ceccd1aa13a490f7c9 DIFF: https://github.com/llvm/llvm-project/commit/e3aafe407af36f580148d3ceccd1aa13a490f7c9.diff

[clang] ae20dbd - [clang][analysis] refactor the unevaluated api (#117474)

2024-11-24 Thread via cfe-commits
Author: Congcong Cai Date: 2024-11-25T06:46:47+08:00 New Revision: ae20dbdd63d97c342b89a72e9e839556d0deed07 URL: https://github.com/llvm/llvm-project/commit/ae20dbdd63d97c342b89a72e9e839556d0deed07 DIFF: https://github.com/llvm/llvm-project/commit/ae20dbdd63d97c342b89a72e9e839556d0deed07.diff

[clang] [clang-tools-extra] [clang][analysis] refactor the unevaluated api (PR #117474)

2024-11-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/117474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC]add static for internal linkage function (PR #117482)

2024-11-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/117482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3c344f9 - [clang][tablegen][NFC]add static for internal linkage function (#117479)

2024-11-24 Thread via cfe-commits
Author: Congcong Cai Date: 2024-11-25T06:48:09+08:00 New Revision: 3c344f92e62ac07faf5df68d73ad765b11f465f2 URL: https://github.com/llvm/llvm-project/commit/3c344f92e62ac07faf5df68d73ad765b11f465f2 DIFF: https://github.com/llvm/llvm-project/commit/3c344f92e62ac07faf5df68d73ad765b11f465f2.diff

[clang] [clang][tablegen][NFC]add static for internal linkage function (PR #117479)

2024-11-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/117479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cbdd14e - [clang][NFC]add static for internal linkage function (#117482)

2024-11-24 Thread via cfe-commits
Author: Congcong Cai Date: 2024-11-25T06:48:33+08:00 New Revision: cbdd14ee9de72c277d9f89a6aa57c54a495f5458 URL: https://github.com/llvm/llvm-project/commit/cbdd14ee9de72c277d9f89a6aa57c54a495f5458 DIFF: https://github.com/llvm/llvm-project/commit/cbdd14ee9de72c277d9f89a6aa57c54a495f5458.diff

[clang-tools-extra] [clang-tidy] Fix false positive in cppcoreguidelines-avoid-const-or-ref-data-members when detecting templated classes with inheritance (PR #115180)

2024-11-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/115180 ___ 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] fix release note order (PR #117484)

2024-11-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vla-2stage` running on `linaro-g3-04` while building `clang-tools-extra` at step 11 "build stage 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/41/builds/3669 Here is the relev

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-11-24 Thread via cfe-commits
yronglin wrote: Thanks for your review! The latest update add a RecoveryExpr for invalid in-class-initializer. But I have some concerns about the inconsistency between `RecordDecl::hasInClassInitializer()` and `FieldDecl::hasInClassInitializer()`. FieldDecl has a method `removeInClassInitial

[clang] [Sema] Migrate away from PointerUnion::{is, get} (NFC) (PR #117498)

2024-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with //isa, cast and the llvm::dyn_cast I'm n

[clang-tools-extra] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer (PR #66810)

2024-11-24 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Actually only thing that were missing were example. Added test. I'm not adding release notes as this is crash on invalid anyway, and I don't want to add multiple entrys, as this impact multiple checks. https://github.com/llvm/llvm-project/pull/66810 _

[clang-tools-extra] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer (PR #66810)

2024-11-24 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-24 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-24 Thread Julian Schmidt via cfe-commits
@@ -240,6 +240,9 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { ReplacementFunction->getName()); // Replace arguments and everything after the function call. + if (FindExpr->getNumArgs() == 0) { +r

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-24 Thread Julian Schmidt via cfe-commits
@@ -183,40 +210,47 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang-tools-extra] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer (PR #66810)

2024-11-24 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/66810 >From c808abe4dcba2a523552863bf7a32736e6bbbc37 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Tue, 19 Sep 2023 19:05:00 + Subject: [PATCH] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer N

[clang-tools-extra] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer (PR #66810)

2024-11-24 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-24 Thread Julian Schmidt via cfe-commits
@@ -102,6 +102,210 @@ void BranchCloneCheck::registerMatchers(MatchFinder *Finder) { this); Finder->addMatcher(switchStmt().bind("switch"), this); Finder->addMatcher(conditionalOperator().bind("condOp"), this); + Finder->addMatcher(ifStmt(hasDescendant(ifStmt())).b

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-24 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/114715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-24 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/114715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-24 Thread Joseph Huber via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-24 Thread Congcong Cai via cfe-commits
@@ -102,6 +102,211 @@ void BranchCloneCheck::registerMatchers(MatchFinder *Finder) { this); Finder->addMatcher(switchStmt().bind("switch"), this); Finder->addMatcher(conditionalOperator().bind("condOp"), this); + Finder->addMatcher( + ifStmt((hasThen(hasDescend

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-24 Thread Congcong Cai via cfe-commits
@@ -102,6 +102,211 @@ void BranchCloneCheck::registerMatchers(MatchFinder *Finder) { this); Finder->addMatcher(switchStmt().bind("switch"), this); Finder->addMatcher(conditionalOperator().bind("condOp"), this); + Finder->addMatcher( + ifStmt((hasThen(hasDescend

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/114715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] __riscv_v_intrinsic macro doesn't need zve32x (PR #117356)

2024-11-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/117356 ___ 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 recursion protection in ExceptionSpecAnalyzer (PR #66810)

2024-11-24 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti commented: > Being totally unfamiliar with the code, I have a feeling that we shouldn't be > fixing in the analyze function. analyze has 1 single responsibility: wrap > `analyzeImpl` in order to add cacheability for performance reasons, it does > so simply and well,

[clang] [clang][sema] (PR #117507)

2024-11-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] (PR #117507)

2024-11-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/117507 >From a6c9b5ca52f35fe451a52c590ce93584c2b4f3ac Mon Sep 17 00:00:00 2001 From: Aidan Goldfarb <47676355+aidangoldf...@users.noreply.github.com> Date: Fri, 22 Nov 2024 19:06:29 -0500 Subject: [PATCH 1/3] Upda

[clang] [clang][sema] (PR #117507)

2024-11-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] (PR #117507)

2024-11-24 Thread Justin Fargnoli via cfe-commits
@@ -121,6 +121,17 @@ int NegativeShortTest[NegativeShort == -1 ? 1 : -1]; enum Color { Red, Green, Blue }; // expected-note{{previous use is here}} typedef struct Color NewColor; // expected-error {{use of 'Color' with tag type that does not match previous declaration}} +// E

[clang] [clang][sema] (PR #117507)

2024-11-24 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli commented: Add a title. And welcome to the LLVM community :) https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [clang][sema] (PR #117507)

2024-11-24 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli edited https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-11-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/117507 >From a6c9b5ca52f35fe451a52c590ce93584c2b4f3ac Mon Sep 17 00:00:00 2001 From: Aidan Goldfarb <47676355+aidangoldf...@users.noreply.github.com> Date: Fri, 22 Nov 2024 19:06:29 -0500 Subject: [PATCH 1/4] Upda

[clang-tools-extra] [clang-tidy] Fix false positive in cppcoreguidelines-avoid-const-or-ref-data-members when detecting templated classes with inheritance (PR #115180)

2024-11-24 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/115180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] (PR #117507)

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

[clang] [clang][sema] (PR #117507)

2024-11-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb created https://github.com/llvm/llvm-project/pull/117507 This PR addresses #116880 Updated [LanguageExtensions.rst](https://github.com/llvm/llvm-project/blob/main/clang/docs/LanguageExtensions.rst) to include support for C++11 enumerations with a fixed underl

[clang] [Wunsafe-buffer-usage] Fix false positives in handling array indices that are decidably correct (PR #117370)

2024-11-24 Thread via cfe-commits
https://github.com/mxms0 updated https://github.com/llvm/llvm-project/pull/117370 >From 8fed333cf4221dbf1826351da80164db5d209c21 Mon Sep 17 00:00:00 2001 From: mxms Date: Fri, 22 Nov 2024 15:09:07 -0500 Subject: [PATCH 1/4] [Wunsafe-buffer-usage] Fix false positives in handling enums Do not w

[clang] [llvm] [LoongArch] Support LA V1.1 feature ld-seq-sa that don't generate dbar 0x700. (PR #116762)

2024-11-24 Thread Lu Weining via cfe-commits
@@ -2011,8 +2011,9 @@ const StringMap sys::getHostCPUFeatures() { const StringMap sys::getHostCPUFeatures() { unsigned long hwcap = getauxval(AT_HWCAP); bool HasFPU = hwcap & (1UL << 3); // HWCAP_LOONGARCH_FPU - uint32_t cpucfg2 = 0x2; + const uint32_t cpucfg2 = 0x2, cpuc

[clang] [llvm] [LoongArch] Support LA V1.1 feature ld-seq-sa that don't generate dbar 0x700. (PR #116762)

2024-11-24 Thread Lu Weining via cfe-commits
@@ -2011,8 +2011,9 @@ const StringMap sys::getHostCPUFeatures() { const StringMap sys::getHostCPUFeatures() { unsigned long hwcap = getauxval(AT_HWCAP); bool HasFPU = hwcap & (1UL << 3); // HWCAP_LOONGARCH_FPU - uint32_t cpucfg2 = 0x2; + const uint32_t cpucfg2 = 0x2, cpuc

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread via cfe-commits
@@ -797,3 +797,8 @@ static_assert(__builtin_reduce_xor((vector4int){(int)0x, (int)0x static_assert(__builtin_reduce_xor((vector4long){(long long)0xL, (long long)0xL, (long long)0xL, (long long)0xL}

[clang] [clang-tools-extra] [clang][analysis] refactor the unevaluated api (PR #117474)

2024-11-24 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/117474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][tablegen][NFC]add static for internal linkage function (PR #117479)

2024-11-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/117479 Detected by misc-use-internal-linkage >From c3c37db297c2db4e8e4d8009e30819cdabf05df8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 24 Nov 2024 19:42:51 +0800 Subject: [PATCH] [clang][tablegen][NFC

[clang] [clang][tablegen][NFC]add static for internal linkage function (PR #117479)

2024-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Congcong Cai (HerrCai0907) Changes Detected by misc-use-internal-linkage --- Full diff: https://github.com/llvm/llvm-project/pull/117479.diff 2 Files Affected: - (modified) clang/utils/TableGen/ClangASTNodesEmitter.cpp (+3-2) - (modif

[clang] [Clang][Driver] report unsupported option error when link + compile in same process (PR #116476)

2024-11-24 Thread Reno Dakota via cfe-commits
https://github.com/paparodeo edited https://github.com/llvm/llvm-project/pull/116476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false positive use-internal-linkage for func decl without body (PR #117490)

2024-11-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/117490 If in one TU, function only have declaration without body, this function should be external linkage. Fixed #117488 >From a1f2a6523c69bf09f39e478a8108a621ba959c20 Mon Sep 17 00:00:00 2001 From: Congcong Cai

[clang] [Clang][Driver] report unsupported option error when link + compile in same process (PR #116476)

2024-11-24 Thread Reno Dakota via cfe-commits
paparodeo wrote: Ping https://github.com/llvm/llvm-project/pull/116476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false positive use-internal-linkage for func decl without body (PR #117490)

2024-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes If in one TU, function only have declaration without body, this function should be external linkage. Fixed #117488 --- Full diff: https://github.com/llvm/llvm-project/pull/117490.diff 4 Files Aff

[clang] [clang][NFC]add static for internal linkage function (PR #117482)

2024-11-24 Thread via cfe-commits
https://github.com/Sirraide approved this pull request. https://github.com/llvm/llvm-project/pull/117482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [unwind] Make sure `__STDC_FORMAT_MACROS` is defined to ensure `PRId64` is available (PR #117491)

2024-11-24 Thread via cfe-commits
https://github.com/Zentrik edited https://github.com/llvm/llvm-project/pull/117491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [unwind] Make sure `__STDC_FORMAT_MACROS` is defined to ensure `PRId6… (PR #117491)

2024-11-24 Thread via cfe-commits
https://github.com/Zentrik created https://github.com/llvm/llvm-project/pull/117491 …4` is available See https://github.com/llvm/llvm-project/pull/102980 for further details. >From 65a74d7dd7ef066430f2cf327d0a9ac5aa3adbe9 Mon Sep 17 00:00:00 2001 From: Zentrik Date: Sun, 24 Nov 2024 14:44:17

[libunwind] [unwind] Make sure `__STDC_FORMAT_MACROS` is defined to ensure `PRId6… (PR #117491)

2024-11-24 Thread via cfe-commits
https://github.com/Zentrik edited https://github.com/llvm/llvm-project/pull/117491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Make sure `__STDC_FORMAT_MACROS` is defined to ensure `PRId64` is available (PR #117491)

2024-11-24 Thread via cfe-commits
https://github.com/Zentrik edited https://github.com/llvm/llvm-project/pull/117491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: `__builtin_elementwise_popcount` can be used with a scalar value - please test that as well https://github.com/llvm/llvm-project/pull/117473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/117473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in elementwise popcount function. (PR #117473)

2024-11-24 Thread Simon Pilgrim via cfe-commits
@@ -797,3 +797,8 @@ static_assert(__builtin_reduce_xor((vector4int){(int)0x, (int)0x static_assert(__builtin_reduce_xor((vector4long){(long long)0xL, (long long)0xL, (long long)0xL, (long long)0xL}

[libunwind] [libunwind] Make sure `__STDC_FORMAT_MACROS` is defined to ensure `PRId64` is available (PR #117491)

2024-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: None (Zentrik) Changes See https://github.com/llvm/llvm-project/pull/102980 for further details. --- Full diff: https://github.com/llvm/llvm-project/pull/117491.diff 1 Files Affected: - (modified) libunwind/src/DwarfParser.hpp (+4)

[clang] [Clang-REPL] Fix crash during `__run_exit_handlers` with dynamic libraries. (PR #117475)

2024-11-24 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: It is worth adding a test here. https://github.com/llvm/llvm-project/pull/117475 ___ 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] fix release note order (PR #117484)

2024-11-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/117484 None >From 35938c24d9adf12ef6276dd3c7fb25ab1f40c33c Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 24 Nov 2024 21:46:13 +0800 Subject: [PATCH] [clang-tidy][NFC] fix release note order --- clang-to

[clang-tools-extra] 0c21ed4 - [clang-tidy][NFC] fix release note order (#117484)

2024-11-24 Thread via cfe-commits
Author: Congcong Cai Date: 2024-11-24T21:46:39+08:00 New Revision: 0c21ed48f40b2a6e3aa7e5d1873cf2455e847786 URL: https://github.com/llvm/llvm-project/commit/0c21ed48f40b2a6e3aa7e5d1873cf2455e847786 DIFF: https://github.com/llvm/llvm-project/commit/0c21ed48f40b2a6e3aa7e5d1873cf2455e847786.diff

[clang-tools-extra] [clang-tidy][NFC] fix release note order (PR #117484)

2024-11-24 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/117484.diff 1 Files Affected: - (modified) clang-tools-extra/docs/ReleaseNotes.rst (+4-4) ``diff diff --git a/clang-tool

[clang-tools-extra] [clang-tidy][NFC] fix release note order (PR #117484)

2024-11-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/117484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-11-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes Essentially, this pr makes this ill-formed: ```c++ using mat4 = _BitInt(12) [[clang::matrix_type(3, 3)]]; ``` This matches preexisting behaviour for vector types (e.g. `ext_vector_type`), and given that LLVM IR int

[clang] [Clang] [Sema] Reject non-power-of-2 `_BitInt` matrix element types (PR #117487)

2024-11-24 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/117487 Essentially, this pr makes this ill-formed: ```c++ using mat4 = _BitInt(12) [[clang::matrix_type(3, 3)]]; ``` This matches preexisting behaviour for vector types (e.g. `ext_vector_type`), and given that LLVM I

[clang-tools-extra] [clang-tidy] Fix false positive in cppcoreguidelines-avoid-const-or-ref-data-members when detecting templated classes with inheritance (PR #115180)

2024-11-24 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/115180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix an assertion failure in RemoveSemicolon (PR #117472)

2024-11-24 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/117472 Fixes #117290. >From 9a2a93fbb50163e593f6b48a279bea9f70424c06 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 24 Nov 2024 00:43:29 -0800 Subject: [PATCH] [clang-format] Fix an assertion failure in RemoveSemic

  1   2   >