[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Add support for compare() (PR #89530)

2024-04-22 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/89530 >From c6706922f31d4a7eedecb483346f99bffef67539 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sun, 21 Apr 2024 05:17:19 + Subject: [PATCH] [clang-tidy][modernize-use-starts-ends-with] Add support fo

[clang] [analyzer] Fix performance of getTaintedSymbolsImpl() (PR #89606)

2024-04-22 Thread Balazs Benics via cfe-commits
steakhal wrote: Ah, I think rushed ahead of myself. I applied the patch to clang-17, where it of course we didn't have any issues even with this broken `isTainted`. Now that I applied the patch to our clang-18 based branch, the file analyzes in 1:40, which is still far off from the baseline run

[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Add support for compare() (PR #89530)

2024-04-22 Thread Nicolas van Kempen via cfe-commits
@@ -3,15 +3,16 @@ modernize-use-starts-ends-with == -Checks whether a ``find`` or ``rfind`` result is compared with 0 and suggests -replacing with ``starts_with`` when the method exists in the class. Notably, +Checks for common roundabout ways to ex

[clang] Improve documented sampling profiler steps to best known methods (PR #88438)

2024-04-22 Thread Tim Creech via cfe-commits
https://github.com/tcreech-intel updated https://github.com/llvm/llvm-project/pull/88438 >From fe3404cbdf78b434f16f8351dc242175b4543112 Mon Sep 17 00:00:00 2001 From: Tim Creech Date: Thu, 11 Apr 2024 16:03:52 -0400 Subject: [PATCH 1/2] Improve documented sampling profiler steps to best known

[clang] [RISCV][clang] Don't enable -mrelax-all for -O0 on RISC-V (PR #88538)

2024-04-22 Thread Philip Reames via cfe-commits
https://github.com/preames approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88538 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Add support for compare() (PR #89530)

2024-04-22 Thread via cfe-commits
@@ -3,15 +3,16 @@ modernize-use-starts-ends-with == -Checks whether a ``find`` or ``rfind`` result is compared with 0 and suggests -replacing with ``starts_with`` when the method exists in the class. Notably, +Checks for common roundabout ways to ex

[clang] [clang-tools-extra] [clangd] Show struct fields and enum members in hovers (PR #89557)

2024-04-22 Thread kadir çetinkaya via cfe-commits
kadircet wrote: So my 2cents; > 1. I know a [previous comment on the > bug](https://github.com/clangd/clangd/issues/959#issuecomment-998927030) > stated "We don't show bodies of classes/enums/functions etc by policy", but > can we consider changing this policy in the more limited case of pub

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-22 Thread Vadim D. via cfe-commits
@@ -50,5 +52,36 @@ Examples: } The above code examples show the list of if-statements that this check will -give a warning for. All of them uses ``compare`` to check if equality or +give a warning for. All of them use ``compare`` to check equality or inequality of two strin

[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Add support for compare() (PR #89530)

2024-04-22 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: Got it, thanks! I'm somewhat familiar using InnerMatchers but didn't think that solution fit quite right here. This new version I think is much better. Kept matcher construction in `registerMatchers`, added a little bit of logic in `check` to make sure some sizes match. https

[clang-tools-extra] [clang-tidy][modernize-use-starts-ends-with] Add support for compare() (PR #89530)

2024-04-22 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/89530 >From 98af89a36d4f112c3b31e450a5e6df8b6593aed4 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Sun, 21 Apr 2024 05:17:19 + Subject: [PATCH] [clang-tidy][modernize-use-starts-ends-with] Add support fo

[clang] [llvm] [CLANG][LLVM][AArch64]SME2.1 intrinsics for MOVAZ tile to 2/4 vectors (PR #88710)

2024-04-22 Thread via cfe-commits
@@ -1985,6 +1986,34 @@ void AArch64DAGToDAGISel::SelectMultiVectorMove(SDNode *N, unsigned NumVecs, CurDAG->RemoveDeadNode(N); } +template +void AArch64DAGToDAGISel::SelectMultiVectorMoveZ(SDNode *N, unsigned NumVecs, Lukacma wrote: That's a good point. S

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-22 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/88636 >From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Sat, 13 Apr 2024 23:36:12 +0300 Subject: [PATCH 1/8] readability-string-compare: check std::string_view, allow c

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-22 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/88636 >From 0db24a6806e9429b5e7b9cd9d0777315b3e6d87e Mon Sep 17 00:00:00 2001 From: Vadim Dudkin Date: Sat, 13 Apr 2024 23:36:12 +0300 Subject: [PATCH 1/7] readability-string-compare: check std::string_view, allow c

[clang] [llvm] [cmake] Remove custom linker flag check function (PR #86602)

2024-04-22 Thread Keith Smiley via cfe-commits
https://github.com/keith closed https://github.com/llvm/llvm-project/pull/86602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CLANG][LLVM][AArch64]SME2.1 intrinsics for MOVAZ tile to 2/4 vectors (PR #88710)

2024-04-22 Thread Momchil Velikov via cfe-commits
@@ -1985,6 +1986,34 @@ void AArch64DAGToDAGISel::SelectMultiVectorMove(SDNode *N, unsigned NumVecs, CurDAG->RemoveDeadNode(N); } +template +void AArch64DAGToDAGISel::SelectMultiVectorMoveZ(SDNode *N, unsigned NumVecs, momchil-velikov wrote: The real quest

[clang] [llvm] [cmake] Remove custom linker flag check function (PR #86602)

2024-04-22 Thread Tom Stellard via cfe-commits
tstellar wrote: @petrhosek Would you be able to add a comment to the llvm_check_linker_flag function explaining this so someone else doesn't try to do the same thing. https://github.com/llvm/llvm-project/pull/86602 ___ cfe-commits mailing list cfe-com

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-22 Thread via cfe-commits
@@ -50,5 +52,36 @@ Examples: } The above code examples show the list of if-statements that this check will -give a warning for. All of them uses ``compare`` to check if equality or +give a warning for. All of them use ``compare`` to check equality or inequality of two strin

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-22 Thread via cfe-commits
@@ -286,6 +286,11 @@ Changes in existing checks check by resolving fix-it overlaps in template code by disregarding implicit instances. +- Improved :doc:`readability-string-compare + ` check to also detect + usages of `std::string_view::compare`. Added a `StringLikeClass

[clang-tools-extra] [clang-tidy] check `std::string_view` and custom string-like classes in `readability-string-compare` (PR #88636)

2024-04-22 Thread via cfe-commits
@@ -286,6 +286,11 @@ Changes in existing checks check by resolving fix-it overlaps in template code by disregarding implicit instances. +- Improved :doc:`readability-string-compare + ` check to also detect + usages of `std::string_view::compare`. Added a `StringLikeClass

[clang] [analyzer] Fix performance of getTaintedSymbolsImpl() (PR #89606)

2024-04-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Thanks! The patch makes sense. Thank you for the promptly fix. I've checked and this resolves the `FFmpeg` issue. i wonder if this is serious enough to consider hangs as a crash and nominate this PR for backport to `clang-18`. Leave me no

[clang] [analyzer] Fix performance of getTaintedSymbolsImpl() (PR #89606)

2024-04-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/89606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Don't always destroy template annotations at the end of a declaration (PR #89494)

2024-04-22 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > If we remove MaybeDestroyTemplateIds(); in ParseStatementOrDeclaration, does > it fix the bug, and does it actually impact performance? It fixes the bug; however, I'm afraid we would also lose the chance to optimize the following: ```cpp void foo() { auto generic = []() {};

[clang] [clang][modules] Stop eagerly reading files with diagnostic pragmas (PR #87442)

2024-04-22 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: @alexfh Can you check it doesn't boil down to the same thing as the issue you reported in https://reviews.llvm.org/D137213? https://github.com/llvm/llvm-project/pull/87442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [libclang] Compute the right spelling location (PR #72400)

2024-04-22 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. https://github.com/llvm/llvm-project/pull/72400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CLANG][LLVM][AArch64]SME2.1 intrinsics for MOVAZ tile to 2/4 vectors (PR #88710)

2024-04-22 Thread via cfe-commits
@@ -1985,6 +1986,34 @@ void AArch64DAGToDAGISel::SelectMultiVectorMove(SDNode *N, unsigned NumVecs, CurDAG->RemoveDeadNode(N); } +template +void AArch64DAGToDAGISel::SelectMultiVectorMoveZ(SDNode *N, unsigned NumVecs, Lukacma wrote: `Scale` could be used

[clang] [AIX][TLS][clang] Add -maix-small-local-dynamic-tls clang option (PR #88829)

2024-04-22 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan approved this pull request. LGTM as well. https://github.com/llvm/llvm-project/pull/88829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AIX][TLS][clang] Add -maix-small-local-dynamic-tls clang option (PR #88829)

2024-04-22 Thread Amy Kwan via cfe-commits
@@ -6,6 +6,9 @@ // RUN: %clang -target powerpc64-unknown-aix -maix-small-local-exec-tls -S -emit-llvm \ // RUN:%s -o - | FileCheck %s --check-prefix=CHECK-AIX_SMALL_LOCALEXEC_TLS +// RUN: %clang -target powerpc64-unknown-aix -maix-small-local-dynamic-tls -S -emit-llvm \

[clang] [AIX][TLS][clang] Add -maix-small-local-dynamic-tls clang option (PR #88829)

2024-04-22 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/88829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Dump argument types for TypeTraitExpr. (PR #89370)

2024-04-22 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/89370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 70abbd9 - [AST] Dump argument types for TypeTraitExpr. (#89370)

2024-04-22 Thread via cfe-commits
Author: Haojian Wu Date: 2024-04-22T16:28:14+02:00 New Revision: 70abbd9084e25d2485edfeb252b603b3910a23bc URL: https://github.com/llvm/llvm-project/commit/70abbd9084e25d2485edfeb252b603b3910a23bc DIFF: https://github.com/llvm/llvm-project/commit/70abbd9084e25d2485edfeb252b603b3910a23bc.diff LO

[clang] [analyzer] Fix performance of getTaintedSymbolsImpl() (PR #89606)

2024-04-22 Thread Daniel Krupp via cfe-commits
https://github.com/dkrupp approved this pull request. The suggested change make a lot of sense. Thanks. LGTM. https://github.com/llvm/llvm-project/pull/89606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [clang][CoverageMapping] do not emit gap when either end is an `ImplicitValueInitExpr` (PR #89564)

2024-04-22 Thread Zequan Wu via cfe-commits
ZequanWu wrote: There could be some other statements with invalid source locations (we have seen that before). I suggest validating both source locations inside `findGapAreaBetween` and returning `std::nullopt` if either of them is invalid. https://github.com/llvm/llvm-project/pull/89564 _

[clang] Reapply "[clang][dataflow] Model conditional operator correctly." with fixes (PR #89596)

2024-04-22 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/89596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Parser] Don't always destroy template annotations at the end of a declaration (PR #89494)

2024-04-22 Thread via cfe-commits
cor3ntin wrote: > > Are there actually any benefit from being that eager to delete template > > annotations? > > Well, I don't have much context of that patch, but I think that makes sense > in part e.g. When we have a function that involves many generic lambdas, > where we would destroy temp

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-22 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > > For SystemZ the correct value is 256. > > Thanks! Double-checking: for both constructive and destructive? Yes, for both. Every SystemZ model (supported by GCC/LLVM) has a L1 cache line size of 256 bytes. > > In general I agree it makes sense to look at the GCC implementat

[clang] [Clang][Parser] Don't always destroy template annotations at the end of a declaration (PR #89494)

2024-04-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This seems reasonable to me. https://github.com/llvm/llvm-project/pull/89494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix performance of getTaintedSymbolsImpl() (PR #89606)

2024-04-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (NagyDonat) Changes Previously the function ``` std::vector taint::getTaintedSymbolsImpl(ProgramStateRef State, const MemRegion *Reg,

[clang] [analyzer] Fix performance of getTaintedSymbolsImpl() (PR #89606)

2024-04-22 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/89606 Previously the function ``` std::vector taint::getTaintedSymbolsImpl(ProgramStateRef State, const MemRegion *Reg,

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-22 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/84758 From 7ee5d29f69daf626a4fdc2fced802fe7e881f31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Sun, 10 Mar 2024 18:17:48 +0100 Subject: [PATCH 1/4] [clang-repl] Set up executor implic

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-04-22 Thread Kerry McLaughlin via cfe-commits
@@ -8001,6 +8007,22 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +// SME functions may require SVE to be available for unwinding, as the +// value of VG needs to be preserved across streaming-mode changes. +if (CallerFD &

[clang] [Clang] Fix __is_trivially_equaltiy_comparable documentation (PR #88528)

2024-04-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/88528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-22 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. LGTM, the equivalent patch was approved on Phab too. https://github.com/llvm/llvm-project/pull/89425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang] Mark ill-formed partial specialization as invalid (PR #89536)

2024-04-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Release note, else LGTM. https://github.com/llvm/llvm-project/pull/89536 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5ef5eb6 - [clang][Interp] Implement C++23 [[assume]] support

2024-04-22 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-22T15:28:00+02:00 New Revision: 5ef5eb66fb428aaf61fb51b709f065c069c11242 URL: https://github.com/llvm/llvm-project/commit/5ef5eb66fb428aaf61fb51b709f065c069c11242 DIFF: https://github.com/llvm/llvm-project/commit/5ef5eb66fb428aaf61fb51b709f065c069c11242.diff LO

[clang] abca85b - [clang][Interp] Remove faulty assertion

2024-04-22 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-22T15:28:00+02:00 New Revision: abca85b3f7d5d3a1ae8dfea37d41e913c67b9bab URL: https://github.com/llvm/llvm-project/commit/abca85b3f7d5d3a1ae8dfea37d41e913c67b9bab DIFF: https://github.com/llvm/llvm-project/commit/abca85b3f7d5d3a1ae8dfea37d41e913c67b9bab.diff LO

[clang] 024c3d0 - [clang][Interp][NFC] Refactor Program::getGlobal()

2024-04-22 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-22T15:28:00+02:00 New Revision: 024c3d0c079fd9297725c35082316f2ca29c9526 URL: https://github.com/llvm/llvm-project/commit/024c3d0c079fd9297725c35082316f2ca29c9526 DIFF: https://github.com/llvm/llvm-project/commit/024c3d0c079fd9297725c35082316f2ca29c9526.diff LO

[clang] [AST] Dump argument types for TypeTraitExpr. (PR #89370)

2024-04-22 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/89370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang][dataflow] Model conditional operator correctly." with fixes (PR #89596)

2024-04-22 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/89596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-22 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: vgvassilev wrote: I am fine changing it in any way that creates an executor as part of the initialization phase when we have codegen. Maybe we can do it in the builder class and then pass it to the interpreter?

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-22 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Taking this patch would mean that deriving from Interpreter won't hold as the mechanism for extensions! At least for customizing the JITBuilder. I propose to pass the `LLJITBuilder` to the constructor then and to store it as a member for later `Create/ResetExecutor()` cal

[clang] [Clang] Update missing varargs arg extension warnings (PR #84520)

2024-04-22 Thread via cfe-commits
zibi2 wrote: I agree the code is not C++17 compliant. An alternative fix would be to compile this file with `-Wno-c++20-extensions`. https://github.com/llvm/llvm-project/pull/84520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [llvm] [CLANG][LLVM][AArch64]SME2.1 intrinsics for MOVAZ tile to 2/4 vectors (PR #88710)

2024-04-22 Thread via cfe-commits
https://github.com/Lukacma deleted https://github.com/llvm/llvm-project/pull/88710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a crash introduced in PR#88666 (PR #89567)

2024-04-22 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/89567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0accda7 - [Clang] Fix a crash introduced in PR#88666 (#89567)

2024-04-22 Thread via cfe-commits
Author: Shilei Tian Date: 2024-04-22T09:08:27-04:00 New Revision: 0accda7f17a1f85b4270edf4f0976c55de4e958c URL: https://github.com/llvm/llvm-project/commit/0accda7f17a1f85b4270edf4f0976c55de4e958c DIFF: https://github.com/llvm/llvm-project/commit/0accda7f17a1f85b4270edf4f0976c55de4e958c.diff L

[clang] [clang][modules] Allow module maps with textual headers to be non-affecting (PR #89441)

2024-04-22 Thread Sam McCall via cfe-commits
sam-mccall wrote: > I updated the description of this PR, hopefully it makes more sense now. I > still need to investigate what goes wrong in > "Modules/preprocess-decluse.cpp". It seems that it assumes `%t/b.pcm` embeds > the information from "a.modulemap". I think it should embed that infor

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-22 Thread Daniel M. Katz via cfe-commits
https://github.com/katzdm updated https://github.com/llvm/llvm-project/pull/89565 >From a3f8a8648e2002273d47d7886b29fb02c728b5b7 Mon Sep 17 00:00:00 2001 From: Dan Katz Date: Tue, 16 Apr 2024 17:14:50 -0400 Subject: [PATCH 1/2] Fix bug with constexpr initialization. --- clang/lib/Parse/ParseD

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-22 Thread Daniel M. Katz via cfe-commits
katzdm wrote: > I think the change makes sense. Can you add a release note? Appreciate the reminder! https://github.com/llvm/llvm-project/pull/89565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-22 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/84758 From 7ee5d29f69daf626a4fdc2fced802fe7e881f31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Sun, 10 Mar 2024 18:17:48 +0100 Subject: [PATCH 1/3] [clang-repl] Set up executor implic

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-04-22 Thread Aaron Ballman via cfe-commits
@@ -868,13 +868,7 @@ C++20 implementation status Class template argument deduction for alias templates https://wg21.link/p1814r0";>P1814R0 - - - Clang 19 (Partial) - The associated constraints (over.match.class.deduct#3.3) for th

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-04-22 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Regarding the __is_deducible type trait, GCC also provides one, but it was > > hidden from users and only used for internal CTAD implementation. I'm not > > sure if we should follow the same strategy in clang, ideas? > > I have mixed feeling. What do you think @AaronBal

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-22 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: vgvassilev wrote: For me it is high priority because without it I cannot land the pch support in clang repl. I believe that’s also somewhat important for your use case? https://github.com/llvm/llvm-project/pull/84758 ___

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-04-22 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: > https://github.com/llvm/llvm-project/pull/89031 should unblock this PR. @vgvassilev It did. And it uncovered an issue that I didn't think about before: If we set up the executor in the constructor, then the interpreter instance isn't fully initialized yet when we create

[clang] [llvm] [CLANG][LLVM][AArch64]SME2.1 intrinsics for MOVAZ tile to 2/4 vectors (PR #88710)

2024-04-22 Thread via cfe-commits
@@ -0,0 +1,457 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme2p1 -verify-machineinstrs < %s | FileCheck %s + +;MOVAZ (tile to vector, Multi) + + +;; +; X2 - Horiz +;; + +d

[clang] 1588368 - [clang][Interp] Fix casting pointers to int128

2024-04-22 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-22T14:39:24+02:00 New Revision: 15883684a72cf6c64d856a11f8cd10b3a332dbcf URL: https://github.com/llvm/llvm-project/commit/15883684a72cf6c64d856a11f8cd10b3a332dbcf DIFF: https://github.com/llvm/llvm-project/commit/15883684a72cf6c64d856a11f8cd10b3a332dbcf.diff LO

[clang] 103f1be - [clang][Interp][NFC] getRecord() might return null

2024-04-22 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-22T14:39:24+02:00 New Revision: 103f1be76fbb82ef8ed95b6112d914d4996e27be URL: https://github.com/llvm/llvm-project/commit/103f1be76fbb82ef8ed95b6112d914d4996e27be DIFF: https://github.com/llvm/llvm-project/commit/103f1be76fbb82ef8ed95b6112d914d4996e27be.diff LO

[clang] [clang]MveEmitter: Pass Args as a const reference (PR #89551)

2024-04-22 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/89551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5597d97 - [clang] MveEmitter: Pass Args as a const reference (#89551)

2024-04-22 Thread via cfe-commits
Author: aniplcc Date: 2024-04-22T13:31:55+01:00 New Revision: 5597d97e9982d8f87c9226898f90c5875b498f71 URL: https://github.com/llvm/llvm-project/commit/5597d97e9982d8f87c9226898f90c5875b498f71 DIFF: https://github.com/llvm/llvm-project/commit/5597d97e9982d8f87c9226898f90c5875b498f71.diff LOG:

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-04-22 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm deleted https://github.com/llvm/llvm-project/pull/82819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Set correct FPOptions if attribute 'optnone' presents (PR #85605)

2024-04-22 Thread Serge Pavlov via cfe-commits
spavloff wrote: A little about the significance of this fix. To implement pragma FENV_ROUND, we need to apply the FP options stored in the instance of CompoundStmt to the builder object, so that it uses the specified rounding mode. It can be done using the class CGFPOptionsRAII. However in thi

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-04-22 Thread Tomas Matheson via cfe-commits
@@ -61,12 +61,12 @@ entry: ;; CHECK: paciasp ;; CHECK: retaa -attributes #0 = { nounwind "branch-target-enforcement"="false" "sign-return-address"="none" } -attributes #1 = { nounwind "branch-target-enforcement"="true" "sign-return-address"="none" } -attributes

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-04-22 Thread Tomas Matheson via cfe-commits
@@ -22,4 +22,9 @@ attributes #1 = { ; CHECK: invalid value for 'sign-return-address-key' attribute: B_Key "sign-return-address-key"="B_Key" ; CHECK: invalid value for 'branch-target-enforcement' attribute: True - "branch-target-enforcement"="True" } + "branch-target-enfor

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-04-22 Thread Tomas Matheson via cfe-commits
@@ -58,8 +58,8 @@ entry: ;; CHECK-NEXT: .cfi_negate_ra_state attributes #0 = { norecurse nounwind readnone "sign-return-address"="all" "sign-return-address-key"="b_key" } -attributes #1 = { noinline } -attributes #2 = { nofree noinline norecurse nounwind writeonly } +attribut

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-04-22 Thread Tomas Matheson via cfe-commits
@@ -0,0 +1,22 @@ +// REQUIRES: arm-registered-target + +// RUN: %clang_cc1 -triple=thumbv7m-unknown-unknown-eabi -msign-return-address=non-leaf %s -S -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=SIGN +// RUN: %clang_cc1 -triple=thumbv7m-unknown-unknown

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-04-22 Thread Tomas Matheson via cfe-commits
@@ -2323,15 +2323,33 @@ void Verifier::verifyFunctionAttrs(FunctionType *FT, AttributeList Attrs, if (S != "a_key" && S != "b_key") CheckFailed("invalid value for 'sign-return-address-key' attribute: " + S, V); +if (auto AA = Attrs.getFnAttr("s

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-04-22 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm commented: In general LGTM. This seems like a better approach. The summary could do with clarification, it is hard to understand. https://github.com/llvm/llvm-project/pull/82819 ___ cfe-commits mailing list cfe-commits

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-04-22 Thread Tomas Matheson via cfe-commits
@@ -2323,15 +2323,33 @@ void Verifier::verifyFunctionAttrs(FunctionType *FT, AttributeList Attrs, if (S != "a_key" && S != "b_key") CheckFailed("invalid value for 'sign-return-address-key' attribute: " + S, V); +if (auto AA = Attrs.getFnAttr("s

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-04-22 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/82819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Move StreamChecker out of the alpha package. (PR #89247)

2024-04-22 Thread via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: @@ -563,6 +563,20 @@ def MismatchedDeallocatorChecker : Checker<"MismatchedDeallocator">, Dependencies<[DynamicMemoryModeling]>, Documentation; +def StreamChecker : Che

[clang] [clang][analyzer] Move StreamChecker out of the alpha package. (PR #89247)

2024-04-22 Thread via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/NagyDonat approved this pull request. LGTM, the diff is clean and the results on open source projects are good enough for a non-alpha checker. Note that the direct codeche

[clang] [clang][analyzer] Move StreamChecker out of the alpha package. (PR #89247)

2024-04-22 Thread via cfe-commits
=?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= , =?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/89247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang][dataflow] Refactor `PropagateResultObject()` with a switch statement. (PR #88865)

2024-04-22 Thread via cfe-commits
martinboehme wrote: First of all, a followup: I should of course have noticed the failling CI tests, but a contributing factor was that I was locally running tests in `Release` mode, i.e. with `assert()` compiled out. I've now looked at why tests fail, and it is because when using `E->getStmt

[clang] [clang]MveEmitter: Pass Args as a const reference (PR #89551)

2024-04-22 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-22 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > For SystemZ the correct value is 256. Thanks! Double-checking: for both constructive and destructive? > In general I agree it makes sense to look at the GCC implementation as a > source of reasonable values. Also, I think there probably should be no > generic default val

[clang] [AST] Dump argument types for TypeTraitExpr. (PR #89370)

2024-04-22 Thread Haojian Wu via cfe-commits
hokein wrote: > It seems to me that exposing these as children is the better option here, > right? That way it would better model a CallExpr or template type-trait, and > would work in our StmtProfiler et-al. Agree that exposing them as children is better. However, we encounter an implementat

[clang] Reapply "[Clang][Sema] Fix crash when 'this' is used in a dependent class scope function template specialization that instantiates to a static member function (#87541, #88311)" (PR #88731)

2024-04-22 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88731 >From 9b54d77ef690a69b94ab2985f62fa1a281259796 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 15 Apr 2024 09:17:39 -0400 Subject: [PATCH 1/5] Reapply "[Clang][Sema] Fix crash when 'this' is used

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-22 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Sorry, I know nothing about it. But it looks to me it's to match with GCC, > why don't borrow the value from GCC as a beginning? Because the values depend on the target and the compiler options picked. I don't have that information myself, and given how many targets and o

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-22 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman Did you read > https://discourse.llvm.org/t/rfc-c-17-hardware-constructive-destructive-interference-size/48674/42 > ? I want to make sure we do abide by it and it's unclear a consensus was > ever formed or called Yes, I looked at the thread and while there

[clang] [llvm] [AMDGPU][WIP] Add support for i64/f64 readlane, writelane and readfirstlane operations. (PR #89217)

2024-04-22 Thread Vikram Hegde via cfe-commits
@@ -4822,6 +4822,111 @@ static MachineBasicBlock *lowerWaveReduce(MachineInstr &MI, return RetBB; } +static MachineBasicBlock *lowerPseudoLaneOp(MachineInstr &MI, vikramRH wrote: @arsenm, would "PreISelIntrinsicLowering" be a proper place for this ? https

[clang] [clang]MveEmitter: Pass Args as a const reference (PR #89551)

2024-04-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: aniplcc (aniplcc) Changes Closes #89192. Also updated with review patches. In continuation of: `https://github.com/llvm/llvm-project/pull/89202` [Closed due to a bad rebase] --- Full diff: https://github.com/llvm/llvm-project/pull/89551

[clang] [clang]MveEmitter: Pass Args as a const reference (PR #89551)

2024-04-22 Thread via cfe-commits
https://github.com/aniplcc ready_for_review https://github.com/llvm/llvm-project/pull/89551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-04-22 Thread Tomas Matheson via cfe-commits
@@ -5,13 +5,18 @@ // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -S -emit-llvm -o - -mbranch-protection=pac-ret+b-key %s | FileCheck %s --check-prefix=CHECK --check-prefix=PART // RUN: %clang -target arm-arm-none-eabi -march=armv8.1-m.main -S -emit-llvm -o - -

[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

2024-04-22 Thread via cfe-commits
cor3ntin wrote: > Regarding the __is_deducible type trait, GCC also provides one, but it was > hidden from users and only used for internal CTAD implementation. I'm not > sure if we should follow the same strategy in clang, ideas? I have mixed feeling. What do you think @AaronBallman ? https:

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-04-22 Thread Akash Banerjee via cfe-commits
TIFitis wrote: > This patch is huge, and just skimming over it shows various places that could > be split off, and others that should not make it to the review stage > (commented out code). Please update. Hi, thanks for talking the time out to review the patch. I've addressed the comments you

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-22 Thread via cfe-commits
@@ -1032,17 +1043,15 @@ int f() { namespace GH57682 { void test() { - constexpr auto l1 = []() consteval { // expected-error {{cannot take address of consteval call operator of '(lambda at}} \ - // expected-note 2{{declared here}} + co

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-22 Thread via cfe-commits
@@ -2554,16 +2554,26 @@ Decl *Parser::ParseDeclarationAfterDeclarator( return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo); } +static bool isConstexprVariable(const Decl *D) { + if (const VarDecl *Var = dyn_cast_or_null(D)) cor3ntin wrote:

[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)

2024-04-22 Thread via cfe-commits
@@ -2554,16 +2554,26 @@ Decl *Parser::ParseDeclarationAfterDeclarator( return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo); } +static bool isConstexprVariable(const Decl *D) { + if (const VarDecl *Var = dyn_cast_or_null(D)) +return Var->isConstexpr(); +

[clang] Reapply "[clang][dataflow] Model conditional operator correctly." with fixes (PR #89596)

2024-04-22 Thread via cfe-commits
https://github.com/martinboehme edited https://github.com/llvm/llvm-project/pull/89596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang][dataflow] Model conditional operator correctly." with fixes (PR #89596)

2024-04-22 Thread via cfe-commits
martinboehme wrote: I reverted https://github.com/llvm/llvm-project/pull/89213 beause it was causing buildbots to fail with assertion failures. Embarrassingly, it turns out I had been running tests locally in `Release` mode, i.e. with `assert()` compiled away. This PR re-lands #89213 with fix

[clang] Reapply "[clang][dataflow] Model conditional operator correctly." with fixes (PR #89596)

2024-04-22 Thread via cfe-commits
https://github.com/martinboehme edited https://github.com/llvm/llvm-project/pull/89596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] reland conditional operator (PR #89596)

2024-04-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (martinboehme) Changes - **Reapply "[clang][dataflow] Model conditional operator correctly." (#89577)** - **Fix failing tests for `TransferVisitor::VisitConditionalOperator().`** --- Full diff: https://github.com/llvm/llvm-project/pu

<    1   2   3   4   5   >