[clang] [llvm] [RISCV] Add riscv_atomics.h and Zawrs/Zalrsc builtins (PR #94578)

2024-06-06 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/94578 >From 57c914eaefa7e59aa51a2b1e730fe1b7d6d10e57 Mon Sep 17 00:00:00 2001 From: Wang Pengcheng Date: Thu, 6 Jun 2024 13:48:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

2024-06-06 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/94559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] NFCI: Make ASTContext optional in the AST text dumper again (PR #94522)

2024-06-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. Can't say much about this functionally, but it fixes my problems, so LGTM from that side. https://github.com/llvm/llvm-project/pull/94522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2024-06-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. LGTM. I guess we should close https://github.com/llvm/llvm-project/pull/89449 after merging this. https://github.com/llvm/llvm-project/pull/93046 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] fb0c705 - [clang] NFCI: Make ASTContext optional in the AST text dumper again (#94522)

2024-06-06 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-06-06T04:14:10-03:00 New Revision: fb0c705dbf27e3ab84d726ad30e172806a530c21 URL: https://github.com/llvm/llvm-project/commit/fb0c705dbf27e3ab84d726ad30e172806a530c21 DIFF: https://github.com/llvm/llvm-project/commit/fb0c705dbf27e3ab84d726ad30e172806a530c21.dif

[clang] [clang] NFCI: Make ASTContext optional in the AST text dumper again (PR #94522)

2024-06-06 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/94522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PowerPC] Support -mno-red-zone option (PR #94581)

2024-06-06 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 commented: Are there backend cases that shows with -disable-red-zone, the final assembly is still correct? https://github.com/llvm/llvm-project/pull/94581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [PowerPC] Support -mno-red-zone option (PR #94581)

2024-06-06 Thread Chen Zheng via cfe-commits
https://github.com/chenzheng1030 edited https://github.com/llvm/llvm-project/pull/94581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Decouple feature dependency expansion. (PR #94279)

2024-06-06 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: > Not supporting "neon" as a name would seem like a mistake if it was removed, > but I don't believe this patch does that. It does https://github.com/llvm/llvm-project/pull/94279 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-06 Thread Balazs Benics via cfe-commits
@@ -907,6 +945,73 @@ void StreamChecker::preWrite(const FnDescription *Desc, const CallEvent &Call, C.addTransition(State); } +static std::optional getPointeeType(const MemRegion *R) { + if (!R) +return std::nullopt; + if (const auto *ER = dyn_cast(R)) +return ER-

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-06 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,412 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

[clang] [PowerPC] Support -mno-red-zone option (PR #94581)

2024-06-06 Thread Qiu Chaofan via cfe-commits
ecnelises wrote: No. `-disable-red-zone` does nothing but add `noredzone` IR attribute to functions. We need to add cases to test for `noredzone` behavior on PPC (arm and x86 have). https://github.com/llvm/llvm-project/pull/94581 ___ cfe-commits mail

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

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

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Pierre d'Herbemont via cfe-commits
pdherbemont wrote: > LGTM assuming you will be fixing the buildkite failures. > > You may still need to wait on @AaronBallman's approval. Fixed the buildkite issue – they were regression from the latest changes about acquired_{before,after} handling. Also pinged @AaronBallman. Thank you all fo

[clang] [clang-format] add an option to insert a space only for non-code block empty braces, not for empty parentheses (PR #93634)

2024-06-06 Thread Kohei Asano via cfe-commits
https://github.com/khei4 updated https://github.com/llvm/llvm-project/pull/93634 >From 4cdd7bd2a916740f886939d1ec0395b5915eb3c2 Mon Sep 17 00:00:00 2001 From: Kohei Asano Date: Mon, 3 Jun 2024 09:15:44 +0900 Subject: [PATCH 1/2] [clang-format] add an option to insert a space only for empty brac

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-06 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,412 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

[clang] [analyzer] Factor out NoOwnershipChangeVisitor (PR #94357)

2024-06-06 Thread Kristóf Umann via cfe-commits
Szelethus wrote: Yes, it is, sorry about that :) https://github.com/llvm/llvm-project/pull/94357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Factor out NoOwnershipChangeVisitor (PR #94357)

2024-06-06 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus edited https://github.com/llvm/llvm-project/pull/94357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-06 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,412 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-06-06 Thread Vyacheslav Levytskyy via cfe-commits
@@ -114,15 +118,17 @@ Example: ``-target spirv64v1.0`` can be used to compile for SPIR-V version 1.0 with 64-bit pointer width. +``-target spirv64-amd-amdhsa`` can be used to compile for AMDGCN flavoured SPIR-V version 1.6 with 64-bit pointer width Vyachesl

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-06 Thread Clement Courbet via cfe-commits
@@ -36,6 +36,111 @@ void extractNodesByIdTo(ArrayRef Matches, StringRef ID, Nodes.insert(Match.getNodeAs(ID)); } +// If `D` has a const-qualified overload with otherwise identical +// ref-qualifiers, returns that overload. +const CXXMethodDecl *findConstOverload(const CXX

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-06-06 Thread Vyacheslav Levytskyy via cfe-commits
@@ -0,0 +1,35 @@ +; RUN: llc -O0 -mtriple=spirv64-amd-amdhsa --spirv-ext=+SPV_INTEL_function_pointers %s -o - | FileCheck %s +; TODO: %if spirv-tools %{ llc -O0 -mtriple=spirv64-amd-amdhsa %s -o - -filetype=obj | spirv-val %} + +; CHECK-DAG: OpCapability Int8 +; CHECK-DAG: OpCap

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-06-06 Thread Vyacheslav Levytskyy via cfe-commits
@@ -0,0 +1,35 @@ +; RUN: llc -O0 -mtriple=spirv64-amd-amdhsa --spirv-ext=+SPV_INTEL_function_pointers %s -o - | FileCheck %s +; TODO: %if spirv-tools %{ llc -O0 -mtriple=spirv64-amd-amdhsa %s -o - -filetype=obj | spirv-val %} + +; CHECK-DAG: OpCapability Int8 +; CHECK-DAG: OpCap

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-06 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,412 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-06-06 Thread Vyacheslav Levytskyy via cfe-commits
@@ -0,0 +1,35 @@ +; RUN: llc -O0 -mtriple=spirv64-amd-amdhsa --spirv-ext=+SPV_INTEL_function_pointers %s -o - | FileCheck %s +; TODO: %if spirv-tools %{ llc -O0 -mtriple=spirv64-amd-amdhsa %s -o - -filetype=obj | spirv-val %} + +; CHECK-DAG: OpCapability Int8 +; CHECK-DAG: OpCap

[clang] [PowerPC] Support -mno-red-zone option (PR #94581)

2024-06-06 Thread Chen Zheng via cfe-commits
chenzheng1030 wrote: > No. `-disable-red-zone` does nothing but add `noredzone` IR attribute to > functions. We need to add cases to test for `noredzone` behavior on PPC (arm > and x86 have). Yeah, go ahead to add some backend tests first to make sure we have good functionality for `noredzone

[clang] [llvm] [AArch64] Decouple feature dependency expansion. (PR #94279)

2024-06-06 Thread David Green via cfe-commits
davemgreen wrote: Yeah I had just seen that error message before you edited your comment. There are some examples of neon I found in a quick search, which were presumably added for AArch32: https://github.com/aaru-dps/Aaru.Checksums.Native/blob/bd5051ce181b225a7662bfb764ebcc5cbe7542b2/simd.h#L1

[clang] f1e78f7 - [clang][Interp] Handle lvalue APValues in visitAPValueInitializer()

2024-06-06 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-06T10:24:26+02:00 New Revision: f1e78f776908f2bc1759eae25381f576f62728a2 URL: https://github.com/llvm/llvm-project/commit/f1e78f776908f2bc1759eae25381f576f62728a2 DIFF: https://github.com/llvm/llvm-project/commit/f1e78f776908f2bc1759eae25381f576f62728a2.diff LO

[clang] [libclc] [llvm] [AMDGPU] Add a new target gfx1152 (PR #94534)

2024-06-06 Thread Jay Foad via cfe-commits
@@ -1534,6 +1534,12 @@ def FeatureISAVersion11_5_1 : FeatureSet< FeatureVGPRSingleUseHintInsts, Feature1_5xVGPRs])>; +def FeatureISAVersion11_5_2 : FeatureSet< jayfoad wrote: I don't have a good answer to this except "it's what we normally do". Othe

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-06 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,412 @@ +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -triple x86_64-linux-gnu \ +// RUN: -analyzer-checker=core,unix.Stream,alpha.security.taint \ +// RUN: -analyzer-checker=debug.ExprInspection + +#include "Inputs/system-header-simulator-for-simple-stream.h"

[clang] [libclc] [llvm] [AMDGPU] Add a new target gfx1152 (PR #94534)

2024-06-06 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. LGTM. Could also update `flang/cmake/modules/AddFlangOffloadRuntime.cmake` but I don't really know if it's our responsibility to update Flang. https://github.com/llvm/llvm-project/pull/94534 ___

[clang-tools-extra] [clang-tidy] Remove redundant LINK_LIBS (PR #94588)

2024-06-06 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/94588 clangAnalysis is already being pulled in via clang_target_link_libraries(). Also listing it in LINK_LIBS means that we'll link both against the static libraries and the shared libclang-cpp.so library if CLANG_LINK_

[clang-tools-extra] [clang-tidy] Remove redundant LINK_LIBS (PR #94588)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Nikita Popov (nikic) Changes clangAnalysis is already being pulled in via clang_target_link_libraries(). Also listing it in LINK_LIBS means that we'll link both against the static libraries and the shared libclang-cpp.so library if C

[clang] [cmake] Respect CLANG_LINK_CLANG_DYLIB for objlibs (PR #93454)

2024-06-06 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/93454 >From b0bcd36b62a93e7d8bd0f7f01e857ce9aa7544c2 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 27 May 2024 11:56:41 +0200 Subject: [PATCH 1/2] [cmake] Respect CLANG_LINK_CLANG_DYLIB for objlibs add_clang_lib

[clang] 7091dfc - [clang-repl] Lay the foundation of pretty printing for C. (#89811)

2024-06-06 Thread via cfe-commits
Author: Vassil Vassilev Date: 2024-06-06T11:49:10+03:00 New Revision: 7091dfc0e49b8c79f9e1daf6ab0ca0e65f30f347 URL: https://github.com/llvm/llvm-project/commit/7091dfc0e49b8c79f9e1daf6ab0ca0e65f30f347 DIFF: https://github.com/llvm/llvm-project/commit/7091dfc0e49b8c79f9e1daf6ab0ca0e65f30f347.dif

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-06 Thread Jay Foad via cfe-commits
jayfoad wrote: Is there really a good use case for this? Can you use regular stores to addrspace(7) instead? @krzysz00 Also, do you really need a separate builtin for every legal type, or is there some way they can be type-overloaded? https://github.com/llvm/llvm-project/pull/94576 __

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-06 Thread Mark Zhuang via cfe-commits
zqb-all wrote: Need to add zicond, which is not in RVA22S64Features https://github.com/llvm/llvm-project/pull/94564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-06 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Is there really a good use case for this? Can you use regular stores to > addrspace(7) instead? @krzysz00 I see these regularly used via inline asm in various ML code. We need to expose these in some way to stop people from doing that > > Also, do you really need a separate

[clang] Fix spurious availability warning (PR #94377)

2024-06-06 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun ready_for_review https://github.com/llvm/llvm-project/pull/94377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add builtins for instrinsic `llvm.amdgcn.raw.buffer.store` (PR #94576)

2024-06-06 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,264 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// REQUIRES: amdgpu-registered-target +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu verde -emit-llvm -o - %s | FileCheck %s --check-prefixes=VERDE +// RUN: %clang_cc

[clang] Fix spurious availability warning (PR #94377)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Gábor Horváth (Xazax-hun) Changes The availability attributes are stored on the function declarations. The code was looking for them in the function template declarations. This resulted in spuriously diagnosing availablity issues in conte

[clang] Fix spurious availability warning (PR #94377)

2024-06-06 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Thos should fix the non-strict availability related repro from https://github.com/llvm/llvm-project/issues/40423 . It does not fix the strict case which is a separate codepath, so I did not mark this PR as fixing that bug report. https://github.com/llvm/llvm-project/pull/943

[clang] Fixed grammatical error in "enum specifier" error msg #94443 (PR #94592)

2024-06-06 Thread via cfe-commits
https://github.com/kper created https://github.com/llvm/llvm-project/pull/94592 As discussed in #94443, this PR changes the wording to be more correct. >From 6ff1ec93e93e988b4e4fb2f490d5ea5a7d6e506a Mon Sep 17 00:00:00 2001 From: Kevin Per Date: Wed, 5 Jun 2024 18:45:10 + Subject: [PATCH] F

[clang] Fixed grammatical error in "enum specifier" error msg #94443 (PR #94592)

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

[clang] Fixed grammatical error in "enum specifier" error msg #94443 (PR #94592)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (kper) Changes As discussed in #94443, this PR changes the wording to be more correct. --- Full diff: https://github.com/llvm/llvm-project/pull/94592.diff 10 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticSemaKind

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-06 Thread Balazs Benics via cfe-commits
@@ -907,6 +945,73 @@ void StreamChecker::preWrite(const FnDescription *Desc, const CallEvent &Call, C.addTransition(State); } +static std::optional getPointeeType(const MemRegion *R) { + if (!R) +return std::nullopt; + if (const auto *ER = dyn_cast(R)) +return ER-

[clang] Fix spurious availability warning (PR #94377)

2024-06-06 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/94377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [cmake] Respect CLANG_LINK_CLANG_DYLIB for objlibs (PR #93454)

2024-06-06 Thread Nikita Popov via cfe-commits
nikic wrote: I suspect I may have misdiagnosed the issue, and the actual problem may be just https://github.com/llvm/llvm-project/pull/94588. I'll double check whether this change is necessary before landing. https://github.com/llvm/llvm-project/pull/93454 _

[clang] Fix spurious non-strict availability warning (PR #94377)

2024-06-06 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/94377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/93408 Unicorn! · GitHub body { background-color: #f1f1f1; margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } .container { margin: 50px au

[clang] [analyzer] Refine invalidation caused by `fread` (PR #93408)

2024-06-06 Thread Balazs Benics via cfe-commits
steakhal wrote: Addressed all the feedback. https://github.com/llvm/llvm-project/pull/93408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-06 Thread Clement Courbet via cfe-commits
@@ -36,6 +36,111 @@ void extractNodesByIdTo(ArrayRef Matches, StringRef ID, Nodes.insert(Match.getNodeAs(ID)); } +// If `D` has a const-qualified overload with otherwise identical +// ref-qualifiers, returns that overload. +const CXXMethodDecl *findConstOverload(const CXX

[clang] [llvm] [ARM] r11 is reserved when using -mframe-chain=aapcs (PR #86951)

2024-06-06 Thread via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/86951 >From 1e141e80b0abf45f160c06f8eb39623df16434d8 Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Thu, 6 Jun 2024 09:34:13 +0100 Subject: [PATCH 1/2] [IR] Add target-independent option to preserve frame-poin

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,81 @@ +//=== ModuleDependencyScanner.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: Apa

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -740,6 +741,21 @@ DirectoryBasedGlobalCompilationDatabase::getProjectInfo(PathRef File) const { return Res->PI; } +std::shared_ptr +DirectoryBasedGlobalCompilationDatabase::getProjectModules(PathRef File) const { + CDBLookupRequest Req; + Req.FileName = File; + Req.S

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -222,6 +222,9 @@ class TUScheduler { /// Cache (large) preamble data in RAM rather than temporary files on disk. bool StorePreamblesInMemory = false; +/// Enable experimental support for modules. +bool ExperimentalModulesSupport = false; Chu

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -42,6 +42,8 @@ namespace clang { namespace clangd { + +class ModulesBuilder; ChuanqiXu9 wrote: Done https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Done https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,339 @@ +//===- ModulesBuilder.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-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -149,9 +154,13 @@ struct PreambleBuildStats { /// If \p PreambleCallback is set, it will be run on top of the AST while /// building the preamble. /// If Stats is not non-null, build statistics will be exported there. +/// If \p RequiredModuleBuilder is not null, it will sca

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Done https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -192,8 +192,10 @@ TEST(PreamblePatchTest, PatchesPreambleIncludes) { TU.AdditionalFiles["b.h"] = ""; TU.AdditionalFiles["c.h"] = ""; auto PI = TU.inputs(FS); - auto BaselinePreamble = buildPreamble( - TU.Filename, *buildCompilerInvocation(PI, Diags), PI, true, nu

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -44,6 +44,8 @@ struct ParseOptions { bool ImportInsertions = false; }; +class ModulesBuilder; ChuanqiXu9 wrote: Done https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lis

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -208,15 +208,16 @@ ClangdServer::Options::operator TUScheduler::Options() const { Opts.UpdateDebounce = UpdateDebounce; Opts.ContextProvider = ContextProvider; Opts.PreambleThrottler = PreambleThrottler; + Opts.ExperimentalModulesSupport = ExperimentalModulesSupport;

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,115 @@ +//===- ModulesBuilder.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-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,370 @@ +//===- ModulesBuilder.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-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,370 @@ +//===- ModulesBuilder.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-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,115 @@ +//===- ModulesBuilder.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-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,370 @@ +//===- ModulesBuilder.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-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Done https://github.com/llvm/llvm-project/pull/66462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,87 @@ +//===- PrerequisiteModules.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: Apa

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-06 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/94362 >From 8a7e3ee49295b55193440da6b796c9ada43ee5ef Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Tue, 4 Jun 2024 12:49:39 + Subject: [PATCH 1/2] [clang-tidy] `doesNotMutateObject`: Handle calls to me

[clang] [llvm] [ARM] r11 is reserved when using -mframe-chain=aapcs (PR #86951)

2024-06-06 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 eea05c6b3369736b703e2a5e3ca08ba6ad8a51dc 7272dd8f58e9f445f758a10ae3d91aaa166c91f1 --

[clang] [libc] [llvm] [AMDGPU] Implement variadic functions by IR lowering (PR #93362)

2024-06-06 Thread Jon Chesterfield via cfe-commits
@@ -992,6 +993,8 @@ void AMDGPUPassConfig::addIRPasses() { if (isPassEnabled(EnableImageIntrinsicOptimizer)) addPass(createAMDGPUImageIntrinsicOptimizerPass(&TM)); + addPass(createExpandVariadicsPass(ExpandVariadicsMode::Lowering)); JonChesterfield wrot

[clang] [serialization] no transitive decl change (PR #92083)

2024-06-06 Thread David Spickett via cfe-commits
DavidSpickett wrote: > Thanks. Reproduced. But it surprised me that I can't run the commands you > mentioned, but I need to run: > ./bin/lldb-dotest -p TestTemplateWithSameArg.py -G gmodules Running the tests as modules is perhaps opt in, we have the ability to run them with different debug in

[clang] [llvm] [ARM] r11 is reserved when using -mframe-chain=aapcs (PR #86951)

2024-06-06 Thread via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/86951 >From 1e141e80b0abf45f160c06f8eb39623df16434d8 Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Thu, 6 Jun 2024 09:34:13 +0100 Subject: [PATCH 1/4] [IR] Add target-independent option to preserve frame-poin

[clang] a86c1e7 - [clang][Interp] Member Pointers (#91303)

2024-06-06 Thread via cfe-commits
Author: Timm Baeder Date: 2024-06-06T11:17:48+02:00 New Revision: a86c1e7175d4acd8357326184bf4f88c8192676f URL: https://github.com/llvm/llvm-project/commit/a86c1e7175d4acd8357326184bf4f88c8192676f DIFF: https://github.com/llvm/llvm-project/commit/a86c1e7175d4acd8357326184bf4f88c8192676f.diff L

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-06-06 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/91303 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I think that needs to happen eventually as well Agreed. > similar to preambles supporting in-memory storage, and it's actually not that > hard, GenerateModuleInterfaceAction already has an overrideable > CreateOutputFile method. I am sli

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-06 Thread Clement Courbet via cfe-commits
@@ -259,9 +258,9 @@ void UnnecessaryCopyInitialization::registerMatchers(MatchFinder *Finder) { .bind("blockStmt"); }; - Finder->addMatcher(LocalVarCopiedFrom(anyOf(isConstRefReturningFunctionCall(), - isConstRefReturni

[clang-tools-extra] [clang-tidy] `doesNotMutateObject`: Handle calls to member functions … (PR #94362)

2024-06-06 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/94362 >From 8a7e3ee49295b55193440da6b796c9ada43ee5ef Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Tue, 4 Jun 2024 12:49:39 + Subject: [PATCH 1/3] [clang-tidy] `doesNotMutateObject`: Handle calls to me

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-06-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Just a note, I am building on Windows with MSVC cl.exe and ninja and get this: > > ``` > C:\Program Files\Microsoft Visual > Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\memory(3138): error > C2027: use of undefined type 'clang::clangd::ProjectModules' > ``` > >

[clang] [libc] [llvm] [AMDGPU] Implement variadic functions by IR lowering (PR #93362)

2024-06-06 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,1037 @@ +//===-- ExpandVariadicsPass.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: Apach

[clang] 86295dc - Revert "[Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (#91879)" (#94597)

2024-06-06 Thread via cfe-commits
Author: bgra8 Date: 2024-06-06T11:46:33+02:00 New Revision: 86295dc197db2f08f4eb582ed1026a8f74ac3338 URL: https://github.com/llvm/llvm-project/commit/86295dc197db2f08f4eb582ed1026a8f74ac3338 DIFF: https://github.com/llvm/llvm-project/commit/86295dc197db2f08f4eb582ed1026a8f74ac3338.diff LOG: Re

[clang] Revert "[Analyzer][CFG] Correctly handle rebuilt default arg and default init expression (#91879)" (PR #94597)

2024-06-06 Thread via cfe-commits
https://github.com/bgra8 closed https://github.com/llvm/llvm-project/pull/94597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [AMDGPU] Implement variadic functions by IR lowering (PR #93362)

2024-06-06 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,1037 @@ +//===-- ExpandVariadicsPass.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: Apach

[clang] 026fbdf - [clang][Interp] Handle one-past-the-end pointers in SubPtr

2024-06-06 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-06T11:48:31+02:00 New Revision: 026fbdf934d4adc8b6abe544ba1bcfa3b64293ac URL: https://github.com/llvm/llvm-project/commit/026fbdf934d4adc8b6abe544ba1bcfa3b64293ac DIFF: https://github.com/llvm/llvm-project/commit/026fbdf934d4adc8b6abe544ba1bcfa3b64293ac.diff LO

[clang] e285818 - Revert "[serialization] no transitive decl change (#92083)"

2024-06-06 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-06-06T17:49:59+08:00 New Revision: e2858189bd99e6914dc2f63ab55b053a74b4e58b URL: https://github.com/llvm/llvm-project/commit/e2858189bd99e6914dc2f63ab55b053a74b4e58b DIFF: https://github.com/llvm/llvm-project/commit/e2858189bd99e6914dc2f63ab55b053a74b4e58b.diff LO

[clang] [amdgpu] Pass variadic arguments without splitting (PR #94083)

2024-06-06 Thread Matt Arsenault via cfe-commits
arsenm wrote: > @arsenm You're right about passing larger things indirectly. I'm intending to > land this as-is, with the types inlined, as that unblocks #93362. I'm nervous > that the extra pointer indirection will hit the same memory error that > tweaking codegen in that patch hits (it's a s

[clang] [amdgpu] Pass variadic arguments without splitting (PR #94083)

2024-06-06 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,293 @@ +// REQUIRES: amdgpu-registered-target +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature +// RUN: %clang_cc1 -cc1 -std=c23 -triple amdgcn-amd-amdhsa -emit-llvm -O1 %s -o - | FileCheck %s + +void sink_0

[clang] Revert "Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (#92527)" (PR #94600)

2024-06-06 Thread via cfe-commits
https://github.com/bgra8 created https://github.com/llvm/llvm-project/pull/94600 Reverting due to https://github.com/llvm/llvm-project/pull/92527#issuecomment-2149120420. This reverts commit f049d72ac2bcc40fd91d4e95148658021fb24bf1. >From fbaa1ce73030c456c62ab8b2d002b8f04b6913a7 Mon Sep 17 00:

[clang] Revert "Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (#92527)" (PR #94600)

2024-06-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (bgra8) Changes Reverting due to https://github.com/llvm/llvm-project/pull/92527#issuecomment-2149120420. This reverts commit f049d72ac2bcc40fd91d4e95148658021fb24bf1. --- Full diff: https://github.com/llvm/llvm-project/pull/94600.d

[clang] 7f52e4c - Revert "Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (#92527)" (#94600)

2024-06-06 Thread via cfe-commits
Author: bgra8 Date: 2024-06-06T11:59:52+02:00 New Revision: 7f52e4c755fcd02232964f19bb0226878255f274 URL: https://github.com/llvm/llvm-project/commit/7f52e4c755fcd02232964f19bb0226878255f274 DIFF: https://github.com/llvm/llvm-project/commit/7f52e4c755fcd02232964f19bb0226878255f274.diff LOG: Re

[clang] Revert "Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (#92527)" (PR #94600)

2024-06-06 Thread via cfe-commits
https://github.com/bgra8 closed https://github.com/llvm/llvm-project/pull/94600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add processor definition for SpacemiT-X60 (PR #94564)

2024-06-06 Thread Shao-Ce SUN via cfe-commits
https://github.com/sunshaoce updated https://github.com/llvm/llvm-project/pull/94564 >From 363e29385277c049bc91a86e76ff6f6ae70ceaa9 Mon Sep 17 00:00:00 2001 From: Shao-Ce SUN Date: Thu, 6 Jun 2024 12:05:33 +0800 Subject: [PATCH 1/4] [RISCV] Add processor definition for Spacemit-K1 --- clang/t

[clang] [clang] Report erroneous floating point results in _Complex math (PR #90588)

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

[clang] [flang] [llvm] [mlir] [Flang]Fix for changed code at the end of AllocaIP. (PR #92430)

2024-06-06 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM if @Meinersbur is happy. It's a shame about the fallout to the clang tests but I can see that would be very difficult to avoid. Thank you for persisting with this difficult patch. https://github.com/llvm/llvm-project/pull/92430

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #92527)

2024-06-06 Thread via cfe-commits
alexfh wrote: > Here's the reproducer: > > ```c++ > struct a { > virtual int *b(); > }; > template struct d : a { > int *b() { new c; } > }; > int *e(a *); > struct f { > char *g; > }; > struct h {}; > struct i { > i(const f &); > i(h); > }; > struct l { > i j = i({.g = ""}); > }; >

[clang] [llvm] [PowerPC] Support -mno-red-zone option (PR #94581)

2024-06-06 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises updated https://github.com/llvm/llvm-project/pull/94581 >From 4e078099d8e15fd984ef38435d6f792bbb3d754c Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Thu, 6 Jun 2024 14:06:48 +0800 Subject: [PATCH 1/2] [PowerPC] Support -mno-red-zone option --- clang/lib/Driver/

  1   2   3   4   5   >