[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)" (PR #88311)

2024-04-11 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Can you add the example that caused the revert to the tests? Else, LGTM. https://github.com/llvm/llvm-project/pull/88311 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Could also get them from the CWG GitHub pages repository (https://github.com/cplusplus/CWG/tree/gh-pages/issues)... anyways, am I good to merge this? https://github.com/llvm/llvm-project/pull/88042 ___ cfe-commits mailing list cfe-c

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-11 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/88381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-11 Thread Ilya Biryukov via cfe-commits
@@ -451,6 +451,7 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs, DiagnosticConsumer *DiagConsumer = &ASTDiags; IgnoreDiagnostics DropDiags; if (Preamble) { +CI->TargetOpts = Preamble->TargetOpts; Patch = PreamblePatch::createFullPatch(Fi

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-11 Thread Ilya Biryukov via cfe-commits
@@ -451,6 +451,7 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs, DiagnosticConsumer *DiagConsumer = &ASTDiags; IgnoreDiagnostics DropDiags; if (Preamble) { +CI->TargetOpts = Preamble->TargetOpts; ilya-biryukov wrote: It'd be

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-11 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: Just to confirm I understand the broader context: we only need it when building the AST because the rest of the code (completions, signature help) actually already uses a compile command and FS from preamble inputs, right https://github.com/llvm/llvm

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-11 Thread Ilya Biryukov via cfe-commits
@@ -768,6 +764,35 @@ TEST(ParsedASTTest, GracefulFailureOnAssemblyFile) { << "Should not try to build AST for assembly source file"; } +TEST(ParsedASTTest, PreambleWithDifferentTarget) { + constexpr std::string_view kPreambleTarget = "x86_64"; ilya-biry

[clang-tools-extra] [clangd] Use TargetOpts from preamble when building ASTs (PR #88381)

2024-04-11 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/88381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Erich Keane via cfe-commits
erichkeane wrote: > Could also get them from the CWG GitHub pages repository > (https://github.com/cplusplus/CWG/tree/gh-pages/issues)... anyways, am I good > to merge this? I believe we would still like you to re-generate with : www/make_cxx_dr_status https://github.com/llvm/llvm-project/p

[clang] [Clang][Sema] Fix issue on requires expression with templated base class member function (PR #85198)

2024-04-11 Thread Qizhi Hu via cfe-commits
@@ -7735,7 +7735,8 @@ ExprResult Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, } if (CXXMethodDecl *Method = dyn_cast_or_null(FDecl)) -if (Method->isImplicitObjectMemberFunction()) +if (!isa(CurContext) && jcsxky wrote: Yeah, I think it

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: Oh, sorry. I'll do that :) https://github.com/llvm/llvm-project/pull/88042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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)" (PR #88311)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88311 >From eb389e142b18d1a14d23d9fadea3c503331c2f73 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 9 Apr 2024 08:31:52 -0400 Subject: [PATCH 1/4] Reapply "[Clang][Sema] Fix crash when 'this' is used

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. @endilll says 'Good to go' with the dr-status updated, so I'll approve. https://github.com/llvm/llvm-project/pull/88042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88042 >From e850ae0982efbb7cec7c33d6b927844d89128743 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 8 Apr 2024 09:46:08 -0400 Subject: [PATCH 1/6] [Clang][Sema] Implement approved resolution for CWG28

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: `make_cxx_dr_status` is not going to do anything here, since the DR indeed didn't make it into public list. Merge as-is. 2858 is going to be picked up when someone runs the script for the first time after a new revision of core issues list is published. https://github.com/llvm/l

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > You're missing checks for type domain rules, so things like: > > * converting between `float _Complex` and `double _Complex` > > * common type of `float _Complex` and `double` > > * result of `int` and `float _Complex` > > * complex types not allowed in i

[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)" (PR #88311)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88311 >From eb389e142b18d1a14d23d9fadea3c503331c2f73 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 9 Apr 2024 08:31:52 -0400 Subject: [PATCH 1/5] Reapply "[Clang][Sema] Fix crash when 'this' is used

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @Endilll I ran `make_cxx_dr_status` with the index from the WG21 wiki... should I drop the commit? https://github.com/llvm/llvm-project/pull/88042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Please do. This is going to be reverted by the next person fetching from public index page anyway, because we ask people to run the script every time they have changes for `cxx_dr_status.html`. In any case, WG21 wikis are of restricted access, and we shouldn't make their content

[clang] [llvm] [OpenMP] Remove 'minncta' attributes from NVPTX kernels (PR #88398)

2024-04-11 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/88398 Summary: Currently we treat this attribute as a minimum number for the amount of blocks scheduled on the kernel. However, the doucmentation states that this applies to CTA's mapped onto a *single* SM. Currently we

[clang] [llvm] [OpenMP] Remove 'minncta' attributes from NVPTX kernels (PR #88398)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: Currently we treat this attribute as a minimum number for the amount of blocks scheduled on the kernel. However, the doucmentation states that this applies to CTA's mapped onto a *single* SM. Currentl

[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

2024-04-11 Thread Joseph Huber via cfe-commits
@@ -345,7 +345,13 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args, // Check ROCm path if specified const ToolChain &TC = getToolChain(); - TC.getDeviceLibs(Args); + std::string HIPVersion; + llvm::raw_string_ostream HIPInfo(HIPVersion); + TC.printVerboseInfo(HIP

[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)" (PR #88311)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88311 >From eb389e142b18d1a14d23d9fadea3c503331c2f73 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 9 Apr 2024 08:31:52 -0400 Subject: [PATCH 1/6] Reapply "[Clang][Sema] Fix crash when 'this' is used

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88042 >From e850ae0982efbb7cec7c33d6b927844d89128743 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Mon, 8 Apr 2024 09:46:08 -0400 Subject: [PATCH 1/5] [Clang][Sema] Implement approved resolution for CWG28

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/88401 Removing the intrinsic because there is no opCodes for rcp in DXIL or SPIR-V. Moving means we don't have to re-implement this feature for each backend. fixes #87784 >From 5d8b581be602b6658ab6a1d0b15b5aedbea1ae1

[clang] 198ffb8 - [Clang][Sema] Implement approved resolution for CWG2858 (#88042)

2024-04-11 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-04-11T11:23:24-04:00 New Revision: 198ffb85314f7741ed048de67d68ca83bb30e16e URL: https://github.com/llvm/llvm-project/commit/198ffb85314f7741ed048de67d68ca83bb30e16e DIFF: https://github.com/llvm/llvm-project/commit/198ffb85314f7741ed048de67d68ca83bb30e16e

[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/88042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Farzon Lotfi (farzonl) Changes Removing the intrinsic because there is no opCodes for rcp in DXIL or SPIR-V. Moving means we don't have to re-implement this feature for each backend. fixes #87784 --- Fu

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

2024-04-11 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Are your `textual` headers meant to be included more than once? If not, do they use header guards or `#pragma once`? https://github.com/llvm/llvm-project/pull/83660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

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

2024-04-11 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > It's definitely caused by that change, reverting it fixes the failure. > > We use module maps so that some of our `#include` get processed as `#import`, > I believe the same code gets executed for our use-case. Because our setup is > so unusual, producing a repro is

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: @erichkeane I'm thinking of keeping the use of `bool` to represent the presence of `typename` in this patch, and opening another PR that changes both `TemplateTemplateParmDecl` and `TypeTemplateParmDecl` to use `TypeParmKeyword`... What do you think? https://github.com/llvm/

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane I'm thinking of keeping the use of `bool` to represent the > presence of `typename` in this patch, and opening another PR that changes > both `TemplateTemplateParmDecl` and `TypeTemplateParmDecl` to use > `TypeParmKeyword`... What do you think? I can live with

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88139 >From a3a9dd90ffd82c738c41c6c581852a10742f2bbc Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 9 Apr 2024 10:51:56 -0400 Subject: [PATCH 1/2] [Clang][AST] Track whether template template paramete

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: 1 nit, else LGTM https://github.com/llvm/llvm-project/pull/88139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/88139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Erich Keane via cfe-commits
@@ -1581,26 +1581,33 @@ class TemplateTemplateParmDecl final DefaultArgStorage; DefArgStorage DefaultArgument; + /// Whether this template template parameter was declaration with + /// the 'typename' keyword. + /// + /// If false, it was declared with the 'class' k

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

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

[clang] [Offload] Do not pass `-fcf-protection=` for offloading (PR #88402)

2024-04-11 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/88402 Summary: This patch prevents the `-fcf-protection=` flag from being passed to the device compilation during offloading. This is not supported on CUDA and AMD devices, but if the user is compiling with fcf protecti

[clang] [Offload] Do not pass `-fcf-protection=` for offloading (PR #88402)

2024-04-11 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/88402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Offload] Do not pass `-fcf-protection=` for offloading (PR #88402)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes Summary: This patch prevents the `-fcf-protection=` flag from being passed to the device compilation during offloading. This is not supported on CUDA and AMD devices, but if t

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-11 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > Note that > > ```c++ > > auto div(_Complex float lhs, _Complex float rhs) { > > return lhs / rhs; > > } > > > > int main() { > > return __real div(1.f, 2.f); > > } > > ``` > > > > > > > > > > > > > > > > > > > > > > > > will fail

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: What category should the release note go under? https://github.com/llvm/llvm-project/pull/88139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Erich Keane via cfe-commits
erichkeane wrote: > What category should the release note go under? `Improvements to Clang's diagnostics` https://github.com/llvm/llvm-project/pull/88139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Xiang Li via cfe-commits
@@ -0,0 +1,126 @@ + ; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s + +; CHECK-DAG: %[[#float_64:]] = OpTypeFloat 64 +; CHECK-DAG: %[[#float_32:]] = OpTypeFloat 32 +; CHECK-DAG: %[[#float_16:]] = OpTypeFloat 16 +; CHECK-DAG: %[[#vec2_float_16:]] = OpTypeVector

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Xiang Li via cfe-commits
https://github.com/python3kgae edited https://github.com/llvm/llvm-project/pull/88401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,126 @@ + ; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s + +; CHECK-DAG: %[[#float_64:]] = OpTypeFloat 64 +; CHECK-DAG: %[[#float_32:]] = OpTypeFloat 32 +; CHECK-DAG: %[[#float_16:]] = OpTypeFloat 16 +; CHECK-DAG: %[[#vec2_float_16:]] = OpTypeVector

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88139 >From a3a9dd90ffd82c738c41c6c581852a10742f2bbc Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 9 Apr 2024 10:51:56 -0400 Subject: [PATCH 1/3] [Clang][AST] Track whether template template paramete

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian updated https://github.com/llvm/llvm-project/pull/88139 >From bf5efab69470cfca1c4bea4d8fc31415012a1b17 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Tue, 9 Apr 2024 10:51:56 -0400 Subject: [PATCH 1/3] [Clang][AST] Track whether template template paramete

[clang] [Clang][ScanDeps] Fix error message typo (PR #88404)

2024-04-11 Thread via cfe-commits
https://github.com/nyyakko created https://github.com/llvm/llvm-project/pull/88404 fix the error message command suggestion typo when you try to use ``clang-scan-deps`` without any arguments. ![image](https://github.com/llvm/llvm-project/assets/36525792/fddec820-6238-4bdd-bde1-dd2ad40ad4fa)

[clang] [Clang][ScanDeps] Fix error message typo (PR #88404)

2024-04-11 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] [Clang][ScanDeps] Fix error message typo (PR #88404)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: nyako (nyyakko) Changes fix the error message command suggestion typo when you try to use ``clang-scan-deps`` without any arguments. ![image](https://github.com/llvm/llvm-project/assets/36525792/fddec820-6238-4bdd-bde1-dd2ad40ad4fa) ---

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Cooper Partin via cfe-commits
https://github.com/coopp approved this pull request. Looks good to me https://github.com/llvm/llvm-project/pull/88401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Xiang Li via cfe-commits
@@ -0,0 +1,126 @@ + ; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s + +; CHECK-DAG: %[[#float_64:]] = OpTypeFloat 64 +; CHECK-DAG: %[[#float_32:]] = OpTypeFloat 32 +; CHECK-DAG: %[[#float_16:]] = OpTypeFloat 16 +; CHECK-DAG: %[[#vec2_float_16:]] = OpTypeVector

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-11 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: @aganea Ah, got it. Unfortunately, caching stat failures for all directories doesn't work for modules. Clang is supposed to create the modules cache directory if one doesn't exist. But if we first cache its non-existence, Clang will never see it again, even after Clang itse

[libclc] 72f9881 - [libclc] Refactor build system to allow in-tree builds (#87622)

2024-04-11 Thread via cfe-commits
Author: Fraser Cormack Date: 2024-04-11T17:09:07+01:00 New Revision: 72f9881c3ffcf4be6361c3e4312d91c9c8d94a98 URL: https://github.com/llvm/llvm-project/commit/72f9881c3ffcf4be6361c3e4312d91c9c8d94a98 DIFF: https://github.com/llvm/llvm-project/commit/72f9881c3ffcf4be6361c3e4312d91c9c8d94a98.diff

[libclc] [llvm] [libclc] Refactor build system to allow in-tree builds (PR #87622)

2024-04-11 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/87622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

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

[clang] Fix UPCAddressofArraySubscriptGadget::getClaimedVarUseSites() (PR #88406)

2024-04-11 Thread via cfe-commits
https://github.com/juanvazquez created https://github.com/llvm/llvm-project/pull/88406 UPCAddressofArraySubscriptGadget::getClaimedVarUseSites should skip parentheses when accessing the DeclRefExpr, otherwise a crash happens with parenthesized references. >From f083f7f7e697b9753668e514f38af50

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-11 Thread Artem Chikin via cfe-commits
https://github.com/artemcm updated https://github.com/llvm/llvm-project/pull/88152 >From c2b2cd03e1d8f92b1df814e6312158b8820b790d Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Tue, 9 Apr 2024 11:22:44 -0700 Subject: [PATCH 1/2] [llvm][vfs] Make vfs::FileSystem::exists() virtual NFC Allow a

[clang] Fix UPCAddressofArraySubscriptGadget::getClaimedVarUseSites() (PR #88406)

2024-04-11 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] Fix UPCAddressofArraySubscriptGadget::getClaimedVarUseSites() (PR #88406)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: juan.vazquez (juanvazquez) Changes UPCAddressofArraySubscriptGadget::getClaimedVarUseSites should skip parentheses when accessing the DeclRefExpr, otherwise a crash happens with parenthesized references

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-11 Thread Artem Chikin via cfe-commits
https://github.com/artemcm updated https://github.com/llvm/llvm-project/pull/88152 >From c2b2cd03e1d8f92b1df814e6312158b8820b790d Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Tue, 9 Apr 2024 11:22:44 -0700 Subject: [PATCH 1/2] [llvm][vfs] Make vfs::FileSystem::exists() virtual NFC Allow a

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-11 Thread Artem Chikin via cfe-commits
@@ -0,0 +1,51 @@ +//===- DependencyScanningFilesystemTest.cpp ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-11 Thread Artem Chikin via cfe-commits
@@ -270,6 +270,12 @@ DependencyScanningWorkerFilesystem::status(const Twine &Path) { return Result->getStatus(); } +bool +DependencyScanningWorkerFilesystem::exists(const Twine &Path) { + llvm::ErrorOr Status = status(Path); artemcm wrote: Which optimizat

[clang] [clang-tools-extra] [clang][modules] Do not resolve `HeaderFileInfo` externally in `ASTWriter` (PR #87848)

2024-04-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/87848 >From ee56548604be9473f33cd809c901886f37a3d8e9 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 5 Apr 2024 15:12:39 -0700 Subject: [PATCH 1/4] [clang][modules] Do not resolve `HeaderFileInfo` externall

[clang] [clang-tools-extra] [clang][modules] Do not resolve `HeaderFileInfo` externally in `ASTWriter` (PR #87848)

2024-04-11 Thread Jan Svoboda via cfe-commits
@@ -409,7 +409,7 @@ class SymbolCollector::HeaderFileURICache { // Framework headers are spelled as , not // "path/FrameworkName.framework/Headers/Foo.h". auto &HS = PP->getHeaderSearchInfo(); -if (const auto *HFI = HS.getExistingFileInfo(*FE, /*WantExternal*/ f

[clang] Fix UPCAddressofArraySubscriptGadget::getClaimedVarUseSites() (PR #88406)

2024-04-11 Thread via cfe-commits
https://github.com/juanvazquez updated https://github.com/llvm/llvm-project/pull/88406 >From 810a22f31072099706062a0d0adac7b77344826f Mon Sep 17 00:00:00 2001 From: Juan Vazquez Date: Thu, 11 Apr 2024 18:01:30 +0200 Subject: [PATCH] Fix UPCAddressofArraySubscriptGadget::getClaimedVarUseSites()

[clang] Fix UPCAddressofArraySubscriptGadget::getClaimedVarUseSites() (PR #88406)

2024-04-11 Thread via cfe-commits
juanvazquez wrote: Fixes #88405 https://github.com/llvm/llvm-project/pull/88406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-11 Thread Jan Svoboda via cfe-commits
@@ -270,6 +270,12 @@ DependencyScanningWorkerFilesystem::status(const Twine &Path) { return Result->getStatus(); } +bool +DependencyScanningWorkerFilesystem::exists(const Twine &Path) { + llvm::ErrorOr Status = status(Path); jansvoboda11 wrote: The one fr

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/88152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/88411 Like with the 'default' clause, this is being applied to only Compute Constructs for now. The 'if' clause takes a condition expression which is used as a runtime value. This is not a particularly complex se

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes Like with the 'default' clause, this is being applied to only Compute Constructs for now. The 'if' clause takes a condition expression which is used as a runtime value.

[clang] [C99] Claim conformance for _Complex support (PR #88161)

2024-04-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > Note that > > > ```c++ > > > auto div(_Complex float lhs, _Complex float rhs) { > > > return lhs / rhs; > > > } > > > > > > int main() { > > > return __real div(1.f, 2.f); > > > } > > > ``` > > > > > > > > > > > > > > > > > > > > > > > >

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 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 44718311dee486f1823876e8af9100afcc50041b 408f39f8ed0ee121aeaeb15c02603bb127e8cb73 --

[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

2024-04-11 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/88411 >From 408f39f8ed0ee121aeaeb15c02603bb127e8cb73 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 10 Apr 2024 07:56:30 -0700 Subject: [PATCH 1/2] [OpenACC] Implement 'if' clause for Compute Constructs Like

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-11 Thread YunQiang Su via cfe-commits
wzssyqa wrote: [xx.patch](https://github.com/llvm/llvm-project/files/14948921/xx.patch) @aeubanks can you help to test this patch? https://github.com/llvm/llvm-project/pull/87866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [llvm] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2024-04-11 Thread Ben Langmuir via cfe-commits
@@ -226,9 +247,28 @@ class DependencyScanningFilesystemLocalCache { insertEntryForFilename(StringRef Filename, const CachedFileSystemEntry &Entry) { assert(llvm::sys::path::is_absolute_gnu(Filename)); -const auto *InsertedEntry = Cache.insert(

[clang] [llvm] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2024-04-11 Thread Ben Langmuir via cfe-commits
@@ -130,11 +130,11 @@ DependencyScanningFilesystemSharedCache::CacheShard:: getOrEmplaceEntryForFilename(StringRef Filename, llvm::ErrorOr Stat) { std::lock_guard LockGuard(CacheLock); - auto Insertion = EntriesByFilename.insert({Filename

[clang] [llvm] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2024-04-11 Thread Ben Langmuir via cfe-commits
@@ -159,7 +159,37 @@ DependencyScanningFilesystemSharedCache::CacheShard:: getOrInsertEntryForFilename(StringRef Filename, const CachedFileSystemEntry &Entry) { std::lock_guard LockGuard(CacheLock); - return *EntriesByFilename.insert({File

[clang] [llvm] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2024-04-11 Thread Ben Langmuir via cfe-commits
@@ -230,6 +251,26 @@ class DependencyScanningFilesystemLocalCache { assert(InsertedEntry == &Entry && "entry already present"); return *InsertedEntry; } + + /// Returns real path associated with the filename or nullptr if none is + /// found. + const CachedRealPath

[clang] [llvm] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2024-04-11 Thread Ben Langmuir via cfe-commits
@@ -194,6 +201,17 @@ class DependencyScanningFilesystemSharedCache { const CachedFileSystemEntry & getOrInsertEntryForFilename(StringRef Filename, const CachedFileSystemEntry &Entry); + +/// Returns real path associated with the filen

[clang] [llvm] [HLSL] move rcp to cgbuiltins (PR #88401)

2024-04-11 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,126 @@ + ; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s + +; CHECK-DAG: %[[#float_64:]] = OpTypeFloat 64 +; CHECK-DAG: %[[#float_32:]] = OpTypeFloat 32 +; CHECK-DAG: %[[#float_16:]] = OpTypeFloat 16 +; CHECK-DAG: %[[#vec2_float_16:]] = OpTypeVector

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-11 Thread Alex Voicu via cfe-commits
@@ -3581,8 +3582,10 @@ ConstantAddress CodeGenModule::GetAddrOfTemplateParamObject( isExternallyVisible(TPO->getLinkageAndVisibility().getLinkage()) ? llvm::GlobalValue::LinkOnceODRLinkage : llvm::GlobalValue::InternalLinkage; - auto *GV = new llvm::

[clang] [clang-tools-extra] [clang][modules] Do not resolve `HeaderFileInfo` externally in `ASTWriter` (PR #87848)

2024-04-11 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. LGTM (with the `Not to be committed, just here as a demonstration` test removed, of course). https://github.com/llvm/llvm-project/pull/87848 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [Offload] Do not pass `-fcf-protection=` for offloading (PR #88402)

2024-04-11 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/88402 >From 9b9cbaa09425a706eaf3bb8e85a824ef89b61a9f Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 11 Apr 2024 10:36:15 -0500 Subject: [PATCH] [Offload] Do not pass `-fcf-protection=` for offloading Summary:

[clang] [clang-format] Fix a regression in ContinuationIndenter (PR #88414)

2024-04-11 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/88414 Commit d06b92391513 caused a regression that breaks after a block comment adjacent to a function paramter that follows. Fixes #86573. >From 2ec43f6dc1fafed9d7fc324eeacfa07133af3abd Mon Sep 17 00:00:00 2001 From:

[clang] [clang-format] Fix a regression in ContinuationIndenter (PR #88414)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Commit d06b92391513 caused a regression that breaks after a block comment adjacent to a function paramter that follows. Fixes #86573. --- Full diff: https://github.com/llvm/llvm-project/pull/88414.diff

[clang] [lld] [llvm] [ThinLTO]Record import type in GlobalValueSummary::GVFlags (PR #87597)

2024-04-11 Thread via cfe-commits
goldsteinn wrote: I think this might be breaking: FAIL: LLVM :: tools/gold/X86/thinlto.ll https://github.com/llvm/llvm-project/pull/87597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang-format] Fix a regression in ContinuationIndenter (PR #88414)

2024-04-11 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/88414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2ea7ec9 - [clang][Interp][NFC] Expand pointer unittests

2024-04-11 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-11T19:05:29+02:00 New Revision: 2ea7ec9737e3ca4e2ce23bf606e79e7066beae0b URL: https://github.com/llvm/llvm-project/commit/2ea7ec9737e3ca4e2ce23bf606e79e7066beae0b DIFF: https://github.com/llvm/llvm-project/commit/2ea7ec9737e3ca4e2ce23bf606e79e7066beae0b.diff LO

[clang] 64c3997 - [clang][Interp] Allow initializing static class members

2024-04-11 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-11T19:05:29+02:00 New Revision: 64c3997939cf2d9b4fd1c24c89724d0b47afcd03 URL: https://github.com/llvm/llvm-project/commit/64c3997939cf2d9b4fd1c24c89724d0b47afcd03 DIFF: https://github.com/llvm/llvm-project/commit/64c3997939cf2d9b4fd1c24c89724d0b47afcd03.diff LO

[clang] [llvm] [clang][deps] Overload `Filesystem::exists` in `DependencyScanningFilesystem` to have it use cached `status` (PR #88152)

2024-04-11 Thread Artem Chikin via cfe-commits
https://github.com/artemcm updated https://github.com/llvm/llvm-project/pull/88152 >From c2b2cd03e1d8f92b1df814e6312158b8820b790d Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Tue, 9 Apr 2024 11:22:44 -0700 Subject: [PATCH 1/2] [llvm][vfs] Make vfs::FileSystem::exists() virtual NFC Allow a

[clang] 4e6d18f - [Clang][AST] Track whether template template parameters used the 'typename' keyword (#88139)

2024-04-11 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-04-11T13:20:05-04:00 New Revision: 4e6d18f40642c2cc8e124bbe55810b2d9b2ac9c0 URL: https://github.com/llvm/llvm-project/commit/4e6d18f40642c2cc8e124bbe55810b2d9b2ac9c0 DIFF: https://github.com/llvm/llvm-project/commit/4e6d18f40642c2cc8e124bbe55810b2d9b2ac9c0

[clang] [Clang][AST] Track whether template template parameters used the 'typename' keyword (PR #88139)

2024-04-11 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/88139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] XFAIL clang/Driver/test/compress.c on AIX (PR #87269)

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

[clang] [analyzer] Handle builtin functions in MallocChecker (PR #88416)

2024-04-11 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/88416 This commit ensures that the `CallDescription`s in `MallocChecker` are matched with the mode `CDM::CLibrary`, so: - they don't match methods or functions within user-defined namespaces; - they also match builti

[clang] [analyzer] Handle builtin functions in MallocChecker (PR #88416)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (NagyDonat) Changes This commit ensures that the `CallDescription`s in `MallocChecker` are matched with the mode `CDM::CLibrary`, so: - they don't match methods or functions within user-defined namespaces; - they also match builtin va

[clang] [analyzer] Handle builtin functions in MallocChecker (PR #88416)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (NagyDonat) Changes This commit ensures that the `CallDescription`s in `MallocChecker` are matched with the mode `CDM::CLibrary`, so: - they don't match methods or functions within user-defined namespaces; - they als

[clang] XFAIL clang/Driver/test/compress.c on AIX (PR #87269)

2024-04-11 Thread via cfe-commits
azhan92 wrote: > Can you edit the description to state which command fails on AIX? > > These tests all contain `-###` to stop after clangDriver completes. And > `clang --target=powerpc-ibm-aix -fintegrated-as -Wa,-compress-debug-sections > -c a.c '-###'` seems to work for me. > > We have othe

[clang] [analyzer] Handle builtin functions in MallocChecker (PR #88416)

2024-04-11 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 938a73422e0b964eba16f272acdfae1d0281772c da3b7d89dfa03555a39ff5f0b29cde225a8d6eda --

<    1   2   3   4   >