[clang] [OpenACC] Implement 'routine' construct parsing (PR #73143)

2023-11-27 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/73143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-27 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda updated https://github.com/llvm/llvm-project/pull/68926 >From 78f82bcf33998de0663f4684a64a240f2e97f8a9 Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Thu, 12 Oct 2023 16:56:27 -0400 Subject: [PATCH 01/22] This change adds support for the PPA2 section in zOS --- cla

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-11-27 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/73317 >From f5b909e24e3cea49d98b40797880e4329a7a1e4f Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Mon, 20 Nov 2023 15:50:28 + Subject: [PATCH 1/3] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics Se

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-11-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Was there an RFC asking the community about exposing lambdas in pre C++11 modes? This is a sufficiently large language extension that we probably should verify if we haven't already. I believe this is a conforming extension (I can't think of a circums

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-11-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/73376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-11-27 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -fsyntax-only -Wno-unused-value -verify -std=c++03 %s + +void func() { AaronBallman wrote: We should also test that `__has_feature(cxx_lambdas)` produces the correct results -- I think you're missing changes in `include/clang/

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

2023-11-27 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan updated https://github.com/llvm/llvm-project/pull/73017 >From 4f7e29fe46a011153b3fbeee4d93875bb1a1a233 Mon Sep 17 00:00:00 2001 From: Egor Zhdan Date: Mon, 20 Nov 2023 18:03:18 + Subject: [PATCH 1/4] [APINotes] Upstream attributes that are created implicitly fr

[llvm] [clang] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-11-27 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/73317 >From f5b909e24e3cea49d98b40797880e4329a7a1e4f Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Mon, 20 Nov 2023 15:50:28 + Subject: [PATCH 1/4] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics Se

[llvm] [clang] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-11-27 Thread Matthew Devereau via cfe-commits
@@ -5098,6 +5099,12 @@ void AArch64DAGToDAGISel::Select(SDNode *Node) { AArch64::LUTI2_4ZTZI_S})) // Second Immediate must be <= 3: SelectMultiVectorLuti<3>(Node, 4, Opc); + else if (auto Opc = SelectOpcodeFromVT( MDevereau w

