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

2024-03-21 Thread via cfe-commits
Author: Nikolas Klauser Date: 2024-03-21T12:57:24+01:00 New Revision: 2699072b4bc8d8d5e84eb66af38face73ceeb4d3 URL: https://github.com/llvm/llvm-project/commit/2699072b4bc8d8d5e84eb66af38face73ceeb4d3 DIFF:

[clang] [llvm] [AsmPrinter,X86] Hard code AT syntax input for module-level inline assembly for MSVC triples (PR #85668)

2024-03-21 Thread Nico Weber via cfe-commits
nico wrote: Looks like we could fix code on our end and this here isn't needed. But maybe the current behavior isn't 100% ideal. Here's what I think the situation currently is (please correct me if I'm wrong): * With clang-cl, you get intel assembly output by default with `/FA`. That's good.

[clang] [clang] Improves -print-library-module-manifest-path. (PR #85943)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Mark de Wever (mordante) Changes This adds a libc++ to modules.json as is currently used by libc++. When libc++.so is not found the function will search for libc++.a as fallback. --- Full diff:

[clang] [clang] Improves -print-library-module-manifest-path. (PR #85943)

2024-03-21 Thread Mark de Wever via cfe-commits
https://github.com/mordante ready_for_review https://github.com/llvm/llvm-project/pull/85943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improves -print-library-module-manifest-path. (PR #85943)

2024-03-21 Thread Mark de Wever via cfe-commits
@@ -3,20 +3,29 @@ // RUN: rm -rf %t && split-file %s %t && cd %t // RUN: mkdir -p %t/Inputs/usr/lib/x86_64-linux-gnu // RUN: touch %t/Inputs/usr/lib/x86_64-linux-gnu/libc++.so +// RUN: touch %t/Inputs/usr/lib/x86_64-linux-gnu/libc++.a // RUN: %clang

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

2024-03-21 Thread Luke Lau via cfe-commits
lukel97 wrote: Can this land until #85790 lands? https://github.com/llvm/llvm-project/pull/85786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] Add numerical sanitizer (PR #85916)

2024-03-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,2261 @@ +//===-- NumericalStabilitySanitizer.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [compiler-rt] [llvm] Add numerical sanitizer (PR #85916)

2024-03-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,2261 @@ +//===-- NumericalStabilitySanitizer.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [compiler-rt] [llvm] Add numerical sanitizer (PR #85916)

2024-03-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,2261 @@ +//===-- NumericalStabilitySanitizer.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [compiler-rt] [llvm] Add numerical sanitizer (PR #85916)

2024-03-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,2261 @@ +//===-- NumericalStabilitySanitizer.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [compiler-rt] [llvm] Add numerical sanitizer (PR #85916)

2024-03-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,2261 @@ +//===-- NumericalStabilitySanitizer.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [compiler-rt] [llvm] Add numerical sanitizer (PR #85916)

2024-03-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,2261 @@ +//===-- NumericalStabilitySanitizer.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [compiler-rt] [llvm] Add numerical sanitizer (PR #85916)

2024-03-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,2261 @@ +//===-- NumericalStabilitySanitizer.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [compiler-rt] [llvm] Add numerical sanitizer (PR #85916)

2024-03-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,2261 @@ +//===-- NumericalStabilitySanitizer.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [compiler-rt] [llvm] Add numerical sanitizer (PR #85916)

2024-03-21 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,2261 @@ +//===-- NumericalStabilitySanitizer.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-21 Thread Simon Pilgrim via cfe-commits
@@ -207,6 +207,8 @@ _mm256_div_ps(__m256 __a, __m256 __b) /// Compares two 256-bit vectors of [4 x double] and returns the greater ///of each pair of values. /// +///If either value in a comparison is NaN, returns the value from \a __b. RKSimon wrote:

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-21 Thread Matt Arsenault via cfe-commits
@@ -700,10 +700,13 @@ class MSBuiltin { //===--- Variable Argument Handling Intrinsics ===// // -def int_vastart : DefaultAttrsIntrinsic<[], [llvm_ptr_ty], [], "llvm.va_start">; -def int_vacopy : DefaultAttrsIntrinsic<[], [llvm_ptr_ty,

[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

2024-03-21 Thread Matt Arsenault via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -1295,11 +1295,13 @@ double4 trunc(double4); /// true, across all active lanes in the

[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

2024-03-21 Thread Matt Arsenault via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -1295,11 +1295,13 @@ double4 trunc(double4); /// true, across all active lanes in the

[clang] b433076 - [clang][CodeGen] Allow `memcpy` replace with trivial auto var init

2024-03-21 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2024-03-21T09:55:04+01:00 New Revision: b433076fcbacba8a3b91446390bbea5843322bcd URL: https://github.com/llvm/llvm-project/commit/b433076fcbacba8a3b91446390bbea5843322bcd DIFF:

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-21 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto closed https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-21 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/84230 >From b433076fcbacba8a3b91446390bbea5843322bcd Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Thu, 7 Mar 2024 07:49:40 +0100 Subject: [PATCH] [clang][CodeGen] Allow `memcpy` replace with trivial

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-21 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/84230 >From bfc29a350458e9b8d20d7398595c3f36503e2d72 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Thu, 7 Mar 2024 07:49:40 +0100 Subject: [PATCH] [clang][CodeGen] Allow `memcpy` replace with trivial

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -1217,6 +1231,11 @@ void StreamChecker::evalGetdelim(const FnDescription *Desc, E.isStreamEof() ? ErrorFEof : ErrorFEof | ErrorFError; StateFailed = E.setStreamState( StateFailed, StreamState::getOpened(Desc, NewES, !NewES.isFEof())); + // On failure, the

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -1204,6 +1204,20 @@ void StreamChecker::evalGetdelim(const FnDescription *Desc, State->BindExpr(E.CE, C.getLocationContext(), RetVal); StateNotFailed = E.assumeBinOpNN(StateNotFailed, BO_GE, RetVal, E.getZeroVal(Call)); +// The buffer size `*n` must

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource commented: Applied the feedback. By the way, when `StdLibraryFunctionsChecker` is refactored, I'd be happy to give a hand if you need updating these checkers (UnixAPI and Stream). https://github.com/llvm/llvm-project/pull/83027

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/83027 From a061464b75ac02c21e5d74fc4dff8d8afdbba66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 20 Mar 2024 10:49:08 +0100 Subject: [PATCH 01/20]

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -1204,6 +1204,20 @@ void StreamChecker::evalGetdelim(const FnDescription *Desc, State->BindExpr(E.CE, C.getLocationContext(), RetVal); StateNotFailed = E.assumeBinOpNN(StateNotFailed, BO_GE, RetVal, E.getZeroVal(Call)); +// The buffer size `*n` must

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -1179,6 +1195,113 @@ void StreamChecker::evalUngetc(const FnDescription *Desc, const CallEvent , C.addTransition(StateFailed); } +ProgramStateRef StreamChecker::ensureGetdelimBufferAndSizeCorrect( +SVal LinePtrPtrSVal, SVal SizePtrSVal, const Expr *LinePtrPtrExpr, +

[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

2024-03-21 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -1204,6 +1204,20 @@ void StreamChecker::evalGetdelim(const FnDescription *Desc, State->BindExpr(E.CE, C.getLocationContext(), RetVal); StateNotFailed = E.assumeBinOpNN(StateNotFailed, BO_GE, RetVal, E.getZeroVal(Call)); +// The buffer size `*n` must

[clang] a29e9e3 - [clang-format] Add --fail-on-incomplete-format. (#84346)

2024-03-21 Thread via cfe-commits
Author: Roberto Bampi Date: 2024-03-21T01:29:25-07:00 New Revision: a29e9e32c50273abffc53e3700bbc23985f0a7af URL: https://github.com/llvm/llvm-project/commit/a29e9e32c50273abffc53e3700bbc23985f0a7af DIFF: https://github.com/llvm/llvm-project/commit/a29e9e32c50273abffc53e3700bbc23985f0a7af.diff

[clang] [clang][RISCV] Enable RVV with function attribute __attribute__((target("arch=+v"))) (PR #83674)

2024-03-21 Thread Luke Lau via cfe-commits
@@ -8927,8 +8927,13 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { } } - if (T->isRVVSizelessBuiltinType()) -checkRVVTypeSupport(T, NewVD->getLocation(), cast(CurContext)); + if (T->isRVVSizelessBuiltinType() && isa(CurContext)) { +const

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-21 Thread via cfe-commits
github-actions[bot] wrote: @gigaroby Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

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

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-21 Thread Heejin Ahn via cfe-commits
aheejin wrote: @yamt Given that this PR is not large and we already went through it anyway, nevermind what I said about rebasing, and please use whatever method you are convenient with. But just FYI you can do `git merge` to avoid rebasing (I'm not asking you to do it here; just in case you

[clang] [llvm] [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0` (PR #82404)

2024-03-21 Thread Craig Topper via cfe-commits
topperc wrote: > > Apart from the correctness issues, we've seen some regressions on various > > benchmarks from LLVM Test Suite after this patch. Specifically, around 3-5% > > regression on x86-64 in various metrics of the > >

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

2024-03-21 Thread Piyou Chen via cfe-commits
BeMg wrote: The proposal can be found at the https://github.com/riscv-non-isa/riscv-c-api-doc/pull/48. https://github.com/llvm/llvm-project/pull/85786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Piyou Chen (BeMg) Changes This patch enable the function multiversion(FMV) and `target_clones` attribute for RISC-V target. It will emit the IFUNC resolver function to select appropriate function during runtime. --- Patch is

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

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

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

2024-03-21 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786 >From 239b404203c66ab5336ffdfb45969a50c439a1c0 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Tue, 19 Mar 2024 06:22:17 -0700 Subject: [PATCH 1/2] [RISCV][FMV] Support target_clones ---

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-21 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > because we don't yet support non-zero initialization (as described in commit > [5955a0f](https://github.com/llvm/llvm-project/commit/5955a0f9375a8c0b134eeb4a8de5155dcce7c94f)) I'm confused. We support non-zero init, and there are tests for non-zero init in that commit.

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Kai Luo via cfe-commits
@@ -329,6 +329,12 @@ def FeatureAIXLocalExecTLS : "Produce a TOC-free local-exec TLS sequence for this function " "for 64-bit AIX">; +def FeatureAIXSharedLibraryTLSModelHeuristic : +

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-03-21 Thread Abhin P Jose via cfe-commits
Abhinkop wrote: > I believe this patch is causing some issues on two PPC bots. Would you be > able to help take a look? > https://lab.llvm.org/buildbot/#/builders/57/builds/33601/steps/5/logs/stdio > https://lab.llvm.org/buildbot/#/builders/36/builds/43759/steps/12/logs/stdio I guess adding

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Kai Luo via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Kai Luo via cfe-commits
@@ -3369,6 +3369,48 @@ SDValue PPCTargetLowering::LowerGlobalTLSAddressAIX(SDValue Op, bool Is64Bit = Subtarget.isPPC64(); bool HasAIXSmallLocalExecTLS = Subtarget.hasAIXSmallLocalExecTLS(); TLSModel::Model Model = getTargetMachine().getTLSModel(GV); + // Initialize

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-21 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/84346 >From e19f49ca2660cbcd64fb81aae0428e899d61cac6 Mon Sep 17 00:00:00 2001 From: Roberto Bampi Date: Thu, 7 Mar 2024 18:10:56 +0100 Subject: [PATCH 1/3] [clang-format] Add --fail-on-incomplete-format. At the moment

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-21 Thread Kees Cook via cfe-commits
https://github.com/kees updated https://github.com/llvm/llvm-project/pull/84428 >From eb5138b45fa450737600050ad8dabdcb27513d42 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Thu, 7 Mar 2024 17:03:09 -0800 Subject: [PATCH 1/6] [Clang][Sema]: Allow flexible arrays in unions and alone in structs

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-21 Thread Kees Cook via cfe-commits
kees wrote: > `InitListChecker::CheckStructUnionTypes` never calls > `StructuredList->setInitializedFieldInUnion` Ah-ha, thank you for the pointer. I think I've figured this out: initialization was avoiding flexible arrays because we don't yet support non-zero initialization (as described in

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

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

[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

2024-03-21 Thread Owen Pan via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: cat %s | not clang-format --fail-on-incomplete-format | FileCheck %s +// RUN: cat %s | clang-format | FileCheck %s +int a([) {} + +// CHECK: int a([) {} owenca wrote: > Done. It took me quite a while but `-style=LLVM` is also required as

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-03-21 Thread Kai Luo via cfe-commits
@@ -80,6 +80,7 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo { bool IsISA3_0 = false; bool IsISA3_1 = false; bool HasQuadwordAtomics = false; + bool HasAIXShLibTLSModelHeuristic = false; bzEq wrote: This looks redundant. Frontend

[clang] [llvm] [InstCombine] Canonicalize `(sitofp x)` -> `(uitofp x)` if `x >= 0` (PR #82404)

2024-03-21 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > Apart from the correctness issues, we've seen some regressions on various > benchmarks from LLVM Test Suite after this patch. Specifically, around 3-5% > regression on x86-64 in various metrics of the >

<    1   2   3   4