[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

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

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-14 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,97 @@ +//===--- UseStdMinMaxCheck.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: Apa

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-14 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,97 @@ +//===--- UseStdMinMaxCheck.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: Apa

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-14 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,97 @@ +//===--- UseStdMinMaxCheck.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: Apa

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. I would say that few more nits and could be fine. add tests for class members and some other tests. https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-com

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-14 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,38 @@ +//===--- UseStdMinMaxCheck.h - clang-tidy ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-14 Thread Piotr Zegar via cfe-commits
@@ -336,6 +336,7 @@ Clang-Tidy Checks :doc:`portability-restrict-system-includes `, "Yes" :doc:`portability-simd-intrinsics `, :doc:`portability-std-allocator-const `, + :doc:`readability-use-std-min-max `, "Yes" PiotrZSL wrote: i still thinking th

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-14 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,97 @@ +//===--- UseStdMinMaxCheck.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: Apa

[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-14 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %check_clang_tidy %s readability-use-std-min-max %t + +constexpr int myConstexprMin(int a, int b) { + return a < b ? a : b; +} + +constexpr int myConstexprMax(int a, int b) { + return a > b ? a : b; +} + +int bar(int x, int y) { + return x < y ? x : y;

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-14 Thread Piotr Zegar 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-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-14 Thread Piotr Zegar 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-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-14 Thread Piotr Zegar via cfe-commits
@@ -117,7 +117,8 @@ Clang-Tidy Checks :doc:`bugprone-parent-virtual-call `, "Yes" :doc:`bugprone-posix-return `, "Yes" :doc:`bugprone-redundant-branch-condition `, "Yes" - :doc:`bugprone-reserved-identifier `, "Yes" + :doc:`bugprone-reserved-identifier `, "Yes", -

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-14 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,125 @@ +// RUN: %check_clang_tidy %s bugprone-move-shared-pointer-contents %t -- -config="{CheckOptions: {bugprone-move-shared-pointer-contents.SharedPointerClasses: '::std::shared_ptr;my::OtherSharedPtr;'}}" + +// Some dummy definitions we'll need. + +namespace std

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-01-14 Thread Piotr Zegar 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] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/78088 >From d040754092faa2106dc0b63af5e8bc7d7e1e47c2 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 14 Jan 2024 15:07:26 +0800 Subject: [PATCH] [Clang][Sema] fix crash of attribute transform --- clang/include/clang

[llvm] [clang-tools-extra] [clang] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2024-01-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/76117 >From 97eeda4684804229d9faad19ea7b7888dcd91786 Mon Sep 17 00:00:00 2001 From: Ezike Ebuka Date: Thu, 21 Dec 2023 02:30:34 + Subject: [PATCH 1/6] Fix #75686: add iter_swap and iter_move to the matched name

[clang] [Clang][Sema] Extract ellipsis location from CXXFoldExpr for reattaching constraints on NTTPs (PR #78080)

2024-01-14 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/78080 >From 7c0b5ffe4b377f198308b976eb726138837145c4 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sun, 14 Jan 2024 12:21:33 +0800 Subject: [PATCH 1/2] [Clang][Sema] Extract ellipsis location from CXXFoldExpr for

[clang-tools-extra] [clang] [clangd] Handle an expanded token range that ends in the `eof` token in TokenBuffer::spelledForExpanded() (PR #78092)

2024-01-14 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/78092 Such ranges can legitimately arise in the case of invalid code, such as a declaration missing an ending brace. >From 26a11f5fa7e79c85bac5cf92048194212b957b0a Mon Sep 17 00:00:00 2001 From: Nathan Ridge D

[clang-tools-extra] [clang] [clangd] Handle an expanded token range that ends in the `eof` token in TokenBuffer::spelledForExpanded() (PR #78092)

2024-01-14 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Based on previous discussion and analysis in https://github.com/llvm/llvm-project/pull/69849 https://github.com/llvm/llvm-project/pull/78092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang-tools-extra] [clang] [clangd] Handle an expanded token range that ends in the `eof` token in TokenBuffer::spelledForExpanded() (PR #78092)

2024-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd @llvm/pr-subscribers-clang Author: Nathan Ridge (HighCommander4) Changes Such ranges can legitimately arise in the case of invalid code, such as a declaration missing an ending brace. --- Full diff: https://github.com/llvm/llvm-project/pull/7809

[clang] [clang] Bounds checking on unclosed parentheses, brackets or braces in Expanded Tokens (PR #69849)

2024-01-14 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > What do you think about this as an alternative: if `spelledForExpanded` > receives as input an expanded token range `[firstExpanded, lastExpanded]` > where `lastExpanded` is the `eof` token, return the spelled tokens > corresponding to `[firstExpanded, lastExpanded - 1]

[libc] [lldb] [mlir] [clang-tools-extra] [flang] [clang] [llvm] [compiler-rt] [libcxx] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-14 Thread Fangrui Song via cfe-commits
@@ -1418,6 +1418,14 @@ bool X86TargetInfo::validateAsmConstraint( case 'O': Info.setRequiresImmediate(0, 127); return true; + case 'W': +switch (*++Name) { +default: + return false; +case 's': + Info.setAllowsRegister(); MaskRay

[compiler-rt] [clang] [clang-tools-extra] [lldb] [libc] [flang] [llvm] [libcxx] [mlir] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-14 Thread Fangrui Song via cfe-commits
@@ -130,3 +130,7 @@ void pr40890(void) { __asm__ __volatile__("\n#define BEEF abcd%0\n" : : "n"((int*)0xdeadbeef)); #endif } + +void test_W(int i) { + asm("" : : "Wd"(test_W)); // expected-error{{invalid input constraint 'Wd' in asm}} MaskRay wrote: T

[compiler-rt] [clang] [clang-tools-extra] [lldb] [libc] [lld] [flang] [llvm] [libcxx] [mlir] [X86] Add "Ws" constraint and "p" modifier for symbolic address/label reference (PR #77886)

2024-01-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/77886 >From f5a33f9e6893250e3584a77630b771ee76693c20 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 11 Jan 2024 23:42:38 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF

[llvm] [clang] [TargetParser] Define AEK_FCMA and AEK_JSCVT for tsv110 (PR #75516)

2024-01-14 Thread David Green via cfe-commits
https://github.com/davemgreen approved this pull request. https://github.com/ARM-software/acle/pull/279 was committed recently, where I think this lines up with the final version of it. I think this LGTM in that case. https://github.com/llvm/llvm-project/pull/75516

[clang-tools-extra] [clang] [clangd] Handle an expanded token range that ends in the `eof` token in TokenBuffer::spelledForExpanded() (PR #78092)

2024-01-14 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/78092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

2024-01-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky edited https://github.com/llvm/llvm-project/pull/78088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [clang] [clang] Add test for CWG472 (PR #67948)

2024-01-14 Thread via cfe-commits
@@ -2871,7 +2871,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/472.html";>472 drafting Casting across protected inheritance -Not resolved +No cor3ntin wrote: > For `"no drafting" status, can we say som

[clang] [Clang][Sema] improve sema check of clang::musttail attribute (PR #77727)

2024-01-14 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/77727 >From 537228ee1a223cd89e87daa4402d3aa183d38980 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 11 Jan 2024 13:02:21 +0800 Subject: [PATCH] [Clang][SemaCXX] improve sema check of clang::musttail attribute ---

[clang] [Clang][Sema] improve sema check of clang::musttail attribute (PR #77727)

2024-01-14 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Just needs a release note, else LGTM. Release note has been added. https://github.com/llvm/llvm-project/pull/77727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d3ac676 - [clang-format][NFC] Use FileCheck for clang-format-ignore lit test (#77977)

2024-01-14 Thread via cfe-commits
Author: Owen Pan Date: 2024-01-14T01:41:14-08:00 New Revision: d3ac676ea4d87142ff43f5a64cda1ad181b3ad47 URL: https://github.com/llvm/llvm-project/commit/d3ac676ea4d87142ff43f5a64cda1ad181b3ad47 DIFF: https://github.com/llvm/llvm-project/commit/d3ac676ea4d87142ff43f5a64cda1ad181b3ad47.diff LOG:

[clang] [clang-format][NFC] Use FileCheck for clang-format-ignore lit test (PR #77977)

2024-01-14 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/77977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 356c2c2 - Fix #75686: add iter_swap and iter_move to the matched name (#76117)

2024-01-14 Thread via cfe-commits
Author: Da-Viper Date: 2024-01-14T10:48:47+01:00 New Revision: 356c2c2399e1041439af817e3e179aa35361502e URL: https://github.com/llvm/llvm-project/commit/356c2c2399e1041439af817e3e179aa35361502e DIFF: https://github.com/llvm/llvm-project/commit/356c2c2399e1041439af817e3e179aa35361502e.diff LOG:

[clang-tools-extra] [clang] [llvm] Fix #75686: add iter_swap and iter_move to the matched name (PR #76117)

2024-01-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/76117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] db17a3f - [clang-tidy][DOC] Fix some speling mistakes in release notes

2024-01-14 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2024-01-14T09:53:20Z New Revision: db17a3f69fab16d45d08243b3e711940b6ae3b0d URL: https://github.com/llvm/llvm-project/commit/db17a3f69fab16d45d08243b3e711940b6ae3b0d DIFF: https://github.com/llvm/llvm-project/commit/db17a3f69fab16d45d08243b3e711940b6ae3b0d.diff LOG: [

[compiler-rt] [clang] [libcxx] [llvm] [clang-tools-extra] [mlir] [lldb] [flang] [lld] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/77967 >From 48c4463e8817c8ee0f00ffa7422e6fafbe838275 Mon Sep 17 00:00:00 2001 From: Zingam Date: Wed, 10 Jan 2024 13:46:19 +0200 Subject: [PATCH 01/12] [libc++][numeric] P0543R3: Saturation arithmetic Implements:

[clang] 7851670 - [clang] SyntaxWarning: invalid escape sequence '\s' with Python3.12 (#78036)

2024-01-14 Thread via cfe-commits
Author: Jie Fu (傅杰) Date: 2024-01-14T18:13:54+08:00 New Revision: 785167070982a75d1b123fbbf0917cc457846ec1 URL: https://github.com/llvm/llvm-project/commit/785167070982a75d1b123fbbf0917cc457846ec1 DIFF: https://github.com/llvm/llvm-project/commit/785167070982a75d1b123fbbf0917cc457846ec1.diff L

[clang] [clang] SyntaxWarning: invalid escape sequence '\s' with Python3.12 (PR #78036)

2024-01-14 Thread Jie Fu 傅杰 via cfe-commits
https://github.com/DamonFool closed https://github.com/llvm/llvm-project/pull/78036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] SyntaxWarning: invalid escape sequence '\s' with Python3.12 (PR #78036)

2024-01-14 Thread Jie Fu 傅杰 via cfe-commits
DamonFool wrote: Thanks @MaskRay and @cor3ntin for the review. https://github.com/llvm/llvm-project/pull/78036 ___ 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 readability-implicit-bool-conversion false-positives when comparison bool bitfield (PR #77878)

2024-01-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, but please note that I didn't get too deep into current ast matching, and movement of ExceptionCases higher looks a little bit suspicious. But I assume also that current tests cover this deeply. https://github.com/llvm/llvm-project/

[compiler-rt] [clang] [libcxx] [llvm] [clang-tools-extra] [mlir] [lldb] [flang] [lld] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/77967 >From 48c4463e8817c8ee0f00ffa7422e6fafbe838275 Mon Sep 17 00:00:00 2001 From: Zingam Date: Wed, 10 Jan 2024 13:46:19 +0200 Subject: [PATCH 01/13] [libc++][numeric] P0543R3: Saturation arithmetic Implements:

[compiler-rt] [clang] [libcxx] [llvm] [clang-tools-extra] [mlir] [lldb] [flang] [lld] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/77967 >From 48c4463e8817c8ee0f00ffa7422e6fafbe838275 Mon Sep 17 00:00:00 2001 From: Zingam Date: Wed, 10 Jan 2024 13:46:19 +0200 Subject: [PATCH 01/13] [libc++][numeric] P0543R3: Saturation arithmetic Implements:

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall updated https://github.com/llvm/llvm-project/pull/78030 >From c8d733479ee8d0fd7c75c4a623f8c1bc2f132c61 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sun, 7 Jan 2024 14:53:48 + Subject: [PATCH] Enable direct methods and fast alloc calls for libobjc2. T

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread David Chisnall via cfe-commits
davidchisnall wrote: Formatting issues were introduced by running clang-format15, should now be fixed. https://github.com/llvm/llvm-project/pull/78030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78095 GCC has changed over the past decade. Fixes #51472 >From 1aca1cd3be8209675b8aa3b79b2d626ad9f3c559 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 14:11:16 +0300 Subject: [PATCH] [clang]

[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes GCC has changed over the past decade. Fixes #51472 --- Full diff: https://github.com/llvm/llvm-project/pull/78095.diff 1 Files Affected: - (modified) clang/docs/UsersManual.rst (+6-10) ``d

[mlir] [clang-tools-extra] [lld] [clang] [libcxx] [flang] [compiler-rt] [llvm] [lldb] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,119 @@ +// -*- 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

[lldb] [clang-tools-extra] [lld] [compiler-rt] [mlir] [llvm] [flang] [clang] [libcxx] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,119 @@ +// -*- 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

[flang] [clang-tools-extra] [lld] [clang] [libcxx] [lldb] [compiler-rt] [mlir] [llvm] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,130 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-14 Thread via cfe-commits
@@ -18,52 +19,80 @@ using namespace clang::tidy::matchers; namespace clang::tidy::readability { +static SourceRange +getFullInitRangeInclWhitespaces(SourceRange Range, const SourceManager &SM, +const LangOptions &LangOpts) { + const Token Prev

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-14 Thread Piotr Zegar via cfe-commits
@@ -18,52 +19,80 @@ using namespace clang::tidy::matchers; namespace clang::tidy::readability { +static SourceRange +getFullInitRangeInclWhitespaces(SourceRange Range, const SourceManager &SM, +const LangOptions &LangOpts) { + const Token Prev

[clang-tools-extra] [clang] [llvm] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/77206 >From 66e4026ff568fbd805ddd777596102381e4e0066 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sat, 6 Jan 2024 18:04:57 + Subject: [PATCH 1/2] [clang-tidy] Add support for in-class initializers in readabil

[llvm] [clang] [clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-14 Thread via cfe-commits
@@ -18,52 +19,80 @@ using namespace clang::tidy::matchers; namespace clang::tidy::readability { +static SourceRange +getFullInitRangeInclWhitespaces(SourceRange Range, const SourceManager &SM, +const LangOptions &LangOpts) { + const Token Prev

[llvm] [clang] [clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

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

[libunwind] [mlir] [libcxxabi] [flang] [libc] [libcxx] [lld] [lldb] [clang] [clang-tools-extra] [compiler-rt] [llvm] PR#72453 : Exceeding maximum file name length (PR #72654)

2024-01-14 Thread Shahid Iqbal via cfe-commits
https://github.com/shahidiqbal13 closed https://github.com/llvm/llvm-project/pull/72654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [llvm] [libcxx] [mlir] [clang-tools-extra] [compiler-rt] [lld] [flang] [clang] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,119 @@ +// -*- 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] [libcxx] [mlir] [llvm] [lld] [compiler-rt] [clang-tools-extra] [flang] [lldb] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,119 @@ +// -*- 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] [libcxx] [mlir] [llvm] [lld] [compiler-rt] [clang-tools-extra] [flang] [lldb] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,119 @@ +// -*- 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-tools-extra] [clang] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/77206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 59e79f0 - [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (#77206)

2024-01-14 Thread via cfe-commits
Author: Piotr Zegar Date: 2024-01-14T14:52:46+01:00 New Revision: 59e79f0de59d9e4576b6bf562de40a914702efd4 URL: https://github.com/llvm/llvm-project/commit/59e79f0de59d9e4576b6bf562de40a914702efd4 DIFF: https://github.com/llvm/llvm-project/commit/59e79f0de59d9e4576b6bf562de40a914702efd4.diff L

[clang-tools-extra] 7f1d757 - [clang-tidy] Fix false-positives in readability-container-size-empty (#74140)

2024-01-14 Thread via cfe-commits
Author: Piotr Zegar Date: 2024-01-14T15:49:16+01:00 New Revision: 7f1d757fb40f06cc1c6b134d770987b340286996 URL: https://github.com/llvm/llvm-project/commit/7f1d757fb40f06cc1c6b134d770987b340286996 DIFF: https://github.com/llvm/llvm-project/commit/7f1d757fb40f06cc1c6b134d770987b340286996.diff L

[clang-tools-extra] [clang-tidy] Fix false-positives in readability-container-size-empty (PR #74140)

2024-01-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/74140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] BreakAfterAttributes did not take into account gnu attributes (PR #78102)

2024-01-14 Thread via cfe-commits
https://github.com/mydeveloperday created https://github.com/llvm/llvm-project/pull/78102 Not completely sure if we should handle this with a separate option or just treat [[attribute]] the same as __attribute((attribute)) This was raised by #77310 >From f95a9a43eff1a2c4cc01cc701e12a306a6d80

[clang] [clang-format] BreakAfterAttributes did not take into account gnu attributes (PR #78102)

2024-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: MyDeveloperDay (mydeveloperday) Changes Not completely sure if we should handle this with a separate option or just treat [[attribute]] the same as __attribute((attribute)) This was raised by #77310 --- Full diff: https://github.

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78103 C++14 introduced deduced return type for regular functions, but shortly after [CWG1878](https://wg21.link/cwg1878) was filed and resolved to disallow deduced return types in conversion function templates. So thi

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes C++14 introduced deduced return type for regular functions, but shortly after [CWG1878](https://wg21.link/cwg1878) was filed and resolved to disallow deduced return types in conversion function templat

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 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 fb2cc9b9fc5ae5a544e3009ae153f5ae83c5a89c 522c7dff31a6f63995877674f9f4282ae60f7aaa --

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/2] [clang] Implement CWG1878 "`operator auto` template" C+

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
@@ -686,3 +686,19 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in function prototype}} } } + +struct DeducedTargetTypeOfConversionFunction { + operator auto() const { return char(); } + operator const auto() const { return float(); } cor3ntin wro

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
@@ -11322,9 +11322,22 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if (FunctionTe

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
@@ -11322,9 +11322,22 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if (FunctionTe

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/78103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [libcxx] [mlir] [libc++][concepts] Implements concept helper `__libcpp_integer` (PR #78086)

2024-01-14 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/78086 >From f2008de694bc867efa9632df183f64e3ea194e4e Mon Sep 17 00:00:00 2001 From: Zingam Date: Sun, 14 Jan 2024 09:34:46 +0200 Subject: [PATCH 1/5] [libc++][concepts] Implements concept helper `__libcpp_integer

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/78103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Extract utility functions outside of test fixture (PR #78108)

2024-01-14 Thread via cfe-commits
https://github.com/seranu created https://github.com/llvm/llvm-project/pull/78108 Extract utility functions outside of test fixture for DefinitionBlockSeparatorTest so that these functions can be used by other test fixtures. There are no functional changes. This is a refactoring in preparatio

[clang] [clang-format] Extract utility functions outside of test fixture (PR #78108)

2024-01-14 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-format] Extract utility functions outside of test fixture (PR #78108)

2024-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: serbanu (seranu) Changes Extract utility functions outside of test fixture for DefinitionBlockSeparatorTest so that these functions can be used by other test fixtures. There are no functional changes. This is a refactoring in prep

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-14 Thread via cfe-commits
@@ -17,80 +17,97 @@ namespace clang { namespace format { namespace { +std::string +separateDefinitionBlocks(llvm::StringRef Code, + const std::vector &Ranges, + const FormatStyle &Style = getLLVMStyle()) { + LLVM_DEBUG(llvm::errs

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-14 Thread via cfe-commits
https://github.com/sethp updated https://github.com/llvm/llvm-project/pull/74852 >From f281d34a51f662c934f158e4770774b0dc3588a2 Mon Sep 17 00:00:00 2001 From: Seth Pellegrino Date: Thu, 7 Dec 2023 08:45:51 -0800 Subject: [PATCH 1/9] [Clang][Sema] Print more static_assert exprs This change intro

[clang] [libc] [Libc] Give more functions restrict qualifiers (PR #78061)

2024-01-14 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/78061 >From 5dd1e619ca89d326650894bb2983e21616e765eb Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Sat, 13 Jan 2024 14:09:17 -0500 Subject: [PATCH] [Libc] Give more functi

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-14 Thread via cfe-commits
seranu wrote: > You'd have to create multiple pull requests. And if they build on each other > there is no nice way of doing this on github. You can of course use this one > for a change. You can also not split the work, but chances are it will take > longer for the changes to land. I created

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
@@ -11322,9 +11322,22 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if (FunctionTe

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: Thanks, some comments. https://github.com/llvm/llvm-project/pull/78057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,62 @@ +//===- OffloadWrapper.h --r-*- 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

[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module &M, GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module &M, ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module &

[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

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

[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module &M, GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module &M, ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module &

[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,62 @@ +//===- OffloadWrapper.h --r-*- 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] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module &M, GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module &M, ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module &

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

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

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-14 Thread via cfe-commits
@@ -0,0 +1,205 @@ +// RUN: %clang_cc1 -std=c++2a -verify -fsyntax-only -triple wasm32 %s +// RUN: %clang_cc1 -std=c++2a -verify -fsyntax-only -triple aarch64_be-linux-gnu %s + +struct A { + int a, b[3], c; + bool operator==(const A&) const = default; +}; + +constexpr auto a0 =

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-14 Thread Samuel Thibault via cfe-commits
https://github.com/sthibaul updated https://github.com/llvm/llvm-project/pull/78065 >From fefe6175fa21c668f58d69b0acc9abb89af981ab Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 14 Jan 2024 19:01:52 +0100 Subject: [PATCH 1/3] hurd: Fix indent --- clang/test/Driver/hurd.cpp | 16 +++

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-14 Thread Samuel Thibault via cfe-commits
@@ -78,3 +78,82 @@ // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/ld" {{.*}} "-m" "elf_i386" // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o" // CHECK-CROSS: "-L{{.*}}/Inputs/basi

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-14 Thread via cfe-commits
sethp wrote: I think this change is useful enough on its own that I'd like us to consider merging it: to me, teaching the compiler to do additional diffing or further clarifying the structure of complicated sub-objects feel like they'd benefit from having this work as a fallback. We could then

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-14 Thread Samuel Thibault via cfe-commits
@@ -2477,7 +2477,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( "x86_64-redhat-linux","x86_64-suse-linux", "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux", "x86_64-unknown-linux", - "x86_64-amazon-linux"

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-14 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 270c6cbda2acf1f60891e10667af6d9741b62009 151e8d9325e68259bfbf227d148ed4b508125856 --

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-14 Thread Samuel Thibault via cfe-commits
https://github.com/sthibaul updated https://github.com/llvm/llvm-project/pull/78065 >From fefe6175fa21c668f58d69b0acc9abb89af981ab Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 14 Jan 2024 19:01:52 +0100 Subject: [PATCH 1/3] hurd: Fix indent --- clang/test/Driver/hurd.cpp | 16 +++

[clang] [mlir] [libcxx] [llvm] [clang-tools-extra] [libc++][concepts] Implements concept helper `__libcpp_integer` (PR #78086)

2024-01-14 Thread Mark de Wever via cfe-commits
mordante wrote: > ``` > 86\test\std\utilities\format\format.functions\Output\formatted_size.pass.cpp.dir\t.tmp.exe' > # .---command stderr > # | Traceback (most recent call last): > # | File "C:\ws\src\libcxx\utils\run.py", line 72, in > # | exit(main()) > # | File "C:\ws\src

[clang] [mlir] [libcxx] [llvm] [clang-tools-extra] [libc++][concepts] Implements concept helper `__libcpp_integer` (PR #78086)

2024-01-14 Thread Mark de Wever via cfe-commits
https://github.com/mordante approved this pull request. LGTM! Thanks! Please ping me when you've update your other patch with these changes. https://github.com/llvm/llvm-project/pull/78086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[llvm] [mlir] [clang-tools-extra] [clang] [libcxx] [libc++][concepts] Implements concept helper `__libcpp_integer` (PR #78086)

2024-01-14 Thread Hristo Hristov via cfe-commits
H-G-Hristov wrote: > LGTM! Thanks! Please ping me when you've update your other patch with these > changes. Thank you! I'll ping you when I am ready with the other patch. I still need to implement additional tests. https://github.com/llvm/llvm-project/pull/78086 __

  1   2   3   >