[clang-tools-extra] [clangd] [HeuristicResolver] Protect against infinite recursion on DependentNameTypes (PR #83542)

2024-03-02 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > here is my analysis: > > (Let's use the example from your test case) > > ```c++ > template > struct waldo { > using type = waldo::type::next; > }; > ``` > > So, we're somehow attempting to resolve the type/decl for `next`, which is of > `DependentNameType`. To

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

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

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-02 Thread Fangrui Song via cfe-commits
@@ -203,3 +203,12 @@ // RELOCATABLE-NOT: "-l // RELOCATABLE-NOT: crt{{[^./\\]+}}.o +// Check that the -X flag is passed to the linker on riscv64 MaskRay wrote: The CHECK is self-explanatory and renders the comment redundant. The RUN line may test additional

[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

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

[clang] [clang-format][doc] fix documentation for clang-format (PR #83415)

2024-03-02 Thread Owen Pan via cfe-commits
owenca wrote: > So I did added a simple search and replace to the generating script so now > every time [[[NAME]]] is reference it will use the members name. Nice! Though why `[[[NAME]]]` in particular? Can we use `` instead? https://github.com/llvm/llvm-project/pull/83415

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-02 Thread Shafik Yaghmour via cfe-commits
@@ -5042,7 +5042,7 @@ void RecordDecl::completeDefinition() { // Layouts are dumped when computed, so if we are dumping for all complete // types, we need to force usage to get types that wouldn't be used elsewhere. - if (Ctx.getLangOpts().DumpRecordLayoutsComplete) +

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-02 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I think this makes sense but I would like another set of eyes. https://github.com/llvm/llvm-project/pull/83688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

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

[clang] [clang][AST] fix dereference on class/struct layouts check. (PR #83686)

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

[clang] [clang][AST] fix dereference on class/struct layouts check. (PR #83686)

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

[clang] [clang][AST] fix dereference on class/struct layouts check. (PR #83686)

2024-03-02 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik requested changes to this pull request. We need a minimal reproducer here. Looking at the bug report it is not clear to me if this is the correct fix or not. After we have a reproducer we would need a test added to the PR and a release note.

[clang] [llvm] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #67454)

2024-03-02 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl milestoned https://github.com/llvm/llvm-project/pull/67454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][PAC] Support ptrauth builtins and -fptrauth-intrinsics. (PR #65996)

2024-03-02 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl milestoned https://github.com/llvm/llvm-project/pull/65996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #83400. --- Full diff: https://github.com/llvm/llvm-project/pull/83709.diff 7 Files Affected: - (modified) clang/lib/Format/FormatToken.cpp (+13-3) - (modified) clang/lib/Format/FormatToken.h

[clang] [llvm] [HIP] change compress level (PR #83605)

2024-03-02 Thread Yaxun Liu via cfe-commits
@@ -942,20 +942,28 @@ CompressedOffloadBundle::compress(const llvm::MemoryBuffer , Input.getBuffer().size()); llvm::compression::Format CompressionFormat; + int Level; - if (llvm::compression::zstd::isAvailable()) + if (llvm::compression::zstd::isAvailable()) {

[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

2024-03-02 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/83709 Fixes #83400. >From 91d6e4c6e0ae2e1d79edf496df22978a4e1f3e1a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 2 Mar 2024 22:08:29 -0800 Subject: [PATCH] [clang-format] Handle common C++ non-keyword types as

[clang] [Driver] Remove duplicate -r flag usage when linking (PR #82715)

2024-03-02 Thread Brad Smith via cfe-commits
brad0 wrote: Fuchsia I think has the same issue, but the Driver code is a bit different. https://github.com/llvm/llvm-project/pull/82715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/83216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/83216 >From 35cd96b70bb616bbca68371e374655d0508fc7a8 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 27 Feb 2024 21:07:09 -0500 Subject: [PATCH] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/83216 >From 706bf652f2dec8a4c9341641e53bf57647bf49e3 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 27 Feb 2024 21:07:09 -0500 Subject: [PATCH] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on

[clang] c462160 - More fix BUILD_SHARED_LIBS=ON build for platforms which require explicit link of -lpthread (NFC)

2024-03-02 Thread Mehdi Amini via cfe-commits
Author: Mehdi Amini Date: 2024-03-02T19:54:35-08:00 New Revision: c4621607245a5feed42cf9f748ff796728ef579a URL: https://github.com/llvm/llvm-project/commit/c4621607245a5feed42cf9f748ff796728ef579a DIFF: https://github.com/llvm/llvm-project/commit/c4621607245a5feed42cf9f748ff796728ef579a.diff

[clang] [lld] [llvm] [X86] Use generic CPU tuning when tune-cpu is empty (PR #83631)

2024-03-02 Thread Craig Topper via cfe-commits
topperc wrote: > This is a turbulent change to both upstream and downstream tests without any > profit as far as I can tell. > > I did a similar change for 64-bit a few years ago: > https://reviews.llvm.org/D129647 > > In comparison, this patch is not to solve a specific problem. It should

[clang] [lld] [llvm] [X86] Use generic CPU tuning when tune-cpu is empty (PR #83631)

2024-03-02 Thread Phoebe Wang via cfe-commits
phoebewang wrote: This is a turbulent change to both upstream and downstream tests without any profit as far as I can tell. I did a similar change for 64-bit a few years ago: https://reviews.llvm.org/D129647 In comparison, this patch is not to solve a specific problem. It should not show

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

2024-03-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/83216 >From ad96ce2633c62efa2de6b4925e8c3c11e98ba8bb Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 27 Feb 2024 21:07:09 -0500 Subject: [PATCH] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on

[clang] d5f77e1 - [Driver] Remove duplicate -r flag usage when linking (#82715)

2024-03-02 Thread via cfe-commits
Author: Brad Smith Date: 2024-03-02T21:33:59-05:00 New Revision: d5f77e112e6352d933afa22920a4a0d3bf8d26e5 URL: https://github.com/llvm/llvm-project/commit/d5f77e112e6352d933afa22920a4a0d3bf8d26e5 DIFF: https://github.com/llvm/llvm-project/commit/d5f77e112e6352d933afa22920a4a0d3bf8d26e5.diff

[clang] [Driver] Remove duplicate -r flag usage when linking (PR #82715)

2024-03-02 Thread Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/82715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Remove duplicate -r flag usage when linking (PR #82715)

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

[clang] [Driver] Remove duplicate -r flag usage when linking (PR #82715)

2024-03-02 Thread Fangrui Song via cfe-commits
MaskRay wrote: Gnu.cpp used by Linux doesn't have the problem. Thanks for fixing other targets. https://github.com/llvm/llvm-project/pull/82715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [HIP] change compress level (PR #83605)

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

[clang] [llvm] [HIP] change compress level (PR #83605)

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

[clang] [llvm] [HIP] change compress level (PR #83605)

2024-03-02 Thread Fangrui Song via cfe-commits
@@ -1,4 +1,4 @@ -// REQUIRES: zlib +// REQUIRES: zlib && !zstd MaskRay wrote: Since zstd configurations become more prevalence, `zlib && !zstd` would essentially disable the test for increasingly more bots. But I guess this cannot be improved.

[clang] [llvm] [HIP] change compress level (PR #83605)

2024-03-02 Thread Fangrui Song via cfe-commits
@@ -942,20 +942,28 @@ CompressedOffloadBundle::compress(const llvm::MemoryBuffer , Input.getBuffer().size()); llvm::compression::Format CompressionFormat; + int Level; - if (llvm::compression::zstd::isAvailable()) + if (llvm::compression::zstd::isAvailable()) {

[clang] [Driver][RISCV] Forward --no-relax option to linker for RISC-V on *BS… (PR #83216)

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

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-03-02 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/82689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

2024-03-02 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/82689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC] Use fold expressions to replace discarded initializer_lists (PR #83693)

2024-03-02 Thread via cfe-commits
github-actions[bot] wrote: @MagentaTreehouse 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

[clang] [llvm] [NFC] Use fold expressions to replace discarded initializer_lists (PR #83693)

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

[clang] f505a92 - [NFC] Use fold expressions to replace discarded initializer_lists (#83693)

2024-03-02 Thread via cfe-commits
Author: MagentaTreehouse Date: 2024-03-02T23:44:17+01:00 New Revision: f505a92fc2e965f1fe2e6a25d1ff4f0d9d1297c6 URL: https://github.com/llvm/llvm-project/commit/f505a92fc2e965f1fe2e6a25d1ff4f0d9d1297c6 DIFF:

[clang] [llvm] [NFC] Use fold expressions to replace discarded initializer_lists (PR #83693)

2024-03-02 Thread via cfe-commits
Sirraide wrote: Just saw that another pr was merged earlier that also ran into this issue, so I’m just going to assume that this is fine; it’s just Flang on Windows that seems to be a bit broken atm. https://github.com/llvm/llvm-project/pull/83693

[clang] [llvm] [NFC] Use fold expressions to replace discarded initializer_lists (PR #83693)

2024-03-02 Thread via cfe-commits
Sirraide wrote: Hmm, CI seems to be failing on some flang tests, but other prs seem to be experiencing similar issues, so I don’t think this pr broke anything. https://github.com/llvm/llvm-project/pull/83693 ___ cfe-commits mailing list

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-02 Thread via cfe-commits
Sirraide wrote: > In my opinion, it's confusing for the behavior to change depending on > optimization levels I will say, if you’re calling `__builtin_frame_address` when optimisations are enabled then I’m not quite sure what you’re expecting, candidly; I’m not convinced we should warn on

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-02 Thread via cfe-commits
@@ -2029,6 +2029,10 @@ def warn_frame_address : Warning< "calling '%0' with a nonzero argument is unsafe">, InGroup, DefaultIgnore; +def warn_frame_address_missing_noinline: Warning< + "calling '%0' in function not marked __attribute__((noinline)) may return a caller's

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-03-02 Thread via cfe-commits
https://github.com/Sirraide requested changes to this pull request. https://github.com/llvm/llvm-project/pull/82966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

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

[clang] [llvm] [NFC] Use fold expressions to replace discarded initializer_lists (PR #83693)

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

[clang] [llvm] [NFC] Use fold expressions to replace discarded initializer_lists (PR #83693)

2024-03-02 Thread via cfe-commits
Sirraide wrote: LGTM. This seems like a straight-forward change, so I don’t see anything that could really go wrong here. https://github.com/llvm/llvm-project/pull/83693 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [X86] Use generic CPU tuning when tune-cpu is empty (PR #83631)

2024-03-02 Thread via cfe-commits
AtariDreams wrote: > Please check the CI - these failures look relevant > > ``` > Failed Tests (4): > lld :: COFF/lto-cpu-string.ll > lld :: COFF/lto.ll > lld :: ELF/lto/cpu-string.ll > lld :: MachO/lto-cpu-string.ll > ``` they are and I am getting to them.

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-02 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: ``` error: 'expected-error' diagnostics seen but not expected: File /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-6mhbj-1/llvm-project/clang-ci/clang/test/Modules/explicit-build-overlap.cpp Line 11: module use does not directly depend on a module exporting

[clang] [llvm] [NFC] Use fold expressions to replace discarded initializer_lists (PR #83693)

2024-03-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: None (MagentaTreehouse) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/83693.diff 4 Files Affected: - (modified)

[clang] [llvm] [NFC] Use fold expressions to replace discarded initializer_lists (PR #83693)

2024-03-02 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,

[clang] [llvm] [NFC] Use fold expressions to replace discarded initializer_lists (PR #83693)

2024-03-02 Thread via cfe-commits
https://github.com/MagentaTreehouse created https://github.com/llvm/llvm-project/pull/83693 None >From 7c5498a5844cd5000c31ebef7d9295c98d94f75e Mon Sep 17 00:00:00 2001 From: Mingyi Chen Date: Sat, 2 Mar 2024 16:06:39 -0500 Subject: [PATCH] [NFC] Use fold expressions to replace discarded

[clang] 051e910 - [clang-format][NFC] Replace Style.isCpp() with IsCpp (#83533)

2024-03-02 Thread via cfe-commits
Author: Owen Pan Date: 2024-03-02T12:57:24-08:00 New Revision: 051e910b8b6c59fc94d019fa01ae4507b1c81498 URL: https://github.com/llvm/llvm-project/commit/051e910b8b6c59fc94d019fa01ae4507b1c81498 DIFF: https://github.com/llvm/llvm-project/commit/051e910b8b6c59fc94d019fa01ae4507b1c81498.diff

[clang] [clang-format][NFC] Replace Style.isCpp() with IsCpp (PR #83533)

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

[clang] [clang-format][NFC] Replace Style.isCpp() with IsCpp (PR #83533)

2024-03-02 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/83533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes We were crashing on trying to print the layout of an uninstantiated template, which obviously doesn’t make sense. This fixes #83684. --- Full diff: https://github.com/llvm/llvm-project/pull/83688.diff 3 Files

[clang] [Clang] [Sema] Do not attempt to dump the layout of dependent types when `-fdump-record-layouts-complete` is passed (PR #83688)

2024-03-02 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/83688 We were crashing on trying to print the layout of an uninstantiated template, which obviously doesn’t make sense. This fixes #83684. >From 4abc148104769bd756042c73edeb7ee54397a05f Mon Sep 17 00:00:00 2001

[clang] f25debe - [clang][Interp][NFC] Remove some leftover debug output

2024-03-02 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-03-02T18:56:43+01:00 New Revision: f25debe58b61a6d66e662d60fd4c060adcd74630 URL: https://github.com/llvm/llvm-project/commit/f25debe58b61a6d66e662d60fd4c060adcd74630 DIFF: https://github.com/llvm/llvm-project/commit/f25debe58b61a6d66e662d60fd4c060adcd74630.diff

[clang] dfb8a15 - [clang][Interp][NFC] Make a local variable const

2024-03-02 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-03-02T18:56:35+01:00 New Revision: dfb8a1531c962238a63db199dff973deec47e4ff URL: https://github.com/llvm/llvm-project/commit/dfb8a1531c962238a63db199dff973deec47e4ff DIFF: https://github.com/llvm/llvm-project/commit/dfb8a1531c962238a63db199dff973deec47e4ff.diff

[clang] [clang][AST] fix dereference on class/struct layouts check. (PR #83686)

2024-03-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David CARLIER (devnexen) Changes close #83671. --- Full diff: https://github.com/llvm/llvm-project/pull/83686.diff 1 Files Affected: - (modified) clang/lib/AST/RecordLayoutBuilder.cpp (+3-3) ``diff diff --git

[clang] [clang][AST] fix dereference on class/struct layouts check. (PR #83686)

2024-03-02 Thread David CARLIER via cfe-commits
https://github.com/devnexen created https://github.com/llvm/llvm-project/pull/83686 close #83671. >From 49c888993ee4ce566db8f5b8d4932cee81b8f701 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 2 Mar 2024 18:00:10 + Subject: [PATCH] [clang][AST] fix dereference on class/struct

[clang] b901b0d - [clang][Interp] Reject dummy pointers from __builtin_strcmp()

2024-03-02 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-03-02T18:28:51+01:00 New Revision: b901b0d3edeaa30e363af4cb9dc76d6a7072e6cf URL: https://github.com/llvm/llvm-project/commit/b901b0d3edeaa30e363af4cb9dc76d6a7072e6cf DIFF: https://github.com/llvm/llvm-project/commit/b901b0d3edeaa30e363af4cb9dc76d6a7072e6cf.diff

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

2024-03-02 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,15 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core.DivideZero -std=c++23 -verify %s +// expected-no-diagnostics + +struct S +{ +constexpr auto operator==(this auto, S) +{ +return true; +} +}; + +int main() +{ +return S {} == S {}; +}

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

2024-03-02 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,15 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core.DivideZero -std=c++23 -verify %s steakhal wrote: ```suggestion // RUN: %clang_analyze_cc1 -analyzer-checker=core -std=c++23 -verify %s ``` https://github.com/llvm/llvm-project/pull/83585

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

2024-03-02 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,15 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core.DivideZero -std=c++23 -verify %s +// expected-no-diagnostics + +struct S +{ +constexpr auto operator==(this auto, S) +{ +return true; +} +}; + +int main() +{ +return S {} == S {}; +}

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

2024-03-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: I feel like it's better than crashing, but I suspect it only resolves that, right? https://github.com/llvm/llvm-project/pull/83585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

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

[clang] a30ba2c - [clang][Interp][NFC] Emit diagnostic for unknown builtins

2024-03-02 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-03-02T18:28:12+01:00 New Revision: a30ba2ca21b0da49631c6d0c52108e4a080a451e URL: https://github.com/llvm/llvm-project/commit/a30ba2ca21b0da49631c6d0c52108e4a080a451e DIFF: https://github.com/llvm/llvm-project/commit/a30ba2ca21b0da49631c6d0c52108e4a080a451e.diff

[clang] 57f599d - [clang][Interp] Improve handling of external variables

2024-03-02 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-03-02T17:40:16+01:00 New Revision: 57f599d6443a910a213094646e7e26837a1d4417 URL: https://github.com/llvm/llvm-project/commit/57f599d6443a910a213094646e7e26837a1d4417 DIFF: https://github.com/llvm/llvm-project/commit/57f599d6443a910a213094646e7e26837a1d4417.diff

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

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

[clang] [clang][StaticAnalyzer] fix function evalCall() typo in CheckerDocumentation (PR #83677)

2024-03-02 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/83677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][StaticAnalyzer] fix function evalCall() typo in CheckerDocumentation (PR #83677)

2024-03-02 Thread Balazs Benics via cfe-commits
steakhal wrote: Makes sense, but how did it build before the fix? I thought by inheriting from `Checker` it would take the address of the member function with the expected signature to store them inside vectors. How could it take the address of a nonexisting member function?

[clang] [llvm] [X86] Use generic CPU tuning when tune-cpu is empty (PR #83631)

2024-03-02 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: Please check the CI - these failures look relevant ``` Failed Tests (4): lld :: COFF/lto-cpu-string.ll lld :: COFF/lto.ll lld :: ELF/lto/cpu-string.ll lld :: MachO/lto-cpu-string.ll ``` https://github.com/llvm/llvm-project/pull/83631

[clang] [clang][Interp] Merge ByteCodeExprGen and ByteCodeStmtGen (PR #83683)

2024-03-02 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes When implementing support for `StmtExpr`, I ran into a problem: there is no way for `ByteCodeExprGen` to visit a statement.

[clang] Fix null-deref thanks to an attribute on a global declarator chunk (PR #83611)

2024-03-02 Thread Erich Keane via cfe-commits
erichkeane wrote: Note to self when I get back to work: 1- Update commit message with bug #[ 83611](https://github.com/llvm/llvm-project/pull/83611) 2- Add bug # to release note. https://github.com/llvm/llvm-project/pull/83611 ___ cfe-commits mailing

[clang] Fix null-deref thanks to an attribute on a global declarator chunk (PR #83611)

2024-03-02 Thread Erich Keane via cfe-commits
@@ -100,6 +100,12 @@ void AttributePool::takePool(AttributePool ) { pool.Attrs.clear(); } +void AttributePool::takeFrom(ParsedAttributesView , AttributePool ) { + assert( != this && "AttributePool can't take attributes from itself"); + llvm::for_each(List.AttrList,

[clang] [clang][AMDGPU] Don't define feature macros on host code (PR #83558)

2024-03-02 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: When clang does host compilation, it essentially makes an assumption that the generated IR for host does not depend on the assumed GPU arch, or, the generated IR may be affected by assumed GPU arch, but it won't affect the program output. This is true in most cases. For

[clang] [llvm] [RISCV] RISCV vector calling convention (1/2) (PR #77560)

2024-03-02 Thread Brandon Wu via cfe-commits
4vtomat wrote: > I tried compiling it and then got two warnings. > > ``` > llvm-project/clang/lib/CodeGen/CGDebugInfo.cpp:1408:11: warning: enumeration > value 'CC_RISCVVectorCall' not handled in switch [-Wswitch] > 1408 | switch (CC) { > | ^~ > 1 warning generated. >

[clang] [clang][StaticAnalyzer] fix function evalCall() typo in CheckerDocumentation (PR #83677)

2024-03-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Exile (mzyKi) Changes ```bool evalCall(const CallEvent Call, CheckerContext C)``` is corret form. --- Full diff: https://github.com/llvm/llvm-project/pull/83677.diff 1 Files Affected: - (modified)

[clang] [clang][StaticAnalyzer] fix function evalCall() typo in CheckerDocumentation (PR #83677)

2024-03-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Exile (mzyKi) Changes ```bool evalCall(const CallEvent Call, CheckerContext C)``` is corret form. --- Full diff: https://github.com/llvm/llvm-project/pull/83677.diff 1 Files Affected: - (modified)

[clang] [clang][StaticAnalyzer] fix function evalCall() typo in CheckerDocumentation (PR #83677)

2024-03-02 Thread via cfe-commits
https://github.com/mzyKi created https://github.com/llvm/llvm-project/pull/83677 ```bool evalCall(const CallEvent , CheckerContext )``` is corret form. >From 9779c43a8e603efdf93344780702de1ff343a676 Mon Sep 17 00:00:00 2001 From: miaozhiyuan Date: Sat, 2 Mar 2024 23:16:58 +0800 Subject:

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-02 Thread David CARLIER via cfe-commits
https://github.com/devnexen updated https://github.com/llvm/llvm-project/pull/83675 >From 685c7e56c1ce8d2e11c0f9a97f6c4d24f63a05b8 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 2 Mar 2024 14:56:15 + Subject: [PATCH] [clang][StaticAnalyzer] Adding getentropy to CStringChecker.

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

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

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David CARLIER (devnexen) Changes since it went way beyond just openbsd, adding basic check for possible misusage. --- Full diff: https://github.com/llvm/llvm-project/pull/83675.diff 1 Files Affected: - (modified)

[clang] [clang][StaticAnalyzer] Adding getentropy to CStringChecker. (PR #83675)

2024-03-02 Thread David CARLIER via cfe-commits
https://github.com/devnexen created https://github.com/llvm/llvm-project/pull/83675 since it went way beyond just openbsd, adding basic check for possible misusage. >From f9e571bfa3e64d9fb54e965f3c363aef40fa3b80 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 2 Mar 2024 14:56:15 +

[clang] [clang][RISCV] Support function attribute __attribute__((target("+attr"))) (PR #83674)

2024-03-02 Thread Brandon Wu via cfe-commits
4vtomat wrote: Related request: https://github.com/riscv-non-isa/riscv-c-api-doc/issues/69 https://github.com/llvm/llvm-project/pull/83674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][RISCV] Support function attribute __attribute__((target("+attr"))) (PR #83674)

2024-03-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: Brandon Wu (4vtomat) Changes It is currently not possible to use "RVV type" and "RVV intrinsics" if the "zve32x" is not enabled globally. However in some cases we may want to use them only in some

[clang] [clang][RISCV] Support function attribute __attribute__((target("+attr"))) (PR #83674)

2024-03-02 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat created https://github.com/llvm/llvm-project/pull/83674 It is currently not possible to use "RVV type" and "RVV intrinsics" if the "zve32x" is not enabled globally. However in some cases we may want to use them only in some functions, for instance: ``` #include

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-02 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: The failing test on Windows is unrelated. I've seen it fail in other builds before. https://github.com/llvm/llvm-project/pull/83625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-02 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz updated https://github.com/llvm/llvm-project/pull/83625 >From b62919c2ce24feb3c75a5bbecce3d6b6ee8e5b7e Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Tue, 16 Jan 2024 16:40:47 -0600 Subject: [PATCH 1/3] [Frontend] Add leaf constructs and association to

[clang] [Headers][X86] Add specific results to comparisons (PR #83316)

2024-03-02 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @pogo This doesn't match what we did for the various cmp intrinsics in emmintrin.h - should it? ```cpp /// Compares each of the corresponding signed 32-bit values of the ///128-bit integer vectors to determine if the values in the first operand ///are greater than those

[clang] [analyzer] Improve some comments in ArrayBoundCheckerV2 (NFC) (PR #83545)

2024-03-02 Thread Gábor Spaits via cfe-commits
@@ -301,21 +301,27 @@ compareValueToThreshold(ProgramStateRef State, NonLoc Value, NonLoc Threshold, // calling `evalBinOpNN`: if (isNegative(SVB, State, Value) && isUnsigned(SVB, Threshold)) { if (CheckEquality) { - // negative_value == unsigned_value is always

[clang] [clang][RISCV] Reorder sema check for RVV type (PR #83553)

2024-03-02 Thread Brandon Wu via cfe-commits
4vtomat wrote: Maybe we can modify the current test case, it would get the error message "RISC-V type 'vfloat64m1_t' ... requires the 'zve64x' extension", but should be 'zve64d' instead. https://github.com/llvm/llvm-project/pull/83553 ___

[clang] [clang][RISCV] Reorder sema check for RVV type (PR #83553)

2024-03-02 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat updated https://github.com/llvm/llvm-project/pull/83553 >From 8ad3a883d29155dc26c79abdd57ea0f72d046dfc Mon Sep 17 00:00:00 2001 From: Brandon Wu Date: Fri, 1 Mar 2024 00:40:21 -0800 Subject: [PATCH 1/3] [clang][RISCV] Reorder sema check for RVV type Currently using

[clang] Add new flag -Wreturn-mismatch (PR #82872)

2024-03-02 Thread Bhuminjay Soni via cfe-commits
11happy wrote: Its a Humble Ping! https://github.com/llvm/llvm-project/pull/82872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Enable OpenCL hostcall printf (WIP) (PR #72556)

2024-03-02 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -3616,6 +3617,12 @@ unsigned FunctionDecl::getBuiltinID(bool ConsiderWrapperFunctions) const { if (!ConsiderWrapperFunctions && getStorageClass() == SC_Static) return 0; + // AMDGCN implementation supports printf as a builtin + // for OpenCL + if