[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid dismissed https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Add avr-libc's default linker script to lld (PR #68507)

2023-10-10 Thread Jianjian Guan via cfe-commits
https://github.com/jacquesguan approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/68507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][C2x] Remove confusing diagnostic auto storage class specifier (PR #68710)

2023-10-10 Thread Guillot Tony via cfe-commits
to268 wrote: Can you land this patch on my behalf? "Guillot Tony " https://github.com/llvm/llvm-project/pull/68710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] Fix the condition of checking signature in getIndex (PR #67403)

2023-10-10 Thread Jianjian Guan via cfe-commits
https://github.com/jacquesguan closed https://github.com/llvm/llvm-project/pull/67403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bccf2c8 - [clang][RISCV] Fix the condition of checking signature in getIndex (#67403)

2023-10-10 Thread via cfe-commits
Author: Jianjian Guan Date: 2023-10-11T14:55:52+08:00 New Revision: bccf2c8468e2f364f8c364d613ffb78d61b67ceb URL: https://github.com/llvm/llvm-project/commit/bccf2c8468e2f364f8c364d613ffb78d61b67ceb DIFF: https://github.com/llvm/llvm-project/commit/bccf2c8468e2f364f8c364d613ffb78d61b67ceb.diff

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-10 Thread Richard Smith via cfe-commits
@@ -138,13 +138,14 @@ void g27(void) { // PR8073 void g28(void) { typedef long long v1i64 __attribute((vector_size(8))); typedef short v12i16 __attribute((vector_size(24))); + typedef unsigned char v24u8 __attribute((vector_size(24))); typedef long double v2f80 __attrib

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Looks good, other than the handling of `x86_fp80`, which doesn't seem to match Clang's current runtime behavior. https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-10 Thread Richard Smith via cfe-commits
@@ -138,13 +138,14 @@ void g27(void) { // PR8073 void g28(void) { typedef long long v1i64 __attribute((vector_size(8))); typedef short v12i16 __attribute((vector_size(24))); + typedef unsigned char v24u8 __attribute((vector_size(24))); typedef long double v2f80 __attrib

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-10 Thread Richard Smith via cfe-commits
@@ -7307,6 +7324,74 @@ class BufferToAPValueConverter { return ArrayValue; } + std::optional visit(const VectorType *VTy, CharUnits Offset) { +QualType EltTy = VTy->getElementType(); +unsigned NElts = VTy->getNumElements(); +unsigned EltSize = +VTy->

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-10 Thread Richard Smith via cfe-commits
@@ -7098,6 +7052,69 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue &Val, QualType Ty, CharUnits Offset) { +const VectorType *VTy = Ty->castAs(); +QualType EltTy = VTy->getElementType(); +unsigned NElts = VTy->getNumElemen

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-10-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/66894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add basic support for _BitInt (PR #68069)

2023-10-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/68069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 26d9f85 - [clang][Interp] Add basic support for _BitInt (#68069)

2023-10-10 Thread via cfe-commits
Author: Timm Baeder Date: 2023-10-11T08:53:21+02:00 New Revision: 26d9f851cfddf2d6b57239a7ba054d027756bfb7 URL: https://github.com/llvm/llvm-project/commit/26d9f851cfddf2d6b57239a7ba054d027756bfb7 DIFF: https://github.com/llvm/llvm-project/commit/26d9f851cfddf2d6b57239a7ba054d027756bfb7.diff L

[clang-tools-extra] [clangd] Show alignment for records and fields decls (PR #67213)

2023-10-10 Thread via cfe-commits
https://github.com/sr-tream updated https://github.com/llvm/llvm-project/pull/67213 >From 13e43eb68b0172c4db5c0218ad4ba566da535f67 Mon Sep 17 00:00:00 2001 From: SR_team Date: Wed, 11 Oct 2023 09:49:11 +0300 Subject: [PATCH] [clangd] Show alignment for records and fields decls --- clang-tools

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-10 Thread Alexander Richardson via cfe-commits
@@ -115,6 +121,18 @@ extern int unw_set_reg(unw_cursor_t *, unw_regnum_t, unw_word_t) LIBUNWIND_AVAIL extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t) LIBUNWIND_AVAIL; extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL; +#ifdef LIBUNWIND_HAVE_MSAN +//

[clang] [clang][C2x] Remove confusing diagnostic auto storage class specifier (PR #68710)

2023-10-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks for the quick patch! https://github.com/llvm/llvm-project/pull/68710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][RISCV] Fix the condition of checking signature in getIndex (PR #67403)

2023-10-10 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/67403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Add avr-libc's default linker script to lld (PR #68507)

2023-10-10 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/68507 >From b2a442d6aca019a42baef45e1f245dc1ea5bd8a1 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Wed, 11 Oct 2023 14:05:14 +0800 Subject: [PATCH] [clang][driver] Add avr-libc's default linker script to lld If lld i

[clang] b888592 - Use llvm::endianness::{big,little,native} (NFC)

2023-10-10 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-10-10T22:54:51-07:00 New Revision: b8885926f8115d5fe2c06907e066cae061d5f230 URL: https://github.com/llvm/llvm-project/commit/b8885926f8115d5fe2c06907e066cae061d5f230 DIFF: https://github.com/llvm/llvm-project/commit/b8885926f8115d5fe2c06907e066cae061d5f230.diff L

[clang] 0439a01 - [llvm] Drop unaligned from calls to llvm::support::endian::{read,write} (NFC)

2023-10-10 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-10-10T22:41:47-07:00 New Revision: 0439a017ef72effa9681cdb794860cf954de808a URL: https://github.com/llvm/llvm-project/commit/0439a017ef72effa9681cdb794860cf954de808a DIFF: https://github.com/llvm/llvm-project/commit/0439a017ef72effa9681cdb794860cf954de808a.diff L

[clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-10-10 Thread Felix via cfe-commits
@@ -660,14 +671,16 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI, "GETtls[ld]ADDR[32] must read GPR3"); if (Subtarget->isAIXABI()) { -// On AIX, the variable offset should already be in R4 and the region handle -// should already be in R3. -

[clang] c8e1774 - [Interp] Use llvm::endianness::native (NFC)

2023-10-10 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-10-10T22:26:08-07:00 New Revision: c8e17749757a62cdd5c1dea2cb25f3eaf933cd5d URL: https://github.com/llvm/llvm-project/commit/c8e17749757a62cdd5c1dea2cb25f3eaf933cd5d DIFF: https://github.com/llvm/llvm-project/commit/c8e17749757a62cdd5c1dea2cb25f3eaf933cd5d.diff L

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-10 Thread Chen Zheng via cfe-commits
@@ -807,7 +807,7 @@ ArrayRef PPCTargetInfo::getGCCRegAliases() const { // PPC ELFABIv2 DWARF Definitoin "Table 2.26. Mappings of Common Registers". // vs0 ~ vs31 is mapping to 32 - 63, // vs32 ~ vs63 is mapping to 77 - 108. chenzheng1030 wrote: Done. https:/

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-10 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 updated https://github.com/llvm/llvm-project/pull/68476 >From eada8d170cefcf2c1d152eaadc68dc4c3077c9ce Mon Sep 17 00:00:00 2001 From: Chen Zheng Date: Sat, 7 Oct 2023 06:09:44 -0400 Subject: [PATCH 1/3] [AIX] recognize vsr in inline asm for AIX --- clang/lib/B

[clang] [TSAN] add support for riscv64 (PR #68735)

2023-10-10 Thread via cfe-commits
hiraditya wrote: > The review context is on https://reviews.llvm.org/D145214 . Moving it here > just causes more confusion. > > @alexfanqi is the author of the patch and they can drive a reland. Can you elaborate what is confusing? The patch was already reviewed and accepted. I'm waiting on t

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-10 Thread Hubert Tong via cfe-commits
@@ -807,7 +807,7 @@ ArrayRef PPCTargetInfo::getGCCRegAliases() const { // PPC ELFABIv2 DWARF Definitoin "Table 2.26. Mappings of Common Registers". // vs0 ~ vs31 is mapping to 32 - 63, // vs32 ~ vs63 is mapping to 77 - 108. hubert-reinterpretcast wrote: > I p

[clang] 4eecfda - [Driver] Rename AddAllArgs (initialization list overload) to addAllArgs

2023-10-10 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-10-10T21:31:18-07:00 New Revision: 4eecfda50a4e7a05f448a59885d2572d0ea2f4a1 URL: https://github.com/llvm/llvm-project/commit/4eecfda50a4e7a05f448a59885d2572d0ea2f4a1 DIFF: https://github.com/llvm/llvm-project/commit/4eecfda50a4e7a05f448a59885d2572d0ea2f4a1.diff

[clang] 1d8d326 - [clang][driver] Support option '-r' for target AVR (#68484)

2023-10-10 Thread via cfe-commits
Author: Ben Shi Date: 2023-10-11T12:19:33+08:00 New Revision: 1d8d326a86d59d631655adcb623d08db4a3bf457 URL: https://github.com/llvm/llvm-project/commit/1d8d326a86d59d631655adcb623d08db4a3bf457 DIFF: https://github.com/llvm/llvm-project/commit/1d8d326a86d59d631655adcb623d08db4a3bf457.diff LOG:

[clang] [clang][driver] Support option '-r' for target AVR (PR #68484)

2023-10-10 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/68484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Group together usage of AddAllArgs (PR #68349)

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

[clang] [Driver] Group together usage of AddAllArgs (PR #68349)

2023-10-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: Replace with `AddAllArgs` with `addAllArgs` while you are changing these lines. Most `*Arg` options actually use the proper lower-case but some `Add*` ones are weird... https://github.com/llvm/llvm-project/pull/68349 ___ cfe-commits ma

[clang] [clang][driver] Support option '-r' for target AVR (PR #68484)

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

[clang] [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-10-10 Thread via cfe-commits
h-vetinari wrote: > > Because I don't know of any better way to commandeer a patch in GitHub > > As a maintainer, you can push into this branch I had reached out to @ThePhD with an offer to help on this before they opened this PR, and I now have push access to their fork, which means I could c

[clang] [RISCV] Support Xsfvqmaccdod and Xsfvqmaccqoq extensions (PR #68295)

2023-10-10 Thread Brandon Wu via cfe-commits
@@ -178,6 +178,19 @@ multiclass CustomSiFiveVCIX; } +let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in { +class CustomSiFiveVMACC funct6, RISCVVFormat opv, string opcodestr> +: RVInstVCCustom2 { + let vm = 1; + let funct6_lo2 = funct6{1-0}; +} +} + +multiclass CustomSi

[clang] [RISCV] Support Xsfvqmaccdod and Xsfvqmaccqoq extensions (PR #68295)

2023-10-10 Thread Shao-Ce SUN via cfe-commits
@@ -178,6 +178,19 @@ multiclass CustomSiFiveVCIX; } +let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in { +class CustomSiFiveVMACC funct6, RISCVVFormat opv, string opcodestr> +: RVInstVCCustom2 { + let vm = 1; + let funct6_lo2 = funct6{1-0}; +} +} + +multiclass CustomSi

[clang] [Clang] Implement the 'counted_by' attribute (PR #68750)

2023-10-10 Thread Oskar Wirga via cfe-commits
https://github.com/oskarwirga commented: I've reviewed the admittedly limited sections I'm familiar with and LGTM! This is great work :) https://github.com/llvm/llvm-project/pull/68750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang-tools-extra] [Clang] Support target attr specifying CPU (PR #68678)

2023-10-10 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/68678 >From 78f22a8a57f5b67660763b8c7731b9d3cddede72 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Tue, 10 Oct 2023 17:20:00 +0800 Subject: [PATCH 1/2] [Clang] Support target attr specifying CPU Currently targets

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-10 Thread Chen Zheng via cfe-commits
@@ -807,7 +807,7 @@ ArrayRef PPCTargetInfo::getGCCRegAliases() const { // PPC ELFABIv2 DWARF Definitoin "Table 2.26. Mappings of Common Registers". // vs0 ~ vs31 is mapping to 32 - 63, // vs32 ~ vs63 is mapping to 77 - 108. chenzheng1030 wrote: @hubert-reinte

[clang] [RISCV] Support Xsfvfwmaccqqq extensions (PR #68296)

2023-10-10 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/68296 >From e5a746541509727210e5e561ecb85607939ec0f4 Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Wed, 4 Oct 2023 10:23:52 -0700 Subject: [PATCH 1/4] [RISCV] Support Xsfvfwmaccqqq extensions Bfloat16 Matrix Multipl

[clang] [RISCV] Support Xsfvqmaccdod and Xsfvqmaccqoq extensions (PR #68295)

2023-10-10 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat edited https://github.com/llvm/llvm-project/pull/68295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Support Xsfvqmaccdod and Xsfvqmaccqoq extensions (PR #68295)

2023-10-10 Thread Brandon Wu via cfe-commits
@@ -0,0 +1,57 @@ +# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v,+xsfvqmaccqoq,+xsfvqmaccdod %s \ +# RUN:| FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \ +# RUN:| FileCheck %s --check-

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky deleted https://github.com/llvm/llvm-project/pull/68510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Support Xsfvqmaccdod and Xsfvqmaccqoq extensions (PR #68295)

2023-10-10 Thread Brandon Wu via cfe-commits
@@ -178,6 +178,19 @@ multiclass CustomSiFiveVCIX; } +let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in { +class CustomSiFiveVMACC funct6, RISCVVFormat opv, string opcodestr> +: RVInstVCCustom2 { + let vm = 1; + let funct6_lo2 = funct6{1-0}; +} +} + +multiclass CustomSi

[clang] [Clang][PowerPC] Support tune directive in target attribute (PR #68681)

2023-10-10 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises closed https://github.com/llvm/llvm-project/pull/68681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 15d78ce - [Clang][PowerPC] Support tune CPU in target attribute (#68681)

2023-10-10 Thread via cfe-commits
Author: Qiu Chaofan Date: 2023-10-11T10:38:56+08:00 New Revision: 15d78cef3ddc9c2e00beaf7e6b1d4ba5dd232a89 URL: https://github.com/llvm/llvm-project/commit/15d78cef3ddc9c2e00beaf7e6b1d4ba5dd232a89 DIFF: https://github.com/llvm/llvm-project/commit/15d78cef3ddc9c2e00beaf7e6b1d4ba5dd232a89.diff L

[clang] [RISCV] Support Xsfvqmaccdod and Xsfvqmaccqoq extensions (PR #68295)

2023-10-10 Thread Brandon Wu via cfe-commits
@@ -103,3 +103,27 @@ let SupportOverloading = false in { defm sf_vc_v_fvw : RVVVCIXBuiltinSet<["si"], "UwKzUwUvFe", [-1, 0, 2, 3], UseGPR=0>; } } + +multiclass RVVVQMACCBuiltinSet> suffixes_prototypes> { + let OverloadedName = NAME, + Name = NAME, + HasMasked

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/68510 >From 55ca8fa197e469a7c8f57d7a174c07a063eb022e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Sun, 8 Oct 2023 16:00:29 +0800 Subject: [PATCH] [clang][analysis]Use dyn_cast_or_null instead cast to prevent crash ---

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-10 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 edited https://github.com/llvm/llvm-project/pull/68476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][driver] Support option '-r' for target AVR (PR #68484)

2023-10-10 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/68484 >From 329c4e231a2d039bec48699058e615da3fa3a6e8 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Sat, 7 Oct 2023 20:49:36 +0800 Subject: [PATCH] [clang][driver] Support option '-r' for target AVR If '-r' is specifi

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > Thanks for this fix! Unfortunately, I wasn't able to repro the crash in > godbolt: https://godbolt.org/z/s741z5djY. Can you double check that the check > crashes on that example without your fix? The test case is different from that in this patch. Use `float` in `optional`. ht

[clang] [RISCV] Fix wrong implication for zvknhb. (PR #66860)

2023-10-10 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/66860 >From 3c28f7bace91dc4edd5e87b9f1a36d100cf38318 Mon Sep 17 00:00:00 2001 From: 4vtomat Date: Tue, 19 Sep 2023 23:06:01 -0700 Subject: [PATCH 1/3] [RISCV] Fix wrong implication for zvknhb. --- clang/include/clang

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-10 Thread Chen Zheng via cfe-commits
@@ -807,7 +807,7 @@ ArrayRef PPCTargetInfo::getGCCRegAliases() const { // PPC ELFABIv2 DWARF Definitoin "Table 2.26. Mappings of Common Registers". // vs0 ~ vs31 is mapping to 32 - 63, // vs32 ~ vs63 is mapping to 77 - 108. chenzheng1030 wrote: FP and VMX reg

[clang] [clang][dataflow]Use cast_or_null instead cast to prevent crash (PR #68510)

2023-10-10 Thread Qizhi Hu via cfe-commits
@@ -180,3 +180,44 @@ void std_forward_rvalue_ref_safe(absl::optional&& opt) { std::forward>(opt).value(); } + +namespace std { + +template +class optional { +public: + template + optional& operator=(const U &u){ jcsxky wrote: Using `absl::optional`

[clang] [RISCV] Fix wrong implication for zvknhb. (PR #66860)

2023-10-10 Thread Brandon Wu via cfe-commits
@@ -1013,7 +1013,6 @@ static const char *ImpliedExtsZvfhmin[] = {"zve32f"}; static const char *ImpliedExtsZvkn[] = {"zvkb", "zvkned", "zvknhb", "zvkt"}; static const char *ImpliedExtsZvknc[] = {"zvbc", "zvkn"}; static const char *ImpliedExtsZvkng[] = {"zvkg", "zvkn"}; -static c

[clang] a157e79 - [FlowSensitive] Stop including llvm/ADT/Any.h (NFC)

2023-10-10 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-10-10T18:57:18-07:00 New Revision: a157e79dd207d72aea1d42953c61f14790d847c1 URL: https://github.com/llvm/llvm-project/commit/a157e79dd207d72aea1d42953c61f14790d847c1 DIFF: https://github.com/llvm/llvm-project/commit/a157e79dd207d72aea1d42953c61f14790d847c1.diff L

[clang] d12ece2 - [CodeGen] Use a range-based for loop (NFC)

2023-10-10 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-10-10T18:57:16-07:00 New Revision: d12ece2ecbb6065797c826c2e70d8f8a642b8eb0 URL: https://github.com/llvm/llvm-project/commit/d12ece2ecbb6065797c826c2e70d8f8a642b8eb0 DIFF: https://github.com/llvm/llvm-project/commit/d12ece2ecbb6065797c826c2e70d8f8a642b8eb0.diff L

[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

2023-10-10 Thread Chen Zheng via cfe-commits
@@ -828,10 +829,7 @@ const TargetInfo::AddlRegName GCCAddlRegNames[] = { }; ArrayRef PPCTargetInfo::getGCCAddlRegNames() const { - if (ABI == "elfv2") -return llvm::ArrayRef(GCCAddlRegNames); - else -return TargetInfo::getGCCAddlRegNames(); + return llvm::ArrayRef(G

[clang] [Clang][PowerPC] Support tune directive in target attribute (PR #68681)

2023-10-10 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 approved this pull request. Make sense to me. Thanks. https://github.com/llvm/llvm-project/pull/68681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D159351: [Sema] Change order of displayed overloads in diagnostics

2023-10-10 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. You say "attempts to be a strict weak order" does that mean there are still cases which will cause an assert or are we not sure? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159351/new/ https://reviews.llvm.org/D159351 __

[PATCH] D86310: [X86] Align i128 to 16 bytes in x86 datalayouts

2023-10-10 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. In D86310#4653550 , @tmgross wrote: > Probably would be good to add https://bugs.llvm.org/show_bug.cgi?id=50198 to > the test suite if it isn't there already. That test would not work as an LLVM test directly, but we do already ha

[PATCH] D140925: [CMake] Use Clang to infer the target triple

2023-10-10 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: runtimes/CMakeLists.txt:167 +if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + set(CXX_TARGET_TRIPLE ${CMAKE_CXX_COMPILER} --target=${LLVM_RUNTIME_TRIPLE} -print-target-triple) ldionne wrote: > Is there any reas

[PATCH] D140925: [CMake] Use Clang to infer the target triple

2023-10-10 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added inline comments. This revision is now accepted and ready to land. Comment at: runtimes/CMakeLists.txt:167 +if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) + set(CXX_TARGET_TRIPLE ${CMAKE_CXX_COMPILER} --target=${LLVM_RUNTIME_T

[PATCH] D155688: [PATCH] [llvm] [InstCombine] Canonicalise ADD+GEP

2023-10-10 Thread Fei Peng via Phabricator via cfe-commits
fiigii added a comment. That would be fine. Thanks for explaining. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155688/new/ https://reviews.llvm.org/D155688 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
@@ -5536,10 +5538,24 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, const CGCallee &OrigCallee break; } } + +if (const auto *MD = +dyn_cast_if_present(OCE->getCalleeDecl()); +MD && MD->isStatic()) + StaticOperator = true

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
@@ -7806,7 +7806,8 @@ class ExprEvaluatorBase // Overloaded operator calls to member functions are represented as normal // calls with '*this' as the first argument. const CXXMethodDecl *MD = dyn_cast(FD); - if (MD && MD->isImplicitObjectMemberFunction()

[clang] [clang] static operators should evaluate object argument (PR #68485)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
@@ -5536,10 +5538,24 @@ RValue CodeGenFunction::EmitCall(QualType CalleeType, const CGCallee &OrigCallee break; } } + +if (const auto *MD = +dyn_cast_if_present(OCE->getCalleeDecl()); +MD && MD->isStatic()) + StaticOperator = true

[clang] [analyzer] Compute length of string literal initializers (#66990) (PR #68368)

2023-10-10 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun closed https://github.com/llvm/llvm-project/pull/68368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4df7496 - [analyzer] Compute length of string literal initializers (#66990) (#68368)

2023-10-10 Thread via cfe-commits
Author: luamfb Date: 2023-10-10T16:08:18-07:00 New Revision: 4df74963ea0f6c8650d5837ab52e3cdcf1dcf016 URL: https://github.com/llvm/llvm-project/commit/4df74963ea0f6c8650d5837ab52e3cdcf1dcf016 DIFF: https://github.com/llvm/llvm-project/commit/4df74963ea0f6c8650d5837ab52e3cdcf1dcf016.diff LOG: [

[clang] [clang][driver] Support option '-r' for target AVR (PR #68484)

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

[clang] [clang][driver] Support option '-r' for target AVR (PR #68484)

2023-10-10 Thread Fangrui Song via cfe-commits
@@ -57,3 +57,30 @@ // RUN: %clang -### --target=avr -mmcu=atmega328 -fuse-ld=lld -flto --sysroot %S/Inputs/basic_avr_tree %s 2>&1 | FileCheck -check-prefix LINKS %s // LINKS: {{".*ld.*"}} {{.*}} "--defsym=__DATA_REGION_ORIGIN__=0x800100" "-plugin-opt=mcpu=atmega328" // LINKS-

[clang] [clang][driver] Support option '-r' for target AVR (PR #68484)

2023-10-10 Thread Fangrui Song via cfe-commits
@@ -57,3 +57,30 @@ // RUN: %clang -### --target=avr -mmcu=atmega328 -fuse-ld=lld -flto --sysroot %S/Inputs/basic_avr_tree %s 2>&1 | FileCheck -check-prefix LINKS %s // LINKS: {{".*ld.*"}} {{.*}} "--defsym=__DATA_REGION_ORIGIN__=0x800100" "-plugin-opt=mcpu=atmega328" // LINKS-

[clang] [clang][Sema] Emit more specific diagnostic for auto in lambda before C++14 (#46059) (PR #68540)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
@@ -3605,8 +3605,11 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state, Info = &SemaRef.InventedParameterInfos.back(); } else { // In C++14, generic lambdas allow 'auto' in their parameters. -if (!SemaRef.getLangOpts().CPlu

[clang-tools-extra] [clangd] Show alignment for records and fields decls (PR #67213)

2023-10-10 Thread via cfe-commits
sr-tream wrote: In force-push fixed clangd crash when hovered forward-declared types https://github.com/llvm/llvm-project/pull/67213 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Show alignment for records and fields decls (PR #67213)

2023-10-10 Thread via cfe-commits
https://github.com/sr-tream updated https://github.com/llvm/llvm-project/pull/67213 >From 678bca64870bdc58882e242696ff548f96a5ec09 Mon Sep 17 00:00:00 2001 From: SR_team Date: Sat, 23 Sep 2023 03:49:23 +0300 Subject: [PATCH] [clangd] Show alignment for records and fields decls --- clang-tools

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-10 Thread Louis Dionne via cfe-commits
@@ -115,6 +121,18 @@ extern int unw_set_reg(unw_cursor_t *, unw_regnum_t, unw_word_t) LIBUNWIND_AVAIL extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t) LIBUNWIND_AVAIL; extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL; +#ifdef LIBUNWIND_HAVE_MSAN +//

[clang] [Clang] Implement the 'counted_by' attribute (PR #68750)

2023-10-10 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/68750 >From b7b0c40542589e9c54c21140dbb5b163dd8ffc7b Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 4 Oct 2023 17:55:49 -0700 Subject: [PATCH 1/2] [Clang] Implement the 'counted_by' attribute The 'counted_b

[clang] [Clang] Implement the 'counted_by' attribute (PR #68750)

2023-10-10 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 3a6cc52fe3501b2b7b3aabdff305a18122c9e0db b7b0c40542589e9c54c21140dbb5b163dd8ffc7b --

[clang] [Clang] Implement the 'counted_by' attribute (PR #68750)

2023-10-10 Thread Bill Wendling via cfe-commits
bwendling wrote: And @AaronBallman, I haven't forgotten my promise to change the diagnostics. I've been on vacation, and it's become trickier to get them to work the other way than I had first thought. The change is coming soon though. https://github.com/llvm/llvm-project/pull/68750 __

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-10 Thread Alexander Richardson via cfe-commits
@@ -115,6 +121,18 @@ extern int unw_set_reg(unw_cursor_t *, unw_regnum_t, unw_word_t) LIBUNWIND_AVAIL extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t) LIBUNWIND_AVAIL; extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL; +#ifdef LIBUNWIND_HAVE_MSAN +//

[clang] [Clang] Implement the 'counted_by' attribute (PR #68750)

2023-10-10 Thread Bill Wendling via cfe-commits
bwendling wrote: This is identical to the original change (9a954c693573281407f6ee3f4eb1b16cc545033d), but with a fix for the issue @alexfh discovered (https://github.com/llvm/llvm-project/commit/9a954c693573281407f6ee3f4eb1b16cc545033d#commitcomment-129529574). The change is on lines 473-475

[clang] [Clang] Implement the 'counted_by' attribute (PR #68750)

2023-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Bill Wendling (bwendling) Changes The 'counted_by' attribute is used on flexible array members. The argument for the attribute is the name of the field member in the same structure holding the count of elements in the flexible arr

[clang] [Clang] Implement the 'counted_by' attribute (PR #68750)

2023-10-10 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/68750 The 'counted_by' attribute is used on flexible array members. The argument for the attribute is the name of the field member in the same structure holding the count of elements in the flexible array. This info

[libunwind] [libunwind][test] Avoid calling back into libunwind on sanitizer errors (PR #67861)

2023-10-10 Thread Alexander Richardson via cfe-commits
arichardson wrote: > What is the nested MSAN fault? Wouldn't fixing that be a better way to handle > the situation? Currently there are missing annotations for __unw_getcontext so MSan thinks there are unintialized reads inside libunwind. The underlying issues is fixed in #67860 but if we eve

[clang] [clang][Interp] Only evaluate the source array initialization of an `ArrayInitLoopExpr` once (PR #68039)

2023-10-10 Thread via cfe-commits
isuckatcs wrote: ping @tbaederr https://github.com/llvm/llvm-project/pull/68039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TSAN] add support for riscv64 (PR #68735)

2023-10-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay requested changes to this pull request. https://reviews.llvm.org/D145214#4653647 https://github.com/llvm/llvm-project/pull/68735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [TSAN] add support for riscv64 (PR #68735)

2023-10-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: The review context is on https://reviews.llvm.org/D145214 . Moving it here just causes more confusion. @alexfanqi is the author of the patch and they can drive a reland. https://github.com/llvm/llvm-project/pull/68735 ___ cfe-commits

[clang] [clang][Sema] Emit more specific diagnostic for auto in lambda before C++14 (#46059) (PR #68540)

2023-10-10 Thread via cfe-commits
weltschildkroete wrote: LMK if the release note sounds good. If so, could you land this patch for me? Please use "Leonardo Duarte weltschildkro...@gmail.com" to commit the change. Thanks! https://github.com/llvm/llvm-project/pull/68540 ___ cfe-commit

[clang] [clang][Sema] Emit more specific diagnostic for auto in lambda before C++14 (#46059) (PR #68540)

2023-10-10 Thread via cfe-commits
@@ -2393,7 +2393,7 @@ def err_auto_not_allowed : Error< "|in type allocated by 'new'|in K&R-style function parameter" "|in template parameter|in friend declaration|in function prototype that is " "not a function declaration|in requires expression parameter" - "|in array

[clang] [clang][Sema] Emit more specific diagnostic for auto in lambda before C++14 (#46059) (PR #68540)

2023-10-10 Thread via cfe-commits
https://github.com/weltschildkroete updated https://github.com/llvm/llvm-project/pull/68540 >From 613ea6809b478ff7391614b24ec177fc19339cdd Mon Sep 17 00:00:00 2001 From: Leonardo Duarte Date: Sun, 8 Oct 2023 12:59:15 +0200 Subject: [PATCH 1/4] [clang][Sema] Emit more specific diagnostic for aut

[clang] [clang][Sema] Emit more specific diagnostic for auto in lambda before C++14 (#46059) (PR #68540)

2023-10-10 Thread via cfe-commits
https://github.com/weltschildkroete updated https://github.com/llvm/llvm-project/pull/68540 >From 613ea6809b478ff7391614b24ec177fc19339cdd Mon Sep 17 00:00:00 2001 From: Leonardo Duarte Date: Sun, 8 Oct 2023 12:59:15 +0200 Subject: [PATCH 1/3] [clang][Sema] Emit more specific diagnostic for aut

[PATCH] D145262: [clang-format] Treat AttributeMacros more like __attribute__

2023-10-10 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. @jaredgrubb please provide your authorship for `git commit --author` so that we can land the patch on your behalf. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145262/new/ https://reviews.llvm.org/D145262 ___ cfe-co

[clang] [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-10-10 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > FWIW, I spoke offline with the original author of the PR and he said that > he's fine with me picking up the changes and carrying the review forward. > > Because I don't know of any better way to commandeer a patch in GitHub, I'll > probably grab the changes, get them into my o

[PATCH] D152914: [Draft] Make __builtin_cpu builtins target-independent

2023-10-10 Thread Lei Huang via Phabricator via cfe-commits
lei added a comment. HI @nemanjai, Did you get a chance to post this as a github PR? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152914/new/ https://reviews.llvm.org/D152914 ___ cfe-commits mailing lis

[PATCH] D145262: [clang-format] Treat AttributeMacros more like __attribute__

2023-10-10 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145262/new/ https://reviews.llvm.org/D145262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-10 Thread Björn Schäpers via cfe-commits
@@ -182,7 +182,7 @@ TEST_F(FormatTestComments, UnderstandsSingleLineComments) { "int a; // This is unrelated")); EXPECT_EQ("class C {\n" " void f() { // This does something ..\n" -" } // awesome..\n" +"

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-10 Thread Björn Schäpers via cfe-commits
@@ -3191,20 +3191,120 @@ TEST_F(FormatTestComments, DontAlignNamespaceComments) { "}\n" "// Comment"; -#if 0 - // FIXME: The following comment is aligned with the namespace comment. verifyFormat("namespace A {\n" " int Foo;\n"

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-10 Thread Björn Schäpers via cfe-commits
@@ -20794,7 +20794,7 @@ TEST_F(FormatTest, CatchAlignArrayOfStructuresRightAlignment) { verifyFormat("int a[][] = {\n" "{\n" " {0, 2}, //\n" - " {1, 2} //\n" + " {1, 2} //\n" HazardyKnusperke

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-10 Thread via cfe-commits
=?utf-8?q?Björn_Schäpers?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Björn Schäpers (HazardyKnusperkeks) Changes We now stop aligning trailing comments on all closing braces, for classes etc. we even check for the semicolon between the comment and

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-10 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks created https://github.com/llvm/llvm-project/pull/68743 We now stop aligning trailing comments on all closing braces, for classes etc. we even check for the semicolon between the comment and the brace. Fixes #67906. From 358cbf4fd25d2d323e21774a3d4f5a6

[PATCH] D153131: [clang analysis][thread-safety] Handle return-by-reference...

2023-10-10 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D153131#4653564 , @courbet wrote: > We have a large number of users of `-Werror -Wthread-safety-analysis` > internally. When we make the new warnings part of that flag we cannot > integrate because we're breaking all the

  1   2   3   >