[clang] [Clang] Implement C++26 Attributes for Structured Bindings (P0609R3) (PR #89906)

2024-04-24 Thread via cfe-commits
cor3ntin wrote: > Thank you working on this. I'm really like this feature! I've a question, do > we have any further plans to support GNU extension attributes(e.g. > __attribute__((aligned)))? Although it is not included in the paper. No, sorry! My goal here is to increase conformance, not to

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-24 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > No. But I am confused, isn't this just shadowing a global variable with a > lesser-scoped one. Are they the same? What behavior do we want here? This is declaring, then defining, a global variable; sorry if that wasn't clear. Probably should be an error? It'll be confus

[clang] Notifying assume directive as 'worked on'. (PR #90022)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (SunilKuravinakop) Changes Notifying assume directive as 'worked on'. When checked on slack channel, nobody was working on assume directive. Changes to be committed: modified: clang/docs/OpenMPSupport.rst --- Full diff:

[clang] Notifying assume directive as 'worked on'. (PR #90022)

2024-04-24 Thread via cfe-commits
https://github.com/SunilKuravinakop created https://github.com/llvm/llvm-project/pull/90022 Notifying assume directive as 'worked on'. When checked on slack channel, nobody was working on assume directive. Changes to be committed: modified: clang/docs/OpenMPSupport.rst >From 031b4

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-24 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,165 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -disable-O0-optnone -emit-llvm \ +// RUN: %s -o - | opt -S -passes=mem2reg | FileCheck %s + +// CHECK-LABEL: define dso_local half @test_convert_from_bf16_to_fp16( +// CHECK-SAME: bfloat noundef [[A:%.*]]) #

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

2024-04-24 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89804 >From 50fa9c91bee980a114ebab2b3301a1e378dd2b81 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 18:07:06 + Subject: [PATCH] [clang-repl] Extend the C support. The IdResolver chain is

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-04-24 Thread via cfe-commits
cor3ntin wrote: @t3nsor Do you know the reason for the "not enclosed in parameters" in https://eel.is/c++draft/expr.unary.op#4 ? https://github.com/llvm/llvm-project/pull/89713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-24 Thread via cfe-commits
https://github.com/JinjinLi868 updated https://github.com/llvm/llvm-project/pull/89051 >From 31ced11517042bcbd6f5f6e544cadf6943c1b1c0 Mon Sep 17 00:00:00 2001 From: Jinjin Li Date: Wed, 17 Apr 2024 16:44:50 +0800 Subject: [PATCH] [clang] Fix half && bfloat16 convert node expr codegen Data type

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++26 -fsyntax-only -verify %s + +auto&& f1() { + return 42; // expected-error{{returning reference to local temporary object}} +} +const double& f2() { + static int x = 42; + return x; // expected-error{{returning reference to local te

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

2024-04-24 Thread Wentao Zhang 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] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (PR #89873)

2024-04-24 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/89873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c2a98fd - [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (#89873)

2024-04-24 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-04-25T13:53:22+08:00 New Revision: c2a98fdeb3aede1a8db492a6ea30f4fa85b60edc URL: https://github.com/llvm/llvm-project/commit/c2a98fdeb3aede1a8db492a6ea30f4fa85b60edc DIFF: https://github.com/llvm/llvm-project/commit/c2a98fdeb3aede1a8db492a6ea30f4fa85b60edc.diff LO

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
@@ -42,6 +42,54 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool CBuffer, void SemaHLSL::ActOnFinishBuffer(Decl *Dcl, SourceLocation RBrace) { auto *BufDecl = cast(Dcl); BufDecl->setRBraceLoc(RBrace); + + // Validate packoffset. + llvm::SmallVector> PackOffse

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

2024-04-24 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89804 >From 8317ce33d07d0986e314de0b39aa977f784e0619 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 18:07:06 + Subject: [PATCH] [clang-repl] Extend the C support. The IdResolver chain is

[clang] [clang-repl] Fix the process return code if diagnostics occurred. (PR #89879)

2024-04-24 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/89879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fd5f06e - [clang-repl] Fix the process return code if diagnostics occurred. (#89879)

2024-04-24 Thread via cfe-commits
Author: Vassil Vassilev Date: 2024-04-25T08:46:04+03:00 New Revision: fd5f06eb6d8d8b05846c8d7bd2431079ef707b37 URL: https://github.com/llvm/llvm-project/commit/fd5f06eb6d8d8b05846c8d7bd2431079ef707b37 DIFF: https://github.com/llvm/llvm-project/commit/fd5f06eb6d8d8b05846c8d7bd2431079ef707b37.dif

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-04-24 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/77456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-04-24 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/77456 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTMatchers] forCallable should not erase binding on success (PR #89657)

2024-04-24 Thread Marco Borgeaud via cfe-commits
https://github.com/marco-antognini-sonarsource updated https://github.com/llvm/llvm-project/pull/89657 >From ebc417fe98f1cb0e030ec77c17c0150c3fcca7f9 Mon Sep 17 00:00:00 2001 From: Marco Borgeaud <89914223+marco-antognini-sonarsou...@users.noreply.github.com> Date: Fri, 19 Apr 2024 17:33:22 +02

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-24 Thread via cfe-commits
Sirraide wrote: > @Sirraide See example of > > https://github.com/llvm/llvm-project/blob/662ef8604268b207910225ecca90daf30a46720b/clang/test/CXX/drs/dr25xx.cpp#L148 > > > In this case, the date should be 2024-04-19. Ah, thanks. https://github.com/llvm/llvm-project/pull/89828

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-04-24 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/77456 >From 6c184f9714c94af94c7692e1264061b8dc14e912 Mon Sep 17 00:00:00 2001 From: NorthBlue333 Date: Tue, 9 Jan 2024 14:01:14 +0100 Subject: [PATCH 1/3] [clang-format] Do not update cursor pos if no includes replacem

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add generic CPUs for profiles (PR #84877)

2024-04-24 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: Gentle ping. https://github.com/llvm/llvm-project/pull/84877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Reformat suspicious condition (PR #89923)

2024-04-24 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: This makes sense, I added Nico since they added the change that brought in that line. https://github.com/llvm/llvm-project/pull/89923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
@@ -7398,6 +7398,26 @@ The full documentation is available here: https://docs.microsoft.com/en-us/windo }]; } +def HLSLPackOffsetDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The packoffset attribute is used to change the layout of a cbuffer.

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
@@ -42,6 +42,54 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool CBuffer, void SemaHLSL::ActOnFinishBuffer(Decl *Dcl, SourceLocation RBrace) { auto *BufDecl = cast(Dcl); BufDecl->setRBraceLoc(RBrace); + + // Validate packoffset. + llvm::SmallVector> PackOffse

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
@@ -42,6 +42,54 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool CBuffer, void SemaHLSL::ActOnFinishBuffer(Decl *Dcl, SourceLocation RBrace) { auto *BufDecl = cast(Dcl); BufDecl->setRBraceLoc(RBrace); + + // Validate packoffset. + llvm::SmallVector> PackOffse

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
@@ -183,6 +183,86 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes &Attrs, return; } } break; + case ParsedAttr::AT_HLSLPackOffset: { +// Parse 'packoffset( c[Subcomponent][.component] )'. +// Check '('. +if (ExpectAndConsume(tok::l_paren, diag::er

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
@@ -183,6 +183,86 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes &Attrs, return; } } break; + case ParsedAttr::AT_HLSLPackOffset: { +// Parse 'packoffset( c[Subcomponent][.component] )'. +// Check '('. +if (ExpectAndConsume(tok::l_paren, diag::er

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
@@ -7314,6 +7314,47 @@ static void handleHLSLSV_DispatchThreadIDAttr(Sema &S, Decl *D, D->addAttr(::new (S.Context) HLSLSV_DispatchThreadIDAttr(S.Context, AL)); } +static void handleHLSLPackOffsetAttr(Sema &S, Decl *D, const ParsedAttr &AL) { + if (!isa(D)) { +S.Diag(A

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota requested changes to this pull request. https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Support packoffset attribute in AST (PR #89836)

2024-04-24 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/89836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread A. Jiang via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++26 -fsyntax-only -verify %s + +auto&& f1() { + return 42; // expected-error{{returning reference to local temporary object}} +} +const double& f2() { + static int x = 42; + return x; // expected-error{{returning reference to local te

[clang] [clang-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-04-24 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/77456 >From 6c184f9714c94af94c7692e1264061b8dc14e912 Mon Sep 17 00:00:00 2001 From: NorthBlue333 Date: Tue, 9 Jan 2024 14:01:14 +0100 Subject: [PATCH 1/2] [clang-format] Do not update cursor pos if no includes replacem

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-24 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90012 ___ 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-04-24 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-format] Do not update cursor pos if no includes replacement (PR #77456)

2024-04-24 Thread Owen Pan via cfe-commits
owenca wrote: > I have squashed the commits in only one. Note that I have left the failing > tests in the commit, I am not sure if I should remove them or not. Unfortunately, this wiped out my updates that fixed a formatting error and added `#if 0` for the failing tests. https://github.com/ll

[clang] [clang-repl] Fix the process return code if diagnostics occurred. (PR #89879)

2024-04-24 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: The Unix pre-merge seems okay, however the windows pre-merge check is doing nothing for more than 12h. I will move forward. https://github.com/llvm/llvm-project/pull/89879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @Sirraide See example of https://github.com/llvm/llvm-project/blob/662ef8604268b207910225ecca90daf30a46720b/clang/test/CXX/drs/dr25xx.cpp#L148 In this case, the date should be 2024-04-19. https://github.com/llvm/llvm-project/pull/89828

[clang] 4b10ade - [clang-format] Annotate enum braces as BK_Block (#89871)

2024-04-24 Thread via cfe-commits
Author: Owen Pan Date: 2024-04-24T21:46:45-07:00 New Revision: 4b10ade1a6afa1fcff5752aaebd86a1611d499d7 URL: https://github.com/llvm/llvm-project/commit/4b10ade1a6afa1fcff5752aaebd86a1611d499d7 DIFF: https://github.com/llvm/llvm-project/commit/4b10ade1a6afa1fcff5752aaebd86a1611d499d7.diff LOG:

[clang] [clang-format] Annotate enum braces as BK_Block (PR #89871)

2024-04-24 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/89871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/83774 >From 2ed73672a548b77a36675343b420ef57266e46ab Mon Sep 17 00:00:00 2001 From: wangpc Date: Fri, 14 Jul 2023 10:38:14 +0800 Subject: [PATCH] [clang] Enable sized deallocation by default in C++14 onwards Since C

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-24 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/89228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: So Jason pointed out that GCC's provisional wording for CWG2398 picks a dubious candidate for this example: ```C++ template struct match2; template class t1,typename T> struct match2, typename t1::type > { typedef int type; }; // #5

[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)

2024-04-24 Thread A. Jiang via cfe-commits
@@ -8340,8 +8340,17 @@ void Sema::checkInitializerLifetime(const InitializedEntity &Entity, << Entity.getType()->isReferenceType() << CLE->getInitializer() << 2 << DiagRange; } else { -Diag(DiagLoc, diag::warn_ret_local_temp_addr_ref) -

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

2024-04-24 Thread Wentao Zhang via cfe-commits
https://github.com/whentojump updated https://github.com/llvm/llvm-project/pull/89869 >From 968ef430dd09ee4545323426d0c5b550c6a0f690 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Fri, 19 Apr 2024 15:16:05 +0900 Subject: [PATCH 1/6] [MC/DC][Coverage] Workaround for `##` conditions A synt

[clang] [clang] pointer to member with qualified-id enclosed in parentheses in unevaluated context should be invalid (PR #89713)

2024-04-24 Thread via cfe-commits
@@ -27,3 +26,20 @@ namespace rdar10544564 { X (Y::*func_mem_ptr1)() = &Y::memfunc1; X (Y::*func_mem_ptr2)() = &Y::memfunc2; } + +namespace test2 { + struct A { +int val; +void func() {} + }; + + void test() { +decltype(&(A::val)) ptr1; // expected-error {{inv

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-24 Thread Troy Butler via cfe-commits
https://github.com/Troy-Butler edited https://github.com/llvm/llvm-project/pull/89512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix half && bfloat16 convert node expr codegen (PR #89051)

2024-04-24 Thread via cfe-commits
https://github.com/JinjinLi868 updated https://github.com/llvm/llvm-project/pull/89051 >From 45c6985815f7896c09c1be1eefc10cd4f9cd35af Mon Sep 17 00:00:00 2001 From: Jinjin Li Date: Wed, 17 Apr 2024 16:44:50 +0800 Subject: [PATCH] [clang] Fix half && bfloat16 convert node expr codegen Data type

[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)

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

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-24 Thread Kelvin Li via cfe-commits
@@ -24,6 +24,7 @@ add_flang_library(FIRBuilder Runtime/Inquiry.cpp Runtime/Intrinsics.cpp Runtime/Numeric.cpp + Runtime/Main.cpp kkwli wrote: I think this list is in alphabetical order? https://github.com/llvm/llvm-project/pull/89938 __

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-24 Thread Kelvin Li via cfe-commits
https://github.com/kkwli approved this pull request. LG https://github.com/llvm/llvm-project/pull/89938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [lld] [flang] Generate main only when a Fortran program statement is present (PR #89938)

2024-04-24 Thread Kelvin Li via cfe-commits
https://github.com/kkwli edited https://github.com/llvm/llvm-project/pull/89938 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)

2024-04-24 Thread Fangrui Song via cfe-commits
MaskRay wrote: There may be an example that the current -mrelax-all default penalizes Thumb/Thumb2 code size as well, but I haven't found an example. https://github.com/llvm/llvm-project/pull/90013 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes Some assembly mnemonics may assemble to instructions of different lengths. The longer form is to support instructions like a long branch. -mrelax-all enables `MCRelaxAll`, which expands instructions to the lon

[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)

2024-04-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/90013 Some assembly mnemonics may assemble to instructions of different lengths. The longer form is to support instructions like a long branch. -mrelax-all enables `MCRelaxAll`, which expands instructions to the long fo

[clang] [clang] deprecate frelaxed-template-template-args, make it on by default (PR #89807)

2024-04-24 Thread Matheus Izvekov via cfe-commits
@@ -507,10 +507,62 @@ static TemplateDeductionResult DeduceNonTypeTemplateArgument( S, TemplateParams, NTTP, DeducedTemplateArgument(New), T, Info, Deduced); } +static NamedDecl *DeduceTemplateArguments(Sema &S, NamedDecl *A, + T

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

2024-04-24 Thread Akira Hatanaka via cfe-commits
@@ -3424,6 +3445,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor( ahatanaka wrote: I've updated the

[clang] [llvm] [mlir] Fix mismatches between function parameter definitions and declarations (PR #89512)

2024-04-24 Thread via cfe-commits
https://github.com/NagyDonat approved this pull request. Thanks for the update! I'll merge the PR within ~a day if nobody objects. https://github.com/llvm/llvm-project/pull/89512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

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

2024-04-24 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/79230 >From 95200f3bb3859738981240a9d8c503a13ede9601 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 16 Jan 2024 13:18:09 -0800 Subject: [PATCH 01/13] Add support for builtin_verbose_trap The builtin causes

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-24 Thread Andrew Sukach via cfe-commits
soukatch wrote: @dcb314 @shafik @EugeneZelenko Please let me know if this change looks good. Thanks! https://github.com/llvm/llvm-project/pull/90012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang][modules] Allow including module maps to be non-affecting (PR #89992)

2024-04-24 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/89992 >From 6e77e37977bbecc8053d12b4db3f790042b8f34d Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 24 Apr 2024 11:12:28 -0700 Subject: [PATCH] [clang][modules] Allow including module maps to be non-affect

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andrew Sukach (soukatch) Changes This pr addresses #87255 adds a std::move call to the names in MangledSymbol's constructor. --- Full diff: https://github.com/llvm/llvm-project/pull/90012.diff 1 Files Affected: - (modified) clang/lib/F

[clang] [clang] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-24 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] MangledSymbol: remove pointless copy of vector (PR #90012)

2024-04-24 Thread Andrew Sukach via cfe-commits
https://github.com/soukatch created https://github.com/llvm/llvm-project/pull/90012 This pr addresses #87255 adds a std::move call to the names in MangledSymbol's constructor. >From b8e20a5a3e37ab9a657ac640b848f638387215fa Mon Sep 17 00:00:00 2001 From: Andrew Sukach Date: Wed, 24 Apr 2024 22

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes In the last patch #82310, we used template depths to tell if such alias decls contain lambdas, which is wrong because the lambda can also appear as a part of the default argument, and that would make `getTe

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-04-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 ready_for_review https://github.com/llvm/llvm-project/pull/89934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-04-24 Thread Younan Zhang via cfe-commits
@@ -91,15 +91,60 @@ void bar() { namespace GH82104 { -template int Zero = 0; +template int Value = sizeof...(D); -template -using T14 = decltype([]() { return Zero; }()); +template +using T14 = decltype([](auto Param) { + return Value + V + (int)sizeof(Param); +}("hell

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-04-24 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/89934 >From 92f8cfb255a549769c39327239c69edd6b2e947e Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Wed, 24 Apr 2024 20:54:58 +0800 Subject: [PATCH 1/3] [Clang][Sema] Revisit the lambda within a type alias template

[clang] [llvm] [CIR][NFC] Add scaffolding for the CIR dialect and CIROps.td (PR #86080)

2024-04-24 Thread Nathan Lanza via cfe-commits
https://github.com/lanza closed https://github.com/llvm/llvm-project/pull/86080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CIR][NFC] Add scaffolding for the CIR dialect and CIROps.td (PR #86080)

2024-04-24 Thread Nathan Lanza via cfe-commits
https://github.com/lanza edited https://github.com/llvm/llvm-project/pull/86080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 10661ba - [CIR][NFC] Add scaffolding for the CIR dialect and CIROps.td

2024-04-24 Thread via cfe-commits
Author: Nathan Lanza Date: 2024-04-24T22:26:40-04:00 New Revision: 10661ba2403f73cd2c4b76ebd177fdcf9261cbf2 URL: https://github.com/llvm/llvm-project/commit/10661ba2403f73cd2c4b76ebd177fdcf9261cbf2 DIFF: https://github.com/llvm/llvm-project/commit/10661ba2403f73cd2c4b76ebd177fdcf9261cbf2.diff

[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

2024-04-24 Thread Hubert Tong via cfe-commits
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo &Info, const BinaryOperator *E, // If during the evaluation of an expression, the result is not // mathematically defined [...], the behavior is undefined. // FIXME: C++ rules require us to not conform

[clang] [Clang][Sema] Revisit the fix for the lambda within a type alias template decl (PR #89934)

2024-04-24 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > FYI in my issue, even if the lambda didn't appear as part of the default > argument, I was [still able to trigger the > bug](https://godbolt.org/z/4KrEMTTdd). Noting in case this fix only resolves > the case of lambdas in default template arguments, and not passed in > explic

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-24 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/89796 >From 662f160418c704f45e57e751168903d774b74303 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 23 Apr 2024 17:41:25 +0100 Subject: [PATCH 1/4] Add initial support for AMDGCN flavoured SPIRV. --- clang/lib/

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-24 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/89796 >From 662f160418c704f45e57e751168903d774b74303 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 23 Apr 2024 17:41:25 +0100 Subject: [PATCH 1/3] Add initial support for AMDGCN flavoured SPIRV. --- clang/lib/

[clang] [llvm] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-24 Thread Justin Bogner via cfe-commits
@@ -25,6 +25,7 @@ enum class ResourceClass : uint8_t { SRV = 0, UAV, CBuffer, + TBuffer, bogner wrote: I hadn't noticed this. Xiang's right, this isn't correct. See `CGHLSLRuntime::finishCodeGen` - a tbuffer is annotated with a resource class of `SRV`

[clang] [buildbot] VE builders: disable ctx_profile (PR #89969)

2024-04-24 Thread Mircea Trofin via cfe-commits
https://github.com/mtrofin closed https://github.com/llvm/llvm-project/pull/89969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d6cc8d4 - [buildbot] VE builders: disable ctx_profile (#89969)

2024-04-24 Thread via cfe-commits
Author: Mircea Trofin Date: 2024-04-24T18:37:20-07:00 New Revision: d6cc8d45b3da91b8d48c59fa86b6f1dba9c3e87b URL: https://github.com/llvm/llvm-project/commit/d6cc8d45b3da91b8d48c59fa86b6f1dba9c3e87b DIFF: https://github.com/llvm/llvm-project/commit/d6cc8d45b3da91b8d48c59fa86b6f1dba9c3e87b.diff

[clang] [buildbot] VE builders: disable ctx_profile (PR #89969)

2024-04-24 Thread Kazushi Marukawa via cfe-commits
https://github.com/kaz7 approved this pull request. This solves a problem in a buildbot for VE. Thank you. https://github.com/llvm/llvm-project/pull/89969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [buildbot] VE builders: disable ctx_profile (PR #89969)

2024-04-24 Thread Kazushi Marukawa via cfe-commits
https://github.com/jam7 approved this pull request. This solves a problem in a buildbot for VE. Thank you. https://github.com/llvm/llvm-project/pull/89969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-24 Thread Justin Stitt via cfe-commits
JustinStitt wrote: > > > If you declare a variable as both wrapping and non-wrapping, is it > > > wrapping? > > > > > > I am not sure how to do this. I am sure that with the magic of C anything > > is possible but I can't conceive a way to have a variable both have the > > attribute and not

[clang] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-04-24 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/89796 >From 662f160418c704f45e57e751168903d774b74303 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 23 Apr 2024 17:41:25 +0100 Subject: [PATCH 1/2] Add initial support for AMDGCN flavoured SPIRV. --- clang/lib/

[clang] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-24 Thread Nikita Popov via cfe-commits
nikic wrote: > Hi @nikic I read this RFC > https://discourse.llvm.org/t/rfc-replacing-getelementptr-with-ptradd/68699 > and it seems it reqires multiple patches to implement it. I am wondering if > you have a link or page which contains all related PRs (or future PRs) ? I > want to track its

[clang] [llvm] [ConstantFolding] Canonicalize constexpr GEPs to i8 (PR #89872)

2024-04-24 Thread Nikita Popov via cfe-commits
@@ -944,43 +943,18 @@ Constant *SymbolicallyEvaluateGEP(const GEPOperator *GEP, return ConstantExpr::getIntToPtr(C, ResTy); } - // Otherwise form a regular getelementptr. Recompute the indices so that - // we eliminate over-indexing of the notional static type array bo

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-24 Thread Alex Voicu via cfe-commits
@@ -2216,7 +2216,7 @@ static llvm::Value *EmitTypeidFromVTable(CodeGenFunction &CGF, const Expr *E, } llvm::Value *CodeGenFunction::EmitCXXTypeidExpr(const CXXTypeidExpr *E) { - llvm::Type *PtrTy = llvm::PointerType::getUnqual(getLLVMContext()); + llvm::Type *PtrTy = Int8Pt

[clang] d530894 - [clang][Sema] Preserve the initializer of invalid VarDecls (#88645)

2024-04-24 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-04-24T20:31:18-04:00 New Revision: d5308949cf884d8e4b971d51a8b4f73584c4adec URL: https://github.com/llvm/llvm-project/commit/d5308949cf884d8e4b971d51a8b4f73584c4adec DIFF: https://github.com/llvm/llvm-project/commit/d5308949cf884d8e4b971d51a8b4f73584c4adec.diff

[clang] [clang][Sema] Preserve the initializer of invalid VarDecls (PR #88645)

2024-04-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/88645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-04-24 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/87933 >From 9fba6da7cb1ffbc7d46b69c6ac0cfd15a89c4b56 Mon Sep 17 00:00:00 2001 From: yronglin Date: Mon, 8 Apr 2024 01:38:23 +0800 Subject: [PATCH 1/3] [Clang] Support lifetime extension of temporary created by aggreg

[clang] [llvm] Implement resource binding type prefix mismatch errors (PR #87578)

2024-04-24 Thread Xiang Li via cfe-commits
@@ -25,6 +25,7 @@ enum class ResourceClass : uint8_t { SRV = 0, UAV, CBuffer, + TBuffer, python3kgae wrote: TBuffer should be a resource kind, not resource class. https://github.com/llvm/llvm-project/pull/87578 _

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-24 Thread via cfe-commits
Sirraide wrote: I’m also not sure if the `dr28xx.cpp` file is meant for open issues, but I’ve put the tests for this there for now. https://github.com/llvm/llvm-project/pull/89828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-24 Thread via cfe-commits
Sirraide wrote: Ok, I’ve added a check for CWG 2881 to sema, but there’s at least 2 things I still want to take a look at: - [ ] Consider emitting the upcast once in the function prologue instead of every time a variable is accessed. - [ ] Check for invalid explicit object parameters when the l

[clang] [Clang] [CodeGen] Perform derived-to-base conversion on explicit object parameter in lambda (PR #89828)

2024-04-24 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/89828 >From b5422012a65165f27bb31be7e9490892f663acfe Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 23 Apr 2024 22:45:29 +0200 Subject: [PATCH 1/2] [Clang] [CodeGen] Perform derived-to-base conversion on explicit

[clang] [Driver] Restore compiler-rt arch suffix for PS and Windows (PR #89775)

2024-04-24 Thread Fangrui Song via cfe-commits
MaskRay wrote: I understand that there is some distributed build system pain and I feel sympathy. However, I have pointed out that it is *unsupported* to not provide files for driver probing, therefore I am not sure it is fair to revert the patches improving `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR

  1   2   3   4   5   >