[clang] [clang-format] Fix crash involving array designators and dangling comma (PR #77045)

2024-01-05 Thread via cfe-commits
XDeme wrote: I think with this the issue might be solved. https://github.com/llvm/llvm-project/pull/77045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Improve performance of misc-const-correctness (PR #72705)

2024-01-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/72705 >From 1f9b443a92446ae36825152535706037ef2e87b4 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Wed, 15 Nov 2023 16:52:00 + Subject: [PATCH 1/2] [clang-tidy] Improve performance of misc-const-correctness R

[clang-tools-extra] [clang] [llvm] LLVM_FAULTMAPS section can be put after the DWARF section. (PR #77107)

2024-01-05 Thread via cfe-commits
https://github.com/shamithoke updated https://github.com/llvm/llvm-project/pull/77107 >From a0ccb2cbe3882a6ea8bb020dd54460f57dd84a90 Mon Sep 17 00:00:00 2001 From: shami Date: Thu, 28 Dec 2023 21:29:36 +0530 Subject: [PATCH] LLVM_FAULTMAPS section can be put after the DWARF section. --- llvm/

[clang] [llvm] [clang-tools-extra] Add STACK_SIZES section for MachOS. (PR #77106)

2024-01-05 Thread via cfe-commits
https://github.com/shamithoke updated https://github.com/llvm/llvm-project/pull/77106 >From e939dbedfa4cd875858825e890310d2581bfa525 Mon Sep 17 00:00:00 2001 From: shami Date: Thu, 28 Dec 2023 21:19:36 +0530 Subject: [PATCH 1/2] Add STACK_SIZES section for MachOS. --- llvm/lib/MC/MCObjectFile

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2024-01-05 Thread Michael Buch via cfe-commits
Michael137 wrote: > Yes, in the totally reduced reproducer - another debugger might be able to do > this name lookup with only a declaration, but I understand that at least > Clang's AST expression evaluator wouldn't be able to handle this case. > (though perhaps the lldb-eval work will provid

[clang] [clang][Driver] Don't warn when -nostdinc and -nostdinc++ are both specified (PR #77130)

2024-01-05 Thread Jonathon Penix via cfe-commits
https://github.com/jonathonpenix created https://github.com/llvm/llvm-project/pull/77130 When -nostdinc and -nostdinc++ are both specified and the Baremetal toolchain is used, an unused command line argument warning for -nostdinc++ is produced. This doesn't seem particularly meaningful as -nos

[clang] [clang][Driver] Don't warn when -nostdinc and -nostdinc++ are both specified (PR #77130)

2024-01-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jonathon Penix (jonathonpenix) Changes When -nostdinc and -nostdinc++ are both specified and the Baremetal toolchain is used, an unused command line argument warning for -nostdinc++ is produced. This doesn't seem particularly meani

[clang] [Clang] Add a NULL check (PR #77131)

2024-01-05 Thread via cfe-commits
https://github.com/InfiniteVerma created https://github.com/llvm/llvm-project/pull/77131 Fixes #69200 Issue: Calling function on a nullptr. >From 86a898c55eb304705b7bd0e224b746c7a9284ed0 Mon Sep 17 00:00:00 2001 From: InfiniteVerma Date: Sat, 6 Jan 2024 00:42:34 +0530 Subject: [PATCH] [Clang

[clang] [Clang] Add a NULL check (PR #77131)

2024-01-05 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 i

[clang] [Clang] Add a NULL check (PR #77131)

2024-01-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (InfiniteVerma) Changes Fixes #69200 Issue: Calling function on a nullptr. --- Full diff: https://github.com/llvm/llvm-project/pull/77131.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaOpenMP.cpp (+4) ``diff di

[clang] [Clang] Add a NULL check (PR #77131)

2024-01-05 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 0e8b09c43d9f9e68c95fa1e6f6fb5c8307f3927d 86a898c55eb304705b7bd0e224b746c7a9284ed0 --

[clang] [Clang] Add a NULL check (PR #77131)

2024-01-05 Thread via cfe-commits
https://github.com/InfiniteVerma updated https://github.com/llvm/llvm-project/pull/77131 >From bad1fda58f73e5502df1a1c1ed781c96d86a8ead Mon Sep 17 00:00:00 2001 From: InfiniteVerma Date: Sat, 6 Jan 2024 00:42:34 +0530 Subject: [PATCH] [Clang] Add a NULL check Fixes #69200 --- clang/lib/Sema/S

[clang] [clang][Driver] Don't warn when -nostdinc and -nostdinc++ are both specified (PR #77130)

2024-01-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/77130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add a NULL check (PR #77131)

2024-01-05 Thread via cfe-commits
InfiniteVerma wrote: Should we add the c snippet in issue description as a test case? https://github.com/llvm/llvm-project/issues/69200#issue-1945228087 https://github.com/llvm/llvm-project/pull/77131 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2024-01-05 Thread David Blaikie via cfe-commits
dwblaikie wrote: Thanks! https://github.com/llvm/llvm-project/pull/72235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libcxx] [llvm] [libc++] Implement LWG3940: std::expected::value() also needs E to be copy constructible (PR #71819)

2024-01-05 Thread via cfe-commits
@@ -0,0 +1,49 @@ +//===--===// +// 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: Apache-2

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2024-01-05 Thread via cfe-commits
@@ -265,6 +269,61 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable( return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true); } +void AIXTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2024-01-05 Thread via cfe-commits
@@ -265,6 +269,61 @@ bool AIXTargetCodeGenInfo::initDwarfEHRegSizeTable( return PPC_initDwarfEHRegSizeTable(CGF, Address, Is64Bit, /*IsAIX*/ true); } +void AIXTargetCodeGenInfo::setTargetAttributes( +const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2024-01-05 Thread via cfe-commits
@@ -0,0 +1,69 @@ +// REQUIRES: powerpc-registered-target diggerlin wrote: do we need the // REQUIRES: powerpc-registered-target since it cross compile? https://github.com/llvm/llvm-project/pull/67999 ___ cfe-commits m

[llvm] [clang] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2024-01-05 Thread via cfe-commits
@@ -429,13 +429,101 @@ void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, llvm_unreachable("Unexpected C++ library type; only libc++ is supported."); } +// This function processes all the mtocdata options to build the final +// simplified toc data options to pass

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Have you considered the following case? ``` void foo() { char* arr = new char[]("asdf"); } ``` https://github.com/llvm/llvm-project/pull/76976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [flang] [Flang][Driver] Enable gpulibc/nogpulibc options for Flang, which allows linking of GPU LIBC for the fortran and OpenMP runtime (PR #77135)

2024-01-05 Thread via cfe-commits
https://github.com/agozillon created https://github.com/llvm/llvm-project/pull/77135 This patch seeks to add the -gpulibc and -nogpulibc for Flang, which allows the linking of the GPU libc library, this allows the use of memcpy and other useful library functions for GPU. In particular, this a

[clang] [flang] [Flang][Driver] Enable gpulibc/nogpulibc options for Flang, which allows linking of GPU LIBC for the fortran and OpenMP runtime (PR #77135)

2024-01-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (agozillon) Changes This patch seeks to add the -gpulibc and -nogpulibc for Flang, which allows the linking of the GPU libc library, this allows the use of memcpy and other useful library functions for GPU. In particular, this allow

[flang] [clang] [Flang][Driver] Enable gpulibc/nogpulibc options for Flang, which allows linking of GPU LIBC for the fortran and OpenMP runtime (PR #77135)

2024-01-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Accepting this with Fortran makes sense. This option basically controls whether or not the GPU toolchain will implicitly include the `libcgpu.a` static library via `-lcgpu`. It defaults to on if it finds the `libc` wrapper headers in the `

[flang] [clang] [Flang][Driver] Enable gpulibc/nogpulibc options for Flang, which allows linking of GPU LIBC for the fortran and OpenMP runtime (PR #77135)

2024-01-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Makes sense to me, though this is not my area of expertise. Could you add a > bit more elaborate test? Perhaps something that would check the linker > invocation>? I'm not familiar with how Fortran handles stuff here. It's tested in the `clang` portion at least. The handling

[clang] [clang] Fix parenthesized list initialization of arrays not working with `new` (PR #76976)

2024-01-05 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > Have you considered the following case? > > ``` > void foo() { > char* arr = new char[]("asdf"); > } > ``` Thanks for catching this - this causes this patch to crash. Working on this right now. https://github.com/llvm/llvm-project/pull/76976

[clang] 5121e2c - [OpenMP] Change `__tgt_device_image` to point to the image (#77003)

2024-01-05 Thread via cfe-commits
Author: Joseph Huber Date: 2024-01-05T14:29:34-06:00 New Revision: 5121e2cffd23751360e71a8ac69b7462dae23aa8 URL: https://github.com/llvm/llvm-project/commit/5121e2cffd23751360e71a8ac69b7462dae23aa8 DIFF: https://github.com/llvm/llvm-project/commit/5121e2cffd23751360e71a8ac69b7462dae23aa8.diff

[clang] [OpenMP] Change `__tgt_device_image` to point to the image (PR #77003)

2024-01-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/77003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format]: Split alignment of declarations around assignment (PR #69340)

2024-01-05 Thread Gedare Bloom via cfe-commits
gedare wrote: @owenca this waits for re-review https://github.com/llvm/llvm-project/pull/69340 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [Flang][Driver] Enable gpulibc/nogpulibc options for Flang, which allows linking of GPU LIBC for the fortran and OpenMP runtime (PR #77135)

2024-01-05 Thread via cfe-commits
agozillon wrote: I am gonna sign off for the weekend as it's quite late here, so I'll reply in a little more detail on Monday and update the PR further. but I'd be happy to add a further flang test, although not too sure what it'd be, so suggestions are welcome. I tested this with an out of t

[libcxx] [llvm] [compiler-rt] [clang] [lldb] [flang] [clang-tools-extra] [openmp] [OpenMP] Add memory diff dump for kernel record-replay (PR #70667)

2024-01-05 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: Can you rebase this so we can merge it? https://github.com/llvm/llvm-project/pull/70667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [Flang][Driver] Enable gpulibc/nogpulibc options for Flang, which allows linking of GPU LIBC for the fortran and OpenMP runtime (PR #77135)

2024-01-05 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I am gonna sign off for the weekend as it's quite late here, so I'll reply in > a little more detail on Monday and update the PR further. but I'd be happy to > add a further flang test, although not too sure what it'd be, so suggestions > are welcome. > > I tested this with a

[libunwind] fc1c478 - [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (#74791)

2024-01-05 Thread via cfe-commits
Author: Jordan R AW Date: 2024-01-05T12:56:02-08:00 New Revision: fc1c478709e380164733560e4a2c8f9e8d5e2c1c URL: https://github.com/llvm/llvm-project/commit/fc1c478709e380164733560e4a2c8f9e8d5e2c1c DIFF: https://github.com/llvm/llvm-project/commit/fc1c478709e380164733560e4a2c8f9e8d5e2c1c.diff L

[libunwind] [llvm] [libc] [flang] [libcxx] [clang-tools-extra] [lldb] [clang] [compiler-rt] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2024-01-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/74791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From fd01df837e8d2ae543b35e9075297db36599e179 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH] [clang] Fix behavior of __is_trivially_relocatable(volatile int

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [lldb] [compiler-rt] [libcxx] [libunwind] [libc] [flang] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread James E T Smith via cfe-commits
@@ -13,7 +13,7 @@ // Range algorithms should return `std::ranges::dangling` when given a dangling range. jamesETsmith wrote: I agree and apologize for accidentally formatting this, it does make the diff harder to read. Do you want me to revert the formatting

[libcxx] [clang] [clang-tools-extra] [compiler-rt] [llvm] [flang] [lldb] [libunwind] [libc] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread James E T Smith via cfe-commits
https://github.com/jamesETsmith updated https://github.com/llvm/llvm-project/pull/68494 >From c4a3ccfbad090ad8314aa8ad53092edc8d5432bc Mon Sep 17 00:00:00 2001 From: James Smith Date: Thu, 28 Sep 2023 10:11:15 -0400 Subject: [PATCH 01/20] [libc++] Implement ranges::iota and ranges::out_value_r

[libcxx] [clang] [clang-tools-extra] [compiler-rt] [llvm] [flang] [lldb] [libunwind] [libc] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread James E T Smith via cfe-commits
@@ -46,7 +46,7 @@ "`P2255R2 `__","LWG","A type trait to detect reference binding to temporary","February 2022","","" "`P2273R3 `__","LWG","Making ``std::unique_ptr`` constexpr","February 2022","|Complete|","16.0" "`P2387R3

[compiler-rt] [libunwind] [clang-tools-extra] [clang] [flang] [libcxx] [llvm] [lldb] [libc] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread James E T Smith via cfe-commits
@@ -0,0 +1,123 @@ +//===--===// +// +// 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

[libcxx] [llvm] [libunwind] [flang] [libc] [lldb] [compiler-rt] [clang] [clang-tools-extra] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread James E T Smith via cfe-commits
@@ -0,0 +1,123 @@ +//===--===// +// +// 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

[llvm] [clang-tools-extra] [clang] [lldb] [compiler-rt] [libcxx] [libunwind] [libc] [flang] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread James E T Smith via cfe-commits
@@ -0,0 +1,123 @@ +//===--===// +// +// 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

[libcxx] [clang] [clang-tools-extra] [compiler-rt] [llvm] [flang] [lldb] [libunwind] [libc] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread James E T Smith via cfe-commits
@@ -0,0 +1,123 @@ +//===--===// +// +// 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

[libcxx] [clang] [clang-tools-extra] [compiler-rt] [llvm] [flang] [lldb] [libunwind] [libc] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
@@ -13,7 +13,7 @@ // Range algorithms should return `std::ranges::dangling` when given a dangling range. cjdb wrote: Please revert and apply in a separate patch. https://github.com/llvm/llvm-project/pull/68494 ___

[clang] [clang] Fix test for case-insensitive absolute includes (PR #76985)

2024-01-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/76985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix test for case-insensitive absolute includes (PR #76985)

2024-01-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 ready_for_review https://github.com/llvm/llvm-project/pull/76985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 853b133 - [clang] Fix test for case-insensitive absolute includes (#76985)

2024-01-05 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-01-05T22:41:51+01:00 New Revision: 853b13342a131e06d61293ec6e840642054c6c85 URL: https://github.com/llvm/llvm-project/commit/853b13342a131e06d61293ec6e840642054c6c85 DIFF: https://github.com/llvm/llvm-project/commit/853b13342a131e06d61293ec6e840642054c6c85.diff L

[clang] [clang] Fix test for case-insensitive absolute includes (PR #76985)

2024-01-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/76985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix test for case-insensitive absolute includes (PR #76985)

2024-01-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes When CMake on Windows is told to generate the build into a directory whose real path has a different drive letter (e.g. due to a symlink), the "clang/test/Lexer/case-insensitive-include-absolute.c" test

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2024-01-05 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: @jrmwng PR #76985 (landed in 853b133) seems to have resolved this issue for me. Can you confirm that on your end? https://github.com/llvm/llvm-project/pull/74782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [libcxx] [flang] [llvm] [compiler-rt] [clang-tools-extra] [openmp] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-05 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 6d5d35e1273f595e8a0382053d5183cbce7a9d8a Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/6] [clang-tidy] Add bugprone-move-shared-pointer-contents check.

[clang] [libcxx] [flang] [llvm] [compiler-rt] [clang-tools-extra] [openmp] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-05 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 6d5d35e1273f595e8a0382053d5183cbce7a9d8a Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/6] [clang-tidy] Add bugprone-move-shared-pointer-contents check.

[clang] [CLANG] Add warning when comparing to INF or NAN in fast math mode. (PR #76873)

2024-01-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/76873 >From 7dbaf037b6b2196cee7c0c837e0a89ce3c2556ed Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Wed, 3 Jan 2024 14:37:17 -0800 Subject: [PATCH 1/2] [CLANG] Add warning when comparing to INF or NAN in fast math

[libcxx] [flang] [compiler-rt] [llvm] [openmp] [clang] [libc] [clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-05 Thread via cfe-commits
@@ -0,0 +1,157 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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: Ap

[clang] f1d75d0 - [clang][Driver] Don't warn when -nostdinc and -nostdinc++ are both specified (#77130)

2024-01-05 Thread via cfe-commits
Author: Jonathon Penix Date: 2024-01-05T13:55:50-08:00 New Revision: f1d75d08adb9841dd9cebad63b76d4823ec2bdac URL: https://github.com/llvm/llvm-project/commit/f1d75d08adb9841dd9cebad63b76d4823ec2bdac DIFF: https://github.com/llvm/llvm-project/commit/f1d75d08adb9841dd9cebad63b76d4823ec2bdac.diff

[clang] [clang][Driver] Don't warn when -nostdinc and -nostdinc++ are both specified (PR #77130)

2024-01-05 Thread Jonathon Penix via cfe-commits
https://github.com/jonathonpenix closed https://github.com/llvm/llvm-project/pull/77130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [flang] [llvm] [compiler-rt] [clang-tools-extra] [openmp] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-05 Thread via cfe-commits
pizzud wrote: Not sure how to squash properly; I tried rebasing but all the commits on the main branch snuck in to the history and I'm quite new to git. If it would be preferred I can store this off as a patch and open up a new PR. Sorry for all the hassle with the merges! https://github.com/

[clang] [CLANG] Add warning when comparing to INF or NAN in fast math mode. (PR #76873)

2024-01-05 Thread Zahira Ammarguellat via cfe-commits
@@ -2267,6 +2273,16 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, case Builtin::BI__builtin_signbit: case Builtin::BI__builtin_signbitf: case Builtin::BI__builtin_signbitl: +FPO = TheCall->getFPFeaturesInEffect(getLangOpts()); ---

[clang] [CLANG] Add warning when comparing to INF or NAN in fast math mode. (PR #76873)

2024-01-05 Thread Zahira Ammarguellat via cfe-commits
@@ -13846,6 +13880,37 @@ Sema::CheckReturnValExpr(Expr *RetValExp, QualType lhsType, CheckPPCMMAType(RetValExp->getType(), ReturnLoc); } +/// Diagnose comparison to NAN or INFINITY in fast math modes. +/// The comparison to NaN or INFINITY is always false in +/// fast mod

[clang] [CLANG] Add warning when comparing to INF or NAN in fast math mode. (PR #76873)

2024-01-05 Thread Zahira Ammarguellat via cfe-commits
@@ -13846,6 +13880,37 @@ Sema::CheckReturnValExpr(Expr *RetValExp, QualType lhsType, CheckPPCMMAType(RetValExp->getType(), ReturnLoc); } +/// Diagnose comparison to NAN or INFINITY in fast math modes. +/// The comparison to NaN or INFINITY is always false in +/// fast mod

[clang] [CLANG] Add warning when comparing to INF or NAN in fast math mode. (PR #76873)

2024-01-05 Thread Zahira Ammarguellat via cfe-commits
@@ -13044,9 +13044,12 @@ static QualType checkArithmeticOrEnumeralCompare(Sema &S, ExprResult &LHS, if (Type->isAnyComplexType() && BinaryOperator::isRelationalOp(Opc)) return S.InvalidOperands(Loc, LHS, RHS); - // Check for comparisons of floating point operands using

[clang] [CLANG] Add warning when comparing to INF or NAN in fast math mode. (PR #76873)

2024-01-05 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > Expanding the scope a bit, it would also be useful to have warnings for > constant NaN or Inf values passed as arguments or used in binary operations. Added that. https://github.com/llvm/llvm-project/pull/76873 ___ cfe-commits maili

[clang-tools-extra] [clang-tidy] Add check `readability-avoid-return-with-void-value` (PR #76249)

2024-01-05 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/76249 From 16b877e782951293a67a819441a3910f19bc24ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Fri, 22 Dec 2023 17:09:59 +0100 Subject: [PATCH 01/16] [clang-tidy] Add check readability-ret

[clang] [lldb] [llvm] [compiler-rt] [libcxx] [libc] [clang-tools-extra] [flang] [libunwind] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
https://github.com/cjdb requested changes to this pull request. Thanks for working on this, it's an important algorithm to have. I've left some comments, but would like to see this merged by the end of January. https://github.com/llvm/llvm-project/pull/68494

[flang] [clang] [lldb] [libcxx] [libc] [libunwind] [llvm] [clang-tools-extra] [compiler-rt] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,171 @@ +//===--===// +// +// 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

[libunwind] [lldb] [flang] [libc] [llvm] [clang-tools-extra] [clang] [libcxx] [compiler-rt] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
@@ -1083,6 +1083,27 @@ rvalue_iterator(T*) -> rvalue_iterator; static_assert(std::random_access_iterator>); +// The ProxyDiffTBase allows us to conditionally specify Proxy::difference_type +// which we need in certain situations. For example when we want +// std::weakly_incr

[libunwind] [clang] [clang-tools-extra] [llvm] [flang] [compiler-rt] [libcxx] [libc] [lldb] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,71 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-

[clang-tools-extra] [flang] [libunwind] [libc] [llvm] [lldb] [libcxx] [compiler-rt] [clang] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
@@ -1149,9 +1171,11 @@ struct Proxy { // Calling swap(Proxy{}, Proxy{}) would fail (pass prvalues) // Compare operators are defined for the convenience of the tests - friend constexpr bool operator==(const Proxy&, const Proxy&) -requires (std::equality_comparable && !

[flang] [libcxx] [libc] [clang-tools-extra] [llvm] [libunwind] [lldb] [clang] [compiler-rt] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,71 @@ +// -*- 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-

[libcxx] [compiler-rt] [clang-tools-extra] [libc] [clang] [flang] [lldb] [llvm] [libunwind] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,171 @@ +//===--===// +// +// 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

[llvm] [compiler-rt] [libcxx] [lldb] [libunwind] [flang] [libc] [clang-tools-extra] [clang] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
https://github.com/cjdb edited https://github.com/llvm/llvm-project/pull/68494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc] [llvm] [libunwind] [flang] [lldb] [libcxx] [clang] [compiler-rt] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
@@ -1172,6 +1198,22 @@ struct Proxy { requires std::three_way_comparable_with, std::decay_t> { return lhs.data <=> rhs.data; } + + // Needed to allow certain types to be weakly_incremental + constexpr Proxy& operator++() +requires(HasPreIncrementOp) + { +++

[libcxx] [flang] [libunwind] [libc] [llvm] [lldb] [clang-tools-extra] [compiler-rt] [clang] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
@@ -1161,9 +1185,11 @@ struct Proxy { return lhs.data == rhs.data; } - friend constexpr auto operator<=>(const Proxy&, const Proxy&) -requires (std::three_way_comparable && !std::is_reference_v) - = default; + friend constexpr auto operator<=>(const Proxy& lhs, co

[llvm] [clang] [Clang] Update Unicode version to 15.1 (PR #77147)

2024-01-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-support Author: cor3ntin (cor3ntin) Changes This update all of our Unicode tables to Unicode 15.1. This is a minor version so only a relatively small numbers of characters are added, mainly ideographs https://www.unicode

[flang] [compiler-rt] [llvm] [lldb] [clang-tools-extra] [libunwind] [clang] [libcxx] [libc] [libc++] Implement ranges::iota (PR #68494)

2024-01-05 Thread Christopher Di Bella via cfe-commits
@@ -0,0 +1,71 @@ +// -*- 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-

[llvm] [clang] [Clang] Update Unicode version to 15.1 (PR #77147)

2024-01-05 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 f22dc88759a53d4224c17d3833a359ef5674b4ea 83314b0226f0585c3f689c8fdf556e45dbec207c --

[clang] [-Wunsafe-buffer-usage] Add a new warning for uses of std::span two-parameter constructors (PR #77148)

2024-01-05 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/77148 The PR contains two commits: 1. adding a new waring under a sub-group of `-Wunsafe-buffer-usage` 2. teach the analyzer to be quiet on some benign cases >From 475d918fb0b5991be7ce559ef6ef7f20c6b231e5 Mon Sep

[clang] [clang-format] Break after string literals with trailing line breaks (PR #76795)

2024-01-05 Thread Owen Pan via cfe-commits
@@ -5151,6 +5151,14 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, return true; if (Left.IsUnterminatedLiteral) return true; + // FIXME: Breaking after newlines seems useful in general. Turn this into an + // option and recognize more cases like

[clang] [-Wunsafe-buffer-usage] Add a new warning for uses of std::span two-parameter constructors (PR #77148)

2024-01-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-clang Author: Ziqing Luo (ziqingluo-90) Changes The PR contains two commits: 1. adding a new waring under a sub-group of `-Wunsafe-buffer-usage` 2. teach the analyzer to be quiet on some benign cases --- Patch is 22.

[clang] [-Wunsafe-buffer-usage] Add a new warning for uses of std::span two-parameter constructors (PR #77148)

2024-01-05 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 d7b4debf98fd740f821bda717de7b807e26ae95a 54d75df6c413a5b273a059426b00def7437ab525 --

[libcxx] [libunwind] [libc] [llvm] [compiler-rt] [clang] [NFC][tsan] `ptr != 0` to implicit check (PR #77144)

2024-01-05 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/77144 >From 878c38dba9d819b79b8db8b3044078839f5a4e55 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 5 Jan 2024 14:06:37 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?UT

[mlir] [openmp] [lld] [libc] [llvm] [libcxx] [flang] [clang] [lldb] [compiler-rt] [clang-tools-extra] [libc++][streams] P1759R6: Native handles and file streams (PR #76632)

2024-01-05 Thread via cfe-commits
zeroomega wrote: Hi, this change breaks libcxx test on Windows due to unable to find "unistd.h" file (which doesn't exist on msvc based environment). Failed test message and failed commandline: ``` Failed Tests (8): llvm-libc++-static-clangcl.cfg.in :: std/input.output

[libcxx] [libunwind] [libc] [llvm] [compiler-rt] [clang] [NFC][tsan] `ptr != 0` to implicit check (PR #77144)

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

[clang] [CLANG] Add warning when comparing to INF or NAN in fast math mode. (PR #76873)

2024-01-05 Thread Andy Kaylor via cfe-commits
@@ -13846,6 +13880,37 @@ Sema::CheckReturnValExpr(Expr *RetValExp, QualType lhsType, CheckPPCMMAType(RetValExp->getType(), ReturnLoc); } +/// Diagnose comparison to NAN or INFINITY in fast math modes. +/// The comparison to NaN or INFINITY is always false in +/// fast mod

[libcxx] [libunwind] [libc] [llvm] [compiler-rt] [clang] [tsan] Fallback to top frame (PR #77145)

2024-01-05 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/77145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [openmp] [llvm] [flang] [libcxx] [clang] [compiler-rt] [clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-05 Thread via cfe-commits
EugeneZelenko wrote: You need to do interactive rebase: ``` git fetch --prune # get latest main and remove local copies deleted branch git rebase origin/main # rebase from main git rebase -i origin/main # interactive rebase, just use fixup command git rebase --force origin # push updated branc

[libcxx] [llvm] [clang] [compiler-rt] [libc] [libunwind] [tsan] Fallback to top frame (PR #77145)

2024-01-05 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/77145 >From d3a38ee314802fca37849ae33fa7d445369f0956 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 5 Jan 2024 14:06:41 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?UT

[libcxx] [llvm] [clang] [compiler-rt] [libc] [libunwind] [tsan] Fallback to top frame (PR #77145)

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

[clang] [clang][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72235)

2024-01-05 Thread Michael Buch via cfe-commits
Michael137 wrote: Proposed fix: https://github.com/llvm/llvm-project/pull/77155 https://github.com/llvm/llvm-project/pull/72235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] a89141f - [clang-tidy] Add check `readability-avoid-return-with-void-value` (#76249)

2024-01-05 Thread via cfe-commits
Author: Danny Mösch Date: 2024-01-06T00:14:08+01:00 New Revision: a89141f733cef817c586bb6da0ea69a5a323874e URL: https://github.com/llvm/llvm-project/commit/a89141f733cef817c586bb6da0ea69a5a323874e DIFF: https://github.com/llvm/llvm-project/commit/a89141f733cef817c586bb6da0ea69a5a323874e.diff L

[clang-tools-extra] [clang-tidy] Add check `readability-avoid-return-with-void-value` (PR #76249)

2024-01-05 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny closed https://github.com/llvm/llvm-project/pull/76249 ___ 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 check `readability-avoid-return-with-void-value` (PR #76249)

2024-01-05 Thread Danny Mösch via cfe-commits
SimplyDanny wrote: Thank you, @PiotrZSL, for the reviews and helpful suggestions! https://github.com/llvm/llvm-project/pull/76249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-01-05 Thread Shafik Yaghmour via cfe-commits
shafik wrote: I think I would like some more eyes on this, I don't know if it is obvious to me what it means to reallocate a volatile object. https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] [SpecialCaseList] Use glob by default (PR #74809)

2024-01-05 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: This caused some ignorelist changes, e.g. `src:*third_party/vulkan_memory_allocator/include/vk_mem_alloc.h` didn't work anymore and the opt-out made it work again. Still investigating why. https://github.com/llvm/llvm-project/pull/74809 _

[clang] [llvm] [SpecialCaseList] Use glob by default (PR #74809)

2024-01-05 Thread Ellis Hoag via cfe-commits
ellishg wrote: > This caused some ignorelist changes, e.g. > > > > `src:*third_party/vulkan_memory_allocator/include/vk_mem_alloc.h` > > > > didn't work anymore and the opt-out made it work again. Still investigating > why. Not sure if it's the reason, but the `.` in `vk_mem_alloc.h` matc

[clang] [mlir] [llvm] [clang-tools-extra] [mlir][spirv] Fix spirv dialect to support Specialization constants as GlobalVar initializer (PR #75660)

2024-01-05 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst updated https://github.com/llvm/llvm-project/pull/75660 >From fd8c637f2b146ffce657307841f84a4123e351af Mon Sep 17 00:00:00 2001 From: Dimple Prajapati Date: Wed, 13 Dec 2023 22:33:23 + Subject: [PATCH 1/6] [mlir][spirv] Fix spirv dialect to support Specializat

[clang] [llvm] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2024-01-05 Thread Paul Kirth via cfe-commits
@@ -151,9 +155,10 @@ Usage To enable ShadowCallStack, just pass the ``-fsanitize=shadow-call-stack`` flag to both compile and link command lines. On aarch64, you also need to pass -``-ffixed-x18`` unless your target already reserves ``x18``. On RISC-V, ``x3`` -(``gp``) is alwa

[clang] [llvm] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2024-01-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/68075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2024-01-05 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi commented: Should the driver issue an error when using `-mforced-sw-shadow-stack` w/o `Zicfiss`? As mentioned in-line, I'm not sure we can do that check, but it feels like it should be incompatible. https://github.com/llvm/llvm-project/pull/68075

[llvm] [clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2024-01-05 Thread Paul Kirth via cfe-commits
@@ -57,11 +57,14 @@ compiled application or the operating system. Integrating the runtime into the operating system should be preferred since otherwise all thread creation and destruction would need to be intercepted by the application. -The instrumentation makes use of the p

<    1   2   3   4   5   >