[clang] [analyzer] WebKit checkers: support ref and deref defined on different classes. (PR #68170)

2023-10-20 Thread Ryosuke Niwa via cfe-commits
@@ -44,9 +46,25 @@ bool hasPublicRefAndDeref(const CXXRecordDecl *R) { namespace clang { -std::optional -isRefCountable(const CXXBaseSpecifier* Base) -{ +std::optional +hasPublicRefInBase(const CXXBaseSpecifier *Base) { + assert(Base); + + const Type *T = Base->getType().ge

[clang] Fix build warning caused by mixed signed/unsigned compare (PR #69797)

2023-10-20 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/69797 None >From 856a471b40f19f5fcf6aab7591009555b6a3841f Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 20 Oct 2023 12:33:51 -0700 Subject: [PATCH 1/2] Update SimplifyIndVar.cpp In SimplifyIndvar::replaceF

[clang] Fix build warning caused by mixed signed/unsigned compare (PR #69797)

2023-10-20 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/69797 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-10-20 Thread Alexander Richardson via cfe-commits
arichardson wrote: Debugging shows that the reason this is failing on the clang-cl bots is that the CMAKE_CXX_FLAGS_INIT are using the MSVC syntax but we pass --driver-mode=g++ explicitly: ``` lit: C:\ws\src\libcxx\utils\libcxx\test\format.py:55: note: Command ["'C:/Program Files/LLVM/bin/cla

[libunwind] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-10-20 Thread Alexander Richardson via cfe-commits
@@ -45,10 +45,10 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', -'-nostdinc++ -I %{include} -I %{libcxx}/test/support' +'@CMAKE_CXX_FLAGS_

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-20 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Thanks, this looks good to me other than a small test coverage (see comment) / diagnostic wording issue. (For future reference, please don't force-push to PR branches; that makes it much harder for your reviewer to see what's changed since their last revi

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-20 Thread Richard Smith via cfe-commits
@@ -140,11 +140,12 @@ void g28(void) { typedef short v12i16 __attribute((vector_size(24))); typedef long double v2f80 __attribute((vector_size(24))); // CHECK: @g28.a = internal global <1 x i64> - // CHECK: @g28.b = internal global <12 x i16> - // CHECK: @g28.c = inte

[clang-tools-extra] [clang-tidy] Support functional cast in bugprone-dangling-handle (PR #69067)

2023-10-20 Thread Congcong Cai via cfe-commits
@@ -33,14 +33,19 @@ handleFrom(const ast_matchers::internal::Matcher &IsAHandle, ast_matchers::internal::Matcher handleFromTemporaryValue( const ast_matchers::internal::Matcher &IsAHandle) { + + const auto TemporaryExpr = + anyOf(cxxBindTemporaryExpr(), +

[clang] [libc++] Implement ranges::contains (PR #65148)

2023-10-20 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/16] [libc++] Implement ranges::contains Differential Revision

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-20 Thread Owen Pan via cfe-commits
=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= Message-ID: In-Reply-To: @@ -1118,16 +1121,39 @@ void WhitespaceManager::alignTrailingComments() { } } -// We don't want to align namespace end comments. -const bool DontAlignThisComment = -I > 0 && C.NewlinesBe

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-20 Thread Owen Pan via cfe-commits
=?utf-8?q?Björn_Schäpers?= Message-ID: In-Reply-To: @@ -1118,16 +1121,39 @@ void WhitespaceManager::alignTrailingComments() { } } -// We don't want to align namespace end comments. -const bool DontAlignThisComment = -I > 0 && C.NewlinesBefore == 0

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-20 Thread Owen Pan via cfe-commits
=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= Message-ID: In-Reply-To: @@ -1118,16 +1121,39 @@ void WhitespaceManager::alignTrailingComments() { } } -// We don't want to align namespace end comments. -const bool DontAlignThisComment = -I > 0 && C.NewlinesBe

[clang] [flang][driver] support -dumpversion and -dumpmachine (PR #68896)

2023-10-20 Thread Yuanfang Chen via cfe-commits
https://github.com/yuanfang-chen updated https://github.com/llvm/llvm-project/pull/68896 >From db72a97acc7fd5a517b5ccd525fcf8a7b714fa29 Mon Sep 17 00:00:00 2001 From: Yuanfang Chen Date: Sat, 21 Oct 2023 01:18:47 + Subject: [PATCH] [flang][driver] support -dumpversion and -dumpmachine Matc

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-20 Thread Owen Pan via cfe-commits
=?utf-8?q?Björn_Schäpers?= Message-ID: In-Reply-To: https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/68743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang][driver] support -dumpversion and -dumpmachine (PR #68896)

2023-10-20 Thread Yuanfang Chen via cfe-commits
yuanfang-chen wrote: > You are adding a support for these new flags in `flang-new`, which is > implemented in terms of `clangDriver` - this scenario (i.e. the two projects > being out of sync) would be very unlikely at the moment (perhaps even > impossible). And even if that was desired, you'd

[clang] 14bc11a - [clang][dataflow]Use cast_or_null instead of cast to prevent crash (#68510)

2023-10-20 Thread via cfe-commits
Author: Qizhi Hu Date: 2023-10-21T09:39:30+08:00 New Revision: 14bc11a651971bbbdf96565898be2c94fa2b1cf5 URL: https://github.com/llvm/llvm-project/commit/14bc11a651971bbbdf96565898be2c94fa2b1cf5 DIFF: https://github.com/llvm/llvm-project/commit/14bc11a651971bbbdf96565898be2c94fa2b1cf5.diff LOG:

[clang-tools-extra] [clang][dataflow]Use cast_or_null instead of cast to prevent crash (PR #68510)

2023-10-20 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/68510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert created https://github.com/llvm/llvm-project/pull/69806 The patch contains a basic BumpAllocator for (AMD)GPUs to allow us to run more tests. The allocator implements `malloc`, both internally and externally, while we continue to default to the NVIDIA `malloc` when

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-openmp Author: Johannes Doerfert (jdoerfert) Changes The patch contains a basic BumpAllocator for (AMD)GPUs to allow us to run more tests. The allocator implements `malloc`, both internally and externally, while we continue to default to the NVIDIA `ma

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/69806 >From d0df9cbcb01528760c45898891e175f915dddbb1 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Sat, 30 Sep 2023 23:37:28 -0700 Subject: [PATCH] [OpenMP] Basic BumpAllocator for (AMD)GPUs The patch conta

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 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 1cea309b7e2256746c72f3177e1a5b226bed4f83 d30ff2ef5df686c99184eec7caf175371694cd2d --

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/69806 >From 50807ba3714b5556e9971f3f009fbd8bea70e15f Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Sat, 30 Sep 2023 23:37:28 -0700 Subject: [PATCH] [OpenMP] Basic BumpAllocator for (AMD)GPUs The patch conta

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Joseph Huber via cfe-commits
@@ -16,3 +16,4 @@ free memcmp printf __assert_fail +malloc jhuber6 wrote: This is already in the file https://github.com/llvm/llvm-project/pull/69806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Joseph Huber via cfe-commits
@@ -48,25 +48,17 @@ namespace { extern "C" { [[gnu::weak, gnu::leaf]] void *malloc(uint64_t Size); [[gnu::weak, gnu::leaf]] void free(void *Ptr); -} -///} +void *llvm_device_malloc(uint64_t Size) { return allocator::alloc(Size); } +void llvm_device_free(void *Ptr) { allocator

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Joseph Huber via cfe-commits
@@ -15,9 +15,19 @@ #endif #ifdef __cplusplus +#include jhuber6 wrote: I'm unsure if there's ever a reason to include the C++ wrappers in a freestanding environment. Without C++, these go straight to the `clang` resource directly. With the C++ versions they

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Johannes Doerfert via cfe-commits
@@ -15,9 +15,19 @@ #endif #ifdef __cplusplus +#include jdoerfert wrote: this is not freestanding https://github.com/llvm/llvm-project/pull/69806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/69806 >From 70619108a402b01c5f1f9d307a8cf21289849d74 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Sat, 30 Sep 2023 23:37:28 -0700 Subject: [PATCH] [OpenMP] Basic BumpAllocator for (AMD)GPUs The patch conta

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/69806 >From f3e7e4008cc2acf9101721efd0b7c736b7d982c0 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Sat, 30 Sep 2023 23:37:28 -0700 Subject: [PATCH] [OpenMP] Basic BumpAllocator for (AMD)GPUs The patch conta

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/69806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,80 @@ +//===-- State.cpp - OpenMP State & ICV interface - 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: Apach

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: I figured we would just have an internal implementation of `malloc` provided by the OpenMP device runtime library. The variants make this more difficult, but we could just use `#ifdef __AMDGPU__` instead of an OpenMP variant so we can declare it as `extern

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Joseph Huber via cfe-commits
@@ -36,6 +46,15 @@ extern "C" { #pragma omp end declare variant #ifdef __AMDGCN__ +#pragma omp begin declare variant match( \ +device = {arch(amdgcn)}, \ +implementation =

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Johannes Doerfert via cfe-commits
@@ -36,6 +46,15 @@ extern "C" { #pragma omp end declare variant #ifdef __AMDGCN__ +#pragma omp begin declare variant match( \ +device = {arch(amdgcn)}, \ +implementation =

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,80 @@ +//===-- State.cpp - OpenMP State & ICV interface - 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: Apach

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,80 @@ +//===-- State.cpp - OpenMP State & ICV interface - 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: Apach

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,80 @@ +//===-- State.cpp - OpenMP State & ICV interface - 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: Apach

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/69806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP] Basic BumpAllocator for (AMD)GPUs (PR #69806)

2023-10-20 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,80 @@ +//===-- State.cpp - OpenMP State & ICV interface - 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: Apach

[clang] [Driver] Clean up unused archicture related bits for *BSD's (PR #69809)

2023-10-20 Thread Brad Smith via cfe-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/69809 - FreeBSD removed big-endian arm with 12.0. - OpenBSD never had big-endian arm support. I added it just in case, but it has never been used. - Remove sparcel bits. It was sprinkled in a few places but it will never

[clang] [Driver] Clean up unused archicture related bits for *BSD's (PR #69809)

2023-10-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brad Smith (brad0) Changes - FreeBSD removed big-endian arm with 12.0. - OpenBSD never had big-endian arm support. I added it just in case, but it has never been used. - Remove sparcel bits. It was sprinkled in a few places but it will nev

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-20 Thread Owen Pan via cfe-commits
=?utf-8?q?Bj=C3=B6rn_Sch=C3=A4pers?= Message-ID: In-Reply-To: @@ -3102,7 +3102,9 @@ TEST_F(FormatTestComments, DontAlignNamespaceComments) { StringRef Input = "namespace A {\n" " TESTSUITE(B) {\n" "namespace C {\n" -

[clang] 826c93f - [AST] Use explicit type erasure in TypeSourceInfo constructor (#68435)

2023-10-20 Thread via cfe-commits
Author: Arseny Date: 2023-10-21T10:40:58+05:30 New Revision: 826c93f96efd8e34781c12cfcc6e7284691f6e8c URL: https://github.com/llvm/llvm-project/commit/826c93f96efd8e34781c12cfcc6e7284691f6e8c DIFF: https://github.com/llvm/llvm-project/commit/826c93f96efd8e34781c12cfcc6e7284691f6e8c.diff LOG: [

[clang] [AST] Use explicit type erasure in TypeSourceInfo constructor (PR #68435)

2023-10-20 Thread Shivam Gupta via cfe-commits
https://github.com/xgupta closed https://github.com/llvm/llvm-project/pull/68435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add a new style for the clang-format source code (PR #69814)

2023-10-20 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/69814 None >From 78a2661ba7a18ecf8b09be71f6959fbc9fcf70fe Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 20 Oct 2023 23:01:38 -0700 Subject: [PATCH] [clang-format] Add a new style for the clang-format source code

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-10-20 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 557820. koops added a comment. Correcting a git-clang-format error. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123235/new/ https://reviews.llvm.org/D123235 Files: clang/include/clang/AST/ASTNodeTraverser.h clang/include/clang/AST/OpenMPClause.

[clang] [clang-format] Add a new style for the clang-format source code (PR #69814)

2023-10-20 Thread Owen Pan via cfe-commits
owenca wrote: I don't want to "advertise" this new style in the documentation but am willing to be overruled by the majority. https://github.com/llvm/llvm-project/pull/69814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] af447dd - [Serialization] Use llvm::is_contained (NFC)

2023-10-20 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-10-20T23:45:20-07:00 New Revision: af447dde5e723e925b9c8fdc6715b07f0caf6161 URL: https://github.com/llvm/llvm-project/commit/af447dde5e723e925b9c8fdc6715b07f0caf6161 DIFF: https://github.com/llvm/llvm-project/commit/af447dde5e723e925b9c8fdc6715b07f0caf6161.diff L

<    1   2   3   4