[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/88473 >From 84907542cecbe76b1971a50642d39ec4d1078687 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 12 Apr 2024 08:18:06 +0300 Subject: [PATCH 1/2] [clang] Implement `__is_pointer_interconvertible_base_o

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
@@ -1839,6 +1839,90 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(EnumClassForward, int)); } +namespace IPIBO { +struct Base {}; +struct Base2 {}; +struct Base3 : Base {}; +struct Base3Virtual : virtual Base {}; +struct Derived : Base {}; +struct

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
@@ -1839,6 +1839,90 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(EnumClassForward, int)); } +namespace IPIBO { +struct Base {}; +struct Base2 {}; +struct Base3 : Base {}; +struct Base3Virtual : virtual Base {}; +struct Derived : Base {}; +struct

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
@@ -1740,7 +1740,7 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(void, int)); static_assert(__is_layout_compatible(void, const void)); static_assert(__is_layout_compatible(void, volatile void)); - static_assert(__is_layout_compatible(const int

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
@@ -6082,6 +6082,22 @@ static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT, const TypeSourceI Self.Diag(Rhs->getTypeLoc().getBeginLoc(), diag::err_vla_unsupported) << 1 << tok::kw___is_layout_compatible; return Self.IsLayoutCompatible(LhsT, RhsT);

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
@@ -19710,6 +19710,27 @@ bool Sema::IsLayoutCompatible(QualType T1, QualType T2) const { return isLayoutCompatible(getASTContext(), T1, T2); } +//===-- Pointer interconvertibility // + +bool Sema::IsPointerInterconvertibleBaseOf(const

[clang] [llvm] [RISCV] Support Zama16b1p0 (PR #88474)

2024-04-11 Thread Pengcheng Wang via cfe-commits
@@ -704,6 +705,12 @@ // RUN: -o - | FileCheck --check-prefix=CHECK-ZACAS-EXT %s // CHECK-ZACAS-EXT: __riscv_zacas 100{{$}} +// RUN: %clang --target=riscv32 -march=rv32izama16b -x c -E -dM %s \ +// RUN: -o - | FileCheck --check-prefix=CHECK-ZAMA16B-EXT %s

[clang] Rework the printing of attributes (PR #87281)

2024-04-11 Thread Kim Gräsman via cfe-commits
kimgr wrote: (obtw, the double `final` is unrelated, it's tracked here: https://github.com/llvm/llvm-project/issues/56517) https://github.com/llvm/llvm-project/pull/87281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] Rework the printing of attributes (PR #87281)

2024-04-11 Thread Kim Gräsman via cfe-commits
kimgr wrote: I can confirm that the double space comes from this PR; ```diff diff --git a/clang/unittests/AST/DeclPrinterTest.cpp b/clang/unittests/AST/DeclPrinterTest.cpp index c24e442621c9..c2d02e74a62c 100644 --- a/clang/unittests/AST/DeclPrinterTest.cpp +++ b/clang/unittests/AST/DeclPrinterT

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread via cfe-commits
@@ -1839,6 +1839,90 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(EnumClassForward, int)); } +namespace IPIBO { +struct Base {}; +struct Base2 {}; +struct Base3 : Base {}; +struct Base3Virtual : virtual Base {}; +struct Derived : Base {}; +struct

[clang] [llvm] [RISCV] Support Zama16b1p0 (PR #88474)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc @llvm/pr-subscribers-backend-risc-v Author: Jesse Huang (jaidTw) Changes This patch adds the support for Zama16b version 1.0, which has been added to RVA23U64 optional extensions recently Ref: [rva23-profile](https://github.com/riscv/riscv-profiles/

[clang] [llvm] [RISCV] Support Zama16b1p0 (PR #88474)

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] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread via cfe-commits
@@ -1839,6 +1839,90 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(EnumClassForward, int)); } +namespace IPIBO { +struct Base {}; +struct Base2 {}; +struct Base3 : Base {}; +struct Base3Virtual : virtual Base {}; +struct Derived : Base {}; +struct

[clang] [llvm] [RISCV] Support Zama16b1p0 (PR #88474)

2024-04-11 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw created https://github.com/llvm/llvm-project/pull/88474 This patch adds the support for Zama16b version 1.0, which has been added to RVA23U64 optional extensions recently Ref: [rva23-profile](https://github.com/riscv/riscv-profiles/blob/097819c2c668cbf693c80b8d2508546

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread via cfe-commits
https://github.com/Sirraide commented: Just pointed out some minor things I noticed, otherwise this looks right to me. I at least can’t think of any more test cases that wouldn’t just end up being tests for `IsDerivedFrom()` or `isStandardLayout()`, so I think this is enough. https://github.c

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread via cfe-commits
@@ -1740,7 +1740,7 @@ void is_layout_compatible(int n) static_assert(!__is_layout_compatible(void, int)); static_assert(__is_layout_compatible(void, const void)); static_assert(__is_layout_compatible(void, volatile void)); - static_assert(__is_layout_compatible(const int

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread via cfe-commits
@@ -19710,6 +19710,27 @@ bool Sema::IsLayoutCompatible(QualType T1, QualType T2) const { return isLayoutCompatible(getASTContext(), T1, T2); } +//===-- Pointer interconvertibility // + +bool Sema::IsPointerInterconvertibleBaseOf(const

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread via cfe-commits
@@ -6082,6 +6082,22 @@ static bool EvaluateBinaryTypeTrait(Sema &Self, TypeTrait BTT, const TypeSourceI Self.Diag(Rhs->getTypeLoc().getBeginLoc(), diag::err_vla_unsupported) << 1 << tok::kw___is_layout_compatible; return Self.IsLayoutCompatible(LhsT, RhsT);

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

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

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

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

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Relevant issue: #48204 https://github.com/llvm/llvm-project/pull/88473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch implements intrinsic that supports `std::is_pointer_interconvertible_base_of` type trait from [P0466R5](https://wg21.link/p0466r5) "Layout-compatibility and Pointer-interconvertibility Trai

[clang] [clang] Implement `__is_pointer_interconvertible_base_of()` (PR #88473)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/88473 This patch implements intrinsic that supports `std::is_pointer_interconvertible_base_of` type trait from [P0466R5](https://wg21.link/p0466r5) "Layout-compatibility and Pointer-interconvertibility Traits". Norm

[clang] [Clang] Fix test broken due to unsupported calling convention (PR #88472)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes #88428 ended up breaking CI because it included a test that uses the `regcall` calling convention, which isn’t supported on all targets; I’ve moved it into a separate file that sets the triple. --- Full diff: http

[clang] [Clang] Fix test broken due to unsupported calling convention (PR #88472)

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

[clang] b502dc5 - [Clang] Fix test broken due to unsupported calling convention (#88472)

2024-04-11 Thread via cfe-commits
Author: Sirraide Date: 2024-04-12T07:12:57+02:00 New Revision: b502dc596ba3ed1e857e163e21ed6426125760ef URL: https://github.com/llvm/llvm-project/commit/b502dc596ba3ed1e857e163e21ed6426125760ef DIFF: https://github.com/llvm/llvm-project/commit/b502dc596ba3ed1e857e163e21ed6426125760ef.diff LOG:

[clang] [Clang] Fix test broken due to unsupported calling convention (PR #88472)

2024-04-11 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/88472 #88428 ended up breaking CI because it included a test that uses the `regcall` calling convention, which isn’t supported on all targets; I’ve moved it into a separate file that sets the triple. >From bb043bf20

[clang] f21ead0 - [C++20] [Modules] [Reduced BMI] Remove unreachable decls GMF in redued BMI (#88359)

2024-04-11 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-04-12T12:51:58+08:00 New Revision: f21ead06750b670cf8ce72de3550b04056a2 URL: https://github.com/llvm/llvm-project/commit/f21ead06750b670cf8ce72de3550b04056a2 DIFF: https://github.com/llvm/llvm-project/commit/f21ead06750b670cf8ce72de3550b04056a2.diff LO

[clang] [C++20] [Modules] [Reduced BMI] Remove unreachable decls GMF in redued BMI (PR #88359)

2024-04-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/88359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Look through type sugar when accessing FunctionProtoType (PR #88428)

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

[clang] 505a9ae - [Clang] Look through type sugar when accessing FunctionProtoType (#88428)

2024-04-11 Thread via cfe-commits
Author: Sirraide Date: 2024-04-12T06:49:53+02:00 New Revision: 505a9ae81d620b92284f7b2cbe874c936cf19583 URL: https://github.com/llvm/llvm-project/commit/505a9ae81d620b92284f7b2cbe874c936cf19583 DIFF: https://github.com/llvm/llvm-project/commit/505a9ae81d620b92284f7b2cbe874c936cf19583.diff LOG:

[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: @erichkeane I am

[clang] [clang][NFC] Move more functions to `SemaHLSL` (PR #88354)

2024-04-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/88354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b45c9c3 - [clang][NFC] Move more functions to `SemaHLSL` (#88354)

2024-04-11 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-12T07:44:58+04:00 New Revision: b45c9c313c5107b1942cd325e8ab3b4235948a08 URL: https://github.com/llvm/llvm-project/commit/b45c9c313c5107b1942cd325e8ab3b4235948a08 DIFF: https://github.com/llvm/llvm-project/commit/b45c9c313c5107b1942cd325e8ab3b4235948a08.

[clang] [InstallAPI] Handle zippered frameworks (PR #88205)

2024-04-11 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/88205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c24efff - [InstallAPI] Handle zippered frameworks (#88205)

2024-04-11 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-04-11T20:01:55-07:00 New Revision: c24efffabbf96c7a138439bb8e219850c4d78887 URL: https://github.com/llvm/llvm-project/commit/c24efffabbf96c7a138439bb8e219850c4d78887 DIFF: https://github.com/llvm/llvm-project/commit/c24efffabbf96c7a138439bb8e219850c4d78887.diff

[clang] [RISCV] Disallow target attribute use in multiversioning (PR #85899)

2024-04-11 Thread Piyou Chen via cfe-commits
https://github.com/BeMg closed https://github.com/llvm/llvm-project/pull/85899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 334e07f - [RISCV] Disallow target attribute use in multiversioning (#85899)

2024-04-11 Thread via cfe-commits
Author: Piyou Chen Date: 2024-04-12T10:59:06+08:00 New Revision: 334e07f18e6f2fbc84579f7cac3cdd29d0d7cce0 URL: https://github.com/llvm/llvm-project/commit/334e07f18e6f2fbc84579f7cac3cdd29d0d7cce0 DIFF: https://github.com/llvm/llvm-project/commit/334e07f18e6f2fbc84579f7cac3cdd29d0d7cce0.diff LO

[clang] [RISCV] Disallow target attribute use in multiversioning (PR #85899)

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

[clang] [llvm] [AMDGPU] Add Clang builtins for amdgcn s_ttrace intrinsics (PR #88076)

2024-04-11 Thread Corbin Robeck via cfe-commits
https://github.com/CRobeck closed https://github.com/llvm/llvm-project/pull/88076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 27ce513 - [AMDGPU] Add Clang builtins for amdgcn s_ttrace intrinsics (#88076)

2024-04-11 Thread via cfe-commits
Author: Corbin Robeck Date: 2024-04-11T22:05:01-04:00 New Revision: 27ce513788e15c95f8c623566fbfca9304bb1844 URL: https://github.com/llvm/llvm-project/commit/27ce513788e15c95f8c623566fbfca9304bb1844 DIFF: https://github.com/llvm/llvm-project/commit/27ce513788e15c95f8c623566fbfca9304bb1844.diff

[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

2024-04-11 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/87596 >From af735f3216dd5db9dcaf164892f3f573731701ec Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Wed, 3 Apr 2024 20:58:46 -0700 Subject: [PATCH 1/2] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; l

[clang] ANDROID: x86_64: Set default max-page-size to 16kB (PR #87413)

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

[clang] [CMake][Release] Disable PGO (PR #88465)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Stellard (tstellar) Changes Running the test-release.sh script with PGO enabled causes build errors like: ld.lld: error: Function Import: link error: linking module flags 'ProfileSummary': IDs have conflicting values I believe this a

[clang] [CMake][Release] Disable PGO (PR #88465)

2024-04-11 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/88465 Running the test-release.sh script with PGO enabled causes build errors like: ld.lld: error: Function Import: link error: linking module flags 'ProfileSummary': IDs have conflicting values I believe this a bui

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

2024-04-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. 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] XFAIL clang/Driver/test/compress.c on AIX (PR #87269)

2024-04-11 Thread Fangrui Song via cfe-commits
MaskRay wrote: Thanks for the information. `CHECK-OPT_GZ` is shared by two RUN lines. The failure is due to `-x assembler`. ``` clang '-###' -c --target=powerpc64-ibm-aix -fintegrated-as -gz -x assembler compress.c # warning: argument unused during compilation: '-gz' [-Wunused-command-line-ar

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-11 Thread Felix via cfe-commits
orcguru wrote: Since https://github.com/llvm/llvm-project/pull/86641 has been merged, I will continue work on this patch to handle the interactions of these two flags. Mean while I'm waiting for more review comments from experts. Thank you! https://github.com/llvm/llvm-project/pull/84132 _

[clang] ANDROID: x86_64: Set default max-page-size to 16kB (PR #87413)

2024-04-11 Thread Kalesh Singh via cfe-commits
@@ -17,10 +17,20 @@ // // RUN: %clang -target aarch64-none-linux-android \ // RUN: -### -v %s 2> %t -// RUN: FileCheck -check-prefix=MAX-PAGE-SIZE-AARCH64 < %t %s +// RUN: FileCheck -check-prefix=MAX-PAGE-SIZE-16KB < %t %s +// +// RUN: %clang -### -target i386-none-linux-andr

[clang] ANDROID: x86_64: Set default max-page-size to 16kB (PR #87413)

2024-04-11 Thread Kalesh Singh via cfe-commits
@@ -17,10 +17,20 @@ // // RUN: %clang -target aarch64-none-linux-android \ // RUN: -### -v %s 2> %t -// RUN: FileCheck -check-prefix=MAX-PAGE-SIZE-AARCH64 < %t %s +// RUN: FileCheck -check-prefix=MAX-PAGE-SIZE-16KB < %t %s +// +// RUN: %clang -### -target i386-none-linux-andr

[clang] ANDROID: x86_64: Set default max-page-size to 16kB (PR #87413)

2024-04-11 Thread Kalesh Singh via cfe-commits
https://github.com/Kalesh-Singh updated https://github.com/llvm/llvm-project/pull/87413 >From ae55bb33871fc840c93ad59aed6016fc3999 Mon Sep 17 00:00:00 2001 From: Kalesh Singh Date: Tue, 2 Apr 2024 11:26:11 -0700 Subject: [PATCH 1/3] ANDROID: x86_64: Set default max-page-size to 16kB Androi

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function, NFC (PR #88447)

2024-04-11 Thread Argyrios Kyrtzidis via cfe-commits
@@ -308,6 +308,9 @@ class ModuleDepCollector final : public DependencyCollector { ModuleDeps &Deps); }; +/// Resets some options that introduce dependencies unnecessarily. +void removeUnnecessaryDependencies(CompilerInvocation &CI, bool ForMod

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function, NFC (PR #88447)

2024-04-11 Thread Argyrios Kyrtzidis via cfe-commits
@@ -154,6 +154,20 @@ void ModuleDepCollector::addOutputPaths(CowCompilerInvocation &CI, } } +void dependencies::removeUnnecessaryDependencies(CompilerInvocation &CI, + bool ForModuleBuild) { + if (CI.getFrontendOpts().Program

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function, NFC (PR #88447)

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

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function, NFC (PR #88447)

2024-04-11 Thread Argyrios Kyrtzidis via cfe-commits
https://github.com/akyrtzi updated https://github.com/llvm/llvm-project/pull/88447 >From f96eadb5d41d2433cf0b114556eaaa5f0a66e250 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 11 Apr 2024 14:57:40 -0700 Subject: [PATCH] [clang/DependencyScanning/ModuleDepCollector] Refactor part

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-11 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/86618 >From 10ee32826fc2acb6bd993c88bdb7142360b6f263 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 01/10] implement wraps attribute Signed-off-by: Justin Stitt -

[clang-tools-extra] [clangd] Avoid using CompletionItemKind.Text for macro completions from the index (PR #88236)

2024-04-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/88236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 7aa3716 - [clangd] Avoid using CompletionItemKind.Text for macro completions from the index (#88236)

2024-04-11 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-04-11T19:34:53-04:00 New Revision: 7aa371687ace40b85f04e21956e03f1e93052b56 URL: https://github.com/llvm/llvm-project/commit/7aa371687ace40b85f04e21956e03f1e93052b56 DIFF: https://github.com/llvm/llvm-project/commit/7aa371687ace40b85f04e21956e03f1e93052b56.diff

[clang-tools-extra] [clangd] Avoid using CompletionItemKind.Text for macro completions from the index (PR #88236)

2024-04-11 Thread Nathan Ridge via cfe-commits
@@ -89,7 +89,9 @@ const CodeCompleteOptions::CodeCompletionRankingModel namespace { -CompletionItemKind toCompletionItemKind(index::SymbolKind Kind) { +CompletionItemKind +toCompletionItemKind(index::SymbolKind Kind, + const llvm::StringRef *Signature = nu

[clang-tools-extra] [clangd] Avoid using CompletionItemKind.Text for macro completions from the index (PR #88236)

2024-04-11 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/88236 >From 390fd263242071bcae72e65346da2a315abfbf82 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Wed, 10 Apr 2024 02:47:23 -0400 Subject: [PATCH] [clangd] Avoid using CompletionItemKind.Text for macro com

[clang] [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (PR #88455)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alex Voicu (AlexVlx) Changes Currently neither the SPIR nor the SPIRV targets specify the AS for globals in their datalayout strings. This is problematic because CodeGen/LLVM will default to AS0 in this case, which produces Globals that e

[clang] [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (PR #88455)

2024-04-11 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/88455 Currently neither the SPIR nor the SPIRV targets specify the AS for globals in their datalayout strings. This is problematic because CodeGen/LLVM will default to AS0 in this case, which produces Globals that end

[clang] ANDROID: x86_64: Set default max-page-size to 16kB (PR #87413)

2024-04-11 Thread Fangrui Song via cfe-commits
@@ -17,10 +17,20 @@ // // RUN: %clang -target aarch64-none-linux-android \ // RUN: -### -v %s 2> %t -// RUN: FileCheck -check-prefix=MAX-PAGE-SIZE-AARCH64 < %t %s +// RUN: FileCheck -check-prefix=MAX-PAGE-SIZE-16KB < %t %s +// +// RUN: %clang -### -target i386-none-linux-andr

[clang] ANDROID: x86_64: Set default max-page-size to 16kB (PR #87413)

2024-04-11 Thread Fangrui Song via cfe-commits
@@ -17,10 +17,20 @@ // // RUN: %clang -target aarch64-none-linux-android \ // RUN: -### -v %s 2> %t -// RUN: FileCheck -check-prefix=MAX-PAGE-SIZE-AARCH64 < %t %s +// RUN: FileCheck -check-prefix=MAX-PAGE-SIZE-16KB < %t %s +// +// RUN: %clang -### -target i386-none-linux-andr

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function, NFC (PR #88447)

2024-04-11 Thread Argyrios Kyrtzidis via cfe-commits
@@ -154,6 +154,20 @@ void ModuleDepCollector::addOutputPaths(CowCompilerInvocation &CI, } } +void dependencies::removeUnnecessaryDependencies(CompilerInvocation &CI, + bool ForModuleBuild) { + if (CI.getFrontendOpts().Program

[clang] [clang][docs] Modernize attribute docs for darwin specifics (PR #88448)

2024-04-11 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/88448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 00a4f09 - [clang][docs] Modernize attribute docs for darwin specifics (#88448)

2024-04-11 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-04-11T15:51:27-07:00 New Revision: 00a4f091bad199053b33af983a5abbf2c5abe949 URL: https://github.com/llvm/llvm-project/commit/00a4f091bad199053b33af983a5abbf2c5abe949 DIFF: https://github.com/llvm/llvm-project/commit/00a4f091bad199053b33af983a5abbf2c5abe949.diff

[clang] [clang][docs] Modernize attribute docs for darwin specifics (PR #88448)

2024-04-11 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/88448 >From 0039cbc0d53a4ff8530b78657f8365229162516b Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Thu, 11 Apr 2024 14:10:15 -0700 Subject: [PATCH 1/2] [clang][docs] Modernize attribute docs for darwin specifi

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

2024-04-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed 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] 4036a69 - [HLSL] move rcp to cgbuiltins (#88401)

2024-04-11 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-04-11T18:26:25-04:00 New Revision: 4036a6946e5420bb77a93037c83732be600b9b0b URL: https://github.com/llvm/llvm-project/commit/4036a6946e5420bb77a93037c83732be600b9b0b DIFF: https://github.com/llvm/llvm-project/commit/4036a6946e5420bb77a93037c83732be600b9b0b.diff

[clang-tools-extra] [clangd] Don't ignore external HFI in `SymbolCollector` (PR #88446)

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

[clang-tools-extra] 95fbd8d - [clangd] Don't ignore external HFI in `SymbolCollector` (#88446)

2024-04-11 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-04-11T15:22:35-07:00 New Revision: 95fbd8d19dff10b5a734e3db1b29cba2da7a983f URL: https://github.com/llvm/llvm-project/commit/95fbd8d19dff10b5a734e3db1b29cba2da7a983f DIFF: https://github.com/llvm/llvm-project/commit/95fbd8d19dff10b5a734e3db1b29cba2da7a983f.diff L

[clang-tools-extra] [clangd] Don't ignore external HFI in `SymbolCollector` (PR #88446)

2024-04-11 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman approved this pull request. https://github.com/llvm/llvm-project/pull/88446 ___ 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
jansvoboda11 wrote: Please apply the code formatting suggestions. 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] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-11 Thread Michael Buch via cfe-commits
@@ -5361,7 +5383,56 @@ static bool IsReconstitutableType(QualType QT) { return T.Reconstitutable; } -std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const { +bool CGDebugInfo::HasReconstitutableArgs( +ArrayRef Args) const { + return llvm::all_of(Args, [&

[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
@@ -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] [clang][docs] Modernize attribute docs for darwin specifics (PR #88448)

2024-04-11 Thread Steven Wu via cfe-commits
@@ -1604,23 +1604,31 @@ specifies availability for the current target platform, the availability attributes are ignored. Supported platforms are: ``ios`` - Apple's iOS operating system. The minimum deployment target is specified by - the ``-mios-version-min=*version*`` or `

[clang] [clang][docs] Modernize attribute docs for darwin specifics (PR #88448)

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

[clang] [clang][docs] Modernize attribute docs for darwin specifics (PR #88448)

2024-04-11 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function, NFC (PR #88447)

2024-04-11 Thread Jan Svoboda via cfe-commits
@@ -154,6 +154,20 @@ void ModuleDepCollector::addOutputPaths(CowCompilerInvocation &CI, } } +void dependencies::removeUnnecessaryDependencies(CompilerInvocation &CI, + bool ForModuleBuild) { + if (CI.getFrontendOpts().Program

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function, NFC (PR #88447)

2024-04-11 Thread Jan Svoboda via cfe-commits
@@ -308,6 +308,9 @@ class ModuleDepCollector final : public DependencyCollector { ModuleDeps &Deps); }; +/// Resets some options that introduce dependencies unnecessarily. +void removeUnnecessaryDependencies(CompilerInvocation &CI, bool ForMod

[clang] [clang][docs] Modernize attribute docs for darwin specifics (PR #88448)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes * Generally recommend target triples. But replace `m*version-min` with `mtargetos`. * Also include test coverage for -mtargetos=visionos --- Full diff: https://github.co

[clang] [clang][docs] Modernize attribute docs for darwin specifics (PR #88448)

2024-04-11 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/88448 * Generally recommend target triples. But replace `m*version-min` with `mtargetos`. * Also include test coverage for -mtargetos=visionos >From 0039cbc0d53a4ff8530b78657f8365229162516b Mon Sep 17 00:00:00 200

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-11 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,117 @@ +// RUN: %clang_cc1 %s -ast-dump -fblocks | FileCheck %s + +// Make sure that the attribute gets parsed and attached to the correct AST elements. + +#pragma clang diagnostic ignored "-Wunused-variable" + +// =

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

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 5601e35f620eccdebab988bed4b9677b29366b79 2c9430526320b815f8722512f141e7a90f1c5eb1 --

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function, NFC (PR #88447)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Argyrios Kyrtzidis (akyrtzi) Changes The function is named `removeUnnecessaryDependencies` and is a bit more general that could be used from other places as well. --- Full diff: https://github.com/llvm/llvm-project/pull/88447.diff 2 Fil

[clang] [clang/DependencyScanning/ModuleDepCollector] Refactor part of `makeCommonInvocationForModuleBuild` into its own function, NFC (PR #88447)

2024-04-11 Thread Argyrios Kyrtzidis via cfe-commits
https://github.com/akyrtzi created https://github.com/llvm/llvm-project/pull/88447 The function is named `removeUnnecessaryDependencies` and is a bit more general that could be used from other places as well. >From 0344d1890028b178d54d69fba239149b7d96fa30 Mon Sep 17 00:00:00 2001 From: Argyrio

[clang] [Clang] Add wraps attribute (for granular integer overflow handling) (PR #86618)

2024-04-11 Thread Justin Stitt via cfe-commits
JustinStitt wrote: > > Forbidding usage in C++ probably avoids the worst of the canonical-type > > issues, but there's still some potential for weird results. Particularly > > with type merging; for example, if you write `a ? (wrap_int)x : 1`, is the > > result a wrapping type? > > I had a si

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-11 Thread Doug Wyatt via cfe-commits
@@ -18324,6 +18324,47 @@ bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New, return true; } + // Virtual overrides: check for matching effects. + const auto OldFX = Old->getFunctionEffects(); + const auto NewFX = New->getFunctionEffects(); + + if

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-11 Thread Doug Wyatt via cfe-commits
@@ -1868,6 +1868,28 @@ bool Sema::IsFunctionConversion(QualType FromType, QualType ToType, FromFn = QT->getAs(); Changed = true; } + +if (getLangOpts().CPlusPlus) { + // For C, when called from checkPointerTypesForAssignment, + // we need not to c

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-11 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,190 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s +// These are in a separate file because errors (e.g. incompatible attributes) currently prevent dougsonos wrote: Split the file. https://github.com/llvm/llvm-project/pull/

[clang-tools-extra] [clangd] Don't ignore external HFI in `SymbolCollector` (PR #88446)

2024-04-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Jan Svoboda (jansvoboda11) Changes The `FileEntry` corresponds to a `FileID` containing the `SourceLocation` of a `NamedDecl` which (I think) might've been deserialized from a PCM file. Considering external `HeaderFileInfo` he

[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-tools-extra] [clangd] Don't ignore external HFI in `SymbolCollector` (PR #88446)

2024-04-11 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/88446 The `FileEntry` corresponds to a `FileID` containing the `SourceLocation` of a `NamedDecl` which (I think) might've been deserialized from a PCM file. Considering external `HeaderFileInfo` here is most like

[clang] [llvm] [Clang] Emit DW_TAG_template_alias for template aliases (PR #87623)

2024-04-11 Thread Michael Buch via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s +// RUN: %clang -ggdb -std=c++11 -S -emit-llvm %s -o - | FileCheck %s Michael137 wrote: Do we now lose a tiny bit of coverage for `-glldb`? I assume this change is to make sure th

[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 closed https://github.com/llvm/llvm-project/pull/87848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 84df7a0 - [clang][modules] Do not resolve `HeaderFileInfo` externally in `ASTWriter` (#87848)

2024-04-11 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-04-11T14:44:55-07:00 New Revision: 84df7a09f8da5809b85fd097015e5ac6cc8a3f88 URL: https://github.com/llvm/llvm-project/commit/84df7a09f8da5809b85fd097015e5ac6cc8a3f88 DIFF: https://github.com/llvm/llvm-project/commit/84df7a09f8da5809b85fd097015e5ac6cc8a3f88.diff L

[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/5] [clang][modules] Do not resolve `HeaderFileInfo` externall

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-11 Thread via cfe-commits
@@ -3637,6 +3637,15 @@ FunctionProtoType::FunctionProtoType(QualType result, ArrayRef params, auto &EllipsisLoc = *getTrailingObjects(); EllipsisLoc = epi.EllipsisLoc; } + + if (epi.FunctionEffects) { +auto &ExtraBits = *getTrailingObjects(); +ExtraBits.HasF

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-04-11 Thread via cfe-commits
@@ -3637,6 +3637,15 @@ FunctionProtoType::FunctionProtoType(QualType result, ArrayRef params, auto &EllipsisLoc = *getTrailingObjects(); EllipsisLoc = epi.EllipsisLoc; } + + if (epi.FunctionEffects) { +auto &ExtraBits = *getTrailingObjects(); +ExtraBits.HasF

  1   2   3   4   >