[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 > > [Interpolation](https://github.com/llvm/llvm-test-suite/tree/main/

[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 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] [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 build

[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 FunctionD

[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][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 &Call, C.addTransition(StateFailed); } +ProgramStateRef StreamChecker::ensureGetdelimBufferAndSizeCorrect( +SVal LinePtrPtrSVal, SVal SizePtrSVal, const Expr *LinePtrPtrExp

[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 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
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
@@ -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
@@ -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 con

[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][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 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] 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: https://github.com/llvm/llvm-project/commit/b433076fcbacba8a3b91446390bbea5843322bcd.d

[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 cur

[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 cur

[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, llvm_ptr_t

[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] [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: A

[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: A

[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: A

[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: A

[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: A

[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: A

[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: A

[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: A

[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: A

[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] [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 -print-library-module-man

[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 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: https://github.com/llvm/llvm-project/

[clang] [llvm] [AsmPrinter,X86] Hard code AT&T 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] 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: https://github.com/llvm/llvm-project/commit/2699072b4bc8d8d5e84eb66af38face73ceeb4d3.dif

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

2024-03-21 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 closed 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] move -Wcast-function-type under -Wextra (PR #77178)

2024-03-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I'm confused as to how this code ever compiled in the first place... In each case, this is C++ code that's failing: ``` /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_posix_lib

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-03-21 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-03-21 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-21 Thread Abhin P Jose via cfe-commits
Abhinkop wrote: > I'm confused as to how this code ever compiled in the first place... In each > case, this is C++ code that's failing: > > ``` > /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_po

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

2024-03-21 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM 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] 49b5208 - [X86][Headers] Specify result of NaN comparisons (#85862)

2024-03-21 Thread via cfe-commits
Author: Paul T Robinson Date: 2024-03-21T09:09:34-04:00 New Revision: 49b520856967c2354339d3c2a05fcf1d2d637f30 URL: https://github.com/llvm/llvm-project/commit/49b520856967c2354339d3c2a05fcf1d2d637f30 DIFF: https://github.com/llvm/llvm-project/commit/49b520856967c2354339d3c2a05fcf1d2d637f30.dif

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

2024-03-21 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 closed https://github.com/llvm/llvm-project/pull/85862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-21 Thread Amy Kwan via cfe-commits
amy-kwan wrote: > I'm confused as to how this code ever compiled in the first place... In each > case, this is C++ code that's failing: > > ``` > /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_po

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

2024-03-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > I'm confused as to how this code ever compiled in the first place... In > > each case, this is C++ code that's failing: > > ``` > > /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/compiler-rt/lib/sanitizer_common/san

[clang] [clang-repl] Fix Value for platforms where unqualified char is unsigned (PR #86118)

2024-03-21 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail created https://github.com/llvm/llvm-project/pull/86118 Signedness of unqualified `char` is unspecified and varies between platforms. This patch adds `Char_U` in `REPL_BUILTIN_TYPES` to account for platforms that default to `unsigned char`. From e0cdd176e35d0

[clang] [clang-repl] Fix Value for platforms where unqualified char is unsigned (PR #86118)

2024-03-21 Thread via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Stefan Gränitz (weliveindetail) Changes Signedness of unqualified `char` is unspecified and varies between platforms. This patch adds `Char_U` in `REPL_BUI

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

2024-03-21 Thread Abhin P Jose via cfe-commits
Abhinkop wrote: > > > I'm confused as to how this code ever compiled in the first place... In > > > each case, this is C++ code that's failing: > > > ``` > > > /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/compiler-rt/lib/sanitizer_common

[clang] [clang-repl] Fix Value for platforms where unqualified char is unsigned (PR #86118)

2024-03-21 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: https://github.com/vgvassilev approved this pull request. Good catch! Thank you, @weliveindetail! https://github.com/llvm/llvm-project/pull/86118 ___ cfe-comm

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-21 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/84461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Yeah, I was hoping to avoid having to introduce another diagnostic group, but I think that's going to be the best way forward. I've got a patch in progress to add `-Wcast-function-type-mismatch` so we end up with: ``` -Wcast-function-type |- -Wcast-function-type-mismatch |-

[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)

2024-03-21 Thread Mark de Wever via cfe-commits
@@ -1386,9 +1386,19 @@ inline _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) apply(_Fn&& __f, _Tuple&& std::forward<_Tuple>(__t), typename __make_tuple_indices>>::type{})) +#if _LIBCPP_STD_VER >= 20 template inline _LIBCPP_HIDE_FROM_ABI constexpr _Tp __mak

[clang] a11d9b4 - Disable driver tests on macosx that are currently disabled on darwin (#85990)

2024-03-21 Thread via cfe-commits
Author: Akira Hatanaka Date: 2024-03-21T07:10:42-07:00 New Revision: a11d9b463966d31ecedb373115abdcca54f704c3 URL: https://github.com/llvm/llvm-project/commit/a11d9b463966d31ecedb373115abdcca54f704c3 DIFF: https://github.com/llvm/llvm-project/commit/a11d9b463966d31ecedb373115abdcca54f704c3.diff

[clang] Disable driver tests on macosx that are currently disabled on darwin (PR #85990)

2024-03-21 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/85990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Factor out CreateJITBuilder() and allow specialization in derived classes (PR #84461)

2024-03-21 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/84461 From fae2f46d25650b8480f9d3135f33a0d6532f43ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Thu, 7 Mar 2024 23:04:22 +0100 Subject: [PATCH] [clang-repl] Add CreateJITBuilder() for

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

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

2024-03-21 Thread via cfe-commits
Author: Mark de Wever Date: 2024-03-21T15:11:45+01:00 New Revision: 2152094a45af98c9ccfef6d5913f38c66ab8b165 URL: https://github.com/llvm/llvm-project/commit/2152094a45af98c9ccfef6d5913f38c66ab8b165 DIFF: https://github.com/llvm/llvm-project/commit/2152094a45af98c9ccfef6d5913f38c66ab8b165.diff

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-21 Thread Xiang Li via cfe-commits
@@ -0,0 +1,258 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-21 Thread Xiang Li via cfe-commits
@@ -0,0 +1,258 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-21 Thread Xiang Li via cfe-commits
@@ -0,0 +1,258 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)

2024-03-21 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/85263 >From fc8c1a24f09c8860269fbdcfb0b285ffd19f427c Mon Sep 17 00:00:00 2001 From: yronglin Date: Fri, 15 Mar 2024 00:48:08 +0800 Subject: [PATCH 1/9] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the e

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm created https://github.com/llvm/llvm-project/pull/86122 Clang's current behavior is to ignore the trailing qualifiers, but the [grammar](https://eel.is/c++draft/namespace.alias#nt:namespace-alias-definition) for `namespace-alias-definition` requires an `identifier` wi

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
@@ -268,6 +268,8 @@ def err_expected_semi_after_namespace_name : Error< "expected ';' after namespace name">; def err_unexpected_namespace_attributes_alias : Error< "attributes cannot be specified on namespace alias">; +def err_unexpected_qualified_namespace_alias : Error<

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. Thanks for contributing! This needs a release note (in `clang/docs/ReleaseNotes.rst`) and some changes to the diagnostics, but other than that it looks fine to me. https://github.com/llvm/llvm-project/pull/86122 __

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
@@ -140,6 +140,11 @@ Parser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SkipUntil(tok::semi); return nullptr; } +if (!ExtraNSs.empty()) { + Diag(IdentLoc, diag::err_unexpected_qualified_namespace_alias); Sirraide

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/86122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread Daniel M. Katz via cfe-commits
@@ -268,6 +268,8 @@ def err_expected_semi_after_namespace_name : Error< "expected ';' after namespace name">; def err_unexpected_namespace_attributes_alias : Error< "attributes cannot be specified on namespace alias">; +def err_unexpected_qualified_namespace_alias : Error<

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

2024-03-21 Thread Mark de Wever via cfe-commits
https://github.com/mordante closed 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] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
@@ -140,6 +140,11 @@ Parser::DeclGroupPtrTy Parser::ParseNamespace(DeclaratorContext Context, SkipUntil(tok::semi); return nullptr; } +if (!ExtraNSs.empty()) { + Diag(IdentLoc, diag::err_unexpected_qualified_namespace_alias); Sirraide

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

2024-03-21 Thread Mark de Wever via cfe-commits
mordante wrote: Thanks! 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] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel M. Katz (katzdm) Changes Clang's current behavior is to ignore the trailing qualifiers, but the [grammar](https://eel.is/c++draft/namespace.alias#nt:namespace-alias-definition) for `namespace-alias-definition` requires an `identifi

[clang] Raise an error on namespace aliases with qualified names. (PR #86122)

2024-03-21 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/86122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Don't drop weak_import from a declaration that follows a declaration directly contained in a linkage-specification (PR #85886)

2024-03-21 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/85886 >From d39667c7e65c10babb478d8f8d54fecb66d90568 Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Tue, 19 Mar 2024 15:50:00 -0700 Subject: [PATCH] [Sema] Don't drop weak_import from a declaration that follows

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

2024-03-21 Thread YAMAMOTO Takashi via cfe-commits
yamt 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 y

[clang] [clang][AST][NFC] Add '[[fallthrough]]' to cases fall through (PR #85921)

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

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-21 Thread Simon Pilgrim via cfe-commits
Pol Marcet =?utf-8?q?Sard=C3=A0?= , Pol Marcet =?utf-8?q?Sard=C3=A0?= ,Pol M Message-ID: In-Reply-To: RKSimon wrote: @Destroyerrrocket reverse-ping - are you still working on this? https://github.com/llvm/llvm-project/pull/76615 ___ cfe-commits mai

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/86129 Fixes: #85243. >From 4e0845a143a820d4a68ffbdced206654c7593359 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 15 Mar 2024 08:07:47 +0800 Subject: [PATCH] [clang-tidy] add new check readability-enum-i

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes Fixes: #85243. --- Full diff: https://github.com/llvm/llvm-project/pull/86129.diff 9 Files Affected: - (modified) clang-tools-extra/clang-tidy/readability/CMakeLists.txt (+1) - (added) clang-too

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 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 ffe41819e58365dfbe85a22556c0d9d284e746b9 4e0845a143a820d4a68ffbdced206654c7593359 --

[clang] [clang][AST][NFC] Add '[[fallthrough]]' to cases fall through (PR #85921)

2024-03-21 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Is this addressing a diagnostic you're seeing in the wild? This shouldn't be necessary because the `case` statements are adjacent to one another with only comments/whitespace between them: https://godbolt.org/z/oM7x65hq9 (I'd like to understand the mo

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

2024-03-21 Thread Balázs Kéri via cfe-commits
@@ -376,3 +377,122 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void getline_null_file() { + char *buffer = NULL; + size_t n = 0; + getline(&buffer, &n, NULL); // expected-warning {{Stream pointer might be NULL}} +} + +void getdelim_null_file() { + ch

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

2024-03-21 Thread Balázs Kéri via cfe-commits
@@ -376,3 +377,122 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void getline_null_file() { + char *buffer = NULL; + size_t n = 0; + getline(&buffer, &n, NULL); // expected-warning {{Stream pointer might be NULL}} +} + +void getdelim_null_file() { + ch

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-21 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/86131 We want to add -Wcast-function-type to -Wextra (as done in 1de7e6c8cba27296f3fc16d107822ea0ee856759), but we do not want to add -Wcast-function-type-strict in at the same time (https://lab.llvm.org/buildbo

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: CC @Abhinkop https://github.com/llvm/llvm-project/pull/86131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2024-03-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes We want to add -Wcast-function-type to -Wextra (as done in 1de7e6c8cba27296f3fc16d107822ea0ee856759), but we do not want to add -Wcast-function-type-strict in at the same time (https://lab.llvm.org/bu

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

2024-03-21 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I've put up a PR for review at https://github.com/llvm/llvm-project/pull/86131 https://github.com/llvm/llvm-project/pull/77178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

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

2024-03-21 Thread Balázs Kéri via cfe-commits
@@ -376,3 +377,122 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void getline_null_file() { + char *buffer = NULL; + size_t n = 0; + getline(&buffer, &n, NULL); // expected-warning {{Stream pointer might be NULL}} +} + +void getdelim_null_file() { + ch

[clang] [llvm] [ValueTracking] Convert `isKnownNonZero` to use SimplifyQuery (PR #85863)

2024-03-21 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/85863 >From bacdc24af088560a986028824a0ac43e929c2f1b Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Thu, 21 Mar 2024 21:10:46 +0800 Subject: [PATCH 1/2] [ValueTracking] Add pre-commit tests. NFC. --- llvm/test/Tr

[clang-tools-extra] [clang-tidy] add new check readability-enum-initial-value (PR #86129)

2024-03-21 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/86129 >From 4e0845a143a820d4a68ffbdced206654c7593359 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 15 Mar 2024 08:07:47 +0800 Subject: [PATCH 1/2] [clang-tidy] add new check readability-enum-initial-value

[clang] [llvm] Update documentation and release notes for llvm-profgen COFF support (PR #84864)

2024-03-21 Thread Wei Xiao via cfe-commits
https://github.com/williamweixiao approved this pull request. https://github.com/llvm/llvm-project/pull/84864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Update documentation and release notes for llvm-profgen COFF support (PR #84864)

2024-03-21 Thread Wei Xiao via cfe-commits
williamweixiao wrote: please resolve the conflicts. https://github.com/llvm/llvm-project/pull/84864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)

2024-03-21 Thread via cfe-commits
@@ -1386,9 +1386,19 @@ inline _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) apply(_Fn&& __f, _Tuple&& std::forward<_Tuple>(__t), typename __make_tuple_indices>>::type{})) +#if _LIBCPP_STD_VER >= 20 template inline _LIBCPP_HIDE_FROM_ABI constexpr _Tp __mak

[clang] [llvm] [ValueTracking] Convert `isKnownNonZero` to use SimplifyQuery (PR #85863)

2024-03-21 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > Can you please fix the clang build? Done. https://github.com/llvm/llvm-project/pull/85863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)

2024-03-21 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/85263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)

2024-03-21 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/85263 >From fc8c1a24f09c8860269fbdcfb0b285ffd19f427c Mon Sep 17 00:00:00 2001 From: yronglin Date: Fri, 15 Mar 2024 00:48:08 +0800 Subject: [PATCH 01/10] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the

[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: > > 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 com

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

2024-03-21 Thread Balázs Kéri via cfe-commits
@@ -376,3 +377,122 @@ void fflush_on_open_failed_stream(void) { } fclose(F); } + +void getline_null_file() { + char *buffer = NULL; + size_t n = 0; + getline(&buffer, &n, NULL); // expected-warning {{Stream pointer might be NULL}} +} + +void getdelim_null_file() { + ch

[clang] [clang][AST][NFC] Add '[[fallthrough]]' to cases fall through (PR #85921)

2024-03-21 Thread via cfe-commits
Sirraide wrote: E.g: https://github.com/llvm/llvm-project/blob/50801f1095d33e712c3a51fdeef82569bd09007f/clang/lib/Interpreter/IncrementalParser.cpp#L141-L151 https://github.com/llvm/llvm-project/pull/85921 ___ cfe-commits mailing list cfe-commits@lists

[clang] [llvm] [Clang][OpenMP] Port clang codegen code for openmp porject (PR #85795)

2024-03-21 Thread via cfe-commits
https://github.com/TSWorld1314 updated https://github.com/llvm/llvm-project/pull/85795 >From c44d8c1c7986fad6370273aca55e2db99d47387a Mon Sep 17 00:00:00 2001 From: "Harrison,Hao" Date: Tue, 19 Mar 2024 13:18:07 + Subject: [PATCH 1/2] [Clang][OpenMP] Port clang codegen code for GPU First p

  1   2   3   4   >