[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/81183 >From 88dac6713284ee4f0b7ce73c944f78085412645f Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Fri, 9 Feb 2024 01:21:14 +0530 Subject: [PATCH 01/11] Fix : bugprone-too-small-loop-variable --- .../bugprone/To

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
@@ -28,6 +28,8 @@ In a real use case size means a container's size which depends on the user input This algorithm works for a small amount of objects, but will lead to freeze for a larger user input. +It's recommended to enable the compiler warning -Wtautological-constant-ou

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/81183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

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

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Piotr Zegar via cfe-commits
@@ -117,6 +117,10 @@ Changes in existing checks options `HeaderFileExtensions` and `ImplementationFileExtensions` by the global options of the same name. +- Improved :doc:`bugprone-too-small-loop-variable + ` check by correctly + implementing the check for const loop va

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 updated https://github.com/llvm/llvm-project/pull/81183 >From 88dac6713284ee4f0b7ce73c944f78085412645f Mon Sep 17 00:00:00 2001 From: Sh0g0-1758 Date: Fri, 9 Feb 2024 01:21:14 +0530 Subject: [PATCH 01/12] Fix : bugprone-too-small-loop-variable --- .../bugprone/To

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
@@ -117,6 +117,10 @@ Changes in existing checks options `HeaderFileExtensions` and `ImplementationFileExtensions` by the global options of the same name. +- Improved :doc:`bugprone-too-small-loop-variable + ` check by correctly + implementing the check for const loop va

[clang] 50c5107 - [clang] Add tests for DRs about inheriting constructors (#79981)

2024-02-09 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-09T19:20:10+04:00 New Revision: 50c5107f42a88a1d2ab66dc6cd1f2cfee6707f7d URL: https://github.com/llvm/llvm-project/commit/50c5107f42a88a1d2ab66dc6cd1f2cfee6707f7d DIFF: https://github.com/llvm/llvm-project/commit/50c5107f42a88a1d2ab66dc6cd1f2cfee6707f7d.

[clang] [clang] Add tests for DRs about inheriting constructors (PR #79981)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/79981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78898 >From b99a75a8756a7841657fc78ffbd40f780a412f2b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 21 Jan 2024 16:26:29 +0300 Subject: [PATCH 1/3] [clang][Sema] Add checks for validity of default ctor's

[clang] [libcxx] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-02-09 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. The libc++ changes LGTM. https://github.com/llvm/llvm-project/pull/78898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d054832 - [clang][Interp] Handle dummy pointers in ArrayElemPtr{,Pop} differently

2024-02-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-09T16:24:11+01:00 New Revision: d05483288465a87e75cfab51792801cfee43914c URL: https://github.com/llvm/llvm-project/commit/d05483288465a87e75cfab51792801cfee43914c DIFF: https://github.com/llvm/llvm-project/commit/d05483288465a87e75cfab51792801cfee43914c.diff LO

[clang] [clang] Add tests for DRs about inheriting constructors (PR #79981)

2024-02-09 Thread via cfe-commits
cor3ntin wrote: Thanks @Endilll :tada: https://github.com/llvm/llvm-project/pull/79981 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC/DC] Refactor: Let MCDCConditionID int16_t with zero-origin (PR #81257)

2024-02-09 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni created https://github.com/llvm/llvm-project/pull/81257 Also, Let NumConditions uint16_t >From b2e8b3eaa067844a5fa5643aca17dbb0f237182e Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Sat, 10 Feb 2024 00:08:36 +0900 Subject: [PATCH] [MC/DC] Refactor: Let MCDCCon

[clang] [llvm] [MC/DC] Refactor: Let MCDCConditionID int16_t with zero-origin (PR #81257)

2024-02-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: NAKAMURA Takumi (chapuni) Changes Also, Let NumConditions uint16_t --- Full diff: https://github.com/llvm/llvm-project/pull/81257.diff 9 Files Affected: - (modified) clang/lib/CodeGen/CodeGenPGO.cpp (+4-4) - (modified) clang/li

[clang] [llvm] [MC/DC] Refactor: Let MCDCConditionID int16_t with zero-origin (PR #81257)

2024-02-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: NAKAMURA Takumi (chapuni) Changes Also, Let NumConditions uint16_t --- Full diff: https://github.com/llvm/llvm-project/pull/81257.diff 9 Files Affected: - (modified) clang/lib/CodeGen/CodeGenPGO.cpp (+4-4) - (modified) clang/lib/CodeGe

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
Sh0g0-1758 wrote: Please merge if no further changes are required. https://github.com/llvm/llvm-project/pull/81183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a970090 - [clang][Interp][NFC] Convert test case to verify=expected,all style

2024-02-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-09T16:46:28+01:00 New Revision: a9700904765590ca2fbf08c0cc36d0da1107d3a7 URL: https://github.com/llvm/llvm-project/commit/a9700904765590ca2fbf08c0cc36d0da1107d3a7 DIFF: https://github.com/llvm/llvm-project/commit/a9700904765590ca2fbf08c0cc36d0da1107d3a7.diff LO

[clang] fdb16e6 - [clang][Interp] Only use __int128 in test case if supported

2024-02-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-09T16:52:12+01:00 New Revision: fdb16e6fd81b38835795f22730b39b30ddd90f07 URL: https://github.com/llvm/llvm-project/commit/fdb16e6fd81b38835795f22730b39b30ddd90f07 DIFF: https://github.com/llvm/llvm-project/commit/fdb16e6fd81b38835795f22730b39b30ddd90f07.diff LO

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-09 Thread Vinayak Dev via cfe-commits
https://github.com/vinayakdsci updated https://github.com/llvm/llvm-project/pull/81127 >From f2f9ba7a5399f259f4970f78803a02dc5689daff Mon Sep 17 00:00:00 2001 From: Vinayak Dev Date: Thu, 8 Feb 2024 17:29:44 +0530 Subject: [PATCH] [Clang][Sema]: Allow copy constructor side effects --- clang/d

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-09 Thread Vinayak Dev via cfe-commits
vinayakdsci wrote: @Endilll as you mention on the discourse, I have divided the tests as per the difference in the standards. The tests seem to be working fine. I hope you can review once you find time. Thanks! https://github.com/llvm/llvm-project/pull/81127 __

[clang] 935f7d6 - [clang][Interp][NFC] We do support complex bitint now

2024-02-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-09T17:05:41+01:00 New Revision: 935f7d633374f7073fec14927922a2d534c8795f URL: https://github.com/llvm/llvm-project/commit/935f7d633374f7073fec14927922a2d534c8795f DIFF: https://github.com/llvm/llvm-project/commit/935f7d633374f7073fec14927922a2d534c8795f.diff LO

[clang] [clang][Driver] Add support for XROS_DEPLOYMENT_TARGET env var (PR #81011)

2024-02-09 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: ping https://github.com/llvm/llvm-project/pull/81011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 99d7433 - [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (#81194)

2024-02-09 Thread via cfe-commits
Author: Jon Roelofs Date: 2024-02-09T08:13:15-08:00 New Revision: 99d743320c5dddb780f1fb2f49414b10e6a52a05 URL: https://github.com/llvm/llvm-project/commit/99d743320c5dddb780f1fb2f49414b10e6a52a05 DIFF: https://github.com/llvm/llvm-project/commit/99d743320c5dddb780f1fb2f49414b10e6a52a05.diff L

[clang] [clang][fmv] Drop .ifunc from target_version's entrypoint's mangling (PR #81194)

2024-02-09 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/81194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-09 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/81167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2095655 - [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (#81167)

2024-02-09 Thread via cfe-commits
Author: Jon Roelofs Date: 2024-02-09T08:14:09-08:00 New Revision: 2095655f8e2324971f11be61b88ef1644d5796b8 URL: https://github.com/llvm/llvm-project/commit/2095655f8e2324971f11be61b88ef1644d5796b8 DIFF: https://github.com/llvm/llvm-project/commit/2095655f8e2324971f11be61b88ef1644d5796b8.diff L

[clang] [clang][Driver] Add support for XROS_DEPLOYMENT_TARGET env var (PR #81011)

2024-02-09 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/81011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 088773b - [clang][Interp] Specify triple in C test

2024-02-09 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-09T17:23:26+01:00 New Revision: 088773b0d1c1ee99d78f0b68bf50029637fbead7 URL: https://github.com/llvm/llvm-project/commit/088773b0d1c1ee99d78f0b68bf50029637fbead7 DIFF: https://github.com/llvm/llvm-project/commit/088773b0d1c1ee99d78f0b68bf50029637fbead7.diff LO

[clang] [clang] Add some CodeGen tests for CWG 1xx issues (PR #80338)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/80338 >From 9c434c59a1b09a3d1217bbab4e44112a92bf6360 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 1 Feb 2024 23:44:53 +0300 Subject: [PATCH 1/2] [clang] Add some CodeGen tests for CWG 1xx issues Covers

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-09 Thread Mark de Wever via cfe-commits
https://github.com/mordante updated https://github.com/llvm/llvm-project/pull/80823 >From 560713b5d45236956198654a10e0795eb56cad7b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 6 Feb 2024 13:23:36 +0300 Subject: [PATCH 1/3] [Clang] Add some CodeGen tests for CWG 2xx issues This

[clang] [clang] Add some CodeGen tests for CWG 1xx issues (PR #80338)

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

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -O0 -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emi

[clang] [clang] Add some CodeGen tests for CWG 1xx issues (PR #80338)

2024-02-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,51 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emi

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-09 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/81268 The streaming mode change is incompatible with the ifunc mechanism used to implement FMV: we can't conditionally change it based on the particular callee that is resolved at runtime. Fixes: https://github.com/

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jon Roelofs (jroelofs) Changes The streaming mode change is incompatible with the ifunc mechanism used to implement FMV: we can't conditionally change it based on the particular callee that is resolved at runtime. Fixes: https://github.c

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emi

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

2024-02-09 Thread Shourya Goel via cfe-commits
https://github.com/Sh0g0-1758 edited https://github.com/llvm/llvm-project/pull/81183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] a7520d9 - [Clang-tidy] bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (#81183)

2024-02-09 Thread via cfe-commits
Author: Shourya Goel Date: 2024-02-09T17:44:04+01:00 New Revision: a7520d9727d2638047e5c464b2937581f64e2ce5 URL: https://github.com/llvm/llvm-project/commit/a7520d9727d2638047e5c464b2937581f64e2ce5 DIFF: https://github.com/llvm/llvm-project/commit/a7520d9727d2638047e5c464b2937581f64e2ce5.diff

[clang-tools-extra] FIX : bugprone-too-small-loop-variable - false-negative when const variable is used as loop bound (PR #81183)

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

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -3501,9 +3501,18 @@ bool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) { return false; } +static bool isArmStreaming(const FunctionDecl *FD) { + if (FD->hasAttr()) +return true; sdesmalen-arm wrote: Is this check required? I t

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -454,3 +454,34 @@ void unimplemented_spill_fill_za(void (*share_zt0_only)(void) __arm_inout("zt0") // expected-note@+1 {{add '__arm_preserves("za")' to the callee if it preserves ZA}} share_zt0_only(); } + +// expected-cpp-error@+2 {{streaming function cannot be multi-

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/80823 >From 560713b5d45236956198654a10e0795eb56cad7b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 6 Feb 2024 13:23:36 +0300 Subject: [PATCH 1/4] [Clang] Add some CodeGen tests for CWG 2xx issues This p

[clang] [llvm] [NVPTX] Add clang builtin for `__nvvm_reflect` intrinsic (PR #81277)

2024-02-09 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/81277 Summary: Some recent support made usage of `__nvvm_reflect` more consistent. We should expose it as an intrinsic rather than forcing users to externally define the function. >From 7b97388a5f251684cf4ae69c3b0cae0

[clang] [llvm] [NVPTX] Add clang builtin for `__nvvm_reflect` intrinsic (PR #81277)

2024-02-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Joseph Huber (jhuber6) Changes Summary: Some recent support made usage of `__nvvm_reflect` more consistent. We should expose it as an intrinsic rather than forcing users to externally define the function. --- Full diff: https://github.c

[clang] 1245f5f - [clang][Driver] Add support for XROS_DEPLOYMENT_TARGET env var (#81011)

2024-02-09 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-02-09T08:52:06-08:00 New Revision: 1245f5f4da8f88d031c0a69388d97e8a6d7f00b5 URL: https://github.com/llvm/llvm-project/commit/1245f5f4da8f88d031c0a69388d97e8a6d7f00b5 DIFF: https://github.com/llvm/llvm-project/commit/1245f5f4da8f88d031c0a69388d97e8a6d7f00b5.diff

[clang] [clang][Driver] Add support for XROS_DEPLOYMENT_TARGET env var (PR #81011)

2024-02-09 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/81011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/80823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. LGTM, make sure @cor3ntin is happy too though. https://github.com/llvm/llvm-project/pull/80823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-09 Thread Erich Keane via cfe-commits
@@ -6,28 +6,36 @@ // RUN: %clang_cc1 -std=c++23 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK // RUN: %clang_cc1 -std=c++2c %s -triple x86_64-linux-gnu -em

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-09 Thread Jon Roelofs via cfe-commits
@@ -3501,9 +3501,18 @@ bool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) { return false; } +static bool isArmStreaming(const FunctionDecl *FD) { + if (FD->hasAttr()) +return true; jroelofs wrote: Oh, you're right, we don't need

[clang] [libcxx] [clang][Sema] Add checks for validity of default ctor's class (PR #78898)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/78898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c58c6aa - [clang][Sema] Add checks for validity of default ctor's class (#78898)

2024-02-09 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-02-09T20:59:02+04:00 New Revision: c58c6aac7715d720358e317c26b6768940430ce9 URL: https://github.com/llvm/llvm-project/commit/c58c6aac7715d720358e317c26b6768940430ce9 DIFF: https://github.com/llvm/llvm-project/commit/c58c6aac7715d720358e317c26b6768940430ce9.

[clang] 9bb54b2 - Move the new test added in 2095655f to its own file

2024-02-09 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2024-02-09T09:02:56-08:00 New Revision: 9bb54b2aa006e3bf5df5eb8672075dd589fb9ba5 URL: https://github.com/llvm/llvm-project/commit/9bb54b2aa006e3bf5df5eb8672075dd589fb9ba5 DIFF: https://github.com/llvm/llvm-project/commit/9bb54b2aa006e3bf5df5eb8672075dd589fb9ba5.diff L

[clang] [llvm] [ASAN] For Asan instrumented global, emit two symbols, one with actual size and other with instrumented size. (PR #70166)

2024-02-09 Thread Mitch Phillips via cfe-commits
hctim wrote: Hi, My apologies for the delay. I started to hack together the same idea using `SanitizerMetadata`, which is definitely the preferred way of adding sanitizer globalvariable instrumentation (given that everything else already lives there). You can see the WIP here: https://pasteb

[clang] [clang] Add some CodeGen tests for CWG 1xx issues (PR #80338)

2024-02-09 Thread via cfe-commits
@@ -0,0 +1,51 @@ +// RUN: %clang_cc1 -std=c++98 %s -triple x86_64-linux-gnu -emit-llvm -disable-llvm-passes -o - -fexceptions -fcxx-exceptions -pedantic-errors | llvm-cxxfilt -n | FileCheck %s --check-prefixes CHECK +// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-linux-gnu -emi

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/74512 >From 169d962b64b8ae242c3a6d332677296cf7503839 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Tue, 5 Dec 2023 10:28:44 -0800 Subject: [PATCH 1/5] [clang] Avoid -Wshadow warning when init-capture

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-09 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: @compnerd ping ;) https://github.com/llvm/llvm-project/pull/78445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > And I'm not sure that it STOPS being confusing because of the lack of a > capture of 'this'. For that reason, I didn't fully disable the warning, and put it under `-Wshadow-uncaptured-local` flag instead. https://github.com/llvm/llvm-project/pull/74512 _

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread Mariya Podchishchaeva via cfe-commits
@@ -8400,19 +8412,28 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, /// when these variables are captured by the lambda. void Sema::DiagnoseShadowingLambdaDecls(const LambdaScopeInfo *LSI) { for (const auto &Shadow : LSI->ShadowingDecls) { -const VarDec

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread Mariya Podchishchaeva via cfe-commits
@@ -179,3 +179,64 @@ void f() { #endif } } + +namespace GH71976 { +#ifdef AVOID +struct A { + int b = 5; + int foo() { +return [b = b]() { return b; }(); // no -Wshadow diagnostic, init-capture does not shadow b due to not capturing this + } +}; + +struct B { + int a;

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread Mariya Podchishchaeva via cfe-commits
@@ -8328,35 +8328,47 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, unsigned WarningDiag = diag::warn_decl_shadow; SourceLocation CaptureLoc; - if (isa(D) && isa(ShadowedDecl) && NewDC && - isa(NewDC)) { + if (isa(D) && NewDC && isa(NewDC)) {

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread Mariya Podchishchaeva via cfe-commits
@@ -8328,35 +8328,47 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, unsigned WarningDiag = diag::warn_decl_shadow; SourceLocation CaptureLoc; - if (isa(D) && isa(ShadowedDecl) && NewDC && - isa(NewDC)) { + if (isa(D) && NewDC && isa(NewDC)) {

[clang] [clang] Add some CodeGen tests for CWG 1xx issues (PR #80338)

2024-02-09 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/80338 >From 9c434c59a1b09a3d1217bbab4e44112a92bf6360 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 1 Feb 2024 23:44:53 +0300 Subject: [PATCH 1/2] [clang] Add some CodeGen tests for CWG 1xx issues Covers

[clang] [llvm] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

2024-02-09 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/76955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][sema][FMV] Forbid multi-versioning arm_streaming functions. (PR #81268)

2024-02-09 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/81268 >From 82a631017a114a15a6ba3376c049b7a85707973a Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Thu, 8 Feb 2024 16:21:28 -0800 Subject: [PATCH 1/3] [clang][sema][FMV] Forbid multi-versioning arm_streaming funct

[clang] [llvm] [clang] Support per-function [[clang::code_align(N)]] attribute. (PR #80765)

2024-02-09 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > Aligning the targets of branches is a different thing from what you've > > implemented. There are basic blocks which are not branch targets, and there > > are branch targets which are not at the beginning of a basic block. (Branch > > targets that aren't at the beginning of

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

2024-02-09 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/76548 >From 3dfa00b0dab1820d1d8692ea91e98b29c9f8b627 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 28 Dec 2023 16:49:03 -0800 Subject: [PATCH 1/4] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predica

[clang] [RISCV] Add canonical ISA string as Module metadata in IR. (PR #80760)

2024-02-09 Thread Zakk Chen via cfe-commits
zakk0610 wrote: Does the name of "riscv-arch" give the impression that it might be "march" string? https://github.com/llvm/llvm-project/pull/80760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)

2024-02-09 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Moved the test to its own file to fix appease buildbots 9bb54b2aa006e3bf5df5eb8672075dd589fb9ba5 https://github.com/llvm/llvm-project/pull/81167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2024-02-09 Thread via cfe-commits
@@ -8328,35 +8328,47 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, unsigned WarningDiag = diag::warn_decl_shadow; SourceLocation CaptureLoc; - if (isa(D) && isa(ShadowedDecl) && NewDC && - isa(NewDC)) { + if (isa(D) && NewDC && isa(NewDC)) {

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-09 Thread Jon Roelofs via cfe-commits
@@ -673,7 +673,7 @@ int hoo(void) { // // // CHECK: Function Attrs: noinline nounwind optnone -// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdm +// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdma jroelofs wrote: It seems potentially problematic that t

[clang] [Clang] CGCoroutine: Skip moving parameters if the allocation decision is false (PR #81195)

2024-02-09 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: > I feel whether the param is needed is not related whether the allocation > happens. > > The param isn't needed means it is not used. The original comment seems to suggest a runtime construct? Yeah we can also optimize further here if the param is not used. https://gi

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-09 Thread Jon Roelofs via cfe-commits
@@ -673,7 +673,7 @@ int hoo(void) { // // // CHECK: Function Attrs: noinline nounwind optnone -// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdm +// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdma jroelofs wrote: What does GCC do? https://github.com/l

[clang] [Clang] CGCoroutine: Skip moving parameters if the allocation decision is false (PR #81195)

2024-02-09 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/81195 >From b08a0fed9ae7d0ea5a130875be4d2f5ef3a38b3b Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Wed, 7 Feb 2024 16:05:42 -0800 Subject: [PATCH] Skip moving parameters if the allocation decision is false -

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-09 Thread Jon Roelofs via cfe-commits
@@ -39,7 +39,7 @@ inline int __attribute__((target_version("memtag3+rcpc3+mops"))) fmv_inline(void inline int __attribute__((target_version("aes+dotprod"))) fmv_inline(void) { return 13; } inline int __attribute__((target_version("simd+fp16fml"))) fmv_inline(void) { return 14

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

2024-02-09 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/76548 >From 3dfa00b0dab1820d1d8692ea91e98b29c9f8b627 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 28 Dec 2023 16:49:03 -0800 Subject: [PATCH 1/5] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predica

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-09 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > > > Good example. This pass should be run post-inline. @aeubanks, any reason > > > we want to run it early in the pipeline? > > > > > > We want the main function simplification pipeline to see these function > > attributes because some optimizations trigger or don't trigger

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-09 Thread Joshua Cranmer via cfe-commits
jcranmer-intel wrote: > > > I'd like to see this change land, but with the "-mdaz-ftz" option removed > > > (because I don't think it's useful). That would fix the critical problem > > > of fast-math infecting shared libraries with the ftz setting, and we > > > could straighten out the other p

[clang] [llvm] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-09 Thread David Li via cfe-commits
https://github.com/david-xl approved this pull request. https://github.com/llvm/llvm-project/pull/69030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

2024-02-09 Thread Craig Topper via cfe-commits
@@ -2136,14 +2136,16 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { // bitcast. if (const auto *FixedSrc = dyn_cast(SrcTy)) { if (const auto *ScalableDst = dyn_cast(DstTy)) { -// If we are casting a fixed i8 vector to a scalable 16 x i1 predic

[clang-tools-extra] d86f216 - [clang-tidy][NFC] Fixes in release notes and documentation

2024-02-09 Thread Piotr Zegar via cfe-commits
Author: Piotr Zegar Date: 2024-02-09T18:20:01Z New Revision: d86f21693c5fb8eaa597cfcb15813ffc52d00847 URL: https://github.com/llvm/llvm-project/commit/d86f21693c5fb8eaa597cfcb15813ffc52d00847 DIFF: https://github.com/llvm/llvm-project/commit/d86f21693c5fb8eaa597cfcb15813ffc52d00847.diff LOG: [

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/81198 >From 3221a5e60c58e64dabdf23c52d33ba7ed5bdf81e Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Thu, 8 Feb 2024 14:21:49 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

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

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-09 Thread Paul Kirth via cfe-commits
@@ -3,6 +3,11 @@ // RUN: %clang -### --target=riscv64-linux %s 2>&1 | FileCheck --check-prefix=NODESC %s // RUN: %clang -### --target=x86_64-linux -mtls-dialect=gnu %s 2>&1 | FileCheck --check-prefix=NODESC %s +/// Android supports TLSDESC by default after Android version 29

[clang] 407f9c0 - [clang][driver] Set TLSDESC as the default for Android on RISC-V (#81198)

2024-02-09 Thread via cfe-commits
Author: Paul Kirth Date: 2024-02-09T10:33:58-08:00 New Revision: 407f9c06ea2a4f3fc32647ba22e5b60f695ca4b3 URL: https://github.com/llvm/llvm-project/commit/407f9c06ea2a4f3fc32647ba22e5b60f695ca4b3 DIFF: https://github.com/llvm/llvm-project/commit/407f9c06ea2a4f3fc32647ba22e5b60f695ca4b3.diff LO

[clang] [llvm] [clang][driver] Set TLSDESC as the default for Android on RISC-V (PR #81198)

2024-02-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi closed https://github.com/llvm/llvm-project/pull/81198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add the Ampere1B core (PR #81297)

2024-02-09 Thread Philipp Tomsich via cfe-commits
https://github.com/ptomsich created https://github.com/llvm/llvm-project/pull/81297 The Ampere1B is Ampere's third-generation core implementing a superscalar, out-of-order microarchitecture with nested virtualization, speculative side-channel mitigation and architectural support for defense ag

[clang] [llvm] [AArch64] Add the Ampere1B core (PR #81297)

2024-02-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Philipp Tomsich (ptomsich) Changes The Ampere1B is Ampere's third-generation core implementing a superscalar, out-of-order microarchitecture with nested virtualization, speculative side-channel mitigation and architectural support for def

[clang] [clang] reject to capture variable in `RequiresExprBodyDecl` (PR #78598)

2024-02-09 Thread via cfe-commits
LYP951018 wrote: This PR should also be able to fix https://github.com/llvm/llvm-project/issues/63972. https://github.com/llvm/llvm-project/pull/78598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amirreza Ashouri (AMP999) Changes IMHO it would be productive to make a similar change for `typeid`, in `ParseCXXTypeid`, in order to improve Clang's error message for https://godbolt.org/z/oKKWxeYra But that might be better done by addin

[clang] [llvm] [AArch64] Add the Ampere1B core (PR #81297)

2024-02-09 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 d86f21693c5fb8eaa597cfcb15813ffc52d00847 f5ed6d93ce13efc5cf2dcb9e4a93e0534c2990dd --

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

2024-02-09 Thread zhijian lin via cfe-commits
diggerlin wrote: > Do we really want to support only `__builtin_cpu_is` on AIX? It doesn't seem > like this would achieve the desired goal. Most users will use these builtins > to test for some capability on the target machine. It almost never really > matters to a user whether the CPU is a Po

[clang] [llvm] [NVPTX] Add clang builtin for `__nvvm_reflect` intrinsic (PR #81277)

2024-02-09 Thread Artem Belevich via cfe-commits
Artem-B wrote: > We should expose it as an intrinsic I think you mean `builtin` here. https://github.com/llvm/llvm-project/pull/81277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Add clang builtin for `__nvvm_reflect` intrinsic (PR #81277)

2024-02-09 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. LGTM overall. https://github.com/llvm/llvm-project/pull/81277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Add clang builtin for `__nvvm_reflect` intrinsic (PR #81277)

2024-02-09 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/81277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Add clang builtin for `__nvvm_reflect` intrinsic (PR #81277)

2024-02-09 Thread Artem Belevich via cfe-commits
@@ -1624,8 +1624,9 @@ def int_nvvm_compiler_error : def int_nvvm_compiler_warn : Intrinsic<[], [llvm_anyptr_ty], [], "llvm.nvvm.compiler.warn">; -def int_nvvm_reflect : - Intrinsic<[llvm_i32_ty], [llvm_anyptr_ty], [IntrNoMem], "llvm.nvvm.reflect">; +def int_nvvm_reflect :

[clang] [llvm] [NVPTX] Add clang builtin for `__nvvm_reflect` intrinsic (PR #81277)

2024-02-09 Thread Artem Belevich via cfe-commits
@@ -159,6 +159,7 @@ BUILTIN(__nvvm_read_ptx_sreg_pm3, "i", "n") BUILTIN(__nvvm_prmt, "UiUiUiUi", "") BUILTIN(__nvvm_exit, "v", "r") +BUILTIN(__nvvm_reflect, "UicC*", "r") Artem-B wrote: Now that we're exposing it to the end users. We should probably document

[clang] [llvm] __ARM_ARCH macro definition fix (PR #81301)

2024-02-09 Thread James Westwood via cfe-commits
https://github.com/jwestwood921 created https://github.com/llvm/llvm-project/pull/81301 …ARCH Added functionality to the ARMTargetParser to obtain the minor version of each architecture, and amended ARM.cpp and AArch64.cpp to define __ARM_ARCH correctly. In ACLE 5.4.1, __ARM_ARCH is defined

<    1   2   3   4   >