[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-22 Thread Budimir Aranđelović via cfe-commits
budimirarandjelovicsyrmia wrote: ping @AaronBallman @Endilll @aaronpuchert https://github.com/llvm/llvm-project/pull/70024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-05-22 Thread via cfe-commits
zmodem wrote: Thanks, let me know if I can help. https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix codegen of consteval functions returning an empty class. (PR #93115)

2024-05-22 Thread via cfe-commits
@@ -135,6 +135,17 @@ class AggExprEmitter : public StmtVisitor { EnsureDest(E->getType()); if (llvm::Value *Result = ConstantEmitter(CGF).tryEmitConstantExpr(E)) { + // An empty record can overlap other data (if declared with + // no_unique_address); omit the

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-05-22 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I received some reports for this patch breaking some codes. I am reproducing it. It looks like related to exceptions. https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

2024-05-22 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/92814 >From 43e9f8fe5cdb19c0f57a00b352592e56e470ffe7 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 20 May 2024 20:18:48 +0100 Subject: [PATCH 1/3] [Clang] Change how the argument of a delete expression is c

[clang] [ARM][clang] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-05-22 Thread Chris Copeland via cfe-commits
chrisnc wrote: Rebased and fixed conflict in release notes. https://github.com/llvm/llvm-project/pull/91870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM][clang] Fix warning for VFP function calls from interrupts. (PR #91870)

2024-05-22 Thread Chris Copeland via cfe-commits
https://github.com/chrisnc updated https://github.com/llvm/llvm-project/pull/91870 >From b9aae83e94aab9ebed9b3dc3fe23bee4bd3c0756 Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Sat, 11 May 2024 00:15:50 -0700 Subject: [PATCH] [ARM][clang] Fix warning for VFP function calls from interrupts

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

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

[clang] [clang-format]: Annotate colons found in inline assembly (PR #92617)

2024-05-22 Thread Owen Pan via cfe-commits
@@ -1489,11 +1489,25 @@ TEST_F(TokenAnnotatorTest, RequiresDoesNotChangeParsingOfTheRest) { TEST_F(TokenAnnotatorTest, UnderstandsAsm) { auto Tokens = annotate("__asm{\n" "a:\n" - "};"); - ASSERT_EQ(Tokens.size(), 7u) << Toke

[clang] [clang-format]: Annotate colons found in inline assembly (PR #92617)

2024-05-22 Thread Owen Pan via cfe-commits
@@ -1489,11 +1489,25 @@ TEST_F(TokenAnnotatorTest, RequiresDoesNotChangeParsingOfTheRest) { TEST_F(TokenAnnotatorTest, UnderstandsAsm) { auto Tokens = annotate("__asm{\n" "a:\n" - "};"); - ASSERT_EQ(Tokens.size(), 7u) << Toke

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-22 Thread Fangrui Song via cfe-commits
@@ -11,6 +11,8 @@ // //===--===// +#include "clang/Config/config.h" MaskRay wrote: If SystemZ.h uses CLANG_SYSTEMZ_DEFAULT_ARCH, that file should have `#include "clang/Config/config.h"` as

[clang] [clang-format]: Annotate colons found in inline assembly (PR #92617)

2024-05-22 Thread Owen Pan via cfe-commits
@@ -1358,6 +1358,8 @@ class AnnotatingParser { Line.First->startsSequence(tok::kw_export, Keywords.kw_module) || Line.First->startsSequence(tok::kw_export, Keywords.kw_import)) { Tok->setType(TT_ModulePartitionColon); + } else if (Line.First->is

[clang] [clang-tools-extra] [libcxx] Reland "[clang] Enable sized deallocation by default in C++14 onwards" (PR #90373)

2024-05-22 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: > > Based on my rough understanding, this is expected? > > What do you mean? > > Isn't this test needs to be updated or disabled? I think this ASAN failure is not caused by this PR because these memorys are allocated/deallocated by `memory_resource` directly, **there is nothi

[clang] [llvm] Reland "[X86] Remove knl/knm specific ISAs supports (#92883)" (PR #93136)

2024-05-22 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: any idea on why `Labelling new pull requests / greeter (pull_request_target)` is **skipped**? @phoebewang @RKSimon https://github.com/llvm/llvm-project/pull/93136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-22 Thread Dan Liew via cfe-commits
delcypher wrote: Okay this is interesting... ``` FAIL: Clang :: SemaObjC/warn-thread-safety-analysis.m (15515 of 19369) TEST 'Clang :: SemaObjC/warn-thread-safety-analysis.m' FAILED Exit Code: 134 Command Output (stderr): -- RUN: a

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-05-22 Thread Gedare Bloom via cfe-commits
https://github.com/gedare updated https://github.com/llvm/llvm-project/pull/93140 >From 27a2da876926d2157ea9f18c5fd71a2e81e097fc Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Tue, 21 May 2024 22:21:59 -0600 Subject: [PATCH 1/2] [clang-format] Improve BlockIndent at ColumnLimit Fixes #55731

[clang] [compiler-rt] [lldb] [llvm] [Support] Remove terminfo dependency (PR #92865)

2024-05-22 Thread Aaron Siddhartha Mondal via cfe-commits
https://github.com/aaronmondal updated https://github.com/llvm/llvm-project/pull/92865 >From 124be680ca3ae82edd6fa9a49b1fd171d1babbf5 Mon Sep 17 00:00:00 2001 From: Aaron Siddhartha Mondal Date: Tue, 21 May 2024 06:37:49 +0200 Subject: [PATCH] [Support] Remove terminfo dependency The terminfo

[clang] [clang-tools-extra] [libcxx] Reland "[clang] Enable sized deallocation by default in C++14 onwards" (PR #90373)

2024-05-22 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Based on my rough understanding, this is expected? What do you mean? Isn't this test needs to be updated or disabled? https://github.com/llvm/llvm-project/pull/90373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-05-22 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 7f5c71efc441083282a5365d245acfe6afcd0dd5 27a2da876926d2157ea9f18c5fd71a2e81e097fc --

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Gedare Bloom (gedare) Changes Fixes #55731 Fixes #73584 The reported formatting problems were related to ignoring deep nesting of "simple" functions (causing #54808) and to allowing the trailing annotation to become separated fr

[clang] [clang-format] Improve BlockIndent at ColumnLimit (PR #93140)

2024-05-22 Thread Gedare Bloom via cfe-commits
https://github.com/gedare created https://github.com/llvm/llvm-project/pull/93140 Fixes #55731 Fixes #73584 The reported formatting problems were related to ignoring deep nesting of "simple" functions (causing #54808) and to allowing the trailing annotation to become separated from the clos

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > Just found out this keeps popping up from my notification, and I would like > give my 2 cents, maybe can provide some insights: > > Looking at the backtrace of the failing tests, I noticed we ran into > `clang::Parser::ParseTopLevelStmtDecl()` which makes me very confused.

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > fwiw if you have access to a mac, I don't think it's hard to build > lldb+clang? I have swig, cmake, and ninja installed on my mac via homebrew. > > ``` > lldb/scripts/macos-setup-codesign.sh > > mkdir build > cd build > cmake ../llvm -G Ninja -DLLDB_ENABLE_SWIFT_SUPPORT=0

[clang] [llvm] [RISCV][FMV] Support target_clones (PR #85786)

2024-05-22 Thread Piyou Chen via cfe-commits
https://github.com/BeMg converted_to_draft https://github.com/llvm/llvm-project/pull/85786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][Clang] Add check of size for __builtin_amdgcn_global_load_lds (PR #93064)

2024-05-22 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -cl-std=CL2.0 -O0 -triple amdgcn-unknown-unknown -target-cpu gfx940 -S -verify -o - %s +// REQUIRES: amdgpu-registered-target + +typedef unsigned int u32; + +void test_global_load_lds_unsupported_size(global u32* src, local u32 *dst, u32 size)

[clang] [llvm] Reland "[X86] Remove knl/knm specific ISAs supports (#92883)" (PR #93136)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-clang Author: Freddy Ye (FreddyLeaf) Changes This reverts commit aa4069ea96e5eb62bc8c7895b9d920f129611b3a. --- Patch is 141.63 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/931

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/89572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 896bceb - [MC/DC][Coverage] Add assertions into emitSourceRegions() (#89572)

2024-05-22 Thread via cfe-commits
Author: NAKAMURA Takumi Date: 2024-05-23T13:57:12+09:00 New Revision: 896bceb9537ecd906668fdd2bcb0310b32174917 URL: https://github.com/llvm/llvm-project/commit/896bceb9537ecd906668fdd2bcb0310b32174917 DIFF: https://github.com/llvm/llvm-project/commit/896bceb9537ecd906668fdd2bcb0310b32174917.dif

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-22 Thread Artem Yurchenko via cfe-commits
temyurchenko wrote: Fixes #93085 https://github.com/llvm/llvm-project/pull/93131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Artem Yurchenko (temyurchenko) Changes Problem: the printer used to ignore all but the first declarator for unbraced language linkage declarators. Furthemore, that one would be printed without the final semicolon. Solution: when there is

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-22 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-22 Thread Artem Yurchenko via cfe-commits
https://github.com/temyurchenko created https://github.com/llvm/llvm-project/pull/93131 Problem: the printer used to ignore all but the first declarator for unbraced language linkage declarators. Furthemore, that one would be printed without the final semicolon. Solution: when there is more t

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-05-22 Thread Alan Phipps via cfe-commits
https://github.com/evodius96 approved this pull request. https://github.com/llvm/llvm-project/pull/89572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/89572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MC/DC][Coverage] Add assertions into emitSourceRegions() (PR #89572)

2024-05-22 Thread Jessica Paquette via cfe-commits
https://github.com/ornata approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-22 Thread Jessica Paquette via cfe-commits
@@ -517,7 +552,7 @@ class CoverageMappingBuilder { SourceRegionFilter Filter; for (const auto &FM : FileIDMapping) { SourceLocation ExpandedLoc = FM.second.second; - SourceLocation ParentLoc = getIncludeOrExpansionLoc(ExpandedLoc); + SourceLocation Paren

[clang] [clang-tools-extra] [libcxx] Reland "[clang] Enable sized deallocation by default in C++14 onwards" (PR #90373)

2024-05-22 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: > This one is broken https://lab.llvm.org/buildbot/#/builders/168/builds/20461 The broken case is: ```cpp void test_allocate_deallocate() { std::pmr::memory_resource& r1 = *std::pmr::new_delete_resource(); globalMemCounter.reset(); void* ret = r1.allocate(50); assert(r

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-22 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 updated https://github.com/llvm/llvm-project/pull/92997 >From 751d80c61f0e42daa3796a8270e186153dd9413f Mon Sep 17 00:00:00 2001 From: Chen Zheng Date: Wed, 22 May 2024 02:37:04 -0400 Subject: [PATCH 1/2] [PowerPC] Support -fpatchable-function-entry For now only

[clang] [clang] Introduce `SemaX86` (PR #93098)

2024-05-22 Thread via cfe-commits
xiangzh1 wrote: +1 for this split job, thanks! https://github.com/llvm/llvm-project/pull/93098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix printing of canonical template template parameters (PR #93124)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes When printing template arguments of the template kind, a canonical template template parameter would be printed as an empty string. This fixes it so they are printed similarly to canonical template type

[clang] [clang] fix printing of canonical template template parameters (PR #93124)

2024-05-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/93124 When printing template arguments of the template kind, a canonical template template parameter would be printed as an empty string. This fixes it so they are printed similarly to canonical template type parame

[clang] [llvm] Revert "[X86] Remove knl/knm specific ISAs supports (#92883)" (PR #93123)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Freddy Ye (FreddyLeaf) Changes This reverts commit 282d2ab58f56c89510f810a43d4569824a90c538. --- Patch is 141.61 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pul

[clang] [llvm] Revert "[X86] Remove knl/knm specific ISAs supports (#92883)" (PR #93123)

2024-05-22 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf closed https://github.com/llvm/llvm-project/pull/93123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Support -fpatchable-function-entry (PR #92997)

2024-05-22 Thread Chen Zheng via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -fsyntax-only -verify %s + +// expected-error@+1 {{'patchable_function_entry' attribute is not yet supported on AIX}} +__attribute__((patchable_function_entry(0))) void f(); chenzheng1030 wrote:

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-22 Thread Freddy Ye via cfe-commits
@@ -58016,15 +58035,27 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, break; case 'r': // GENERAL_REGS case 'l': // INDEX_REGS + if (Subtarget.useInlineAsmGPR32()) { +if (VT == MVT::i8 || VT == MVT::i1) +

[clang] [llvm] [polly] [X86] Remove knl/knm specific ISAs supports (PR #92883)

2024-05-22 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf closed https://github.com/llvm/llvm-project/pull/92883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [polly] [X86] Remove knl/knm specific ISAs supports (PR #92883)

2024-05-22 Thread Freddy Ye via cfe-commits
@@ -139,6 +139,9 @@ Changes to the Windows Target Changes to the X86 Backend -- +- Removed knl/knm specific ISA lowerings: AVX512PF, AVX512ER, PREFETCHWT1, FreddyLeaf wrote: [3470095](https://github.com/llvm/llvm-project/pull/92883/com

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-22 Thread Dan Liew via cfe-commits
delcypher wrote: Hmm looks like I broke ``` Clang :: Sema/attr-capabilities.c Clang :: Sema/diagnose_if.c Clang :: Sema/warn-thread-safety-analysis.c Clang :: SemaObjC/warn-thread-safety-analysis.m ``` Let's see if I can figure out what I did... https://github.com/llvm/llvm-project/pul

[clang] [lld] [llvm] Run ObjCContractPass in Default Codegen Pipeline (PR #92331)

2024-05-22 Thread Nuri Amari via cfe-commits
https://github.com/NuriAmari updated https://github.com/llvm/llvm-project/pull/92331 >From 66ddf609c0e77867ec48c17136fb80d1e482041d Mon Sep 17 00:00:00 2001 From: Nuri Amari Date: Wed, 15 May 2024 16:33:03 -0700 Subject: [PATCH 1/7] Run ObjCContractPass in Distributed Thin-LTO Pipeline Prior t

[clang] [BoundsSafety] Add `-fexperimental-bounds-safety` CC1 and language option and use it to tweak `counted_by`'s semantics (PR #92623)

2024-05-22 Thread Dan Liew via cfe-commits
delcypher wrote: This is blocked by #93121 https://github.com/llvm/llvm-project/pull/92623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix codegen of consteval functions returning an empty class. (PR #93115)

2024-05-22 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I didn't think so at first glance... but yes, we do, in certain obscure cases: ``` #include struct A { char c; A(); }; struct __attribute((packed)) S { char a; int x; __attribute((aligned(2))) char y; consteval S() : x(1), a(3), y(2) {} }; struct S2 { [[no_unique_address]

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-22 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf updated https://github.com/llvm/llvm-project/pull/92338 >From 41fbc18c7a4a26b11bc4b772bbe2e384ad9d9dbc Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Fri, 10 May 2024 16:29:55 +0800 Subject: [PATCH 1/8] [X86] Support EGPR for inline assembly. "jR": explictly enabl

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-22 Thread Dan Liew via cfe-commits
delcypher wrote: @rapidsna Please check 604e274a5bc37b18c3bc89eed5749c8617de36e7 to check you are happy with the way I'm fixing the memory leak. https://github.com/llvm/llvm-project/pull/93121 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-22 Thread Dan Liew via cfe-commits
@@ -744,7 +744,13 @@ void Parser::ParseLexedAttributeList(LateParsedAttrList &LAs, Decl *D, for (unsigned i = 0, ni = LAs.size(); i < ni; ++i) { if (D) LAs[i]->addDecl(D); -ParseLexedAttribute(*LAs[i], EnterScope, OnDefinition); +// FIXME: There has to be a

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dan Liew (delcypher) Changes This PR attempts to reland https://github.com/llvm/llvm-project/pull/90786 that was reverted due to a memory leak. This PR includes the following commits 1. The original commit in #90786 (originally 0ec3b97

[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

2024-05-22 Thread Dan Liew via cfe-commits
https://github.com/delcypher created https://github.com/llvm/llvm-project/pull/93121 This PR attempts to reland https://github.com/llvm/llvm-project/pull/90786 that was reverted due to a memory leak. This PR includes the following commits 1. The original commit in #90786 (originally 0ec3b97

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Jun Zhang via cfe-commits
junaire wrote: Just found out this keeps popping up from my notification, and I would like give my 2 cents, maybe can provide some insights: Looking at the backtrace of the failing tests, I noticed we ran into `clang::Parser::ParseTopLevelStmtDecl()` which makes me very confused. Do we actual

[clang] Fix codegen of consteval functions returning an empty class. (PR #93115)

2024-05-22 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. Looks good. Do we also need to worry about overwriting tail padding here? https://github.com/llvm/llvm-project/pull/93115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] Fix codegen of consteval functions returning an empty class. (PR #93115)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Eli Friedman (efriedma-quic) Changes If a class is empty, don't store it to memory: the store might overwrite useful data. (See also d60c3d08.) Fixes #93040. --- Full diff: https://github.com/llvm/llvm-project/pull/93115.diff

[clang] Fix codegen of consteval functions returning an empty class. (PR #93115)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes If a class is empty, don't store it to memory: the store might overwrite useful data. (See also d60c3d08.) Fixes #93040. --- Full diff: https://github.com/llvm/llvm-project/pull/93115.diff 2 Files

[clang] Fix codegen of consteval functions returning an empty class. (PR #93115)

2024-05-22 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/93115 If a class is empty, don't store it to memory: the store might overwrite useful data. (See also d60c3d08.) Fixes #93040. >From bdfcc729c309fc5b1092b67d7c3c803c852ae251 Mon Sep 17 00:00:00 2001 From: Eli

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-05-22 Thread Fangrui Song via cfe-commits
@@ -801,7 +801,7 @@ static OutputDesc *addInputSec(StringMap> &map, auto *firstIsec = cast( cast(sec->commands[0])->sectionBases[0]); OutputSection *firstIsecOut = - firstIsec->flags & SHF_LINK_ORDER MaskRay wrote: A CppCheck is

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #92527)

2024-05-22 Thread via cfe-commits
https://github.com/yronglin closed https://github.com/llvm/llvm-project/pull/92527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f049d72 - Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (#92527)

2024-05-22 Thread via cfe-commits
Author: yronglin Date: 2024-05-23T07:59:46+08:00 New Revision: f049d72ac2bcc40fd91d4e95148658021fb24bf1 URL: https://github.com/llvm/llvm-project/commit/f049d72ac2bcc40fd91d4e95148658021fb24bf1 DIFF: https://github.com/llvm/llvm-project/commit/f049d72ac2bcc40fd91d4e95148658021fb24bf1.diff LOG:

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #92527)

2024-05-22 Thread via cfe-commits
yronglin wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/92527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikolas Klauser (philnik777) Changes This changes `__is_trivially_equality_comparable` to do overload resolution instead, which fixes a couple of false-positives (and a false-negative as a drive-by). Fixes #89293 --- Full diff: https:

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-05-22 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 ready_for_review https://github.com/llvm/llvm-project/pull/93113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-05-22 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/93113 >From 31e334643e7b4fa4a87c8d15efab4036306d Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 23 May 2024 01:48:06 +0200 Subject: [PATCH] [Clang] Fix __is_trivially_equality_comparable returning tru

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-05-22 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 465bfd41fa27383d93521a31458e6496ebfc590d 53b52a07f8720db4495b93099d3e1874453f6950 --

[clang] [Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads (PR #93113)

2024-05-22 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/93113 This changes `__is_trivially_equality_comparable` to do overload resolution instead, which fixes a couple of false-positives (and a false-negative as a drive-by). Fixes #89293 >From 53b52a07f8720db4495b93

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-22 Thread Hendrik Hübner via cfe-commits
HendrikHuebner wrote: Alright, I implemented the changes you suggested. There may have been an easier way to modify the diagnostic though. https://github.com/llvm/llvm-project/pull/91057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-22 Thread Hendrik Hübner via cfe-commits
https://github.com/HendrikHuebner updated https://github.com/llvm/llvm-project/pull/91057 From c6a28f1ca3fe64deee892abdf2d3646e9ccf0a87 Mon Sep 17 00:00:00 2001 From: hhuebner Date: Sat, 4 May 2024 13:49:38 +0200 Subject: [PATCH] [Clang] Throw error when calling atomic with pointer to zero siz

[clang] [clang] Fix PS "selective" DLL import/export of vtable & typeinfo (PR #92579)

2024-05-22 Thread via cfe-commits
@@ -1793,6 +1793,37 @@ void ItaniumCXXABI::EmitDestructorCall(CodeGenFunction &CGF, ThisTy, VTT, VTTTy, nullptr); } +// Check if any non-inline method has the specified attribute. +template +static bool CXXRecordNonInlineHasAttr(const CXXRecordDec

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-22 Thread via cfe-commits
antangelo wrote: Friendly ping https://github.com/llvm/llvm-project/pull/91046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-22 Thread Hendrik Hübner via cfe-commits
https://github.com/HendrikHuebner updated https://github.com/llvm/llvm-project/pull/91057 From 9a0cb155e9d05043b31736080cb355ae73e16860 Mon Sep 17 00:00:00 2001 From: hhuebner Date: Sat, 4 May 2024 13:49:38 +0200 Subject: [PATCH] [Clang] Throw error when calling atomic with pointer to zero siz

[clang] [Clang] Throw error when calling atomic with pointer to zero size object (PR #91057)

2024-05-22 Thread Hendrik Hübner via cfe-commits
https://github.com/HendrikHuebner updated https://github.com/llvm/llvm-project/pull/91057 From d1013726315209ba2517ecd767daa067b4b34143 Mon Sep 17 00:00:00 2001 From: hhuebner Date: Sat, 4 May 2024 13:49:38 +0200 Subject: [PATCH] gClang] Throw error when calling atomic with pointer to zero siz

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-22 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/91101 >From 0f04281f4c064d0c873abf0c95c54b53fa3deafd Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Sat, 4 May 2024 18:12:34 -0500 Subject: [PATCH 1/3] [Inliner] Add tests for propagating more parameter attrib

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-22 Thread via cfe-commits
@@ -1427,8 +1429,17 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, ValidExactParamAttrs[ArgNo].getAlignment().valueOrOne()) AL = AL.removeParamAttribute(Context, I, Attribute::Alignment); + auto ExistingRange = AL.getParamRa

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
@@ -339,8 +365,18 @@ class CoverageMappingBuilder { llvm::SmallSet Visited; SmallVector, 8> FileLocs; -for (const auto &Region : SourceRegions) { +for (auto &Region : SourceRegions) { SourceLocation Loc = Region.getBeginLoc(); + + // Replace Region

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
@@ -292,10 +292,36 @@ class CoverageMappingBuilder { return SM.getLocForEndOfFile(SM.getFileID(Loc)); } - /// Find out where the current file is included or macro is expanded. - SourceLocation getIncludeOrExpansionLoc(SourceLocation Loc) { -return Loc.isMacroID() ?

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Jason Molenda via cfe-commits
jasonmolenda wrote: fwiw if you have access to a mac, I don't think it's hard to build lldb+clang? I have swig, cmake, and ninja installed on my mac via homebrew. ``` lldb/scripts/macos-setup-codesign.sh mkdir build cd build cmake ../llvm -G Ninja -DLLDB_ENABLE_SWIFT_SUPPORT=0 -DPython3_EXE

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Daniel Thornburgh via cfe-commits
mysterymath wrote: This still exhibits the same issue: https://luci-milo.appspot.com/raw/build/logs.chromium.org/fuchsia/led/dthorn_google.com/0d77d2b0963e18ad11cb83db0680c2382ed7f8df95cf733f42fcdbd1dda8a7ec/+/build.proto https://logs.chromium.org/logs/fuchsia/led/dthorn_google.com/0d77d2b0963

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-05-22 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/85316 >From cf9b776ff6fd59fc9488eedf45b9344f711ee155 Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 14 Mar 2024 17:34:16 -0400 Subject: [PATCH] Resolve FIXME: Use class method when receiver is reference to class

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-05-22 Thread via cfe-commits
https://github.com/AtariDreams edited https://github.com/llvm/llvm-project/pull/85316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Resolve FIXME: Use class method when receiver is reference to class (PR #85316)

2024-05-22 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/85316 >From 3a1cc2ba9c3b5f5bd290eda890287f3f87803e61 Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 14 Mar 2024 17:34:16 -0400 Subject: [PATCH] Resolve FIXME: Use class method when receiver is reference to class

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/92953 >From 66e05ac24613435dbe774d49684d8ff9d119c4c3 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 21 May 2024 21:41:24 +0300 Subject: [PATCH 1/3] Remove some `try_compile` CMake checks for compiler flag

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-22 Thread Andreas Jonson via cfe-commits
@@ -1427,8 +1429,17 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, ValidExactParamAttrs[ArgNo].getAlignment().valueOrOne()) AL = AL.removeParamAttribute(Context, I, Attribute::Alignment); + auto ExistingRange = AL.getParamRa

[clang] [CodeGen] Update test intrinsic to support immediates (PR #79174)

2024-05-22 Thread via cfe-commits
https://github.com/AtariDreams converted_to_draft https://github.com/llvm/llvm-project/pull/79174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-22 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/91101 >From 0f04281f4c064d0c873abf0c95c54b53fa3deafd Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Sat, 4 May 2024 18:12:34 -0500 Subject: [PATCH 1/3] [Inliner] Add tests for propagating more parameter attrib

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-05-22 Thread via cfe-commits
@@ -1427,8 +1429,20 @@ static void AddParamAndFnBasicAttributes(const CallBase &CB, ValidExactParamAttrs[ArgNo].getAlignment().valueOrOne()) AL = AL.removeParamAttribute(Context, I, Attribute::Alignment); + auto ExistingRange = AL.getParamRa

[clang] [clang] Introduce `SemaX86` (PR #93098)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Vlad Serebrennikov (Endilll) Changes This patch moves `Sema` functions that are specific for x86 into the new `SemaX86` class. This continues previous efforts to split `Sema` up. Additional context can be found in #84184 and #92682.

[clang] [clang] Introduce `SemaX86` (PR #93098)

2024-05-22 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/93098 This patch moves `Sema` functions that are specific for x86 into the new `SemaX86` class. This continues previous efforts to split `Sema` up. Additional context can be found in #84184 and #92682. >From 662c3458

[clang] [Coverage][Expansion] handle nested macros in scratch space (PR #89869)

2024-05-22 Thread NAKAMURA Takumi via cfe-commits
@@ -339,8 +365,18 @@ class CoverageMappingBuilder { llvm::SmallSet Visited; SmallVector, 8> FileLocs; -for (const auto &Region : SourceRegions) { +for (auto &Region : SourceRegions) { SourceLocation Loc = Region.getBeginLoc(); + + // Replace Region

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-22 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,29 @@ +; RUN: llc -mtriple=x86_64-- -O0 < %s | FileCheck %s +; RUN: llc -mtriple=x86_64-- -O1 < %s | FileCheck %s +; RUN: llc -mtriple=x86_64-- -O2 < %s | FileCheck %s + +; The codegen should insert post-inlining instrumentation calls and should not +; insert pre-inlini

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-22 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,44 @@ +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="thinlto-pre-link,thinlto" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="thi

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-22 Thread Arthur Eubanks via cfe-commits
@@ -1,41 +0,0 @@ -// REQUIRES: arm-registered-target,aarch64-registered-target - -// RUN: %clang -target armv7-unknown-none-eabi -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,UNSUPPORTED -// RUN: %clang -target armv7-unknown-none-eabi -pg -meabi gnu -S -emit-llvm

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-22 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,44 @@ +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s aeubanks wrote: `PRELTO` isn't quite accurate since we also instrument in the default pipelines, I'd use `INSTRUMENT`/`NOINSTRUMENT` or even just `YES`/`NO` :) https://gi

[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-22 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,44 @@ +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="default" -S < %s | FileCheck -check-prefix=PRELTO %s +; RUN: opt -passes="thinlto-pre-link,thinlto" -S < %s | FileCheck -check-prefix=PRELTO %s aeubank

[clang] [clang] fix(93002): clang/lib/Sema/SemaOpenMP.cpp:7405: Possible & / && mixup ? (PR #93093)

2024-05-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #93002 --- Full diff: https://github.com/llvm/llvm-project/pull/93093.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaOpenMP.cpp (+1-1) ``diff diff --git a/clang/lib/Sema/SemaOpe

[clang] [clang] fix(93002): clang/lib/Sema/SemaOpenMP.cpp:7405: Possible & / && mixup ? (PR #93093)

2024-05-22 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/93093 Fixes #93002 >From 19c54263be42fea58403d30030af76da0355ef1e Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 22 May 2024 23:47:19 +0300 Subject: [PATCH] fix(93002): switch & to && for boolean values ---

  1   2   3   4   >