[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-14 Thread Jun Wang via cfe-commits
https://github.com/jwanggit86 updated https://github.com/llvm/llvm-project/pull/79236 >From 9c40b1151b0673430ff53eb121784724a5b090e5 Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Tue, 23 Jan 2024 19:19:00 -0600 Subject: [PATCH 1/4] [AMDGPU] Emit a waitcnt instruction after each memory

[clang] [HLSL] Expose `half` types and intrinsics always (PR #81782)

2024-02-14 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/81782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2024-02-14 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: I have been putting this on hold to coordinate with some tooling change (which likely become behind schedule). At this point, both code reviews and testing the (pending) changes in would be much more time efficient if this initial change could get in sooner. Now with

[clang] [compiler-rt] [llvm] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2024-02-14 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 ready_for_review https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Allow builtin addc/subc to be constant evaluated (PR #81656)

2024-02-14 Thread Bryce Wilson via cfe-commits
Bryce-MW wrote: I swear I had meant to add tests! I did see a place that looks good to add them before so I've done that. Which allowed me to find out that I had not done my implementation correctly so I fixed that up. https://github.com/llvm/llvm-project/pull/81656

[clang] [clang] Allow builtin addc/subc to be constant evaluated (PR #81656)

2024-02-14 Thread Bryce Wilson via cfe-commits
https://github.com/Bryce-MW updated https://github.com/llvm/llvm-project/pull/81656 >From 9bea6282aae73372a80aa3d0532ae0532b4ca948 Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Fri, 9 Feb 2024 16:56:57 -0600 Subject: [PATCH 1/2] [clang] Allow builtin addc/subc to be constant evaluated ---

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/81343 >From dfc9d95c185f5228f5c9680a19aa396d20e33d19 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Thu, 25 Jan 2024 13:52:12 -0800 Subject: [PATCH 01/11] [-Wunsafe-buffer-usage] Emit fixits for arguments of

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/81343 >From dfc9d95c185f5228f5c9680a19aa396d20e33d19 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Thu, 25 Jan 2024 13:52:12 -0800 Subject: [PATCH 01/10] [-Wunsafe-buffer-usage] Emit fixits for arguments of

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple ready_for_review https://github.com/llvm/llvm-project/pull/81343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2024-02-14 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 converted_to_draft https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Detect a return value of Ref & RefPtr (PR #81580)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ closed https://github.com/llvm/llvm-project/pull/81580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7249692 - [analyzer] Detect a return value of Ref & RefPtr (#81580)

2024-02-14 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-02-14T14:47:40-08:00 New Revision: 7249692bd24afc81fbbaa24240e3c9bba046f854 URL: https://github.com/llvm/llvm-project/commit/7249692bd24afc81fbbaa24240e3c9bba046f854 DIFF: https://github.com/llvm/llvm-project/commit/7249692bd24afc81fbbaa24240e3c9bba046f854.diff

[clang] Detect a return value of Ref & RefPtr (PR #81580)

2024-02-14 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: Ok this needs a rebase after the other two PRs landed. https://github.com/llvm/llvm-project/pull/81580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81532)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ closed https://github.com/llvm/llvm-project/pull/81532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cbdc760 - [analyzer] Add a few more safe functions to call. (#81532)

2024-02-14 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-02-14T14:45:29-08:00 New Revision: cbdc7605edca26ff75a28f080089a835ed9dba92 URL: https://github.com/llvm/llvm-project/commit/cbdc7605edca26ff75a28f080089a835ed9dba92 DIFF: https://github.com/llvm/llvm-project/commit/cbdc7605edca26ff75a28f080089a835ed9dba92.diff

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-14 Thread Ellis Hoag via cfe-commits
@@ -821,15 +822,23 @@ void InstrProfRecord::merge(InstrProfRecord , uint64_t Weight, for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) { bool Overflowed; -uint64_t Value = -SaturatingMultiplyAdd(Other.Counts[I], Weight, Counts[I], ); -if (Value >

[clang] [alpha.webkit.UncountedCallArgsChecker] Check the safety of the object argument in a member function call. (PR #81400)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ closed https://github.com/llvm/llvm-project/pull/81400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3a49dfb - [analyzer] Check the safety of the object argument in a member function call. (#81400)

2024-02-14 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-02-14T14:44:51-08:00 New Revision: 3a49dfb28fed8f784484ce2ce6d687550f27ad59 URL: https://github.com/llvm/llvm-project/commit/3a49dfb28fed8f784484ce2ce6d687550f27ad59 DIFF: https://github.com/llvm/llvm-project/commit/3a49dfb28fed8f784484ce2ce6d687550f27ad59.diff

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Kees Cook via cfe-commits
kees wrote: > > > > > Why not just enforce -fsanitize=signed-integer-overflow with -fwrapv? > > > > > I suspect it's just overlook, and not intentional behavior. > > > > > > > > > > > > +1 > > > > We should consider this direction > > > > > > > > > The UB-vs-non-UB seemed to be a really

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. https://github.com/llvm/llvm-project/pull/80358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-14 Thread Artem Dergachev via cfe-commits
@@ -282,8 +282,8 @@ isInUnspecifiedPointerContext(internal::Matcher InnerMatcher) { //(i.e., computing the distance between two pointers); or ... auto CallArgMatcher = - callExpr(forEachArgumentWithParam(InnerMatcher, - hasPointerType() /* array

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-14 Thread Ellis Hoag via cfe-commits
@@ -821,15 +822,23 @@ void InstrProfRecord::merge(InstrProfRecord , uint64_t Weight, for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) { bool Overflowed; -uint64_t Value = -SaturatingMultiplyAdd(Other.Counts[I], Weight, Counts[I], ); -if (Value >

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread John McCall via cfe-commits
rjmccall wrote: > > > > Why not just enforce -fsanitize=signed-integer-overflow with -fwrapv? I > > > > suspect it's just overlook, and not intentional behavior. > > > > > > > > > +1 > > > We should consider this direction > > > > > > The UB-vs-non-UB seemed to be a really specific goal in

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80504 >From dfc9d95c185f5228f5c9680a19aa396d20e33d19 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Thu, 25 Jan 2024 13:52:12 -0800 Subject: [PATCH 1/7] [-Wunsafe-buffer-usage] Emit fixits for arguments of

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-clang Author: None (jkorous-apple) Changes depends on https://github.com/llvm/llvm-project/pull/80358 --- Full diff: https://github.com/llvm/llvm-project/pull/80504.diff 5 Files Affected: - (modified)

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80504 >From dfc9d95c185f5228f5c9680a19aa396d20e33d19 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Thu, 25 Jan 2024 13:52:12 -0800 Subject: [PATCH 1/6] [-Wunsafe-buffer-usage] Emit fixits for arguments of

[clang] [clang][OpenACC] Fix copy-paste name in ParsingOpenACCDirectiveRAII (PR #81796)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (FruitClover) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/81796.diff 1 Files Affected: - (modified) clang/include/clang/Parse/RAIIObjectsForParser.h (+1-1) ``diff diff --git

[clang] [clang][OpenACC] Fix copy-paste name in ParsingOpenACCDirectiveRAII (PR #81796)

2024-02-14 Thread via cfe-commits
https://github.com/FruitClover created https://github.com/llvm/llvm-project/pull/81796 None >From e7b232ea0228a267bf92ec0bbd61b61eac9cb579 Mon Sep 17 00:00:00 2001 From: Mike Kashkarov Date: Thu, 8 Feb 2024 19:27:29 +0300 Subject: [PATCH] [clang][OpenACC] Fix copy-paste name in

[clang] ad49657 - [clang] Add fixed point precision macros (#81207)

2024-02-14 Thread via cfe-commits
Author: PiJoules Date: 2024-02-14T14:11:56-08:00 New Revision: ad49657a424db5e5979236ef5a474e93d827ab2c URL: https://github.com/llvm/llvm-project/commit/ad49657a424db5e5979236ef5a474e93d827ab2c DIFF: https://github.com/llvm/llvm-project/commit/ad49657a424db5e5979236ef5a474e93d827ab2c.diff

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-14 Thread via cfe-commits
https://github.com/PiJoules closed https://github.com/llvm/llvm-project/pull/81207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81532)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. https://github.com/llvm/llvm-project/pull/81532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-14 Thread via cfe-commits
https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/81207 >From 58a33e3792d2447cf99ac9959c80333299a9a2dc Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Thu, 8 Feb 2024 16:12:35 -0800 Subject: [PATCH] [clang] Add fixed point precision macros This defines the

[clang] [HLSL] Vector standard conversions (PR #71098)

2024-02-14 Thread Chris B via cfe-commits
@@ -6432,7 +6432,7 @@ void InitializationSequence::InitializeFrom(Sema , // For HLSL ext vector types we allow list initialization behavior for C++ // constructor syntax. This is accomplished by converting initialization // arguments an InitListExpr late. - if

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 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?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny =?utf-8?q?M=C3=B6sch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,127 @@ +//===--- UseDesignatedInitializersCheck.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:

[clang-tools-extra] [llvm] Add bazel support for clangd as a library. (PR #81556)

2024-02-14 Thread via cfe-commits
josh11b wrote: I've made my email address public, as requested. https://github.com/llvm/llvm-project/pull/81556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Julian Schmidt via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,130 @@ +// RUN: %check_clang_tidy -std=c++17 %s modernize-use-designated-initializers %t +// RUN: %check_clang_tidy -check-suffixes=,SINGLE-ELEMENT -std=c++17 %s modernize-use-designated-initializers %t \ +// RUN: -- -config="{CheckOptions: [{key:

[clang-tools-extra] [include-cleaner] don't consider the associated header unused (PR #67228)

2024-02-14 Thread Vadim D. via cfe-commits
@@ -227,6 +230,7 @@ class PragmaIncludes::RecordPragma : public PPCallbacks, public CommentHandler { IncludedHeader = *File; checkForExport(HashFID, HashLine, std::move(IncludedHeader), File); vvd170501 wrote: `std::move` should be removed, because

[clang] [clang] Allow builtin addc/subc to be constant evaluated (PR #81656)

2024-02-14 Thread Thorsten Schütt via cfe-commits
tschuett wrote: The bigger issue is that it needs a test. Unfortunately, I am less familiar with the Clang test infrastructure. https://github.com/llvm/llvm-project/pull/81656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > `signed-integer-overflow` Or maybe I am missing the bigger picture? Is there a plan fix signed-integer-overflow for -fwrapv as well? https://github.com/llvm/llvm-project/pull/80089 ___ cfe-commits mailing list

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > > I don't really like the whole "sufficiently simple function" thing. It > > seems fragile. You should be able to just take a arbitrary internal varargs > > function, rewrite its signature to take a va_list argument, rewrite calls > > to va_start to make a copy of that

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > > Why not just enforce -fsanitize=signed-integer-overflow with -fwrapv? I > > > suspect it's just overlook, and not intentional behavior. > > > > > > +1 > > We should consider this direction > > The UB-vs-non-UB seemed to be a really specific goal in the existing code.

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Lei Huang via cfe-commits
https://github.com/lei137 deleted https://github.com/llvm/llvm-project/pull/80069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -126,4 +126,53 @@ PPC_LNX_CPU("power10",47) #undef PPC_LNX_DEFINE_OFFSETS #undef PPC_LNX_FEATURE #undef PPC_LNX_CPU + +// Definition of the following values are found in the AIX header file: . +#ifndef AIX_POWERPC_SYS_CONF +#define AIX_POWERPC_SYS_CONF + #define

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -904,8 +904,18 @@ bool PPCTargetInfo::validateCpuSupports(StringRef FeatureStr) const { } bool PPCTargetInfo::validateCpuIs(StringRef CPUName) const { + llvm::Triple Triple = getTriple(); amy-kwan wrote: Check clang-format for indentation.

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -126,4 +126,53 @@ PPC_LNX_CPU("power10",47) #undef PPC_LNX_DEFINE_OFFSETS #undef PPC_LNX_FEATURE #undef PPC_LNX_CPU + +// Definition of the following values are found in the AIX header file: . +#ifndef AIX_POWERPC_SYS_CONF +#define AIX_POWERPC_SYS_CONF + #define

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -126,4 +126,53 @@ PPC_LNX_CPU("power10",47) #undef PPC_LNX_DEFINE_OFFSETS #undef PPC_LNX_FEATURE #undef PPC_LNX_CPU + +// Definition of the following values are found in the AIX header file: . +#ifndef AIX_POWERPC_SYS_CONF +#define AIX_POWERPC_SYS_CONF + #define

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -126,4 +126,53 @@ PPC_LNX_CPU("power10",47) #undef PPC_LNX_DEFINE_OFFSETS #undef PPC_LNX_FEATURE #undef PPC_LNX_CPU + +// Definition of the following values are found in the AIX header file: . +#ifndef AIX_POWERPC_SYS_CONF +#define AIX_POWERPC_SYS_CONF + #define

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -16542,12 +16542,64 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, Intrinsic::ID ID = Intrinsic::not_intrinsic; + // The lambda function converts builtin_cpu_is function into directly + // returning false or true, or it gets and checks the

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -126,4 +126,53 @@ PPC_LNX_CPU("power10",47) #undef PPC_LNX_DEFINE_OFFSETS #undef PPC_LNX_FEATURE #undef PPC_LNX_CPU + +// Definition of the following values are found in the AIX header file: . +#ifndef AIX_POWERPC_SYS_CONF +#define AIX_POWERPC_SYS_CONF

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -126,4 +126,53 @@ PPC_LNX_CPU("power10",47) #undef PPC_LNX_DEFINE_OFFSETS #undef PPC_LNX_FEATURE #undef PPC_LNX_CPU + +// Definition of the following values are found in the AIX header file: . +#ifndef AIX_POWERPC_SYS_CONF +#define AIX_POWERPC_SYS_CONF + #define

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -362,8 +362,16 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { // We support __builtin_cpu_supports/__builtin_cpu_is on targets that // have Glibc since it is Glibc that provides the HWCAP[2] in the auxv. + static constexpr int

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
@@ -126,4 +126,53 @@ PPC_LNX_CPU("power10",47) #undef PPC_LNX_DEFINE_OFFSETS #undef PPC_LNX_FEATURE #undef PPC_LNX_CPU + +// Definition of the following values are found in the AIX header file: . +#ifndef AIX_POWERPC_SYS_CONF +#define AIX_POWERPC_SYS_CONF + #define

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: Group review comments. https://github.com/llvm/llvm-project/pull/80069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/80069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Kees Cook via cfe-commits
kees wrote: > > Why not just enforce -fsanitize=signed-integer-overflow with -fwrapv? I > > suspect it's just overlook, and not intentional behavior. > > +1 > > We should consider this direction The UB-vs-non-UB seemed to be a really specific goal in the existing code. i.e. that the

[clang] [HLSL] Vector standard conversions (PR #71098)

2024-02-14 Thread Justin Bogner via cfe-commits
@@ -113,30 +115,12 @@ float2 HowManyFloats(float V) { // up nicely too. // CHECK-LABEL: AllRighty -// CHECK: [[XTmp:%.*]] = alloca <1 x double>, align 8 -// CHECK: [[YTmp:%.*]] = alloca <1 x double>, align 8 -// CHECK: [[ZTmp:%.*]] = alloca <1 x double>, align 8 - -// CHECK:

[clang] [HLSL] Vector standard conversions (PR #71098)

2024-02-14 Thread Justin Bogner via cfe-commits
@@ -4772,6 +4788,76 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, llvm_unreachable("Improper second standard conversion"); } + if (SCS.Element != ICK_Identity) { +// If SCS.Element is not ICK_Identity the To and From types must be HLSL +//

[clang] [HLSL] Vector standard conversions (PR #71098)

2024-02-14 Thread Justin Bogner via cfe-commits
@@ -6432,7 +6432,7 @@ void InitializationSequence::InitializeFrom(Sema , // For HLSL ext vector types we allow list initialization behavior for C++ // constructor syntax. This is accomplished by converting initialization // arguments an InitListExpr late. - if

[clang] [HLSL] Vector standard conversions (PR #71098)

2024-02-14 Thread Justin Bogner via cfe-commits
@@ -4772,6 +4788,76 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, llvm_unreachable("Improper second standard conversion"); } + if (SCS.Element != ICK_Identity) { +// If SCS.Element is not ICK_Identity the To and From types must be HLSL +//

[clang] [HLSL] Vector standard conversions (PR #71098)

2024-02-14 Thread Justin Bogner via cfe-commits
@@ -123,84 +123,83 @@ CompareDerivedToBaseConversions(Sema , SourceLocation Loc, /// GetConversionRank - Retrieve the implicit conversion rank /// corresponding to the given implicit conversion kind. ImplicitConversionRank clang::GetConversionRank(ImplicitConversionKind Kind)

[clang] [HLSL] Vector standard conversions (PR #71098)

2024-02-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Looks good barring a few minor comments https://github.com/llvm/llvm-project/pull/71098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [HLSL] Vector standard conversions (PR #71098)

2024-02-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/71098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Why not just enforce -fsanitize=signed-integer-overflow with -fwrapv? I > suspect it's just overlook, and not intentional behavior. +1 We should consider this direction https://github.com/llvm/llvm-project/pull/80089 ___

[clang-tools-extra] [clangd] Clean formatting modernize-use-override (PR #81435)

2024-02-14 Thread via cfe-commits
github-actions[bot] wrote: @kevinjoseph1995 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with

[clang-tools-extra] [clangd] Clean formatting modernize-use-override (PR #81435)

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

[clang-tools-extra] 5992b32 - [clangd] Clean formatting modernize-use-override (#81435)

2024-02-14 Thread via cfe-commits
Author: Kevin Joseph Date: 2024-02-14T20:59:21+01:00 New Revision: 5992b3272b29e071f6f5a4807a4e0c23e88c310d URL: https://github.com/llvm/llvm-project/commit/5992b3272b29e071f6f5a4807a4e0c23e88c310d DIFF: https://github.com/llvm/llvm-project/commit/5992b3272b29e071f6f5a4807a4e0c23e88c310d.diff

[clang] [clang-format] Support of TableGen basic format restrictions. (PR #81611)

2024-02-14 Thread Björn Schäpers via cfe-commits
@@ -55,5 +59,271 @@ TEST_F(FormatTestTableGen, NoSpacesInSquareBracketLists) { verifyFormat("def flag : Flag<[\"-\", \"--\"], \"foo\">;"); } +TEST_F(FormatTestTableGen, LiteralsAndIdentifiers) { + verifyFormat("def LiteralAndIdentifiers {\n" + " let

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token , const char *CurPtr, const char *PrefixEnd = [PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n') {

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token , const char *CurPtr, const char *PrefixEnd = [PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n') {

[clang] bad error message on incorrect string literal #18079 (PR #81670)

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

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token , const char *CurPtr, const char *PrefixEnd = [PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n') {

[clang-tools-extra] [clangd] Clean formatting modernize-use-override (PR #81435)

2024-02-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/81435 >From db2c4ee74ffb0592ec7f3fd5557dbb5399ef998d Mon Sep 17 00:00:00 2001 From: Kevin Joseph Date: Sun, 11 Feb 2024 13:39:51 -0800 Subject: [PATCH 1/3] [clangd] Clean formatting modernize-use-override When

[clang] [HLSL] Expose `half` types and intrinsics always (PR #81782)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes We previously made an implmenetation error when adding `half` overloads for HLSL library functionalitly. The `half` type is always defined in HLSL and `half` intrinsics should not be conditionally included.

[clang] [HLSL] Expose `half` types and intrinsics always (PR #81782)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-backend-x86 Author: Chris B (llvm-beanz) Changes We previously made an implmenetation error when adding `half` overloads for HLSL library functionalitly. The `half` type is always defined in HLSL and `half` intrinsics should

[clang-tools-extra] [clang-tidy] Removed redundant-inline-specifier warning on static data members (PR #81423)

2024-02-14 Thread Piotr Zegar via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/81423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] 9b80ab4 - [clang-tidy] Removed redundant-inline-specifier warning on static data members (#81423)

2024-02-14 Thread via cfe-commits
Author: Félix-Antoine Constantin Date: 2024-02-14T20:30:21+01:00 New Revision: 9b80ab4332bbe336ab8b9f2082eadf6b8d223150 URL: https://github.com/llvm/llvm-project/commit/9b80ab4332bbe336ab8b9f2082eadf6b8d223150 DIFF:

[clang] [HLSL] Expose `half` types and intrinsics always (PR #81782)

2024-02-14 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/81782 We previously made an implmenetation error when adding `half` overloads for HLSL library functionalitly. The `half` type is always defined in HLSL and `half` intrinsics should not be conditionally included.

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token , const char *CurPtr, const char *PrefixEnd = [PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n') {

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
https://github.com/akshaykumars614 updated https://github.com/llvm/llvm-project/pull/81670 >From c2f716ee5f787ec3df63511fd5f565a3deee4d6e Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 13 Feb 2024 16:29:51 -0500 Subject: [PATCH 1/5] issue: #18079 (bad errwqor message on incorrect

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-14 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token , const char *CurPtr, const char *PrefixEnd = [PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n') {

[clang] [clang][CodeGen] Add missing error check (PR #81777)

2024-02-14 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j closed https://github.com/llvm/llvm-project/pull/81777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7d28f19 - [clang][CodeGen] Add missing error check (#81777)

2024-02-14 Thread via cfe-commits
Author: Jacob Lambert Date: 2024-02-14T11:25:58-08:00 New Revision: 7d28f19f68c82b65cf1180b170f33d6f82422d64 URL: https://github.com/llvm/llvm-project/commit/7d28f19f68c82b65cf1180b170f33d6f82422d64 DIFF: https://github.com/llvm/llvm-project/commit/7d28f19f68c82b65cf1180b170f33d6f82422d64.diff

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-14 Thread Lei Huang via cfe-commits
@@ -10347,6 +10347,8 @@ def err_x86_builtin_tile_arg_duplicate : Error< def err_builtin_target_unsupported : Error< "builtin is not supported on this target">; +def err_builtin_aix_os_unsupported : Error< + "this builtin is available only on AIX 7.2 and later operating

[clang] [clang][CodeGen] Add missing error check (PR #81777)

2024-02-14 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/81777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -100,7 +100,10 @@ def err_raw_delim_too_long : Error< "raw string delimiter longer than 16 characters" "; use PREFIX( )PREFIX to delimit raw string">; def err_invalid_char_raw_delim : Error< - "invalid character '%0' character in raw string delimiter" + "invalid

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -2270,9 +2270,11 @@ bool Lexer::LexRawStringLiteral(Token , const char *CurPtr, const char *PrefixEnd = [PrefixLen]; if (PrefixLen == 16) { Diag(PrefixEnd, diag::err_raw_delim_too_long); - } else { + } else if (*PrefixEnd != '\n') {

[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-02-14 Thread Krystian Stasiowski via cfe-commits
@@ -6316,6 +6310,15 @@ TEST(HasAnyTemplateArgumentLoc, BindsToSpecializationWithDoubleArgument) { hasTypeLoc(loc(asString("double"))); } +TEST(HasAnyTemplateArgumentLoc, BindsToExplicitSpecializationWithIntArgument) { + EXPECT_TRUE( +

<    1   2   3   4   >