[llvm] [lldb] [lld] [libc] [clang] [libcxx] [flang] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-02-02 Thread Paul Kirth via cfe-commits
@@ -1251,6 +1253,10 @@ elseif(LLVM_ENABLE_LTO) endif() endif() +if(LLVM_ENABLE_FATLTO AND (FUCHSIA OR UNIX)) +append("-ffat-lto-objects" CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS) ilovepi wrote: Dang, I thought I had done that. That's probably w

[clang] [analyzer] Teach analzer about ms __analyzer_assume(bool) and friends (PR #80456)

2024-02-02 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Hey! Thanks for looking into this! Did you actually encounter this call in the wild? The reason I ask, because their definition looks like this in the current version of `sal.h`: ``` #ifndef __analysis_assume // [ #ifdef _PREFAST_ // [ #define __analysis_assume(expr) __assume

[llvm] [lldb] [lld] [libc] [clang] [libcxx] [flang] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-02-02 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/80480 >From 2793f30243a0b93d8a1f52343ab974bf9eef4e03 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Tue, 22 Aug 2023 15:24:03 + Subject: [PATCH 1/2] [CMAKE] Enable FatLTO as a build option for LLVM --- clang/cma

[clang] 05a6cb2 - [Clang] Allow __is_nothrow_convertible to be used as an identifier (#80476)

2024-02-02 Thread via cfe-commits
Author: Nikolas Klauser Date: 2024-02-02T22:18:58+01:00 New Revision: 05a6cb208635a54fb63622f13420e4d8549e5ba1 URL: https://github.com/llvm/llvm-project/commit/05a6cb208635a54fb63622f13420e4d8549e5ba1 DIFF: https://github.com/llvm/llvm-project/commit/05a6cb208635a54fb63622f13420e4d8549e5ba1.dif

[clang] [Clang] Allow __is_nothrow_convertible to be used as an identifier (PR #80476)

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

[llvm] [lldb] [lld] [openmp] [compiler-rt] [mlir] [libc] [clang-tools-extra] [clang] [libcxx] [flang] [Driver] Report invalid target triple versions for all environment types. (PR #78655)

2024-02-02 Thread via cfe-commits
https://github.com/ZijunZhaoCCK edited https://github.com/llvm/llvm-project/pull/78655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [lldb] [lld] [mlir] [libc] [clang-tools-extra] [clang] [libcxx] [flang] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-02-02 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/80480 >From 2793f30243a0b93d8a1f52343ab974bf9eef4e03 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Tue, 22 Aug 2023 15:24:03 + Subject: [PATCH 1/2] [CMAKE] Enable FatLTO as a build option for LLVM --- clang/cma

[llvm] [openmp] [clang] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[llvm] [openmp] [clang] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[llvm] [openmp] [clang] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Joseph Huber via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[llvm] [openmp] [clang] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Joseph Huber via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[llvm] [libc] [libcxx] [clang-tools-extra] [openmp] [compiler-rt] [clang] [lldb] [lld] [flang] [mlir] [Driver] Report invalid target triple versions for all environment types. (PR #78655)

2024-02-02 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/78655 >From f440f44e7e270d4636ad39f4e4223c904e496d3a Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Fri, 19 Jan 2024 00:47:05 + Subject: [PATCH 1/6] Make clang report invalid target versions for all environme

[llvm] [libc] [libcxx] [clang-tools-extra] [openmp] [compiler-rt] [clang] [lldb] [lld] [flang] [mlir] [Driver] Report invalid target triple versions for all environment types. (PR #78655)

2024-02-02 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/78655 >From f440f44e7e270d4636ad39f4e4223c904e496d3a Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Fri, 19 Jan 2024 00:47:05 + Subject: [PATCH 1/7] Make clang report invalid target versions for all environme

[llvm] [libc] [libcxx] [clang-tools-extra] [openmp] [compiler-rt] [clang] [lldb] [lld] [flang] [mlir] [Driver] Report invalid target triple versions for all environment types. (PR #78655)

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

[openmp] [clang] [llvm] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[openmp] [clang] [llvm] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[clang] [attributes][analyzer] Generalize [[clang::suppress]] to declarations. (PR #80371)

2024-02-02 Thread Artem Dergachev via cfe-commits
@@ -147,6 +147,20 @@ bool BugSuppression::isSuppressed(const PathDiagnosticLocation &Location, // done as well as perform a lot of work we'll never need. // Gladly, none of our on-by-default checkers currently need it. DeclWithIssue = ACtx.getTranslationUnitDecl();

[openmp] [clang] [llvm] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Joseph Huber via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[openmp] [clang] [llvm] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Gheorghe-Teodor Bercea via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[openmp] [clang] [llvm] [OpenMP] Remove `register_requires` global constructor (PR #80460)

2024-02-02 Thread Joseph Huber via cfe-commits
@@ -199,7 +199,7 @@ static int initLibrary(DeviceTy &Device) { Entry.size) != OFFLOAD_SUCCESS) REPORT("Failed to write symbol for USM %s\n", Entry.name); } -} else { +} else if (Entry.addr) { --

[clang] [libcxxabi] [lldb] [flang] [lld] [llvm] [libcxx] [libc] [msan] Unpoison indirect outputs for userspace using memset for large operands (PR #79924)

2024-02-02 Thread Vitaly Buka via cfe-commits
@@ -4552,16 +4552,22 @@ struct MemorySanitizerVisitor : public InstVisitor { } if (!ElemTy->isSized()) return; -Value *SizeVal = - IRB.CreateTypeSize(MS.IntptrTy, DL.getTypeStoreSize(ElemTy)); +auto Size = DL.getTypeStoreSize(ElemTy); +Value *Siz

[clang] [Headers][X86] Editorial fixes to ia32intrin.h descriptions (PR #80490)

2024-02-02 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Tag @cflores as well, https://github.com/llvm/llvm-project/pull/80490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

2024-02-02 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/76548 >From 3dfa00b0dab1820d1d8692ea91e98b29c9f8b627 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 28 Dec 2023 16:49:03 -0800 Subject: [PATCH 1/2] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predica

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

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

[compiler-rt] [lld] [flang] [libcxx] [mlir] [openmp] [llvm] [libc] [clang-tools-extra] [lldb] [clang] [Driver] Report invalid target triple versions for all environment types. (PR #78655)

2024-02-02 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/78655 >From f440f44e7e270d4636ad39f4e4223c904e496d3a Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Fri, 19 Jan 2024 00:47:05 + Subject: [PATCH 1/7] Make clang report invalid target versions for all environme

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

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

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-02 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 86cd2fbdfe67d70a7fe061ed5d3a644f50f070f5 b510cf7ca8c47c64e0b9f5fcd5634759dfe95751 --

[clang] 7a94acb - [Clang] Fix a crash when dumping a pack indexing type. (#80439)

2024-02-02 Thread via cfe-commits
Author: cor3ntin Date: 2024-02-03T00:09:07+01:00 New Revision: 7a94acb2da5b20d12f13f3c5f4eb0f3f46e78e73 URL: https://github.com/llvm/llvm-project/commit/7a94acb2da5b20d12f13f3c5f4eb0f3f46e78e73 DIFF: https://github.com/llvm/llvm-project/commit/7a94acb2da5b20d12f13f3c5f4eb0f3f46e78e73.diff LOG:

[clang] [Clang] Fix a crash when dumping a pack indexing type. (PR #80439)

2024-02-02 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/80439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

2024-02-02 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/76548 >From 3dfa00b0dab1820d1d8692ea91e98b29c9f8b627 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 28 Dec 2023 16:49:03 -0800 Subject: [PATCH 1/3] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predica

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

2024-02-02 Thread Craig Topper via cfe-commits
topperc wrote: > Generalising this code makes sense, 16 should never have been hardcoded here. > > Is it possible to add a test for the case where the predicate type is not > ``? I rebased, which picked up more tests that are affected for RISC-V. This also pointed out that I missed very simil

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

2024-02-02 Thread Craig Topper via cfe-commits
@@ -2136,14 +2136,16 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { // bitcast. if (const auto *FixedSrc = dyn_cast(SrcTy)) { if (const auto *ScalableDst = dyn_cast(DstTy)) { -// If we are casting a fixed i8 vector to a scalable 16 x i1 predic

[clang] [IRGen][AArch64][RISCV] Generalize bitcast between i1 predicate vector and i8 fixed vector. (PR #76548)

2024-02-02 Thread Craig Topper via cfe-commits
@@ -70,13 +70,17 @@ fixed_float64m1_t call_float64_ff(fixed_float64m1_t op1, fixed_float64m1_t op2) // CHECK-LABEL: @call_bool1_ff( // CHECK-NEXT: entry: -// CHECK-NEXT:[[SAVED_VALUE4:%.*]] = alloca , align 8 -// CHECK-NEXT:[[RETVAL_COERCE:%.*]] = alloca , align 8 -/

[openmp] [compiler-rt] [mlir] [llvm] [clang] [lldb] [clang-tools-extra] [lld] [flang] [libcxx] [libc] [Driver] Report invalid target triple versions for all environment types. (PR #78655)

2024-02-02 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/78655 >From f440f44e7e270d4636ad39f4e4223c904e496d3a Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Fri, 19 Jan 2024 00:47:05 + Subject: [PATCH 1/7] Make clang report invalid target versions for all environme

[openmp] [compiler-rt] [mlir] [llvm] [clang] [lldb] [clang-tools-extra] [lld] [flang] [libcxx] [libc] [Driver] Report invalid target triple versions for all environment types. (PR #78655)

2024-02-02 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/78655 >From f440f44e7e270d4636ad39f4e4223c904e496d3a Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Fri, 19 Jan 2024 00:47:05 + Subject: [PATCH 1/8] Make clang report invalid target versions for all environme

[llvm] [clang] [flang] [InstCombine] Canonicalize constant GEPs to i8 source element type (PR #68882)

2024-02-02 Thread Artem Belevich via cfe-commits
Artem-B wrote: Another corner case here. Untyped GEP resulted in SimpifyCFG producing a `load(gep(argptr, cond ? 24 : 0))` instead of `load( cond ? gep(argptr, 24) : argptr)` it produced before the patch, and that eventually prevented SROA from processing that load. While it's not a bug in th

[clang] [Headers][X86] Editorial fixes to ia32intrin.h descriptions (PR #80490)

2024-02-02 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/80490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-02 Thread James Y Knight via cfe-commits
jyknight wrote: I think there is a bit of a problematic interaction with getDenormalModeForType [here](https://github.com/llvm/llvm-project/blob/7a94acb2da5b20d12f13f3c5f4eb0f3f46e78e73/clang/lib/Driver/ToolChains/Linux.cpp#L838C8-L838C37). "-shared" is (should be) a flag used only for linking,

[clang] [clang][CodeGen][UBSan] Fixing shift-exponent generation for _BitInt (PR #80515)

2024-02-02 Thread Adam Magier via cfe-commits
https://github.com/AdamMagierFOSS created https://github.com/llvm/llvm-project/pull/80515 Testing the shift-exponent check with small width _BitInt values exposed a bug in ScalarExprEmitter::GetWidthMinusOneValue when using the result to determine valid exponent sizes. False positives were rep

[clang] [clang][CodeGen][UBSan] Fixing shift-exponent generation for _BitInt (PR #80515)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Adam Magier (AdamMagierFOSS) Changes Testing the shift-exponent check with small width _BitInt values exposed a bug in ScalarExprEmitter::GetWidthMinusOneValue when using the result to determine valid exponent sizes. False positiv

[clang] [clang][CodeGen][UBSan] Fixing shift-exponent generation for _BitInt (PR #80515)

2024-02-02 Thread Adam Magier via cfe-commits
AdamMagierFOSS wrote: One thing I'll preemptively address is I didn't know where to put the new unit testing - creating a separate file seems a little heavy handed but I see that there's a test for UBSan shift generation (`clang/test/CodeGen/ubsan-shift.c`) and one for UBSan + _BitInt (`clang/

[clang] Fix clang crash when printing highlighted code in diagnostic (after #66514) (PR #80442)

2024-02-02 Thread via cfe-commits
@@ -1349,7 +1349,7 @@ void TextDiagnostic::emitSnippetAndCaret( // Prepare source highlighting information for the lines we're about to // emit, starting from the first line. std::unique_ptr[]> SourceStyles = - highlightLines(BufStart, Lines.first, Lines.second, PP,

[clang] Fix clang crash when printing highlighted code in diagnostic (after #66514) (PR #80442)

2024-02-02 Thread via cfe-commits
@@ -1349,7 +1349,7 @@ void TextDiagnostic::emitSnippetAndCaret( // Prepare source highlighting information for the lines we're about to // emit, starting from the first line. std::unique_ptr[]> SourceStyles = - highlightLines(BufStart, Lines.first, Lines.second, PP,

[clang] Consider aggregate bases when checking if an InitListExpr is constant (PR #80519)

2024-02-02 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/80519 This code was correct as written prior to C++17, which allowed bases to appear in the initializer list. Clang currently requires compound literal initializers at file scope to be constants, which is how I tested thi

[clang] Consider aggregate bases when checking if an InitListExpr is constant (PR #80519)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Reid Kleckner (rnk) Changes This code was correct as written prior to C++17, which allowed bases to appear in the initializer list. Clang currently requires compound literal initializers at file scope to be constants, which is how I test

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-02 Thread Ben Barham via cfe-commits
https://github.com/bnbarham commented: Cool stuff @DavidGoldman! Nice to see ObjC getting some love. It's a bummer we duplicated here, but seems like both you and @ahoppen took fairly similar approaches. The main difference looks to be the use of `SymbolName` in the other PR. https://github.c

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

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

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

2024-02-02 Thread via cfe-commits
@@ -0,0 +1,164 @@ +// RUN: %clang_cc1 -std=c++20 -Wunsafe-buffer-usage \ +// RUN:-fsafe-buffer-usage-suggestions \ +// RUN:-fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +typedef int * Int_ptr_t; +typedef int Int_t; + +void simple(unsigned idx) { +

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

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

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-02 Thread Daniel Rodríguez Troitiño via cfe-commits
https://github.com/drodriguez created https://github.com/llvm/llvm-project/pull/80524 The current Apple Clang behaviour is to prefer `-isysroot` vs libc++ headers side-by-side the compiler. This has been like that for several Xcode versions, at least since Xcode 14. The code was originally wr

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Daniel Rodríguez Troitiño (drodriguez) Changes The current Apple Clang behaviour is to prefer `-isysroot` vs libc++ headers side-by-side the compiler. This has been like that for several Xcode versions, a

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-02 Thread Daniel Rodríguez Troitiño via cfe-commits
drodriguez wrote: @ilg-ul: you might be interested in reviewing this changes, since they change the behaviour you introduced in #70817 when `-isysroot` is provided. If some folks at Apple reads this: it would be preferable to have the actual code instead of trying to guess which is the interna

[clang] Consider aggregate bases when checking if an InitListExpr is constant (PR #80519)

2024-02-02 Thread Shafik Yaghmour via cfe-commits
@@ -3342,6 +3342,18 @@ bool Expr::isConstantInitializer(ASTContext &Ctx, bool IsForRef, if (ILE->getType()->isRecordType()) { unsigned ElementNo = 0; RecordDecl *RD = ILE->getType()->castAs()->getDecl(); + + // Check bases for C++17 aggregate initializers.

[clang] Consider aggregate bases when checking if an InitListExpr is constant (PR #80519)

2024-02-02 Thread Shafik Yaghmour via cfe-commits
@@ -108,3 +109,22 @@ int computed_with_lambda = [] { return result; }(); #endif + +#if __cplusplus >= 201703L +namespace DynamicFileScopeLiteral { +// This covers the case where we have a file-scope compound literal with a +// non-constant initializer in C++. Previously, we h

[clang] Consider aggregate bases when checking if an InitListExpr is constant (PR #80519)

2024-02-02 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Also in the issue: https://github.com/llvm/llvm-project/issues/80510 you pointed out a crash bug. We should have the bug covered in the test case as well. https://github.com/llvm/llvm-project/pull/80519 ___ cfe-co

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

2024-02-02 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/80327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-02 Thread via cfe-commits
Author: Shafik Yaghmour Date: 2024-02-02T20:26:54-08:00 New Revision: 82a32140acb52472241f04644cdcf88a4cf4bee8 URL: https://github.com/llvm/llvm-project/commit/82a32140acb52472241f04644cdcf88a4cf4bee8 DIFF: https://github.com/llvm/llvm-project/commit/82a32140acb52472241f04644cdcf88a4cf4bee8.dif

[clang] [Driver] Unify InstalledDir and Dir (PR #80527)

2024-02-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/80527 `Driver::ClangExecutable` is derived from: * (-canonical-prefixes default): `realpath` on the executable path * (-no-canonical-prefixes) argv[0] (consult PATH if argv[0] is a word) `Dir` and `ResourceDir` are de

[clang] [Driver] Unify InstalledDir and Dir (PR #80527)

2024-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes `Driver::ClangExecutable` is derived from: * (-canonical-prefixes default): `realpath` on the executable path * (-no-canonical-prefixes) argv[0] (consult PATH if argv[0] is a word) `Dir` and `ResourceDir` ar

[clang] [clang][driver] Add \/../include/c++/v1 to include path on Darwin (PR #70817)

2024-02-02 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > changing the structure of the symlinks is not possible, it is done > > automatically by a tool. > > To be fair: tools can be changed, and in fact you're proposing to change one > ;) > > But that said, now I see what you're up against. I am more convinced that we should uni

[clang] [Driver] Unify InstalledDir and Dir (PR #80527)

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

[clang] [polly] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

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

[lldb] [libcxx] [clang] [libc] [libcxxabi] [flang] [llvm] [lld] [msan] Unpoison indirect outputs for userspace using memset for large operands (PR #79924)

2024-02-02 Thread Fangrui Song via cfe-commits
@@ -4552,16 +4552,22 @@ struct MemorySanitizerVisitor : public InstVisitor { } if (!ElemTy->isSized()) return; -Value *SizeVal = - IRB.CreateTypeSize(MS.IntptrTy, DL.getTypeStoreSize(ElemTy)); +auto Size = DL.getTypeStoreSize(ElemTy); +Value *Siz

[lldb] [libcxx] [clang] [libc] [libcxxabi] [flang] [llvm] [lld] [msan] Unpoison indirect outputs for userspace using memset for large operands (PR #79924)

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

[clang] [X86] [iamcu] Fix wrong alignment value for attr (aligned) with -miamcu (PR #80401)

2024-02-02 Thread via cfe-commits
https://github.com/joyhou-hw updated https://github.com/llvm/llvm-project/pull/80401 >From 834e55dbf7ac54ad7d006866ae4da3190f2197aa Mon Sep 17 00:00:00 2001 From: houzhenyu Date: Fri, 2 Feb 2024 11:21:50 +0800 Subject: [PATCH] [X86] [iamcu] Fix wrong alignment value for attr (aligned) with -mi

[llvm] [clang] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

2024-02-02 Thread Fangrui Song via cfe-commits
@@ -102,3 +102,50 @@ // CHECK-ABI-SOFT-MIPS16: "-target-feature" "+mips16" // CHECK-ABI-SOFT-MIPS16: "-msoft-float" // CHECK-ABI-SOFT-MIPS16: "-mfloat-abi" "soft" + +/// On MIPS, don't accept constraint "f" for soft-float. +// RUN: not %clang -S %s -o %t.s 2>&1 \ +// RUN: -

[llvm] [clang] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

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

[polly] [clang] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-02 Thread via cfe-commits
rmarker wrote: Thanks, @owenca. Don't know if you want to wait for any others to look it over. I had a look at the buildkite check failure. Not sure if it is related to the changes in the PR? In any case, I'll need someone to merge for me when the time is right. https://github.com/llvm/llvm-pro

[llvm] [clang] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

2024-02-02 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa updated https://github.com/llvm/llvm-project/pull/79116 >From af69ccc8182f8a1e86637b75a8fb1e717b157354 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Tue, 23 Jan 2024 18:14:48 +0800 Subject: [PATCH] MIPS/clang: Fix asm constraint for softfloat This include 2 fixes:

[llvm] [clang] MIPS/clang: Fix asm constraint for softfloat (PR #79116)

2024-02-02 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa edited https://github.com/llvm/llvm-project/pull/79116 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[polly] [clang] [clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (PR #78011)

2024-02-02 Thread Owen Pan via cfe-commits
owenca wrote: I don't think the buildkite failure is related to this PR, but I like to wait for a couple of days before merging in case others have any comments. https://github.com/llvm/llvm-project/pull/78011 ___ cfe-commits mailing list cfe-commits@

[clang] [X86] [iamcu] Fix wrong alignment value for attr (aligned) with -miamcu (PR #80401)

2024-02-02 Thread via cfe-commits
https://github.com/joyhou-hw updated https://github.com/llvm/llvm-project/pull/80401 >From 2ecfbf64322a34276a5821b6b24c2e0d62797aeb Mon Sep 17 00:00:00 2001 From: houzhenyu Date: Fri, 2 Feb 2024 11:21:50 +0800 Subject: [PATCH] [X86] [iamcu] Fix wrong alignment value for attr (aligned) with -mi

[libunwind] MIPS/libunwind: Use -mfp64 if compiler is FPXX (PR #68521)

2024-02-02 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa updated https://github.com/llvm/llvm-project/pull/68521 >From 65db5951e3c30b6c2a112b590839fad6b8ec2944 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Sun, 8 Oct 2023 07:12:45 -0400 Subject: [PATCH] MIPS/libunwind: Use -mfp64 if compiler is FPXX Libunwind supports F

<    1   2   3   4