[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/5] workflows: Refactor release-tasks.yml * Split out the lit re

[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
@@ -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] [lldb] [c++20] P1907R1: Support for generalized non-type template arguments of scalar type. (PR #78041)

2024-01-13 Thread via cfe-commits
https://github.com/cor3ntin 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 via cfe-commits
https://github.com/cor3ntin commented: A few comments/nitpicks Should we add a couple of PCH tests ? 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

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

2024-01-13 Thread via cfe-commits
@@ -25,10 +25,13 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" #include "clang/AST/DeclObjC.h" +#include "clang/AST/Expr.h" #include "clang/AST/NSAPI.h" #include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" #include "clang/Basic/Builtins.h" #inc

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

2024-01-13 Thread via cfe-commits
@@ -12,6 +12,7 @@ #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/DeclVisitor.h" +#include "clang/AST/ODRHash.h" cor3ntin wrote: Is the header necessary? https://github.com/llvm/llvm-project/pull/78041 __

[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
@@ -628,6 +628,10 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, return IsStructurallyEquivalent(Context, Arg1.getAsExpr(), Arg2.getAsExpr()); + case TemplateArgument::StructuralValue: +// FIXME: Do

[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
@@ -80,6 +81,13 @@ class TemplateArgument { /// that was provided for an integral non-type template parameter. Integral, +/// The template argument is a non-type template argument that can't be +/// represented by the special-case Declaration, NullPtr, or Integ

[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
@@ -14,6 +14,11 @@ #include "clang/AST/ODRHash.h" +#include "clang/AST/APValue.h" +#include "clang/AST/ASTContext.h" +#include "clang/AST/CharUnits.h" +#include "clang/AST/Decl.h" +#include "clang/AST/DeclCXX.h" cor3ntin wrote: Do we actually need these head

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

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

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

2024-01-13 Thread Tom Stellard via cfe-commits
tstellar wrote: Ping. https://github.com/llvm/llvm-project/pull/69523 ___ 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/15] 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
@@ -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, 11happy wrote: Oh sorry I misu

[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
@@ -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, 11happy wrote: I have fixed it

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

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %check_clang_tidy -check-suffixes=,MACROS %s readability-simplify-boolean-expr %t + +// Ignore expressions in macros. +// RUN: %check_clang_tidy %s readability-simplify-boolean-expr %t +// RUN: -- -config="{CheckOptions: [{key: readability-simplify-

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

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -500,6 +500,10 @@ Changes in existing checks ` check to identify calls to static member functions with out-of-class inline definitions. +- Added option `IgnoreMacros` to :doc:`readability-simplify-boolean-expr PiotrZSL wrote: follow current style of c

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

2024-01-13 Thread Piotr Zegar via cfe-commits
@@ -277,6 +277,9 @@ class SimplifyBooleanExprCheck::Visitor : public RecursiveASTVisitor { } bool dataTraverseStmtPre(Stmt *S) { +if (Check->IgnoreMacros && S->getBeginLoc().isMacroID()) { PiotrZSL wrote: what if S is nullptr ? it will crash, move S

[clang] [lldb] [clang-tools-extra] [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
@@ -80,6 +81,13 @@ class TemplateArgument { /// that was provided for an integral non-type template parameter. Integral, +/// The template argument is a non-type template argument that can't be +/// represented by the special-case Declaration, NullPtr, or Integ

[clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-13 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/4] [CLANG] Add warning when comparing to INF or NAN in fast math

[clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

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 f64d1c810a2b8d89c3760cefb957da499c087404 d82f5690f4811552241b22b425de30dfbc84b049 --

[clang] [lldb] [clang-tools-extra] [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,10 +25,13 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" #include "clang/AST/DeclObjC.h" +#include "clang/AST/Expr.h" #include "clang/AST/NSAPI.h" #include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" #include "clang/Basic/Builtins.h" #inc

[clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-13 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/5] [CLANG] Add warning when comparing to INF or NAN in fast math

[openmp] [libcxx] [llvm] [compiler-rt] [libcxxabi] [clang] [mlir] [lld] [runtimes] Use LLVM libunwind from libc++abi by default (PR #77687)

2024-01-13 Thread Michał Górny via cfe-commits
mgorny wrote: FTR, this breaks standalone builds against installed LLVM's libunwind since `unwind_shared` target doesn't exist. However, as long as I can pass `-DLIBCXXABI_USE_LLVM_UNWINDER=OFF` that just does the right thing, it's fine with me. https://github.com/llvm/llvm-project/pull/77687

[lldb] [clang] [clang-tools-extra] [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
@@ -12,6 +12,7 @@ #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/DeclVisitor.h" +#include "clang/AST/ODRHash.h" bolshakov-a wrote: `ODRHash` is used inside the newly added code. Btw, what do you mean by "necessary"? I t

[lldb] [clang] [clang-tools-extra] [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
@@ -14,6 +14,11 @@ #include "clang/AST/ODRHash.h" +#include "clang/AST/APValue.h" +#include "clang/AST/ASTContext.h" +#include "clang/AST/CharUnits.h" +#include "clang/AST/Decl.h" +#include "clang/AST/DeclCXX.h" bolshakov-a wrote: Types from all of them are

[lldb] [clang] [clang-tools-extra] [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
https://github.com/bolshakov-a 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

[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
https://github.com/bolshakov-a updated https://github.com/llvm/llvm-project/pull/78041 >From b178deb9479e86d2899466c521ebfb28a08d27cb Mon Sep 17 00:00:00 2001 From: Andrey Ali Khan Bolshakov Date: Sun, 6 Aug 2023 19:38:23 +0300 Subject: [PATCH] [c++20] P1907R1: Support for generalized non-type

[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
@@ -628,6 +628,10 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, return IsStructurallyEquivalent(Context, Arg1.getAsExpr(), Arg2.getAsExpr()); + case TemplateArgument::StructuralValue: +// FIXME: Do

[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
bolshakov-a wrote: > Should we add a couple of PCH tests ? [clang/test/Modules/odr_hash.cpp](https://github.com/llvm/llvm-project/pull/78041/files#diff-b0662120e3a8a2bf3ccd95b9e8943640816b457c00e662ebfdd648632e383314) should cover AST serialization/deserialization. But I could missing something

[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
@@ -12,6 +12,7 @@ #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/DeclVisitor.h" +#include "clang/AST/ODRHash.h" cor3ntin wrote: Yep, this one looks that it's needed, sorry. The idea (for the other comments), is that we

[clang] [lldb] [clang-tools-extra] [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
bolshakov-a wrote: Btw, I have a local branch with a few distinct commits. I could temporarily push it to simplify review process, and then squash them before merging. https://github.com/llvm/llvm-project/pull/78041 ___ cfe-commits mailing list cfe-co

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2024-01-13 Thread Dan Klishch via cfe-commits
https://github.com/DanShaders updated https://github.com/llvm/llvm-project/pull/71148 >From b26dd88d456cff7f412cdff6126d0e48454d9eb9 Mon Sep 17 00:00:00 2001 From: Dan Klishch Date: Fri, 3 Nov 2023 21:18:06 -0400 Subject: [PATCH] [clang] Stub out gcc_struct attribute This commit implements gcc

[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 1/4] [clang-tidy] Add option to ignore macros

[clang] [clang] Stub out gcc_struct attribute (PR #71148)

2024-01-13 Thread Dan Klishch via cfe-commits
DanShaders wrote: @MaskRay Bump https://github.com/llvm/llvm-project/pull/71148 ___ 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
SimplyDanny wrote: Thanks @PiotrZSL for the review! I've addressed your remarks. Would you [support me](https://github.com/llvm/llvm-project/pull/78043#discussion_r1451556010) with the test as well? https://github.com/llvm/llvm-project/pull/78043 __

[clang] [lldb] [clang-tools-extra] [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
@@ -12,6 +12,7 @@ #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/DeclVisitor.h" +#include "clang/AST/ODRHash.h" bolshakov-a wrote: Just to clarify: do you insist that `#include` set added in a PR should be minimal for c

[clang] [lldb] [clang-tools-extra] [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
https://github.com/bolshakov-a updated https://github.com/llvm/llvm-project/pull/78041 >From 459f2c778d42fd5132bf69695537dc5f5a26b160 Mon Sep 17 00:00:00 2001 From: Andrey Ali Khan Bolshakov Date: Sun, 6 Aug 2023 19:38:23 +0300 Subject: [PATCH] [c++20] P1907R1: Support for generalized non-type

[clang] [lldb] [clang-tools-extra] [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,10 +25,13 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" #include "clang/AST/DeclObjC.h" +#include "clang/AST/Expr.h" #include "clang/AST/NSAPI.h" #include "clang/AST/StmtVisitor.h" +#include "clang/AST/Type.h" #include "clang/Basic/Builtins.h" #inc

[clang] [lldb] [clang-tools-extra] [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
@@ -14,6 +14,11 @@ #include "clang/AST/ODRHash.h" +#include "clang/AST/APValue.h" +#include "clang/AST/ASTContext.h" +#include "clang/AST/CharUnits.h" +#include "clang/AST/Decl.h" +#include "clang/AST/DeclCXX.h" bolshakov-a wrote: Removed. https://github.co

[clang] [clang] Reword apologetic Clang diagnostic messages (PR #76310)

2024-01-13 Thread Pavel Gueorguiev via cfe-commits
pav-code wrote: I fixed all the comments. So what's the next step? https://github.com/llvm/llvm-project/pull/76310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Set the decl context to the instantiated constructor when instantiating the explicit specifier (PR #78053)

2024-01-13 Thread via cfe-commits
https://github.com/LYP951018 created https://github.com/llvm/llvm-project/pull/78053 The code that causes the bug: ```cpp template concept Q = requires(T t) { [](int*){}(t); }; struct A { template explicit(Q) A(T); }; A a = 1; ``` When instantiating a lambda, the calculation of the lambda's de

[clang] [Clang] Set the decl context to the instantiated constructor when instantiating the explicit specifier (PR #78053)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: 刘雨培 (LYP951018) Changes The code that causes the bug: ```cpp template concept Q = requires(T t) { [](int*){}(t); }; struct A { template explicit(Q) A(T); }; A a = 1; ``` When instantiating a lambda, the calculation of

[libunwind] [libunwind] Move errno.h and signal.h includes under the block where they're needed (PR #78054)

2024-01-13 Thread Louis Dionne via cfe-commits
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/78054 Commit fc1c478709e3 added includes of and to UnwindCursor.hpp. The library previously built on platforms where these headers are not provided. These headers should be included only in the case where they are

[libunwind] [libunwind] Move errno.h and signal.h includes under the block where they're needed (PR #78054)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Louis Dionne (ldionne) Changes Commit fc1c478709e3 added includes of and to UnwindCursor.hpp. The library previously built on platforms where these headers are not provided. These headers should be included only i

[libunwind] [libunwind] Move errno.h and signal.h includes under the block where they're needed (PR #78054)

2024-01-13 Thread Louis Dionne via cfe-commits
ldionne wrote: CC @ajordanr-google By the way, I noticed that you checked the "hide my email address" Github feature, which leads to your commits being authored as `Jordan R AW <103465530+ajordanr-goo...@users.noreply.github.com>`. Please uncheck that, we strive to make it easy to track who

[libunwind] [libunwind] Move errno.h and signal.h includes under the block where they're needed (PR #78054)

2024-01-13 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. https://github.com/llvm/llvm-project/pull/78054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Set the decl context to the instantiated constructor when instantiating the explicit specifier (PR #78053)

2024-01-13 Thread via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/78053 From ebd57b11fbce96a493c57d4c459baca6bcd6e9d2 Mon Sep 17 00:00:00 2001 From: letrec Date: Sun, 14 Jan 2024 00:59:23 +0800 Subject: [PATCH 1/2] add release notes --- clang/docs/ReleaseNotes.rst

[clang-tools-extra] e9df6fe - [clang-tidy] Invalid Fix-It generated for implicit-widening-multiplication-result (#76315)

2024-01-13 Thread via cfe-commits
Author: Félix-Antoine Constantin Date: 2024-01-13T19:07:11+01:00 New Revision: e9df6fec59b3ea9bc7f66236bc94517bcb00f15a URL: https://github.com/llvm/llvm-project/commit/e9df6fec59b3ea9bc7f66236bc94517bcb00f15a DIFF: https://github.com/llvm/llvm-project/commit/e9df6fec59b3ea9bc7f66236bc94517bcb0

[clang-tools-extra] [clang-tidy] Invalid Fix-It generated for implicit-widening-multiplication-result (PR #76315)

2024-01-13 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/76315 ___ 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-13 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg created https://github.com/llvm/llvm-project/pull/78057 This patch moves `clang/tools/clang-linker-wrapper/OffloadWrapper.*` to `llvm/Frontend/Offloading` allowing them to be reutilized by other projects. Additionally, it makes minor modifications to the API to make

[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
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 1/2] [coverage] skipping code coverage

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

2024-01-13 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 1/4] [libc++][numeric] P0543R3: Saturation arithmetic Implements: ht

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/78060 As per [CWG2351](https://wg21.link/CWG2351), allow `void{}`, treated the same as `void()`: a prvalue expression of type `void` that performs no initialization. Note that the AST for the expression `T{}` look

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes As per [CWG2351](https://wg21.link/CWG2351), allow `void{}`, treated the same as `void()`: a prvalue expression of type `void` that performs no initialization. Note that the AST for the expression `T{}` l

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: DR testing part looks fine. I'm worried there are no regular tests. It's also not clear what happens in 98 mode. New code doesn't seem to care about language mode. https://github.com/llvm/llvm-project/pull/78060 _

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Initializer list syntax isn't available in C++98 mode (even as an extension? I can't find the option) Even so, as a defect report it should apply to all prior C++ versions. https://github.com/llvm/llvm-project/pull/78060 ___ cfe-co

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

2024-01-13 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg updated https://github.com/llvm/llvm-project/pull/78057 >From f56a7395b19ff634b3ac963204348db2575fdf87 Mon Sep 17 00:00:00 2001 From: Fabian Mora Date: Sat, 13 Jan 2024 17:31:51 + Subject: [PATCH 1/2] Move OffloadWrapper.* to llvm/Frontend/Offloading --- .../i

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

2024-01-13 Thread via cfe-commits
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/78061 strsep has restrict qualifiers, as well as strtok_r. Add the restrict qualifiers to them. Source: https://man7.org/linux/man-pages/man3/strsep.3.html >From 04e6077b5f22d50e8ccc2aace3af7b27af922b76 Mon Sep 1

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

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libc @llvm/pr-subscribers-clang Author: AtariDreams (AtariDreams) Changes strsep has restrict qualifiers, as well as strtok_r. Add the restrict qualifiers to them. Source: https://man7.org/linux/man-pages/man3/strsep.3.html --- Full diff: https://gith

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

2024-01-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/78061 >From 681e16edc6e73179d65ddb11bc5d7d888f672680 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] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-13 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg ready_for_review 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

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

2024-01-13 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/78061 >From df4e56a3b1a580e3fc20d0335377733f5e047ec7 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] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fabian Mora (fabianmcg) Changes This patch moves `clang/tools/clang-linker-wrapper/OffloadWrapper.*` to `llvm/Frontend/Offloading` allowing them to be reutilized by other projects. Additionally, it makes minor modifications to the API to m

[libunwind] [libunwind] Move errno.h and signal.h includes under the block where they're needed (PR #78054)

2024-01-13 Thread Jordan R AW via cfe-commits
ajordanr-google wrote: Done! Thanks for the heads up on the email. I'm not too familiar with the GitHub workflow still. Also thanks for this fix PR. https://github.com/llvm/llvm-project/pull/78054 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

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

2024-01-13 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 1/5] [libc++][numeric] P0543R3: Saturation arithmetic Implements: ht

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Initializer list syntax isn't available in C++98 mode (even as an extension? > I can't find the option) I'm not confident enough to properly review your changes, but my line of thinking is the following: `void()` is available in all language modes, but you're adding C++11-spe

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

2024-01-13 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. 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] [clang-format] Add SpacesInParensOption for attributes and filtering for repeated parens (PR #77522)

2024-01-13 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/77522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add ShortReturnTypeLength option. (PR #78011)

2024-01-13 Thread Björn Schäpers via cfe-commits
@@ -3928,6 +3928,13 @@ struct FormatStyle { /// \version 13 unsigned ShortNamespaceLines; + /// When AlwaysBreakAfterReturnType is None, line breaks are prevented after HazardyKnusperkeks wrote: ```suggestion /// When ``AlwaysBreakAfterReturnType`` is

[clang] [clang-format] Add ShortReturnTypeLength option. (PR #78011)

2024-01-13 Thread Björn Schäpers via cfe-commits
@@ -3928,6 +3928,13 @@ struct FormatStyle { /// \version 13 unsigned ShortNamespaceLines; + /// When AlwaysBreakAfterReturnType is None, line breaks are prevented after + /// short return types. This configures the character limit for a type to be + /// regarded as shor

[clang] [Clang] Set the decl context to the instantiated constructor when instantiating the explicit specifier (PR #78053)

2024-01-13 Thread via cfe-commits
@@ -743,3 +743,21 @@ struct S { explicit(1L) S(char, char, char); }; } // namespace P1401 + +#if __cplusplus > 201703L +namespace GH67058 { +template +concept Q = requires(T t) { [](int *) {}(t); }; +struct A { + template explicit(Q) A(T); +}; +A a = 1; + +struct B { // ex

[clang] [Clang] Set the decl context to the instantiated constructor when instantiating the explicit specifier (PR #78053)

2024-01-13 Thread via cfe-commits
https://github.com/cor3ntin commented: I think it looks good but I'd like @erichkeane's input. I also wonder whether we should look at the instantiated parent to determine whether the lambda is dependent, instead of just looking at the non-instantiated parent. Might fix a few bugs and it's an

[clang] [Clang] Set the decl context to the instantiated constructor when instantiating the explicit specifier (PR #78053)

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

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Mital Ashok via cfe-commits
MitalAshok wrote: Looking at other places, it looks like init-list stuff is guarded behind `getLangOpts().CPlusPlus11`, so I'll add that check. It looks like this DR is CD5 (after C++17, applies to C++17), but `void{}` in C++11/14 without a warning seems fine. As for "regular tests", do you m

[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 1/3] [coverage] skipping code coverage

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

2024-01-13 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks 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] [clang-format] Stop aligning the to continuation lines (PR #76378)

2024-01-13 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/76378 ___ 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 Piotr Zegar via cfe-commits
Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= Message-ID: In-Reply-To: @@ -492,6 +492,10 @@ Changes in existing checks ` check to ignore false-positives in initializer list of record. +- Added option `IgnoreMacros` to :doc:`r

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

2024-01-13 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= Message-ID: In-Reply-To: @@ -0,0 +1,20 @@ +// RUN: %check_clang_tidy -check-suffixes=,MACROS %s readability-simplify-boolean-expr %t + +// Ignore expressions in macros. +// RUN: %check_clang_tidy %s re

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

2024-01-13 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: > > Maybe first only handle #42112 for what I will be really grateful. > > #42112 requests separating both license text and include directives blocks. > My bad, I only looked at the title, not the text. > > And then the stuff with the _license_, because I see discuss

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Looking at other places, it looks like init-list stuff is guarded behind > getLangOpts().CPlusPlus11, so I'll add that check. Corentin told me offline that check for list initialization that you do might be sufficient, as it can't pass in 98. > It looks like this DR is CD5 (a

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread via cfe-commits
cor3ntin wrote: I would recommend adding a test in C++98 mode. I don't think gating is necessary, the code should not parse. Adding a test for ({}) is also a good idea. https://github.com/llvm/llvm-project/pull/78060 ___ cfe-commits mailing list cfe-

[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
hanickadot wrote: I need to skip the whitespace before `if constexpr` and `if consteval` (in circles). ![coverage-before-after](https://github.com/llvm/llvm-project/assets/6557263/77a58cea-47c7-472a-91d0-6d1c2e34a3c6) https://github.com/llvm/llvm-project/pull/78033

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

2024-01-13 Thread Björn Schäpers 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 Björn Schäpers 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 Björn Schäpers 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] TableGen multi line string support. (PR #78032)

2024-01-13 Thread Björn Schäpers via cfe-commits
@@ -272,6 +274,14 @@ void FormatTokenLexer::tryMergePreviousTokens() { return; } } + if (Style.isTableGen()) { +if (tryMergeTokens({tok::l_square, tok::l_brace}, HazardyKnusperkeks wrote: ```suggestion if (Style.isTableGen() && tryMergeToken

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

2024-01-13 Thread Björn Schäpers via cfe-commits
@@ -763,6 +773,53 @@ void FormatTokenLexer::handleCSharpVerbatimAndInterpolatedStrings() { resetLexer(SourceMgr.getFileOffset(Lex->getSourceLocation(Offset + 1))); } +void FormatTokenLexer::handleTableGenMultilineString() { + FormatToken *MultiLineString = Tokens.back(); +

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

2024-01-13 Thread Björn Schäpers via cfe-commits
@@ -1710,7 +1710,7 @@ class AnnotatingParser { TT_UnionLBrace, TT_RequiresClause, TT_RequiresClauseInARequiresExpression, TT_RequiresExpression, TT_RequiresExpressionLParen, TT_RequiresExpressionLBrace, -TT_BracedListLBrace)) { +

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

2024-01-13 Thread Björn Schäpers via cfe-commits
@@ -2193,6 +2193,11 @@ TEST_F(TokenAnnotatorTest, UnderstandTableGenTokens) { ASSERT_TRUE(Keywords.isTableGenDefinition(*Tokens[0])); ASSERT_TRUE(Tokens[0]->is(Keywords.kw_def)); ASSERT_TRUE(Tokens[1]->is(TT_StartOfName)); + + // Code, the multiline string token. ---

[clang] [clang] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

2024-01-13 Thread via cfe-commits
https://github.com/elhewaty created https://github.com/llvm/llvm-project/pull/78064 Fixes: https://github.com/llvm/llvm-project/issues/54215 >From da9e05f5574bae712a14a3b467d5b3944418b421 Mon Sep 17 00:00:00 2001 From: Mohamed Atef Date: Sat, 13 Jan 2024 22:19:15 +0200 Subject: [PATCH] [clan

[clang] [clang] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (elhewaty) Changes Fixes: https://github.com/llvm/llvm-project/issues/54215 --- Full diff: https://github.com/llvm/llvm-project/pull/78064.diff 3 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td (+2)

[clang] [clang] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

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 66786a79d6f622012879e94a92838449bf175a71 da9e05f5574bae712a14a3b467d5b3944418b421 --

[clang] [clang] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

2024-01-13 Thread via cfe-commits
https://github.com/elhewaty updated https://github.com/llvm/llvm-project/pull/78064 >From 42029d55a4f9a08648eb83096d9e71977b3bf1b1 Mon Sep 17 00:00:00 2001 From: Mohamed Atef Date: Sat, 13 Jan 2024 22:19:15 +0200 Subject: [PATCH] [clang] emit an error when the same identifier appears with both

[clang] [clang] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

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

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

2024-01-13 Thread Samuel Thibault via cfe-commits
https://github.com/sthibaul created https://github.com/llvm/llvm-project/pull/78065 None >From 17619023092c35fb851866172094540f6d18718f Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 13 Jan 2024 20:16:03 +0100 Subject: [PATCH] Hurd: Add x86_64 support --- clang/lib/Basic/Targets.c

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

2024-01-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Samuel Thibault (sthibaul) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/78065.diff 18 Files Affected: - (modified) clang/lib/Basic/Targets.cpp (+2) - (modified) clang/lib/Driver/ToolChains/Gnu.cpp (+1-1) -

[clang] [clang] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

2024-01-13 Thread via cfe-commits
https://github.com/elhewaty updated https://github.com/llvm/llvm-project/pull/78064 >From ac16dd9593a3febdecef7fe79167aff1cbf035a7 Mon Sep 17 00:00:00 2001 From: Mohamed Atef Date: Sat, 13 Jan 2024 22:19:15 +0200 Subject: [PATCH] [clang] emit an error when the same identifier appears with both

[clang] [clang] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

2024-01-13 Thread via cfe-commits
https://github.com/elhewaty updated https://github.com/llvm/llvm-project/pull/78064 >From cdd9783e65315e296139478283732a935bfa87cf Mon Sep 17 00:00:00 2001 From: Mohamed Atef Date: Sat, 13 Jan 2024 22:19:15 +0200 Subject: [PATCH] [clang] emit an error when the same identifier appears with both

[clang] [SemaCXX] Implement CWG2351 `void{}` (PR #78060)

2024-01-13 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/78060 >From b33b2bc24ff0af7b2cb0f740826885f1f2dafb49 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sat, 13 Jan 2024 18:03:15 + Subject: [PATCH] [SemaCXX] Implement CWG2351 `void{}` --- clang/docs/ReleaseNot

<    1   2   3   4   >