[clang] [Clang][Sema] Fix crash with const qualified member operator new (PR #80327)

2024-02-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I'm not the best reviewer for this, but it looks reasonable to me. Perhaps Aaron should take a look to make sure? https://github.com/llvm/llvm-project/pull/80327 ___ cfe-commits mailing list cfe-commits@lists.

[clang-tools-extra] [clang-tidy] Remove enforcement of rule C.48 from cppcoreguidelines-prefer-member-init (PR #80330)

2024-02-01 Thread Piotr Zegar via cfe-commits
Carlos =?utf-8?q?G=C3=A1lvez?= Message-ID: In-Reply-To: https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/80330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[llvm] [lld] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-02-01 Thread Aiden Grossman via cfe-commits
@@ -73,68 +83,89 @@ FileHeader: Sections: - Name:.text.foo Type:SHT_PROGBITS -Address: [[FOO_ADDR]] +Address: 0x4000 Flags: [SHF_ALLOC, SHF_EXECINSTR] -Content: '503b050520907d02ebf5c3' +Content: '503b050530907d08ebf50f8dee1fc3'

[clang-tools-extra] [llvm] [clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-01 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna converted_to_draft https://github.com/llvm/llvm-project/pull/78000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-01 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/78000 >From c39871ed2ec642ab00360f2c3a18fba7c915f82d Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Mon, 18 Dec 2023 10:58:16 +0900 Subject: [PATCH] [BoundsSafety] Introduce CountAttributedType CountAttributedType is

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-01 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna ready_for_review https://github.com/llvm/llvm-project/pull/78000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Remove check-specific HeaderFileExtensions and Implement… (PR #80333)

2024-02-01 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/80333 …ationFileExtensions Deprecated since clang-tidy 17. Use the corresponding global options instead. Fixes #61947 >From fbb0837342a566ff928b211cbb418075a7e744fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl

[clang-tools-extra] [clang-tidy] Remove check-specific HeaderFileExtensions and Implement… (PR #80333)

2024-02-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Carlos Galvez (carlosgalvezp) Changes …ationFileExtensions Deprecated since clang-tidy 17. Use the corresponding global options instead. Fixes #61947 --- Patch is 35.96 KiB, truncated to 20.00 KiB below, full version: https://gith

[clang] [clang-tools-extra] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

2024-02-01 Thread Shourya Goel via cfe-commits
@@ -179,7 +179,7 @@ def err_verify_invalid_no_diags : Error< "%select{expected|'expected-no-diagnostics'}0 directive cannot follow " "%select{'expected-no-diagnostics' directive|other expected directives}0">; Sh0g0-1758 wrote: @AaronBallman, I don't thi

[clang-tools-extra] [clang-tidy] Remove check-specific HeaderFileExtensions and Implement… (PR #80333)

2024-02-01 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/80333 >From fbb0837342a566ff928b211cbb418075a7e744fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Thu, 1 Feb 2024 20:00:45 + Subj

[clang-tools-extra] [clang-tidy] Remove enforcement of rule C.48 from cppcoreguidelines-prefer-member-init (PR #80330)

2024-02-01 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/80330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang-tools-extra] 6f32d6a - [clang-tidy] Remove enforcement of rule C.48 from cppcoreguidelines-prefer-member-init (#80330)

2024-02-01 Thread via cfe-commits
Author: Carlos Galvez Date: 2024-02-01T21:16:24+01:00 New Revision: 6f32d6a4f362ad1c7f6328232a68f44a44fc2d2e URL: https://github.com/llvm/llvm-project/commit/6f32d6a4f362ad1c7f6328232a68f44a44fc2d2e DIFF: https://github.com/llvm/llvm-project/commit/6f32d6a4f362ad1c7f6328232a68f44a44fc2d2e.diff

[clang-tools-extra] [clang-tidy] Remove check-specific HeaderFileExtensions and Implement… (PR #80333)

2024-02-01 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/80333 >From b40347c8025b0d5de83453012a76d412c07f54a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Thu, 1 Feb 2024 20:00:45 + Subj

[clang] [clang-tools-extra] [llvm] [Clang] Fix : More Detailed "No expected directives found" (PR #78338)

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

[clang] Fix INF/NAN warning. (PR #80290)

2024-02-01 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/80290 >From 529879c78ae4c1bf4d04110b543f37c1d1af20f7 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Thu, 1 Feb 2024 05:26:00 -0800 Subject: [PATCH 1/3] Fix INF/NAN warning. --- .../clang/Basic/DiagnosticCommonKin

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Adrian Prantl via cfe-commits
@@ -3424,6 +3443,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation * +CGDebugInfo::CreateTrapFailureMessageFor(llvm::DebugLoc TrapLocation, +

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Adrian Prantl via cfe-commits
@@ -602,6 +613,19 @@ class CGDebugInfo { return CoroutineParameterMappings; } + // Create a debug location from `TrapLocation` that adds an artificial inline + // frame where the frame name is + // + // * `: ` if `` is not empty. + // * `` if `` is empty. Note `` mu

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Adrian Prantl via cfe-commits
@@ -346,6 +348,15 @@ class CGDebugInfo { const FieldDecl *BitFieldDecl, const llvm::DIDerivedType *BitFieldDI, llvm::ArrayRef PreviousFieldsDI, const RecordDecl *RD); + // A cache that maps artificial inlined function names used for + // __builtin_verbose_trap to

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Adrian Prantl via cfe-commits
@@ -346,6 +348,15 @@ class CGDebugInfo { const FieldDecl *BitFieldDecl, const llvm::DIDerivedType *BitFieldDI, llvm::ArrayRef PreviousFieldsDI, const RecordDecl *RD); + // A cache that maps artificial inlined function names used for + // __builtin_verbose_trap to

[clang] [AMDGPU] Diagnose unaligned atomic (PR #80322)

2024-02-01 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/80322 >From 8cc0ecfe6723b7eb363a5eef2cd4b8630e6a2ac8 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Thu, 1 Feb 2024 13:44:03 -0500 Subject: [PATCH] [AMDGPU] Diagnose unaligned atomic for amdgpu AMDGPU does no

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

2024-02-01 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/80338 Covers CWG issues [185](https://cplusplus.github.io/CWG/issues/185.html), [193](https://cplusplus.github.io/CWG/issues/193.html), [199](https://cplusplus.github.io/CWG/issues/199.html). I also looked at [190](htt

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

2024-02-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes Covers CWG issues [185](https://cplusplus.github.io/CWG/issues/185.html), [193](https://cplusplus.github.io/CWG/issues/193.html), [199](https://cplusplus.github.io/CWG/issues/199.html). I also looked at

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder } } +private: + static bool evaluateConstantCondition(const Expr *Condition) { +if (const auto *Expr = dyn_cast(Condition)) + return Expr->getResultAsAPSInt().getExtValue(); + +if (const auto *Exp

[clang-tools-extra] [libcxx] [lldb] [lld] [llvm] [compiler-rt] [libc] [libcxxabi] [flang] [clang] [TTI][RISCV]Improve costs for fixed vector whole reg extract/insert. (PR #80164)

2024-02-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev updated https://github.com/llvm/llvm-project/pull/80164 >From cfd0dcfa1f5fabd12cf4d7bf8d5a10bd324ace0a Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Wed, 31 Jan 2024 16:47:49 + Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] 243bfed - [analyzer][HTMLRewriter] Cache partial rewrite results. (#80220)

2024-02-01 Thread via cfe-commits
Author: Artem Dergachev Date: 2024-02-01T13:07:21-08:00 New Revision: 243bfed68367263cfc3fb3f396660acf60051fbf URL: https://github.com/llvm/llvm-project/commit/243bfed68367263cfc3fb3f396660acf60051fbf DIFF: https://github.com/llvm/llvm-project/commit/243bfed68367263cfc3fb3f396660acf60051fbf.dif

[clang] [analyzer][HTMLRewriter] Cache partial rewrite results. (PR #80220)

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

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread via cfe-commits
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder } } +private: + static bool evaluateConstantCondition(const Expr *Condition) { +if (const auto *Expr = dyn_cast(Condition)) + return Expr->getResultAsAPSInt().getExtValue(); + +if (const auto *Exp

[openmp] [clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From 84817eb419dfe0a66e8b4b1d21cf67cbc6b20199 Mon Sep 17 00:00:00 2001 From: Alexandre Ganea <37383324+aga...@users.noreply.github.com> Date: Thu, 1 Feb 2024 08:14:05 -0500 Subject: [PATCH] [coverage] fix crash

[openmp] [clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder } } +private: + static bool evaluateConstantCondition(const Expr *Condition) { +if (const auto *Expr = dyn_cast(Condition)) + return Expr->getResultAsAPSInt().getExtValue(); + +if (const auto *Exp

[openmp] [clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
@@ -1808,12 +1808,24 @@ struct CounterCoverageMappingBuilder } } +private: + static bool evaluateConstantCondition(const Expr *Condition) { +if (const auto *Expr = dyn_cast(Condition)) + return Expr->getResultAsAPSInt().getExtValue(); + +if (const auto *Exp

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From f1dfd7fb2713f879de3532c903217b911b81db34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 1 Feb 2024 22:20:44 +0100 Subject: [PATCH] [coverage] fix crash in code coverage

[clang] [Clang][Sema] Fix crash with const qualified member operator new (PR #80327)

2024-02-01 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/80327 >From afcf464812bdb0a167023e7930b0be2ed29a3b3e Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 1 Feb 2024 11:19:14 -0800 Subject: [PATCH] [Clang][Sema] Fix crash with const qualified member operator new

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Changes LGTM, but please add a release note to `clang/docs/ReleaseNotes.rst` so users know about the fix. Thank you for the fix! https://github.com/llvm/llvm-project/pull/80292 ___ cfe-commits mailing list c

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
hanickadot wrote: > Changes LGTM, but please add a release note to `clang/docs/ReleaseNotes.rst` > so users know about the fix. > > Thank you for the fix! Even if it's a fix for recent PR I did few days ago? Also, how do I get this into release branch (the previous change is there)? https://

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/80292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Fangrui Song via cfe-commits
@@ -234,6 +234,35 @@ constexpr int check_macro_consteval_if_skipped(int i) { // CHECK-NEXT: [[@LINE return i; } +struct false_value { + constexpr operator bool() { +return false; + } +}; + +template struct dependable_false_value { + constexpr operator bool() { +

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/80292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From 4b2d3b7b8f04510f791e4d3cc68b2de5a273c735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 1 Feb 2024 22:20:44 +0100 Subject: [PATCH] [coverage] fix crash in code coverage

[llvm] [libcxx] [libc] [clang-tools-extra] [mlir] [lld] [lldb] [openmp] [clang] [flang] [SLP][TTI]Add support for strided loads. (PR #80310)

2024-02-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev updated https://github.com/llvm/llvm-project/pull/80310 >From 92950afd39034c0184a3c807f8062e0053eead5c Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Thu, 1 Feb 2024 17:22:34 + Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[llvm] [libcxx] [libc] [clang-tools-extra] [mlir] [lld] [lldb] [openmp] [clang] [flang] [SLP]Add support for strided loads. (PR #80310)

2024-02-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/80310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [openmp] [libcxx] [clang-tools-extra] [mlir] [lldb] [llvm] [lld] [libc] [SLP]Add support for strided loads. (PR #80310)

2024-02-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/80310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
@@ -234,6 +234,35 @@ constexpr int check_macro_consteval_if_skipped(int i) { // CHECK-NEXT: [[@LINE return i; } +struct false_value { + constexpr operator bool() { +return false; + } +}; + +template struct dependable_false_value { + constexpr operator bool() { +

[llvm] [mlir] [clang] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-02-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Akash Banerjee (TIFitis) Changes This patch migrates the CGOpenMPRuntimeGPU::emitReduction and related functions to the OpenMPIRBUilder. In future patches MLIR OpenMP translation would be making use of these functions. Co-authore

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread via cfe-commits
cor3ntin wrote: > Changes LGTM, but please add a release note to `clang/docs/ReleaseNotes.rst` > so users know about the fix. > > Thank you for the fix! FYI this is a regression in 18 affecting users so we should backport https://github.com/llvm/llvm-project/pull/80292 __

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-01 Thread Artem Dergachev via cfe-commits
@@ -61,6 +61,7 @@ void testArraySubscripts(int *p, int **pp) { ); int a[10]; // expected-warning{{'a' is an unsafe buffer that does not perform bounds checks}} +// expected-note@-1{{change type of 'a' to 'std::array' to harden it}}

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-01 Thread Artem Dergachev via cfe-commits
@@ -58,6 +95,8 @@ class UnsafeBufferUsageHandler { #endif public: + enum class TargetType { Span, Array }; haoNoQ wrote: Looks like a bit of dead code? https://github.com/llvm/llvm-project/pull/80084 ___ cfe-commi

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-01 Thread Artem Dergachev via cfe-commits
@@ -2495,10 +2470,113 @@ static FixItList fixVariableWithSpan(const VarDecl *VD, return fixLocalVarDeclWithSpan(VD, Ctx, getUserFillPlaceHolder(), Handler); } +static FixItList fixVarDeclWithArray(const VarDecl *D, const ASTContext &Ctx, +

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-01 Thread Artem Dergachev via cfe-commits
@@ -2495,10 +2470,113 @@ static FixItList fixVariableWithSpan(const VarDecl *VD, return fixLocalVarDeclWithSpan(VD, Ctx, getUserFillPlaceHolder(), Handler); } +static FixItList fixVarDeclWithArray(const VarDecl *D, const ASTContext &Ctx, +

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Changes LGTM, but please add a release note to > > `clang/docs/ReleaseNotes.rst` so users know about the fix. > > Thank you for the fix! > > Even if it's a fix for recent PR I did few days ago? Oh, I had missed that, sorry! Then no, a release note isn't needed. https:/

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Changes LGTM, but please add a release note to > > `clang/docs/ReleaseNotes.rst` so users know about the fix. > > Thank you for the fix! > > FYI this is a regression in 18 affecting users so we should backport Btw, instructions on how to do that can be found here: http

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-01 Thread via cfe-commits
@@ -2495,10 +2470,113 @@ static FixItList fixVariableWithSpan(const VarDecl *VD, return fixLocalVarDeclWithSpan(VD, Ctx, getUserFillPlaceHolder(), Handler); } +static FixItList fixVarDeclWithArray(const VarDecl *D, const ASTContext &Ctx, +

[llvm] [mlir] [clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From 4b2d3b7b8f04510f791e4d3cc68b2de5a273c735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 1 Feb 2024 22:20:44 +0100 Subject: [PATCH] [coverage] fix crash in code coverage

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-01 Thread via cfe-commits
@@ -61,6 +61,7 @@ void testArraySubscripts(int *p, int **pp) { ); int a[10]; // expected-warning{{'a' is an unsafe buffer that does not perform bounds checks}} +// expected-note@-1{{change type of 'a' to 'std::array' to harden it}}

[clang] [-Wunsafe-buffer-usage] Fixits for array decayed to pointer (PR #80347)

2024-02-01 Thread via cfe-commits
https://github.com/jkorous-apple created https://github.com/llvm/llvm-project/pull/80347 depends on https://github.com/llvm/llvm-project/pull/80084 >From 463a9904c1ae85fbdc0bd6029c6effea3fb16ea6 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Tue, 23 Jan 2024 16:16:10 -0800 Subject: [PATCH 01

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From af3118a1bbc071ec5d3a9d5b43cce66b0fe828e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 1 Feb 2024 22:20:44 +0100 Subject: [PATCH] [coverage] fix crash in code coverage

[libc] [compiler-rt] [llvm] [clang] [flang] [libcxx] [clang-tools-extra] [SLP]Improve minbitwidth analysis. (PR #78976)

2024-02-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev updated https://github.com/llvm/llvm-project/pull/78976 >From 391145a2d04873ef84c4f1083fe9b9fcdbb3b940 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Mon, 22 Jan 2024 14:13:51 + Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [clang-tools-extra] [clangd] Add support to rename Objective-C selectors (PR #78872)

2024-02-01 Thread Alex Hoppen via cfe-commits
https://github.com/ahoppen updated https://github.com/llvm/llvm-project/pull/78872 >From 26d9d1a5a342df34cde921f7d9921e7b94dadd87 Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Tue, 19 Dec 2023 15:54:40 -0800 Subject: [PATCH 1/5] [Refactoring] Add capabilities to `SymbolName` to represent Ob

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-01 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80084 >From 463a9904c1ae85fbdc0bd6029c6effea3fb16ea6 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Tue, 23 Jan 2024 16:16:10 -0800 Subject: [PATCH 01/12] [-Wunsafe-buffer-usage] Move Strategy class to the head

[clang-tools-extra] [clangd] Add 'apply all clangd fixes' and 'apply all '_' fixes' QuickFixes (PR #79867)

2024-02-01 Thread Tor Shepherd via cfe-commits
https://github.com/torshepherd updated https://github.com/llvm/llvm-project/pull/79867 >From 7cb9e7b604a16414f31309b59747abbd7d3c0025 Mon Sep 17 00:00:00 2001 From: Tor Shepherd Date: Mon, 29 Jan 2024 11:44:25 -0500 Subject: [PATCH] [clangd] Add fix-all CodeActions --- clang-tools-extra/clang

[clang] [llvm] [lld] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-02-01 Thread Rahman Lavaee via cfe-commits
rlavaee wrote: Thank everyone for reviewing. I will probably merge this today. I want to save myself and others the trouble of merge conflicts over 38 files. https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@list

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-01 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80084 >From 463a9904c1ae85fbdc0bd6029c6effea3fb16ea6 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Tue, 23 Jan 2024 16:16:10 -0800 Subject: [PATCH 01/13] [-Wunsafe-buffer-usage] Move Strategy class to the head

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-01 Thread via cfe-commits
@@ -58,6 +95,8 @@ class UnsafeBufferUsageHandler { #endif public: + enum class TargetType { Span, Array }; jkorous-apple wrote: Totally. Removed. Thanks! https://github.com/llvm/llvm-project/pull/80084 ___ cfe-com

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -1628,6 +1628,25 @@ llvm::DIType *CGDebugInfo::createFieldType( offsetInBits, flags, debugType, Annotations); } +llvm::DISubprogram * +CGDebugInfo::createInlinedTrapSubprogram(StringRef FuncName, +

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -775,6 +775,11 @@ class Expr : public ValueStmt { const Expr *PtrExpression, ASTContext &Ctx, EvalResult &Status) const; + /// If the current Expr can be evaluated to a pointer to a null-terminated + /// co

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++20 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s + +// CHECK-LABEL: define void @_Z2f0v() +// CHECK: call void @llvm.trap(), !dbg ![[LOC17:.*]] + +// CHECK-LABEL: define void @_Z2f1v() +// CHECK: ca

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++20 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s + +// CHECK-LABEL: define void @_Z2f0v() +// CHECK: call void @llvm.trap(), !dbg ![[LOC17:.*]] + +// CHECK-LABEL: define void @_Z2f1v() +// CHECK: ca

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++20 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s delcypher wrote: Could we add a separate test that tests the trap merging behavior in optimized code? https://github.com/llvm/llv

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -3452,6 +3452,18 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_trap: EmitTrapCall(Intrinsic::trap); return RValue::get(nullptr); + case Builtin::BI__builtin_verbose_trap: { +llvm::DILocation *Tra

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -3379,6 +3379,57 @@ Query for this feature with ``__has_builtin(__builtin_debugtrap)``. Query for this feature with ``__has_builtin(__builtin_trap)``. +``__builtin_verbose_trap`` +-- + +``__builtin_verbose_trap`` causes the program to stop its exec

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -0,0 +1,35 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -fcxx-exceptions -verify %s + +#if !__has_builtin(__builtin_verbose_trap) +#error +#endif + +constexpr char const* constMsg1 = "hello"; +char cons

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fcxx-exceptions -verify %s + +#if !__has_builtin(__builtin_verbose_trap) +#error +#endif + +constexpr char const* constMsg1 = "hello"; +char const* const constMsg2 = "hello"; +char const constMsg3[] = "hello"; + +templ

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
https://github.com/delcypher requested changes to this pull request. Looks pretty good. I have a few minor comments. Some things I suggest we may want to do in a follow up patch. https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -3424,6 +3443,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation * +CGDebugInfo::CreateTrapFailureMessageFor(llvm::DebugLoc TrapLocation, +

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++20 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s + +// CHECK-LABEL: define void @_Z2f0v() +// CHECK: call void @llvm.trap(), !dbg ![[LOC17:.*]] + +// CHECK-LABEL: define void @_Z2f1v() +// CHECK: ca

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-01 Thread via cfe-commits
@@ -2495,10 +2470,113 @@ static FixItList fixVariableWithSpan(const VarDecl *VD, return fixLocalVarDeclWithSpan(VD, Ctx, getUserFillPlaceHolder(), Handler); } +static FixItList fixVarDeclWithArray(const VarDecl *D, const ASTContext &Ctx, +

[clang-tools-extra] [clang-tidy] Remove check-specific HeaderFileExtensions and Implement… (PR #80333)

2024-02-01 Thread via cfe-commits
Carlos =?utf-8?q?G=C3=A1lvez?= Message-ID: In-Reply-To: https://github.com/EugeneZelenko approved this pull request. https://github.com/llvm/llvm-project/pull/80333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [-Wunsafe-buffer-usage] Introduce std::array fixits (PR #80084)

2024-02-01 Thread Artem Dergachev via cfe-commits
@@ -61,6 +61,7 @@ void testArraySubscripts(int *p, int **pp) { ); int a[10]; // expected-warning{{'a' is an unsafe buffer that does not perform bounds checks}} +// expected-note@-1{{change type of 'a' to 'std::array' to harden it}}

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -3416,6 +3437,27 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor( +llvm::DebugLoc TrapLocation, StringRef Prefix,

[clang] [Clang][Sema] fix outline member function template with default align crash (PR #80288)

2024-02-01 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/80288 >From 88c382b0af1ebc76e5d80d36ddb5345e0bc9f676 Mon Sep 17 00:00:00 2001 From: huqizhi Date: Thu, 1 Feb 2024 20:54:46 +0800 Subject: [PATCH] [Clang][Sema] fix outline member function template with default align cr

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -3424,6 +3443,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation * +CGDebugInfo::CreateTrapFailureMessageFor(llvm::DebugLoc TrapLocation, +

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-02-01 Thread via cfe-commits
https://github.com/weiguozhi updated https://github.com/llvm/llvm-project/pull/76868 >From 90e14918a0eb13e2187f8548416ac72491d966c1 Mon Sep 17 00:00:00 2001 From: Guozhi Wei Date: Thu, 21 Dec 2023 19:04:44 + Subject: [PATCH 1/7] New calling convention preserve_none The new calling conventi

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

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

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -3424,6 +3443,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation * +CGDebugInfo::CreateTrapFailureMessageFor(llvm::DebugLoc TrapLocation, +

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

2024-02-01 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/80292 From 886cd32ef022fcb7c5a4604c5238074a54f78b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 1 Feb 2024 22:20:44 +0100 Subject: [PATCH] [coverage] fix crash in code coverage

[clang] bfc6eaa - [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (#80292)

2024-02-01 Thread via cfe-commits
Author: Hana Dusíková Date: 2024-02-01T23:31:32+01:00 New Revision: bfc6eaa26326e4d0d20d1f4a1f0064c6df0135bd URL: https://github.com/llvm/llvm-project/commit/bfc6eaa26326e4d0d20d1f4a1f0064c6df0135bd DIFF: https://github.com/llvm/llvm-project/commit/bfc6eaa26326e4d0d20d1f4a1f0064c6df0135bd.diff

[clang] [coverage] fix crash in code coverage and `if constexpr` with `ExprWithCleanups` (PR #80292)

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

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Dan Liew via cfe-commits
@@ -346,6 +348,15 @@ class CGDebugInfo { const FieldDecl *BitFieldDecl, const llvm::DIDerivedType *BitFieldDI, llvm::ArrayRef PreviousFieldsDI, const RecordDecl *RD); + // A cache that maps artificial inlined function names used for + // __builtin_verbose_trap to

[clang] [Clang] Convert __builtin_dynamic_object_size into a calculation (PR #80256)

2024-02-01 Thread Richard Smith via cfe-commits
@@ -1051,6 +1052,145 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, return Builder.CreateSelect(Cmp, Res, ConstantInt::get(ResType, 0, IsSigned)); } +namespace { + +/// \p StructBaseExpr returns the base \p Expr with a structure or union type

[clang] [Clang] Convert __builtin_dynamic_object_size into a calculation (PR #80256)

2024-02-01 Thread Richard Smith via cfe-commits
@@ -1051,6 +1052,145 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type, return Builder.CreateSelect(Cmp, Res, ConstantInt::get(ResType, 0, IsSigned)); } +namespace { + +/// \p StructBaseExpr returns the base \p Expr with a structure or union type

[clang] [-Wunsafe-buffer-usage] Fixits for array decayed to pointer (PR #80347)

2024-02-01 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80347 >From 463a9904c1ae85fbdc0bd6029c6effea3fb16ea6 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Tue, 23 Jan 2024 16:16:10 -0800 Subject: [PATCH 01/15] [-Wunsafe-buffer-usage] Move Strategy class to the head

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

2024-02-01 Thread via cfe-commits
https://github.com/jkorous-apple created https://github.com/llvm/llvm-project/pull/80358 depends on https://github.com/llvm/llvm-project/pull/80347 >From 463a9904c1ae85fbdc0bd6029c6effea3fb16ea6 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Tue, 23 Jan 2024 16:16:10 -0800 Subject: [PATCH 01/

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

2024-02-01 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 86cd2fbdfe67d70a7fe061ed5d3a644f50f070f5 8788dc6e7501033b51ed6fa8e7078809c5c1daec --

[clang] [Clang][Sema] Correctly look up primary template for variable template specializations (PR #80359)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/80359 Consider the following: ```cpp namespace N0 { namespace N1 { template int x1 = 0; } using namespace N1; } template<> int N0::x1; ``` According to [[dcl.meaning.general] p3.3](http://eel.is/c++dr

[clang] [Clang][Sema] Correctly look up primary template for variable template specializations (PR #80359)

2024-02-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes Consider the following: ```cpp namespace N0 { namespace N1 { template int x1 = 0; } using namespace N1; } template<> int N0::x1; ``` According to [[dcl.meaning.general

[clang] [Clang][Sema] Correctly look up primary template for variable template specializations (PR #80359)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Still need to add a release note, but this should otherwise complete https://github.com/llvm/llvm-project/pull/80359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] [libc] [mlir] [clang-tools-extra] [openmp] [llvm] [lldb] [clang] [flang] [lld] [SLP]Add support for strided loads. (PR #80310)

2024-02-01 Thread Philip Reames via cfe-commits
preames wrote: FYI - https://github.com/llvm/llvm-project/pull/80360 adds testing infrastructure to exercise the TTI hooks. https://github.com/llvm/llvm-project/pull/80310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [Clang][Sema] Correctly look up primary template for variable template specializations (PR #80359)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/80359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Correctly look up primary template for variable template specializations (PR #80359)

2024-02-01 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/80359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add -march support for many of the S extensions mentioned in the profile specification. (PR #79399)

2024-02-01 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/79399 >From 1d29443b30f6d6db2dbba0f78e8347ea126321e7 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 24 Jan 2024 18:39:07 -0800 Subject: [PATCH 1/7] [RISCV] Add many of the S extensions mentioned in the profile

<    1   2   3   4   5   6   >