[flang] [clang] [Flang][Clang] Add support for frame pointers in Flang Driver (PR #72146)

2023-11-27 Thread Radu Salavat via cfe-commits
https://github.com/Radu2k updated https://github.com/llvm/llvm-project/pull/72146 >From 0b0f02eab4dc02adf79461bc865be6f7580938cf Mon Sep 17 00:00:00 2001 From: Radu2k Date: Mon, 13 Nov 2023 17:49:06 + Subject: [PATCH 1/7] [Flang][Clang] Add support for frame pointers in Flang --- clang/in

[clang] [AArch64][SME2] Add PEXT, PSEL builtins for SME2 (PR #72827)

2023-11-27 Thread Sander de Smalen via cfe-commits
@@ -5,6 +5,11 @@ // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-linux-gnu \ // RUN: -target-feature +sve2p1 -S -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK // RUN: %clang_cc1 -fclang-abi-compat=latest -triple aarch64-none-li

[clang] [AArch64][SME2] Add PEXT, PSEL builtins for SME2 (PR #72827)

2023-11-27 Thread Sander de Smalen via cfe-commits
@@ -15,7 +22,7 @@ // CPP-CHECK-NEXT:[[TMP0:%.*]] = tail call @llvm.aarch64.sve.pext.nxv16i1(target("aarch64.svcount") [[C:%.*]], i32 0) // CPP-CHECK-NEXT:ret [[TMP0]] // -svbool_t test_svpext_lane_c8_0(svcount_t c) { +svbool_t test_svpext_lane_c8_0(svcount_t c) __arm

[clang] [AArch64][SME2] Add PEXT, PSEL builtins for SME2 (PR #72827)

2023-11-27 Thread Sander de Smalen via cfe-commits
@@ -1,10 +1,17 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // REQUIRES: aarch64-registered-target -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -emit-llvm -o - %s | FileCheck %s -// RUN: %clang_cc1

[clang] [AArch64][SME2] Add PEXT, PSEL builtins for SME2 (PR #72827)

2023-11-27 Thread Sander de Smalen via cfe-commits
@@ -1859,19 +1859,28 @@ def SVBGRP : SInst<"svbgrp[_{d}]", "ddd", "UcUsUiUl", MergeNone, "aarch64_sv def SVBGRP_N : SInst<"svbgrp[_n_{d}]", "dda", "UcUsUiUl", MergeNone, "aarch64_sve_bgrp_x">; } +let TargetGuard = "sve2p1|sme" in { sdesmalen-arm wrote:

[flang] [clang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-27 Thread Tom Eccles via cfe-commits
tblah wrote: > If you are in a rush to land this then this LGTM, but I would like the > relationship between `-O{1|2|3|4}` and `-f{no}-alias-analysis` to be refined > in a follow-up patch. Unless there's a good reason to avoid that? WDYT? Thanks @banach-space, I will land this now and follow u

[clang] [llvm] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-11-27 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau edited https://github.com/llvm/llvm-project/pull/73317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] caba031 - [flang] Enable alias tags pass by default (#73111)

2023-11-27 Thread via cfe-commits
Author: Tom Eccles Date: 2023-11-27T15:10:21Z New Revision: caba0314cf631a3ba3e982cbcdc455224046c7a8 URL: https://github.com/llvm/llvm-project/commit/caba0314cf631a3ba3e982cbcdc455224046c7a8 DIFF: https://github.com/llvm/llvm-project/commit/caba0314cf631a3ba3e982cbcdc455224046c7a8.diff LOG: [f

[clang] [flang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-27 Thread Tom Eccles via cfe-commits
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/73111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-27 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { +data_ = new char[6](); +__builtin_memcpy(data_, "Hello", 5); +data_[5] = 0

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-27 Thread Aaron Ballman via cfe-commits
@@ -179,18 +179,20 @@ static_assert(false, Message{}); // expected-error {{static assertion failed: He } struct MessageInvalidSize { -constexpr auto size(int) const; // expected-note {{candidate function not viable: requires 1 argument, but 0 were provided}} -constex

[clang-tools-extra] [llvm] [lld] [mlir] [clang] [flang] [clangtidy] Allow safe suspensions in coroutine-hostile-raii check (PR #72954)

2023-11-27 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/72954 >From c863646669d0b2b54e1c1c353b063a8209730528 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 21 Nov 2023 06:51:48 +0100 Subject: [PATCH 01/14] [clangtidy]Allow safe suspensions in coroutine-hostile-raii

[clang-tools-extra] [llvm] [lld] [mlir] [clang] [flang] [clangtidy] Allow safe suspensions in coroutine-hostile-raii check (PR #72954)

2023-11-27 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/72954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] c944443 - [clangtidy] Allow safe suspensions in coroutine-hostile-raii check (#72954)

2023-11-27 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2023-11-27T16:21:07+01:00 New Revision: c9390f4c8f4d898ac8a8444bc4bf3394609f URL: https://github.com/llvm/llvm-project/commit/c9390f4c8f4d898ac8a8444bc4bf3394609f DIFF: https://github.com/llvm/llvm-project/commit/c9390f4c8f4d898ac8a8444bc4bf3394609f.diff

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-27 Thread Yusra Syeda via cfe-commits
@@ -1026,6 +1030,72 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static std::string getProductID(Module &M) { + std::string ProductID; + if (auto *MD = M.getModuleFlag("zos_product_id")) +ProductID = cast(MD)->getString().str(); + if (Pr

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-27 Thread Yusra Syeda via cfe-commits
@@ -976,6 +976,46 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +getModule().addModuleFlag(llvm::Modu

[clang] [Clang] Eagerly instantiate used constexpr function upon definition. (PR #73463)

2023-11-27 Thread Timm Baeder via cfe-commits
tbaederr wrote: Does this have any compile-time impact? https://github.com/llvm/llvm-project/pull/73463 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-27 Thread via cfe-commits
@@ -179,18 +179,20 @@ static_assert(false, Message{}); // expected-error {{static assertion failed: He } struct MessageInvalidSize { -constexpr auto size(int) const; // expected-note {{candidate function not viable: requires 1 argument, but 0 were provided}} -constex

[clang] c449460 - ms inline asm: Fix {call,jmp} fptr (#73207)

2023-11-27 Thread via cfe-commits
Author: Fangrui Song Date: 2023-11-27T07:27:50-08:00 New Revision: c449460d8a657e46500ad12be457928207207e3e URL: https://github.com/llvm/llvm-project/commit/c449460d8a657e46500ad12be457928207207e3e DIFF: https://github.com/llvm/llvm-project/commit/c449460d8a657e46500ad12be457928207207e3e.diff

[clang] [llvm] ms inline asm: Fix {call,jmp} fptr (PR #73207)

2023-11-27 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/73207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Eagerly instantiate used constexpr function upon definition. (PR #73463)

2023-11-27 Thread via cfe-commits
cor3ntin wrote: > Does this have any compile-time impact? Nope, should be ~free. It does add 1 DenseMap lookup per constexpr function definition, which ought to be negligible. https://github.com/llvm/llvm-project/pull/73463 ___ cfe-commits mailing li

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-27 Thread Aaron Ballman via cfe-commits
@@ -179,18 +179,20 @@ static_assert(false, Message{}); // expected-error {{static assertion failed: He } struct MessageInvalidSize { -constexpr auto size(int) const; // expected-note {{candidate function not viable: requires 1 argument, but 0 were provided}} -constex

[libcxxabi] [llvm] [lldb] [clang] [flang] [clang-tools-extra] [libc] [lld] [libcxx] [flang] Pass Argv0 to getIntriniscDir and getOpenMPHeadersDir (PR #73254)

2023-11-27 Thread via cfe-commits
https://github.com/madanial0 updated https://github.com/llvm/llvm-project/pull/73254 >From 81d1e05dd084dd5bb88dab88d2f23008b8dc6cfb Mon Sep 17 00:00:00 2001 From: Mark Danial Date: Tue, 21 Nov 2023 12:18:40 -0500 Subject: [PATCH] Pass the correct path to getIntriniscDir and getOpenMPHeadersDir

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-27 Thread David Truby via cfe-commits
DavidTruby wrote: I think for Windows the easy thing to do here is just to add `/WHOLEARCHIVE:...` here anyway, using the same logic as in processVSRuntimeLibrary(); E.g ``` void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args, //need to add args here so we can search it

[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-27 Thread Michael Klemm via cfe-commits
mjklemm wrote: > I think for Windows the easy thing to do here is just to add > `/WHOLEARCHIVE:...` here anyway, using the same logic as in > processVSRuntimeLibrary(); E.g > > ``` > void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args, > //need to add args here so we ca

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-27 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/73234 >From 0822314d8e87dbf080e72ef3e890635601dae163 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 23 Nov 2023 12:51:46 +0100 Subject: [PATCH 1/3] [Clang] Improve support for expression messages in `static

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/73234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [flang] [clang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-27 Thread Peter Klausler via cfe-commits
@@ -9,6 +9,17 @@ // Defines the API between compiled code and the implementations of time-related // intrinsic subroutines in the runtime library. +// time-intrinsic.h +#ifndef TIME_INTRINSIC_H +#define TIME_INTRINSIC_H + +#include + +void copyBufferAndPad( +char *dest,

[clang-tools-extra] [flang] [llvm] [clang] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-27 Thread Peter Klausler via cfe-commits
@@ -9,6 +9,17 @@ // Defines the API between compiled code and the implementations of time-related // intrinsic subroutines in the runtime library. +// time-intrinsic.h +#ifndef TIME_INTRINSIC_H +#define TIME_INTRINSIC_H + +#include + +void copyBufferAndPad(

[llvm] [clang] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-11-27 Thread Kerry McLaughlin via cfe-commits
@@ -5098,6 +5099,12 @@ void AArch64DAGToDAGISel::Select(SDNode *Node) { AArch64::LUTI2_4ZTZI_S})) // Second Immediate must be <= 3: SelectMultiVectorLuti<3>(Node, 4, Opc); + else if (auto Opc = SelectOpcodeFromVT( kmclaughlin

[llvm] [clang] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-11-27 Thread Kerry McLaughlin via cfe-commits
@@ -1666,7 +1674,8 @@ static unsigned SelectOpcodeFromVT(EVT VT, ArrayRef Opcodes) { return 0; break; case SelectTypeKind::FP: -if (EltVT != MVT::f16 && EltVT != MVT::f32 && EltVT != MVT::f64) +if (EltVT != MVT::bf16 && EltVT != MVT::f16 && EltVT != MVT::f3

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2023-11-27 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[llvm] [clang] [SME2] Add LUTI2 and LUTI4 double Builtins and Intrinsics (PR #73305)

2023-11-27 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/73305 >From 5aba2f1d2fe34f721a8e85eef6eecc25cb60851f Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Mon, 20 Nov 2023 15:50:28 + Subject: [PATCH 1/3] [SME2] Add LUTI2 and LUTI4 double Builtins and Intrinsics

[llvm] [clang] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-11-27 Thread Matthew Devereau via cfe-commits
@@ -1666,7 +1674,8 @@ static unsigned SelectOpcodeFromVT(EVT VT, ArrayRef Opcodes) { return 0; break; case SelectTypeKind::FP: -if (EltVT != MVT::f16 && EltVT != MVT::f32 && EltVT != MVT::f64) +if (EltVT != MVT::bf16 && EltVT != MVT::f16 && EltVT != MVT::f3

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-27 Thread Fangrui Song via cfe-commits
MaskRay wrote: > (btw, that `squash!` commit contains the revised commit message I plan to put > on the final version, so I need to not forget to do the squash by hand to get > that right) You may edit the first comment in this PR now, and it will be propagated to the textbox when you click "

[clang] [flang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-27 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > I don't feel strongly about it ACK. I mostly care about consistency in the interface exposed to the end-user. TBH, I've never really investigated the relationship of `-O{0|1|2|3|4}` with various feature flags. What I described definitely holds for `-f{no-}some_feature`

[llvm] [clang] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics (PR #73317)

2023-11-27 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/73317 >From f5b909e24e3cea49d98b40797880e4329a7a1e4f Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Mon, 20 Nov 2023 15:50:28 + Subject: [PATCH 1/5] [SME2] Add LUTI2 and LUTI4 quad Builtins and Intrinsics Se

[clang] [flang] [flang][Driver] Support -nodefaultlibs, -nostartfiles and -nostdlib (PR #72601)

2023-11-27 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/72601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -nodefaultlibs, -nostartfiles and -nostdlib (PR #72601)

2023-11-27 Thread Fangrui Song via cfe-commits
@@ -5152,7 +5152,8 @@ def : Flag<["-"], "nocudalib">, Alias; def gpulibc : Flag<["-"], "gpulibc">, Visibility<[ClangOption, CC1Option]>, HelpText<"Link the LLVM C Library for GPUs">; def nogpulibc : Flag<["-"], "nogpulibc">, Visibility<[ClangOption, CC1Option]>; -def nodefaul

[clang] [flang] [flang][Driver] Support -nodefaultlibs, -nostartfiles and -nostdlib (PR #72601)

2023-11-27 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/72601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MemProf] Expand optimization scope to internal linakge function (PR #73236)

2023-11-27 Thread Teresa Johnson via cfe-commits
teresajohnson wrote: @snehasish can you take a look at the issue described here? Should we be doing something different in llvm-profdata? https://github.com/llvm/llvm-project/pull/73236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [flang] [flang][Driver] Support -nodefaultlibs, -nostartfiles and -nostdlib (PR #72601)

2023-11-27 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/72601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [llvm] [clang] [clang-tools-extra] [libc] [flang] [libcxx] [compiler-rt] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: There has been multiple discussion in different places about behavior of `-E`, `-M`, and friends (the most notable starts [here](https://discord.com/channels/636084430946959380/636732781086638081/1175241241710055424)), so I thought it would be a good idea to raise awareness amon

[clang] [clang] Accept lambdas in C++03 as an extensions (PR #73376)

2023-11-27 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > Was there an RFC asking the community about exposing lambdas in pre C++11 > modes? This is a sufficiently large language extension that we probably > should verify if we haven't already. I believe this is a conforming extension > (I can't think of a circumstance under which

[compiler-rt] [llvm] [lldb] [libcxx] [flang] [libc] [clang-tools-extra] [clang] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @AaronBallman Can you describe your current plan how driver options are going to behave in the light of `#embed`? https://github.com/llvm/llvm-project/pull/68620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] b9b627f - [clang] Fix a new test to not write temp files to the git repository

2023-11-27 Thread Dmitri Gribenko via cfe-commits
Author: Dmitri Gribenko Date: 2023-11-27T18:04:49+01:00 New Revision: b9b627fbc3bc64cd3e7e009917df35d2971827d9 URL: https://github.com/llvm/llvm-project/commit/b9b627fbc3bc64cd3e7e009917df35d2971827d9 DIFF: https://github.com/llvm/llvm-project/commit/b9b627fbc3bc64cd3e7e009917df35d2971827d9.dif

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { +data_ = new char[6](); +__builtin_memcpy(data_, "Hello", 5); +data_[5] = 0

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-11-27 Thread Balázs Kéri via cfe-commits
@@ -350,17 +383,38 @@ void ArrayBoundCheckerV2::checkLocation(SVal Location, bool IsLoad, if (ExceedsUpperBound) { if (!WithinUpperBound) { // We know that the index definitely exceeds the upper bound. -std::string RegName = getRegionName(Reg); -

[clang] [Clang] CWG2789 Overload resolution with implicit and explicit object… (PR #73493)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/73493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] CWG2789 Overload resolution with implicit and explicit object… (PR #73493)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + + +namespace dr2789 { // dr2789: 18 open + +template +struct Base { +constexpr void g(); // expected-note {{candidate function}} +}; + +template +struct Base2 { +constexpr void g() requires true; // expected-n

[clang] [Clang] CWG2789 Overload resolution with implicit and explicit object… (PR #73493)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll requested changes to this pull request. https://github.com/llvm/llvm-project/pull/73493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { +data_ = new char[6](); +__builtin_memcpy(data_, "Hello", 5); +data_[5] = 0

[flang] [libc] [llvm] [libcxx] [lld] [clang] [compiler-rt] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-27 Thread David Li via cfe-commits
david-xl wrote: Gentle ping. https://github.com/llvm/llvm-project/pull/73186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [flang] [clang-tools-extra] [flang ]GETLOG runtime and extension implementation: get login username (PR #70917)

2023-11-27 Thread Yi Wu via cfe-commits
https://github.com/yi-wu-arm updated https://github.com/llvm/llvm-project/pull/70917 >From 0e98aa7ca15b05b91813eaeeb6ae1305e5f5384d Mon Sep 17 00:00:00 2001 From: Yi Wu Date: Mon, 6 Nov 2023 19:49:13 + Subject: [PATCH 01/11] GETLOG runtime and extension implementation: get login username

[flang] [clang] [flang] Update -falias-analysis help text (PR #73548)

2023-11-27 Thread Tom Eccles via cfe-commits
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/73548 As requested by @branach-space on #73111. This makes it clearer that -f[no-]alias-analysis will always override -O flags, no matter their ordering. >From d65bd2855b170cffdcf04b2052dfa8aec37b4722 Mon Sep 17 00:00:00

[flang] [clang] [flang] Update -falias-analysis help text (PR #73548)

2023-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Tom Eccles (tblah) Changes As requested by @branach-space on #73111. This makes it clearer that -f[no-]alias-analysis will always override -O flags, no matter their ordering. --- Full diff: https://github.com/llvm/llvm-project/pul

[flang] [clang] [flang] Update -falias-analysis help text (PR #73548)

2023-11-27 Thread Tom Eccles via cfe-commits
tblah wrote: @banach-space I'm happy to change the behavior too if you'd prefer that https://github.com/llvm/llvm-project/pull/73548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Exclude external variables from constant promotion. (PR #73549)

2023-11-27 Thread Levon Ter-Grigoryan via cfe-commits
https://github.com/PatriosTheGreat created https://github.com/llvm/llvm-project/pull/73549 Promoting __constant__ to external variables includes them to PTX which then leads to nvlinker failure. See changes at device-use-host-var test. Befor this change those variables was included to PTX witho

[clang] [CUDA][HIP] Exclude external variables from constant promotion. (PR #73549)

2023-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Levon Ter-Grigoryan (PatriosTheGreat) Changes Promoting __constant__ to external variables includes them to PTX which then leads to nvlinker failure. See changes at device-use-host-var test. Befor this change those variables was included t

[flang] [clang] [Flang][Clang] Add support for frame pointers in Flang Driver (PR #72146)

2023-11-27 Thread Tom Eccles via cfe-commits
https://github.com/tblah edited https://github.com/llvm/llvm-project/pull/72146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix emitvaarg when struct is null (PR #72624)

2023-11-27 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Please fix the pull request description to say this is aarch64-specific. Missing regression test in clang/test/CodeGen/ How does this interact with #72197? https://github.com/llvm/llvm-project/pull/72624 ___ cfe-commits mailing l

[flang] [clang] [Flang][Clang] Add support for frame pointers in Flang Driver (PR #72146)

2023-11-27 Thread Tom Eccles via cfe-commits
@@ -49,6 +49,7 @@ class CodeGenOptionsBase { class CodeGenOptions : public CodeGenOptionsBase { public: + tblah wrote: nit: unrelated change https://github.com/llvm/llvm-project/pull/72146 ___ cfe-commits mailing l

[clang] [flang] [Flang][Clang] Add support for frame pointers in Flang Driver (PR #72146)

2023-11-27 Thread Tom Eccles via cfe-commits
https://github.com/tblah commented: Thanks for the update. See my previous comment about the changes to `MLIRToLLVMPassPipelineConfig` and `CodeGenOptions.def`. https://github.com/llvm/llvm-project/pull/72146 ___ cfe-commits mailing list cfe-commits@l

[clang] [Clang] Improve support for expression messages in `static_assert` (PR #73234)

2023-11-27 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +namespace dr2798 { // dr2798: 17 drafting +#if __cpp_static_assert >= 202306 +struct string { +constexpr string() { +data_ = new char[6](); +__builtin_memcpy(data_, "Hello", 5); +data_[5] = 0

[clang] [libc] [libcxx] [compiler-rt] [llvm] [lld] [flang] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-27 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM - cheers https://github.com/llvm/llvm-project/pull/73186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang, SystemZ] Pass HasDef flag to getMinGlobalAlign(). (PR #73511)

2023-11-27 Thread Eli Friedman via cfe-commits
@@ -1687,7 +1687,8 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool ForAlignof) const { if (VD->hasGlobalStorage() && !ForAlignof) { uint64_t TypeSize = !BaseT->isIncompleteType() ? getTypeSize(T.getTypePtr()) : 0; -Align = std::max(A

[lldb] [libc] [compiler-rt] [libcxx] [llvm] [flang] [clang-tools-extra] [clang] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-27 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman Can you describe your current plan how driver options are going > to behave in the light of `#embed`? I'm flexible with how we proceed, so if others have different ideas, feel free to suggest them! But my initial inclination is: * `--embed-dir=` as a way to

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers created https://github.com/llvm/llvm-project/pull/73552 Due to inlining, descovering which specific call site to a function with the attribute "warning" or "error" is painful. In the IR record inlining decisions in metadata when inlining a callee that itself c

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nick Desaulniers (nickdesaulniers) Changes Due to inlining, descovering which specific call site to a function with the attribute "warning" or "error" is painful. In the IR record inlining decisions in metadata when inlining a callee that

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers converted_to_draft https://github.com/llvm/llvm-project/pull/73552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Nick Desaulniers (nickdesaulniers) Changes Due to inlining, descovering which specific call site to a function with the attribute "warning" or "error" is painful. In the IR record inlining decisions in metadata when inlining a ca

[llvm] [clang] [clang] report inlining decisions with -Wattribute-{warning|error} (PR #73552)

2023-11-27 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: (Initial import from https://reviews.llvm.org/D141451) https://github.com/llvm/llvm-project/pull/73552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-27 Thread David Truby via cfe-commits
DavidTruby wrote: I think so yes. The issue is that Windows really wants these things to be in the object files rather than passed on the link line, which is what the patch you're referencing changed for linking the runtimes at least. Doing that for this as well is a little more complex though

[clang-tools-extra] [libc] [libcxx] [compiler-rt] [flang] [llvm] [clang] [lldb] ✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-11-27 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: I'd also like to highlight the use case of diagnostic for compiler crashes. IIRC preprocessed source to attach to an issue is produced with `-frewrite-includes`, so we might want to change its behavior for `#embed`. This might be a good use case for `#embed_base64`. https://git

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-27 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/73124 >From 2a2693364cb8e9b657b9ff54aa78df0466b55fe4 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Wed, 22 Nov 2023 14:22:20 +0100 Subject: [PATCH 01/12] Let the linker fail on multiple definitions of main() ---

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-11-27 Thread Michael Klemm via cfe-commits
mjklemm wrote: > I think so yes. The issue is that Windows really wants these things to be in > the object files rather than passed on the link line, which is what the patch > you're referencing changed for linking the runtimes at least. Doing that for > this as well is a little more complex t

[clang] [clang][ExtractAPI] Add support for blocks in declaration fragments (PR #73369)

2023-11-27 Thread Erick Velez via cfe-commits
@@ -24,6 +26,40 @@ using namespace clang::extractapi; using namespace llvm; +namespace { + +void findTypeLocForBlockDecl(const clang::TypeSourceInfo *TSInfo, + clang::FunctionTypeLoc &Block, + clang::FunctionProtoTypeLoc

[clang] [clang][ExtractAPI] Add support for blocks in declaration fragments (PR #73369)

2023-11-27 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/73369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Add support for blocks in declaration fragments (PR #73369)

2023-11-27 Thread Erick Velez via cfe-commits
https://github.com/evelez7 requested changes to this pull request. LGTM except for while loop https://github.com/llvm/llvm-project/pull/73369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang][ExtractAPI] Add support for blocks in declaration fragments (PR #73369)

2023-11-27 Thread Erick Velez via cfe-commits
https://github.com/evelez7 deleted https://github.com/llvm/llvm-project/pull/73369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Add support for blocks in declaration fragments (PR #73369)

2023-11-27 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/73369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExtractAPI] Add support for blocks in declaration fragments (PR #73369)

2023-11-27 Thread Erick Velez via cfe-commits
https://github.com/evelez7 approved this pull request. https://github.com/llvm/llvm-project/pull/73369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Add MSC_VER and target arch defines when targeting the MSVC ABI (PR #73250)

2023-11-27 Thread Brad King via cfe-commits
bradking wrote: This file has CRLF newlines. Is that expected? https://github.com/llvm/llvm-project/pull/73250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-27 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. This version LGTM now, thanks! https://github.com/llvm/llvm-project/pull/68926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-27 Thread Yuxuan Chen via cfe-commits
@@ -129,7 +130,14 @@ static SmallString<32> buildSuspendPrefixStr(CGCoroData &Coro, AwaitKind Kind) { return Prefix; } -static bool memberCallExpressionCanThrow(const Expr *E) { +static bool ResumeExprCanThrow(const CoroutineSuspendExpr &S) { + const Expr *E = S.getResumeE

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-27 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/73160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [InstCombine] Set disjoint flag when turning Add into Or. (PR #72702)

2023-11-27 Thread Nikita Popov via cfe-commits
@@ -255,8 +255,11 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, return I->getOperand(1); // If the RHS is a constant, see if we can simplify it. -if (ShrinkDemandedConstant(I, 1, DemandedMask)) +if (ShrinkDemandedConstant(

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-27 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/73160 >From 08e2293255a504043fe404cceaeb3ff1fc0dc344 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Tue, 21 Nov 2023 21:38:12 -0800 Subject: [PATCH] add checks for nested noexcept in cxxtempexpr --- clang/li

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-27 Thread Yuxuan Chen via cfe-commits
@@ -38,9 +39,52 @@ Task coro_create() { co_return; } -// CHECK-LABEL: define{{.*}} ptr @_Z11coro_createv( +// CHECK-LABEL: define{{.*}} ptr @_ZN9can_throw11coro_createEv( // CHECK: init.ready: // CHECK-NEXT: store i1 true, ptr {{.*}} -// CHECK-NEXT: call void @_ZN4Task23

[clang] [flang] [flang][Driver] Support -nodefaultlibs, -nostartfiles and -nostdlib (PR #72601)

2023-11-27 Thread Brad Smith via cfe-commits
@@ -5152,7 +5152,8 @@ def : Flag<["-"], "nocudalib">, Alias; def gpulibc : Flag<["-"], "gpulibc">, Visibility<[ClangOption, CC1Option]>, HelpText<"Link the LLVM C Library for GPUs">; def nogpulibc : Flag<["-"], "nogpulibc">, Visibility<[ClangOption, CC1Option]>; -def nodefaul

[clang] [Clang] CWG2789 Overload resolution with implicit and explicit object… (PR #73493)

2023-11-27 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/73493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   >