[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/78022 Finds nested conditional operator. Nested conditional operators lead code hard to understand, so they should be splited as several statement and stored in temporary varibale. >From 0988bb25a35e5d50b44bf53d45

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes Finds nested conditional operator. Nested conditional operators lead code hard to understand, so they should be splited as several statement and stored in temporary varibale. --- Full diff: https://

[clang] [X86_64] fix empty structure vaarg in c++ (PR #77907)

2024-01-13 Thread Phoebe Wang via cfe-commits
@@ -2989,6 +2989,11 @@ static Address EmitX86_64VAArgFromMemory(CodeGenFunction &CGF, // an 8 byte boundary. uint64_t SizeInBytes = (CGF.getContext().getTypeSize(Ty) + 7) / 8; + + if (isEmptyRecord(CGF.getContext(), Ty, true)) { +SizeInBytes = 0; + } + -

[clang] [llvm] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2024-01-13 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 updated https://github.com/llvm/llvm-project/pull/76558 >From 590f4920ceb1a80d711d39624b0249cd9ff774d2 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 11 Aug 2023 22:16:01 -0400 Subject: [PATCH 1/4] [IR] Add an xpassing test for `f128` intrinsic lowering `f12

[clang] [llvm] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2024-01-13 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 updated https://github.com/llvm/llvm-project/pull/76558 >From 946581e0c6a06be92b16d74199b58a72be4b76f3 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 11 Aug 2023 22:16:01 -0400 Subject: [PATCH 1/4] [IR] Add an xpassing test for `f128` intrinsic lowering `f12

[clang] [clang-format] Add PenaltyBreakScopeResolution option. (PR #78015)

2024-01-13 Thread Emilia Kond via cfe-commits
https://github.com/rymiel approved this pull request. https://github.com/llvm/llvm-project/pull/78015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2024-01-13 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 updated https://github.com/llvm/llvm-project/pull/76558 >From 90a465d0a7e9744a4a8043152016e500927a0d95 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 11 Aug 2023 22:16:01 -0400 Subject: [PATCH 1/4] [IR] Add an xpassing test for `f128` intrinsic lowering `f12

[clang] [clang] Fix clang++ crash on assertions when compiling source (PR #70594)

2024-01-13 Thread Rajveer Singh Bharadwaj via cfe-commits
https://github.com/Rajveer100 updated https://github.com/llvm/llvm-project/pull/70594 >From 864bd0ef7b6bbb0bc1502ef5884ae3c261d3b156 Mon Sep 17 00:00:00 2001 From: Rajveer Date: Sun, 29 Oct 2023 18:37:17 +0530 Subject: [PATCH] [clang] Fix a crash in debug mode Resolves Issue #35603 This bug w

[llvm] [clang] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2024-01-13 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 updated https://github.com/llvm/llvm-project/pull/76558 >From 90a465d0a7e9744a4a8043152016e500927a0d95 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 11 Aug 2023 22:16:01 -0400 Subject: [PATCH 1/4] [IR] Add an xpassing test for `f128` intrinsic lowering `f12

[clang] [X86_64] fix empty structure vaarg in c++ (PR #77907)

2024-01-13 Thread via cfe-commits
https://github.com/hstk30-hw updated https://github.com/llvm/llvm-project/pull/77907 >From e4cd3bd69cc8dbf9fb922cf92207d71946b03b72 Mon Sep 17 00:00:00 2001 From: Longsheng Mou Date: Fri, 12 Jan 2024 18:24:08 +0800 Subject: [PATCH] [X86_64] fix empty structure vaarg in c++ SizeInBytes of empty

[clang] [llvm] [WIP] Correct lowering of `fp128` intrinsics (PR #76558)

2024-01-13 Thread Trevor Gross via cfe-commits
https://github.com/tgross35 updated https://github.com/llvm/llvm-project/pull/76558 >From 90a465d0a7e9744a4a8043152016e500927a0d95 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Fri, 11 Aug 2023 22:16:01 -0400 Subject: [PATCH 1/4] [IR] Add an xpassing test for `f128` intrinsic lowering `f12

[clang] [X86_64] fix empty structure vaarg in c++ (PR #77907)

2024-01-13 Thread Longsheng Mou via cfe-commits
@@ -2989,6 +2989,11 @@ static Address EmitX86_64VAArgFromMemory(CodeGenFunction &CGF, // an 8 byte boundary. uint64_t SizeInBytes = (CGF.getContext().getTypeSize(Ty) + 7) / 8; + + if (isEmptyRecord(CGF.getContext(), Ty, true)) { +SizeInBytes = 0; + } + -

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

2024-01-13 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-format] Separate License text and include blocks (PR #77918)

2024-01-13 Thread via cfe-commits
seranu wrote: > Maybe first only handle #42112 for what I will be really grateful. #42112 requests separating both license text and include directives blocks. > And then the stuff with the _license_, because I see discussion there. As far > as I can tell you just declare all comments on top o

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

2024-01-13 Thread via cfe-commits
@@ -586,7 +586,8 @@ template <> struct ScalarEnumerationTraits { static void enumeration(IO &IO, FormatStyle::SeparateDefinitionStyle &Value) { IO.enumCase(Value, "Leave", FormatStyle::SDS_Leave); -IO.enumCase(Value, "Always", FormatStyle::SDS_Always); +IO.enumCa

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

2024-01-13 Thread via cfe-commits
@@ -586,7 +586,8 @@ template <> struct ScalarEnumerationTraits { static void enumeration(IO &IO, FormatStyle::SeparateDefinitionStyle &Value) { IO.enumCase(Value, "Leave", FormatStyle::SDS_Leave); -IO.enumCase(Value, "Always", FormatStyle::SDS_Always); +IO.enumCa

[clang] [X86_64] fix empty structure vaarg in c++ (PR #77907)

2024-01-13 Thread Phoebe Wang via cfe-commits
phoebewang wrote: I checked it locally, the patch doesn't fix the reported problem: ``` $ clang pr77036.cpp && ./a.out -nan Fail ``` https://github.com/llvm/llvm-project/pull/77907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

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

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

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

2024-01-13 Thread via cfe-commits
@@ -65,18 +81,18 @@ void DefinitionBlockSeparator::separateBlocks( } return false; }; - unsigned NewlineCount = - (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Always ? 1 : 0) + 1; + unsigned NewlineCount = getNewlineCount(Style.SeparateDefinitionBlocks);

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

2024-01-13 Thread via cfe-commits
@@ -171,6 +187,31 @@ void DefinitionBlockSeparator::separateBlocks( return false; }; +// Separate License text. +const bool isComment = Lines[I]->isComment(); seranu wrote: changed https://github.com/llvm/llvm-project/pull/77918 ___

[clang] [llvm] [AArch64] Make Armv8.3-a extension set +pauth by default (PR #78027)

2024-01-13 Thread Anatoly Trosinenko via cfe-commits
https://github.com/atrosinenko created https://github.com/llvm/llvm-project/pull/78027 Add AEK_PAUTH to ARMV8_3A in TargetParser and let it propagate to ARMV8R, as it aligns with GCC defaults. After adding AEK_PAUTH, several tests from TargetParserTest.cpp crashed when trying to format an err

[llvm] [clang] [AArch64] Make Armv8.3-a extension set +pauth by default (PR #78027)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-clang Author: Anatoly Trosinenko (atrosinenko) Changes Add AEK_PAUTH to ARMV8_3A in TargetParser and let it propagate to ARMV8R, as it aligns with GCC defaults. After adding AEK_PAUTH, several tests from TargetParse

[llvm] [clang] [AArch64] Make Armv8.3-a extension set +pauth by default (PR #78027)

2024-01-13 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 460ff58f62456a1f3ccf61ec9cf9d10781bd41bb c960dacbdb58efbf2a2ef30eb4d0a9a640ce1071 --

[clang] [openmp] [mlir] [llvm] [lld] [libcxx] [libc++] Deprecate the _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS macro (PR #77692)

2024-01-13 Thread Mark de Wever via cfe-commits
mordante wrote: > > My suggestion on #69994 had been to stop implying > > `_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS` from > > `_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES` in LLVM 18 at the same time as > > deprecating it. Did you intend to _not_ do that, or was it just missed? > > We've also

[clang-tools-extra] clang-tidy: Add bugprone-eval-order (PR #78028)

2024-01-13 Thread via cfe-commits
https://github.com/maflcko created https://github.com/llvm/llvm-project/pull/78028 The evaluation order of function or constructor parameters is unspecified, which may be unknown to non-expert C++ developers, and can lead to bugs. Thus, add a clang-tidy check to catch presumed suspect code. #

[clang-tools-extra] clang-tidy: Add bugprone-eval-order (PR #78028)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (maflcko) Changes The evaluation order of function or constructor parameters is unspecified, which may be unknown to non-expert C++ developers, and can lead to bugs. Thus, add a clang-tidy check to catch presumed suspect code.

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

2024-01-13 Thread via cfe-commits
https://github.com/seranu updated https://github.com/llvm/llvm-project/pull/77918 >From 60a5851b40f03fb71b2a3d30972d51ba40244d68 Mon Sep 17 00:00:00 2001 From: Serban Ungureanu Date: Fri, 12 Jan 2024 14:33:32 +0200 Subject: [PATCH 1/2] [clang-format] Extend DefinitionBlockSeparatorStyle to sep

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

2024-01-13 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 2798b72ae7e5caad793169b77cbac47fe2362d0f 291c05994202393a858de1aafa8eeaf958223964 --

[clang-tools-extra] clang-tidy: Add bugprone-eval-order (PR #78028)

2024-01-13 Thread via cfe-commits
maflcko wrote: I guess this check has too many false-positives, so reading from a user-supplied list of class names as a config setting would make more sense? https://github.com/llvm/llvm-project/pull/78028 ___ cfe-commits mailing list cfe-commits@lis

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

2024-01-13 Thread via cfe-commits
https://github.com/seranu updated https://github.com/llvm/llvm-project/pull/77918 >From 60a5851b40f03fb71b2a3d30972d51ba40244d68 Mon Sep 17 00:00:00 2001 From: Serban Ungureanu Date: Fri, 12 Jan 2024 14:33:32 +0200 Subject: [PATCH 1/3] [clang-format] Extend DefinitionBlockSeparatorStyle to sep

[clang] [clang-format] TableGen keywords support. (PR #77477)

2024-01-13 Thread Hirofumi Nakamura via cfe-commits
hnakamura5 wrote: Thank you very much! https://github.com/llvm/llvm-project/pull/77477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-13 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall created https://github.com/llvm/llvm-project/pull/78030 These will be supported in the upcoming 2.2 release and so are gated on that version. Direct methods call `objc_send_initialize` if they are class methods that may not have called initialize. This is gua

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

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David Chisnall (davidchisnall) Changes These will be supported in the upcoming 2.2 release and so are gated on that version. Direct methods call `objc_send_initialize` if they are class methods that may not have called initialize. This

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

2024-01-13 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 8f76f1816ea63b7cc28e150ba319ffbfe6351f9e b286b9b07d60a7b3243ad5e8e6959a4d7d7fda49 --

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-13 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 created https://github.com/llvm/llvm-project/pull/78032 Support the handling of TableGen's multiline string (code) literal. That has the form, [{ this is the string possibly with multi line... }] This is a separated part from https://github.com/llvm/llvm-project/pu

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Hirofumi Nakamura (hnakamura5) Changes Support the handling of TableGen's multiline string (code) literal. That has the form, [{ this is the string possibly with multi line... }] This is a separated part from https://github.com/llvm

[clang] 1e51b35 - [RISCV] Change required features for Zvfhmin intrinsics from ZvfhminOrZvfh to Zvfhmin (#77866)

2024-01-13 Thread via cfe-commits
Author: Jim Lin Date: 2024-01-13T07:11:15-06:00 New Revision: 1e51b35981063ea3408d3dab6c103a23f94c25e0 URL: https://github.com/llvm/llvm-project/commit/1e51b35981063ea3408d3dab6c103a23f94c25e0 DIFF: https://github.com/llvm/llvm-project/commit/1e51b35981063ea3408d3dab6c103a23f94c25e0.diff LOG:

[clang] [RISCV] Change required features for Zvfhmin intrinsics from ZvfhminOrZvfh to Zvfhmin (PR #77866)

2024-01-13 Thread Jim Lin via cfe-commits
https://github.com/tclin914 closed https://github.com/llvm/llvm-project/pull/77866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Support of TableGen formatting. (PR #76059)

2024-01-13 Thread Hirofumi Nakamura via cfe-commits
hnakamura5 wrote: Multi line string part https://github.com/llvm/llvm-project/pull/78032 https://github.com/llvm/llvm-project/pull/76059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [coverage] skipping code coverage for 'if constexpr' and 'if consteval' [WIP] (PR #78033)

2024-01-13 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot created https://github.com/llvm/llvm-project/pull/78033 `if constexpr` and `if consteval` conditional statements code coverage should behave more like a preprocesor `#if`-s than normal ConditionalStmt. This PR should fix that. From 50856e444d4fd9dc92dab34ed8ad302

[clang] [llvm] [coverage] skipping code coverage for 'if constexpr' and 'if consteval' [WIP] (PR #78033)

2024-01-13 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot converted_to_draft https://github.com/llvm/llvm-project/pull/78033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [coverage] skipping code coverage for 'if constexpr' and 'if consteval' [WIP] (PR #78033)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Hana Dusíková (hanickadot) Changes `if constexpr` and `if consteval` conditional statements code coverage should behave more like a preprocesor `#if`-s than normal ConditionalStmt. This PR should fix that. --- Full diff: https://

[clang] [llvm] [coverage] skipping code coverage for 'if constexpr' and 'if consteval' [WIP] (PR #78033)

2024-01-13 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/78033 From 7e09f8a2dc9026047d34e0d6f4f55df9ab196fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Sat, 13 Jan 2024 14:54:21 +0100 Subject: [PATCH] [coverage] skipping code coverage for

[llvm] [clang] [coverage] skipping code coverage for 'if constexpr' and 'if consteval' [WIP] (PR #78033)

2024-01-13 Thread Hana Dusíková via cfe-commits
hanickadot wrote: ![coverage-change-if-constexpr](https://github.com/llvm/llvm-project/assets/6557263/7c579d4f-0f14-4c7e-b9af-b0ec15b389ee) https://github.com/llvm/llvm-project/pull/78033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [SemaCXX] Make __builtin_addressof more like std::addressof (PR #78035)

2024-01-13 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/78035 Fixes #77928 There are a few places which expect that, if for an expression `E->getType()->isBuiltinType(BuiltinType::Overload)`, then `E` must be an `OverloadExpr` or a `UnaryOperator` where `cast(E)->getOp

[clang] [SemaCXX] Make __builtin_addressof more like std::addressof (PR #78035)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes Fixes #77928 There are a few places which expect that, if for an expression `E->getType()->isBuiltinType(BuiltinType::Overload)`, then `E` must be an `OverloadExpr` or a `UnaryOperator` where `cast

[clang] [SemaCXX] Make __builtin_addressof more like std::addressof (PR #78035)

2024-01-13 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 8d817f6479a5df874028a8b40fd30aecd3479005 7384e99c5fc1bcba1a304735243e49e9738691aa --

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

2024-01-13 Thread Jie Fu 傅杰 via cfe-commits
https://github.com/DamonFool created https://github.com/llvm/llvm-project/pull/78036 The following SyntaxWarning was observed with Python3.12 . ``` llvm-project/clang/tools/libclang/linker-script-to-export-list.py:9: SyntaxWarning: invalid escape sequence '\s' m = re.search("^\s+(clang_[^;]+)

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

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jie Fu (傅杰) (DamonFool) Changes The following SyntaxWarning was observed with Python3.12 . ``` llvm-project/clang/tools/libclang/linker-script-to-export-list.py:9: SyntaxWarning: invalid escape sequence '\s' m = re.search("^\s+(clang_[^;

[llvm] [clang] [coverage] skipping code coverage for 'if constexpr' and 'if consteval' [WIP] (PR #78033)

2024-01-13 Thread Hana Dusíková via cfe-commits
hanickadot wrote: ![coverage-change](https://github.com/llvm/llvm-project/assets/6557263/f4d8ea72-a197-4fe5-8f1e-254e44fde0c1) https://github.com/llvm/llvm-project/pull/78033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[llvm] [clang] [coverage] skipping code coverage for 'if constexpr' and 'if consteval' [WIP] (PR #78033)

2024-01-13 Thread Hana Dusíková via cfe-commits
hanickadot wrote: (still needs some polishing) ![coverage-compare](https://github.com/llvm/llvm-project/assets/6557263/b62fae27-ca7a-4f48-9d16-d04a25262ea6) https://github.com/llvm/llvm-project/pull/78033 ___ cfe-commits mailing list cfe-commits@lists

[clang] [SemaCXX] Make __builtin_addressof more like std::addressof (PR #78035)

2024-01-13 Thread via cfe-commits
cor3ntin wrote: I think the approach makes sense but I'd like other folks to weight in @AaronBallman @erichkeane. Note that even if we wanted in the long term to do the work to support overloaded expression (which i would agree is probably not a high priority), fixing the crash seems to be th

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-13 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/77768 >From 7b6bd8158ecc4645e26ec2f6fd6e7c5215bb038a Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 22 Jul 2023 20:07:00 +0100 Subject: [PATCH 1/2] [SemaCXX] Implement CWG2137 (list-initialization from objec

[clang] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78040 Test is based on [P0136R1](https://wg21.link/p0136r1) wording instead of proposed resolution in the issue itself. This patch also expands related CWG1573 test with an additional test case. Existing `3.9` status

[clang] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes Test is based on [P0136R1](https://wg21.link/p0136r1) wording instead of proposed resolution in the issue itself. This patch also expands related CWG1573 test with an additional test case. Existing `3

[libcxx] [clang] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-13 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/77768 >From 344366c3f749c43376aca09c5bd563ec823b76f9 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 22 Jul 2023 20:07:00 +0100 Subject: [PATCH 1/2] [SemaCXX] Implement CWG2137 (list-initialization from objec

[clang] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I was way too deep into P0136R1 [Rewording inheriting constructors (core issue 1941 et al)](https://wg21.link/p0136r1) when I realized Richard has written tests for all issues covered there long ago. So I decided to carry on and check whether those tests would benefit from addit

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-13 Thread Mital Ashok via cfe-commits
@@ -132,6 +142,36 @@ namespace dr2126 { // dr2126: 12 #endif } +namespace dr2137 { // dr2137: 18 +#if __cplusplus >= 201103L + struct Q { +Q(); +Q(Q&&); +Q(std::initializer_list) = delete; // since-cxx11-note 2 {{has been explicitly marked deleted here}} + }; +

[clang] [libcxx] [SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (PR #77768)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Looks perfect to me now. Thank you! https://github.com/llvm/llvm-project/pull/77768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] Recognize friend operator != to fix ambiguity with operator== (PR #70217)

2024-01-13 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: Will wait for the EWG to give final guidance. https://github.com/llvm/llvm-project/pull/70217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Recognize friend operator != to fix ambiguity with operator== (PR #70217)

2024-01-13 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/70217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread via cfe-commits
cor3ntin wrote: For completeness, can you add a couple of tests covering the note (ie, template case?) Otherwise, LGTM https://github.com/llvm/llvm-project/pull/78040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-lldb Author: Andrey Ali Khan Bolshakov (bolshakov-a) Changes Previously committed as 9e08e51a20d0d2b1c5724bb17e969d036fced4cd, and reverted because a dependency commit was reverted, then committed again as 4b574008aef5a7235c1

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

2024-01-13 Thread via cfe-commits
@@ -6,6 +6,6 @@ output_file = open(sys.argv[2], "w") for line in input_file: -m = re.search("^\s+(clang_[^;]+)", line) +m = re.search("^\\s+(clang_[^;]+)", line) cor3ntin wrote: ```suggestion m = re.search(r"^\s+(clang_[^;]+)", line) ``` Making i

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -25,7 +25,7 @@ template struct S {}; // #dr1801-S S V; // #dr1801-S-i // cxx98-14-error@-1 {{non-type template argument does not refer to any declaration}} // cxx98-14-note@#dr1801-S {{template parameter is declared here}} -// since-cxx17-error@#dr1801-S-i {{non-type tem

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -5401,6 +5409,8 @@ std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { // feasible some day. return TA.getAsIntegral().getBitWidth() <= 64 && IsReconstitutableType(TA.getIntegralType()); + case Template

[clang-tools-extra] [lldb] [clang] [Clang] [c++20] P1907R1: Support for generalized non-type template ar… (PR #77428)

2024-01-13 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: @cor3ntin, #78041. https://github.com/llvm/llvm-project/pull/77428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AVX10][Doc] Add documentation about AVX10 options and their attentions (PR #77925)

2024-01-13 Thread Evgenii Kudriashov via cfe-commits
@@ -3963,6 +3963,60 @@ implicitly included in later levels. - ``-march=x86-64-v3``: (close to Haswell) AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, XSAVE - ``-march=x86-64-v4``: AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL +`Intel AVX10 ISA

[clang] [AVX10][Doc] Add documentation about AVX10 options and their attentions (PR #77925)

2024-01-13 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/77925 ___ 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-13 Thread via cfe-commits
@@ -0,0 +1,31 @@ +.. title:: clang-tidy - readability-use-std-min-max + +readability-use-std-min-max +=== + +Replaces certain conditional statements with equivalent ``std::min`` or ``std::max`` expressions, +improving readability and promoting the use of

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

2024-01-13 Thread via cfe-commits
@@ -0,0 +1,33 @@ +.. title:: clang-tidy - readability-use-std-min-max + +readability-use-std-min-max +=== + +Replaces certain conditional statements with equivalent ``std::min`` or ``std::max`` expressions, EugeneZelenko wrote: Line is s

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

2024-01-13 Thread via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %check_clang_tidy %s readability-use-std-min-max %t + +void foo() { + int value1,value2,value3; + short value4; + + // CHECK-MESSAGES: :[[@LINE+1]]:3: warning: use `std::max` instead of `<` [readability-use-std-min-max] + if (value1 < value2) +va

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

2024-01-13 Thread via cfe-commits
@@ -0,0 +1,31 @@ +.. title:: clang-tidy - readability-use-std-min-max + +readability-use-std-min-max +=== + +Replaces certain conditional statements with equivalent ``std::min`` or ``std::max`` expressions, +improving readability and promoting the use of

[clang] [AVX10][Doc] Add documentation about AVX10 options and their attentions (PR #77925)

2024-01-13 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud edited https://github.com/llvm/llvm-project/pull/77925 ___ 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-13 Thread via cfe-commits
https://github.com/EugeneZelenko 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] [clang] Add test for CWG1350 (PR #78040)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78040 >From 62620337b64c64535d76c5003f9acd450ab527f7 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 13 Jan 2024 17:32:37 +0300 Subject: [PATCH 1/2] [clang] Add test for CWG1350 Test is based on [P0136R1]

[lldb] [clang-tools-extra] [clang] [Clang] [c++20] P1907R1: Support for generalized non-type template ar… (PR #77428)

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

[clang-tools-extra] [clang] [lldb] [Clang] [c++20] P1907R1: Support for generalized non-type template ar… (PR #77428)

2024-01-13 Thread via cfe-commits
cor3ntin wrote: Author opened #78041 - closing https://github.com/llvm/llvm-project/pull/77428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AVX10][Doc] Add documentation about AVX10 options and their attentions (PR #77925)

2024-01-13 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud edited https://github.com/llvm/llvm-project/pull/77925 ___ 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 new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread via cfe-commits
@@ -0,0 +1,33 @@ +//===--- AvoidNestedConditionalOperatorCheck.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: Apache-

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread via cfe-commits
@@ -0,0 +1,33 @@ +//===--- AvoidNestedConditionalOperatorCheck.h - clang-tidy --*- C++ -*-===// EugeneZelenko wrote: Please add `-`. https://github.com/llvm/llvm-project/pull/78022 ___ cfe-commits mailing list cfe-comm

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-13 Thread via cfe-commits
@@ -0,0 +1,20 @@ +.. title:: clang-tidy - readability-avoid-nested-conditional-operator + +readability-avoid-nested-conditional-operator += EugeneZelenko wrote: Please adjust length. https://github.com/llvm/llvm-pr

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: C++ DR test changes look good to me. https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang-tools-extra] [clang] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
@@ -25,7 +25,7 @@ template struct S {}; // #dr1801-S S V; // #dr1801-S-i // cxx98-14-error@-1 {{non-type template argument does not refer to any declaration}} // cxx98-14-note@#dr1801-S {{template parameter is declared here}} -// since-cxx17-error@#dr1801-S-i {{non-type tem

[clang-tools-extra] clang-tidy: Add bugprone-eval-order (PR #78028)

2024-01-13 Thread via cfe-commits
@@ -0,0 +1,40 @@ +.. title:: clang-tidy - bugprone-eval-order + +bugprone-eval-order +=== + +Order of evaluation is unspecified for function and constructor parameters, +unless the constructor uses C++11 list-initialization. + +This may lead to issues in code that

[clang-tools-extra] clang-tidy: Add bugprone-eval-order (PR #78028)

2024-01-13 Thread via cfe-commits
@@ -0,0 +1,40 @@ +.. title:: clang-tidy - bugprone-eval-order + +bugprone-eval-order +=== + +Order of evaluation is unspecified for function and constructor parameters, EugeneZelenko wrote: Please synchronize with statement in Release Notes. http

[clang-tools-extra] [clang-tidy] Add option to ignore macros in `readability-simplify-boolean-expr` check (PR #78043)

2024-01-13 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny created https://github.com/llvm/llvm-project/pull/78043 None From 7dadf5494bbe53048d01ec78d7facd91085b2198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sat, 13 Jan 2024 16:36:48 +0100 Subject: [PATCH] [clang-tidy] Add option to ignore macro

[clang-tools-extra] [clang-tidy] Add option to ignore macros in `readability-simplify-boolean-expr` check (PR #78043)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Danny Mösch (SimplyDanny) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/78043.diff 5 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp (+5) - (modified) clang-

[llvm] [clang-tools-extra] [clang] Add OpenSSF Best Practice Badge (PR #77398)

2024-01-13 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/77398 >From 71574d1f8b37747b2b7176fffee8483a53fee4be Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 8 Jan 2024 16:39:00 -0800 Subject: [PATCH] Add OpenSSF Best Practice Badge --- README.md | 1 + 1 file chan

[clang-tools-extra] [clang-tidy] Add option to ignore macros in `readability-simplify-boolean-expr` check (PR #78043)

2024-01-13 Thread Danny Mösch via cfe-commits
SimplyDanny wrote: @njames93: The test currently fails. You likely see immediately why. I don't have a clue at the moment. Feels like I tried everything already. 😶 https://github.com/llvm/llvm-project/pull/78043 ___

[clang-tools-extra] [clang] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread via cfe-commits
@@ -25,7 +25,7 @@ template struct S {}; // #dr1801-S S V; // #dr1801-S-i // cxx98-14-error@-1 {{non-type template argument does not refer to any declaration}} // cxx98-14-note@#dr1801-S {{template parameter is declared here}} -// since-cxx17-error@#dr1801-S-i {{non-type tem

[llvm] [clang-tools-extra] [clang] Add OpenSSF Best Practice Badge (PR #77398)

2024-01-13 Thread Tom Stellard via cfe-commits
https://github.com/tstellar closed https://github.com/llvm/llvm-project/pull/77398 ___ 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 option to ignore macros in `readability-simplify-boolean-expr` check (PR #78043)

2024-01-13 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/78043 From 55d278f3f33716b5b18d46048df7e664bcdfed6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sat, 13 Jan 2024 16:36:48 +0100 Subject: [PATCH] [clang-tidy] Add option to ignore macros in

[clang-tools-extra] [clang-tidy] Add option to ignore macros in `readability-simplify-boolean-expr` check (PR #78043)

2024-01-13 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny edited https://github.com/llvm/llvm-project/pull/78043 ___ 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-13 Thread Bhuminjay Soni via cfe-commits
https://github.com/11happy updated https://github.com/llvm/llvm-project/pull/77816 >From 1883d987b2f83adaef05fdb47ae25c7b06582a64 Mon Sep 17 00:00:00 2001 From: 11happy Date: Fri, 12 Jan 2024 00:02:46 +0530 Subject: [PATCH 01/14] Add readability check to suggest replacement of conditional stat

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

2024-01-13 Thread Bhuminjay Soni via cfe-commits
11happy wrote: I have added the initialisation of variables and also added tests involving constexpr,functions etc. https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

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

2024-01-13 Thread via cfe-commits
@@ -0,0 +1,57 @@ +// 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] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-01-13 Thread via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %check_clang_tidy %s readability-use-std-min-max %t + +void foo() { + int value1,value2,value3; + short value4; + + // CHECK-MESSAGES: :[[@LINE+1]]:3: warning: use `std::max` instead of `<` [readability-use-std-min-max] + if (value1 < value2) +va

[clang-tools-extra] [clang] [llvm] workflows: Refactor release-tasks.yml (PR #69523)

2024-01-13 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/69523 >From 6a7f298f403e0e454644f3d945242120f8b2b321 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 18 Oct 2023 04:56:28 -0700 Subject: [PATCH 1/4] workflows: Refactor release-tasks.yml * Split out the lit re

  1   2   3   4   >