[clang] Introduce paged vector (PR #66430)

2023-09-18 Thread Giulio Eulisse via cfe-commits
@@ -0,0 +1,322 @@ +//===- llvm/ADT/PagedVector.h - 'Lazyly allocated' vectors *- C++ +//-*-===// +// +// 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] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/66481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,128 @@ +//===- TaggedUnionModeling.h -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: This is my first round of review. So far it looks good. I didn't have much time, but that's all I had. I think it would make sense to have tests for variants containing variants and playing with the active members. That would be interesting to see. https:

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Balazs Benics via cfe-commits
@@ -318,6 +318,10 @@ def C11LockChecker : Checker<"C11Lock">, Dependencies<[PthreadLockBase]>, Documentation; +def StdVariantChecker : Checker<"StdVariant">, + HelpText<"Check wether we access the right type stored in std::variant">, steakhal wrote: Plea

[clang] [Clang][test] Replace legacy -target with --target=. (PR #66572)

2023-09-18 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk closed https://github.com/llvm/llvm-project/pull/66572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9ea083f - [Clang][test] Replace legacy -target with --target=. (#66572)

2023-09-18 Thread via cfe-commits
Author: Yeting Kuo Date: 2023-09-18T15:35:57+08:00 New Revision: 9ea083f2d4049d398c00b9a6de1e95979ec2c157 URL: https://github.com/llvm/llvm-project/commit/9ea083f2d4049d398c00b9a6de1e95979ec2c157 DIFF: https://github.com/llvm/llvm-project/commit/9ea083f2d4049d398c00b9a6de1e95979ec2c157.diff LO

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Guillaume Chatelet via cfe-commits
https://github.com/gchatelet updated https://github.com/llvm/llvm-project/pull/66504 >From f1427a81c4a3425c1a574316fc26d2c74297b34b Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Fri, 15 Sep 2023 12:34:17 + Subject: [PATCH 1/2] [clang-tidy] Update llvmlibc-implementation-in-namespa

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/65918 >From cfedbe3fb2f2f331b3f9ee1f4f3e2fcd348797e2 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 11 Sep 2023 09:15:41 +0800 Subject: [PATCH 1/5] [Sema] add cast from IncompleteArrayType to ConstantArray

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-18 Thread James Henderson via cfe-commits
@@ -5,16 +5,22 @@ # RUN: mkdir %t # RUN: ln -s llvm-ar %t/llvm-ar-9 # RUN: ln -s llvm-ar %t/ar.exe +# RUN: ln -s llvm-ar %t/x86_64-portbld-freebsd13.2-llvm-ar +# RUN: ln -s llvm-ar %t/x86_64-portbld-freebsd13.2-llvm-ar.exe # RUN: ln -s llvm-ar %t/arm-pokymllib32-linux-gnueabi-

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-18 Thread James Henderson via cfe-commits
@@ -390,6 +390,21 @@ StringRef stem(StringRef path, Style style = Style::native); /// @result The extension of \a path. StringRef extension(StringRef path, Style style = Style::native); +/// Get the program's name +/// +/// If the path ends with the string .exe, returns the s

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-18 Thread James Henderson via cfe-commits
@@ -600,6 +600,14 @@ StringRef extension(StringRef path, Style style) { return fname.substr(pos); } +StringRef program_name(StringRef path, Style style) { + // In the future this may need to be extended to other + // program suffixes. jh7370 wrote: Unnece

[clang] Support target names with dots in more utilities (PR #65812)

2023-09-18 Thread James Henderson via cfe-commits
@@ -1696,6 +1696,38 @@ TEST(Support, ReplacePathPrefix) { EXPECT_EQ(Path, "C:\\old/foo\\bar"); } +TEST(Support, FindProgramName) { + StringRef WindowsProgName = + path::program_name("C:\\Test\\foo.exe", path::Style::windows); + EXPECT_EQ(WindowsProgName, "foo"); + +

[PATCH] D154262: [clang][Interp] LambdaThisCaptures

2023-09-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154262/new/ https://reviews.llvm.org/D154262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D154581: [clang][Interp] Track existing InitMaps in InterpState

2023-09-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154581/new/ https://reviews.llvm.org/D154581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D156453: [clang][Interp] Create only globals when initializing a global variable

2023-09-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156453/new/ https://reviews.llvm.org/D156453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}. (PR #65756)

2023-09-18 Thread Yeting Kuo via cfe-commits
https://github.com/yetingk updated https://github.com/llvm/llvm-project/pull/65756 >From 391711dd39e2ee2e8f5d3dac6f466649238f4517 Mon Sep 17 00:00:00 2001 From: Yeting Kuo Date: Fri, 8 Sep 2023 19:46:03 +0800 Subject: [PATCH] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}.

[PATCH] D157252: [clang][ExprConst] Handle 0 type size in builtin_memcpy etc.

2023-09-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157252/new/ https://reviews.llvm.org/D157252 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D158516: [clang][Interp] Only lazily visit constant globals

2023-09-18 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158516/new/ https://reviews.llvm.org/D158516 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}. (PR #65756)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes RISC-V C API introduced predefined macro to achieve hints about unaligned accesses ([pr]). This patch defines __riscv_misaligned_fast when using -mno-strict-align, otherwise, defines __riscv_misaligned_avoid. Note: This ignores __riscv_mi

[clang] [RISCV] Support predefined marcro __riscv_misaligned_{fast,avoid}. (PR #65756)

2023-09-18 Thread Yeting Kuo via cfe-commits
@@ -1220,3 +1220,15 @@ // RUN: -march=rv64i_zve32x_zvkt1p0 -x c -E -dM %s \ // RUN: -o - | FileCheck --check-prefix=CHECK-ZVKT-EXT %s // CHECK-ZVKT-EXT: __riscv_zvkt 100{{$}} + +// RUN: %clang -target riscv32-unknown-linux-gnu -march=rv32i -x c -E -dM %s \

[clang] 75b76c4 - [clang-transformer] Allow stencils to read from system headers. (#66480)

2023-09-18 Thread via cfe-commits
Author: Clement Courbet Date: 2023-09-18T10:07:30+02:00 New Revision: 75b76c4b477e98b5e74f986f18acc04b4ada URL: https://github.com/llvm/llvm-project/commit/75b76c4b477e98b5e74f986f18acc04b4ada DIFF: https://github.com/llvm/llvm-project/commit/75b76c4b477e98b5e74f986f18acc04b4ada.dif

[clang] [clang-transformer] Allow stencils to read from system headers. (PR #66480)

2023-09-18 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle closed https://github.com/llvm/llvm-project/pull/66480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D159292: [driver] Conditionally include installed libc++ headers for Android

2023-09-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159292/new/ https://reviews.llvm.org/D159292 ___

[PATCH] D158476: [driver] Search for compatible Android runtime directories

2023-09-18 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158476/new/ https://reviews.llvm.org/D158476 ___

[PATCH] D158156: [analyzer] Add C++ array delete checker

2023-09-18 Thread Discookie via Phabricator via cfe-commits
Discookie updated this revision to Diff 556933. Discookie added a comment. Updated the visitor to track all conversions, and have type names for clarity. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158156/new/ https://reviews.llvm.org/D158156 Files: clang/docs/analyzer/checkers.rst

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Guillaume Chatelet via cfe-commits
gchatelet wrote: > Should this change be reflected in the Release Notes? Where would that be? `clang-tools-extra/docs/ReleaseNotes.rst`? I can't find what the current release notes look like for head. https://github.com/llvm/llvm-project/pull/66504 __

[PATCH] D158472: [clang][Diagnostics] Emit fix-it hint separately on overload resolution failure

2023-09-18 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet abandoned this revision. hazohelet added a comment. In D158472#4645378 , @aaron.ballman wrote: > In D158472#4605228 , @hazohelet > wrote: > >> This breaks the one-note-for-one-overload-candidate rule o

[PATCH] D157615: [ExtendLifetimes][1/4] Add "disable-post-ra" function attribute to disable the post-regalloc scheduler

2023-09-18 Thread Stephen Tozer via Phabricator via cfe-commits
StephenTozer added a comment. In D157615#4646848 , @dblaikie wrote: > Might be worth rewording the commit, or splitting it - I'd say the > introduction of `optdebug` should be the noteworthier part of this patch (or > whichever patch introduces it) - s

[PATCH] D158156: [analyzer] Add C++ array delete checker

2023-09-18 Thread Discookie via Phabricator via cfe-commits
Discookie marked 12 inline comments as done. Discookie added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CXXDeleteChecker.cpp:192 + + const Stmt *S = N->getStmtForDiagnostics(); + if (!S) steakhal wrote: > Discookie wrote: > > steakhal wrote:

[clang] [clang][Sema] Stop format size estimator upon %p to adapt to linux kernel's extension (PR #65969)

2023-09-18 Thread Takuya Shimizu via cfe-commits
https://github.com/hazohelet updated https://github.com/llvm/llvm-project/pull/65969 >From 5ee1a4f83c69b5e2910ea883dca7f0fa2c1a4bd3 Mon Sep 17 00:00:00 2001 From: Takuya Shimizu Date: Wed, 13 Sep 2023 17:43:11 +0900 Subject: [PATCH 1/4] [clang][Diagnostics] Separate Wformat-overflow and Wforma

[PATCH] D158156: [analyzer] Add C++ array delete checker

2023-09-18 Thread Discookie via Phabricator via cfe-commits
Discookie marked 6 inline comments as done. Discookie added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CXXDeleteChecker.cpp:220 N->getLocationContext()); - return std::make_shared(Pos, OS.str(), true); + return std::make_shared(

[clang] 03be486 - [clang][dataflow] Model the fields that are accessed via inline accessors (#66368)

2023-09-18 Thread via cfe-commits
Author: Kinuko Yasuda Date: 2023-09-18T10:46:36+02:00 New Revision: 03be486ecc256638a94243de8260a95e1b25bca4 URL: https://github.com/llvm/llvm-project/commit/03be486ecc256638a94243de8260a95e1b25bca4 DIFF: https://github.com/llvm/llvm-project/commit/03be486ecc256638a94243de8260a95e1b25bca4.diff

[clang] [clang][dataflow] Model the fields that are accessed via inline accessors (PR #66368)

2023-09-18 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/66368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][NVPTX] Add a warning that device debug info does not work with optimizations (PR #65327)

2023-09-18 Thread Georgi Mirazchiyski via cfe-commits
GeorgeWeb wrote: @Artem-B Hi, sorry for the direct ping. I was just wondering if it's okay to take a quick look at this patch. (Didn't know how to ping folks subscribed to clang-driver). Thanks! 🙏 https://github.com/llvm/llvm-project/pull/65327 ___

[clang] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -4532,6 +4532,15 @@ static void TryReferenceListInitialization(Sema &S, if (T1Quals.hasAddressSpace()) Sequence.AddQualificationConversionStep( cv1T1, DestType->isRValueReferenceType() ? VK_XValue : VK_LValue); + else if (S.getLangOpts().CPlusP

[clang-tools-extra] [Sema] add cast from IncompleteArrayType to ConstantArrayType in TryReferenceListInitialization (PR #65918)

2023-09-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -4532,6 +4532,15 @@ static void TryReferenceListInitialization(Sema &S, if (T1Quals.hasAddressSpace()) Sequence.AddQualificationConversionStep( cv1T1, DestType->isRValueReferenceType() ? VK_XValue : VK_LValue); + else if (S.getLangOpts().CPlusP

[clang] 52a55a7 - [clang][Interp] Allow zero-init of primitives with an empty init list

2023-09-18 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-09-18T11:09:30+02:00 New Revision: 52a55a7178381c7ac2b46155f2cc000dac48f2d4 URL: https://github.com/llvm/llvm-project/commit/52a55a7178381c7ac2b46155f2cc000dac48f2d4 DIFF: https://github.com/llvm/llvm-project/commit/52a55a7178381c7ac2b46155f2cc000dac48f2d4.diff LO

[PATCH] D158595: [clang][Interp] Allow zero-init of primitives with an empty init list

2023-09-18 Thread Timm Bäder via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG52a55a717838: [clang][Interp] Allow zero-init of primitives with an empty init list (authored by tbaeder). Repository: rG LLVM Github Monorepo CH

[clang] b2cd9db - [clang][Sema] Remove irrelevant diagnostics from constraint satisfaction failure

2023-09-18 Thread Takuya Shimizu via cfe-commits
Author: Takuya Shimizu Date: 2023-09-18T18:14:44+09:00 New Revision: b2cd9db589335d5885c04df83003a623cf2f05ff URL: https://github.com/llvm/llvm-project/commit/b2cd9db589335d5885c04df83003a623cf2f05ff DIFF: https://github.com/llvm/llvm-project/commit/b2cd9db589335d5885c04df83003a623cf2f05ff.diff

[PATCH] D157526: [clang][Sema] Remove irrelevant diagnostics from constraint satisfaction failure

2023-09-18 Thread Takuya Shimizu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb2cd9db58933: [clang][Sema] Remove irrelevant diagnostics from constraint satisfaction failure (authored by hazohelet). Changed prior to commit: h

[clang-tools-extra] [clang-tidy] Update llvmlibc-implementation-in-namespace to new rules (PR #66504)

2023-09-18 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: > Where would that be? `clang-tools-extra/docs/ReleaseNotes.rst`? I can't find > what the current release notes look like for head. Yes, it's deployed here: https://clang.llvm.org/extra/ReleaseNotes.html https://github.com/llvm/llvm-project/pull/66504

[clang] [analyzer] Do not use APInt methods on _BitInt() Types (PR #65887)

2023-09-18 Thread via cfe-commits
https://github.com/vabridgers resolved https://github.com/llvm/llvm-project/pull/65887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [C23] Fix crash with _BitInt running clang-tidy (PR #65889)

2023-09-18 Thread via cfe-commits
vabridgers wrote: The status above is showing 1 change requested, but I think I've addressed all comments. Please review at your convenience. Thank you. https://github.com/llvm/llvm-project/pull/65889 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang-tools-extra] [llvm][documentation] Fix coroutines documentation (PR #66420)

2023-09-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/66420 >From 71c5d851d2b14022434fb6533ec7418ee00751c2 Mon Sep 17 00:00:00 2001 From: NoodleSugar Date: Tue, 12 Sep 2023 12:39:13 +0200 Subject: [PATCH] [llvm][documentation] Fix coroutines documentation --- llvm/do

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread David Spickett via cfe-commits
DavidSpickett wrote: Thankyou for looking into this, if it can work it's much cleaner than an ever expanding if. I think that `getAllProcessorFeatures` my include things that are rejected by `-march`. I will check that for Arm and AArch64. Since the list of features in the target parser may b

[clang-tools-extra] [llvm][documentation] Fix coroutines documentation (PR #66420)

2023-09-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/66420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Do not use APInt methods on _BitInt() Types (PR #65887)

2023-09-18 Thread via cfe-commits
vabridgers wrote: The status above shows 1 change requested, but I believe I've resolved the requested changes. Please review at your convenience. Thank you. https://github.com/llvm/llvm-project/pull/65887 ___ cfe-commits mailing list cfe-commits@list

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread David Spickett via cfe-commits
DavidSpickett wrote: One way to check the formats is to add checks for the column titles (if any) and first extension listed in `clang/test/Driver/print-supported-extensions.c`, to document the existing behaviour. RISC-V calls into it's own ABI info class which only has unit tests so if you ch

[clang] [Inliner] Improve attribute propagation to callsites when inlining. (PR #66036)

2023-09-18 Thread Nikita Popov via cfe-commits
nikic wrote: > > It occurs to me that the current return attribute propagation is currently > > buggy for poison-generating attributes: https://llvm.godbolt.org/z/x8n18q9Mj > > In this case the argument to use() will now be poison as well, while before > > inlining only the return value was poi

[clang-tools-extra] [llvm][documentation] Fix coroutines documentation (PR #66420)

2023-09-18 Thread Tobias Hieta via cfe-commits
tru wrote: ping @tstellar - guess it can be a wrong team name / label name? https://github.com/llvm/llvm-project/pull/66420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread Balint Cristian via cfe-commits
cbalint13 wrote: @DavidSpickett Hi David, > Thankyou for looking into this, if it can work it's much cleaner than an ever > expanding if. > > I think that `getAllProcessorFeatures` may include things that are rejected > by `-march`. I will check that for Arm and AArch64. Since the list of

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread David Spickett via cfe-commits
DavidSpickett wrote: Put `-mcpu` aside for now, that's nice, but it's only going to be viable in a world where the backend (tablegen) and frontend (target parsers/ABI info) agree on what is valid and can also be passed to clang. > The file with the full log outputs is here: > [sample-outputs.

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-18 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer created https://github.com/llvm/llvm-project/pull/66632 This patch adds a new fn attribute, `optdebug`, that specifies that optimizations should make decisions that prioritize debug info quality, potentially at the cost of runtime performance. This patch does not ad

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo Changes This patch adds a new fn attribute, `optdebug`, that specifies that optimizations should make decisions that prioritize debug info quality, potentially at the cost of runtime performance. This patch does not add any functional changes

[PATCH] D159212: [MLIR] Allow dialects to disable CSE for certain operations

2023-09-18 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak abandoned this revision. skatrak added a comment. I'll close this patch now, since the agreed approach has been to try using the `IsolatedFromAbove` trait and not to add an interface modifying the CSE pass behavior. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

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

2023-09-18 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 556940. courbet marked 7 inline comments as done. courbet added a comment. - Check return values against the exit set rather than the entry set, add unit tests. - Address other cosmetic review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LA

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

2023-09-18 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. > I think we should use the expected exit set instead of the entry set. Indeed, I've added a few tests to check this. Let me know if you see any other tests that might be valuable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[clang] [clang] remove ClassScopeFunctionSpecializationDecl (PR #66636)

2023-09-18 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/66636 This removes the `ClassScopeFunctionSpecializationDecl` `Decl` node, and instead uses `DependentFunctionTemplateSpecializationInfo` to handle such declarations. `DependentFunctionTemplateSpecializationInfo` i

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread Balint Cristian via cfe-commits
cbalint13 wrote: > Put `-mcpu` aside for now, that's nice, but it's only going to be viable in a > world where the backend (tablegen) and frontend (target parsers/ABI info) > agree on what is valid and can also be passed to clang. > So what your patch produces is kinda like `./bin/clang --targ

[clang] [Inliner] Improve attribute propagation to callsites when inlining. (PR #66036)

2023-09-18 Thread via cfe-commits
goldsteinn wrote: > > > It occurs to me that the current return attribute propagation is > > > currently buggy for poison-generating attributes: > > > https://llvm.godbolt.org/z/x8n18q9Mj > > > In this case the argument to use() will now be poison as well, while > > > before inlining only the

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread David Spickett via cfe-commits
DavidSpickett wrote: > I was only able to check intel's one (w.r.t to -mcpu), without being aware on > aarch64 / riscv world's detail. Yes I wouldn't expect you to right away, that's why we all keep an eye out for each other's changes :) . That's what I meant about starting by writing more co

[clang] [Documentation] Replace recommonmark by myst-parser (PR #65664)

2023-09-18 Thread via cfe-commits
cor3ntin wrote: @andreil99 Sorry, I missed that. I'd like to wait a few days for the bots to have the package installed first to minimize disruption. https://github.com/llvm/llvm-project/pull/65664 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [Inliner] Improve attribute propagation to callsites when inlining. (PR #66036)

2023-09-18 Thread Nikita Popov via cfe-commits
nikic wrote: > ``` > define noundef nonnull ptr @foo() { >%b = call ptr @bar() >call void @use(ptr %p) willreturn nounwind >ret ptr %b > } > ``` > > If we add `nonnull` to `@bar` during inlining it can still make `%p` poison > for its use in `@use`. I get it will trigger proper UB a

[clang] [clang-repl] Emit const variables only once (PR #65257)

2023-09-18 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Ping on the updated patch, which is now also passing downstream testing after I realized that we were missing a backport of commit e451d552348bc714614d294e32dfbe7ec2cd4005, which explains why some constructors were wrongly ordered... https://github.com/llvm/llvm-project/pull/652

[clang] [clang] Enable --print-supported-extensions for all targets (PR #66586)

2023-09-18 Thread Balint Cristian via cfe-commits
https://github.com/cbalint13 closed https://github.com/llvm/llvm-project/pull/66586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Documentation] Replace recommonmark by myst-parser (PR #65664)

2023-09-18 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/65664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Documentation] Replace recommonmark by myst-parser (PR #65664)

2023-09-18 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/65664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Gábor Spaits via cfe-commits
@@ -0,0 +1,312 @@ +//===- StdVariantChecker.cpp -*- C++ -*-==// +// +// 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: Ap

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Gábor Spaits via cfe-commits
https://github.com/spaits edited https://github.com/llvm/llvm-project/pull/66481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Add std::variant checker (PR #66481)

2023-09-18 Thread Gábor Spaits via cfe-commits
https://github.com/spaits edited https://github.com/llvm/llvm-project/pull/66481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix math-errno issue (PR #66381)

2023-09-18 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/66381 >From 997e3b69ac5c20a9130b957c86c08b16d23af07c Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 14 Sep 2023 06:27:35 -0700 Subject: [PATCH 1/7] Fix math-errno issue --- clang/lib/CodeGen/CGBuiltin

[PATCH] D159528: [clang] Fix null dereference on return in lambda attribute statement expr

2023-09-18 Thread Piotr Fusik via Phabricator via cfe-commits
pfusik created this revision. Herald added a project: All. pfusik requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/48527 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D159

[clang] [clang][Interp] Three-way comparisons (PR #65901)

2023-09-18 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/65901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Add IntegralAP for arbitrary-precision integers (PR #65844)

2023-09-18 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/65844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [clang] Preserve UDL nodes in RemoveNestedImmediateInvocation (PR #66641)

2023-09-18 Thread via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/66641 D63960 performs a tree transformation on AST to prevent evaluating constant expressions eagerly by removing recorded immediate consteval invocations from subexpressions. (See https://reviews.llvm.org/D63960#inli

[clang] [clang] Preserve UDL nodes in RemoveNestedImmediateInvocation (PR #66641)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes D63960 performs a tree transformation on AST to prevent evaluating constant expressions eagerly by removing recorded immediate consteval invocations from subexpressions. (See https://reviews.llvm.org/D63960#inline-600736 for its motivatio

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-18 Thread Paul T Robinson via cfe-commits
@@ -2325,6 +2325,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::Naked); // OptimizeNone wins over OptimizeForSize and MinSize. +F->removeFnAttr(llvm::Attribute::OptimizeForDebugging); --

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread Piotr Fusik via cfe-commits
https://github.com/pfusik created https://github.com/llvm/llvm-project/pull/66643 Fixes https://github.com/llvm/llvm-project/issues/48527 >From ea731b4d3d553f42cbaaec2079adeec3927b4150 Mon Sep 17 00:00:00 2001 From: Piotr Fusik Date: Mon, 18 Sep 2023 15:10:58 +0200 Subject: [PATCH] [clang] Fix

[PATCH] D159528: [clang] Fix null dereference on return in lambda attribute statement expr

2023-09-18 Thread Piotr Fusik via Phabricator via cfe-commits
pfusik abandoned this revision. pfusik added a comment. Moved to https://github.com/llvm/llvm-project/pull/66643 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159528/new/ https://reviews.llvm.org/D159528 ___

[clang] [clang] Fix null dereference on return in lambda attribute statement expr (PR #66643)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes Fixes https://github.com/llvm/llvm-project/issues/48527 --- Full diff: https://github.com/llvm/llvm-project/pull/66643.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaStmt.cpp (+2) - (added) clang/test/SemaCXX/gh48527.cpp (+10)

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-18 Thread via cfe-commits
@@ -305,9 +305,22 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) mflr 0 std 0, PPC64_OFFS_SRR0(3) // store lr as ssr0 PPC64_STR(1) + PPC64_STR(4) // Save r4 first since it will be used for fixing r2. +#if defined(_AIX) + // The TOC register (r2) was changed by t

[libunwind] [libunwind][AIX] Fix up TOC register if unw_getcontext is called from a different module (PR #66549)

2023-09-18 Thread via cfe-commits
@@ -305,9 +305,22 @@ DEFINE_LIBUNWIND_FUNCTION(__unw_getcontext) mflr 0 std 0, PPC64_OFFS_SRR0(3) // store lr as ssr0 PPC64_STR(1) + PPC64_STR(4) // Save r4 first since it will be used for fixing r2. +#if defined(_AIX) + // The TOC register (r2) was changed by t

[PATCH] D134654: [clang] Detect header loops

2023-09-18 Thread Nathan Sidwell via Phabricator via cfe-commits
urnathan added a comment. In D134654#4645969 , @cor3ntin wrote: > @aaron.ballman @urnathan What is the status of this PR? I'd kind of forgotten about it. Did get a query from, I think, boost about how I detected the loops I reported -- which was by hac

[clang] [InstSimplify] Fold icmp of `X and/or C1` and `X and/or C2` into constant (PR #65905)

2023-09-18 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > LGTM, but please cleanup commits. GitHub will squash commits into a single commit. https://github.com/llvm/llvm-project/pull/65905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang-tools-extra] [InstSimplify] Fold icmp of `X and/or C1` and `X and/or C2` into constant (PR #65905)

2023-09-18 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > LGTM, but please cleanup commits. GitHub will squash commits into a single commit. https://github.com/llvm/llvm-project/pull/65905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang-tools-extra] [InstSimplify] Fold icmp of `X and/or C1` and `X and/or C2` into constant (PR #65905)

2023-09-18 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw closed https://github.com/llvm/llvm-project/pull/65905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Remove inaccurate legacy handling of bad bitwise shifts (PR #66647)

2023-09-18 Thread via cfe-commits
https://github.com/DonatNagyE created https://github.com/llvm/llvm-project/pull/66647 Previously, bitwise shifts with constant operands were validated by the checker `core.UndefinedBinaryOperatorResult`. However, this logic was unreliable, and commit 25b9696b61e53a958e217bb3d0eab66350dc187f ad

<    1   2   3   4   5   >