[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/78114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg edited https://github.com/llvm/llvm-project/pull/78057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Fabian Mora via cfe-commits
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module , GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module , ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module ,

[clang] [llvm] [mlir] [clang-tools-extra] [libcxx] [libc++][concepts] Implements concept helper `__libcpp_integer` (PR #78086)

2024-01-14 Thread Hristo Hristov via cfe-commits
https://github.com/Zingam closed https://github.com/llvm/llvm-project/pull/78086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
@@ -1722,23 +2300,23 @@ def location(self): return self._loc @property -def linkage(self): +def linkage(self) -> LinkageKind: """Return the linkage of this cursor.""" if not hasattr(self, "_linkage"): self._linkage =

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
@@ -67,89 +67,690 @@ import clang.enumerations import os -import sys - -if sys.version_info[0] == 3: -# Python 3 strings are unicode, translate them to/from utf8 for C-interop. -class c_interop_string(c_char_p): -def __init__(self, p=None): -if p

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Fabian Mora via cfe-commits
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module , GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module , ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module ,

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
@@ -2341,30 +2830,32 @@ class Type(Structure): _fields_ = [("_kind_id", c_int), ("data", c_void_p * 2)] +_tu: TranslationUnit + @property -def kind(self): +def kind(self) -> TypeKind: """Return the kind of this type.""" return

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
@@ -67,89 +67,690 @@ import clang.enumerations import os -import sys - -if sys.version_info[0] == 3: -# Python 3 strings are unicode, translate them to/from utf8 for C-interop. -class c_interop_string(c_char_p): -def __init__(self, p=None): -if p

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
@@ -67,89 +67,690 @@ import clang.enumerations import os -import sys - -if sys.version_info[0] == 3: -# Python 3 strings are unicode, translate them to/from utf8 for C-interop. -class c_interop_string(c_char_p): -def __init__(self, p=None): -if p

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/78114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
@@ -232,13 +840,16 @@ class _CXString(Structure): _fields_ = [("spelling", c_char_p), ("free", c_int)] -def __del__(self): +def __del__(self) -> None: conf.lib.clang_disposeString(self) @staticmethod -def from_result(res, fn=None, args=None):

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
@@ -3968,7 +4500,7 @@ def function_exists(self, name): return True -def register_enumerations(): +def register_enumerations() -> None: DeinAlptraum wrote: This implementation dynamically adds the TokenKind variants, which means it also suffers from

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg updated https://github.com/llvm/llvm-project/pull/78057 >From f56a7395b19ff634b3ac963204348db2575fdf87 Mon Sep 17 00:00:00 2001 From: Fabian Mora Date: Sat, 13 Jan 2024 17:31:51 + Subject: [PATCH 1/3] Move OffloadWrapper.* to llvm/Frontend/Offloading ---

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
@@ -642,51 +1259,29 @@ def register(value, name): ### Cursor Kinds ### -class BaseEnumeration(object): -""" -Common base class for named enumerations held in sync with Index.h values. +TEnum = TypeVar("TEnum", bound="BaseEnumeration") -Subclasses must define

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
@@ -642,51 +1259,29 @@ def register(value, name): ### Cursor Kinds ### -class BaseEnumeration(object): -""" -Common base class for named enumerations held in sync with Index.h values. +TEnum = TypeVar("TEnum", bound="BaseEnumeration") -Subclasses must define

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
@@ -67,89 +67,690 @@ import clang.enumerations import os -import sys - -if sys.version_info[0] == 3: -# Python 3 strings are unicode, translate them to/from utf8 for C-interop. -class c_interop_string(c_char_p): -def __init__(self, p=None): -if p

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread Jannick Kremer via cfe-commits
@@ -67,89 +67,690 @@ import clang.enumerations import os -import sys - -if sys.version_info[0] == 3: -# Python 3 strings are unicode, translate them to/from utf8 for C-interop. -class c_interop_string(c_char_p): -def __init__(self, p=None): -if p

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jannick Kremer (DeinAlptraum) Changes This PR adds type annotations to the clang Python bindings, to the point that they pass a strict MyPy check. This utilizes Python features up to 3.7, thus ending support of the bindings for versions

[clang] [clang-bindings] Add strict typing to clang Python bindings (#76664) (PR #78114)

2024-01-14 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] emit an error when the same identifier appears with both internal and external linkage in a translation unit (PR #78064)

2024-01-14 Thread via cfe-commits
elhewaty wrote: Hello @cor3ntin, can you please suggest `clang` issues that maybe suitable for a beginner, or if you have a TO-DO list I will be happy to work on it. Thanks https://github.com/llvm/llvm-project/pull/78064 ___ cfe-commits mailing list

[clang] [clang-format] Extract utility functions outside of test fixture (PR #78108)

2024-01-14 Thread via cfe-commits
seranu wrote: > I don't understand why we need to refactor this? During the review for https://github.com/llvm/llvm-project/pull/77918 there was an ask to extract the refactor in a separate PR. https://github.com/llvm/llvm-project/pull/78108 ___

[clang] [clang][ASTMatcher] Add matchers for CXXFoldExpr (PR #71245)

2024-01-14 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I updated the branch with GitHubs UI and will merge this in one or two days, to let the CI run against a recent base. https://github.com/llvm/llvm-project/pull/71245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][ASTMatcher] Add matchers for CXXFoldExpr (PR #71245)

2024-01-14 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/71245 >From 3979b64361ee286fd71d0aba816047dc3dea319d Mon Sep 17 00:00:00 2001 From: Julian Schmidt <44101708+5chmi...@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:51:57 +0100 Subject: [PATCH 1/5]

[clang] [clang-format] Extract utility functions outside of test fixture (PR #78108)

2024-01-14 Thread via cfe-commits
https://github.com/mydeveloperday commented: I don't understand why we need to refactor this? https://github.com/llvm/llvm-project/pull/78108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] 21edd38 - [clang-doc] Use SmallString::operator std::string (NFC)

2024-01-14 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-01-14T12:17:56-08:00 New Revision: 21edd381e403079baa2d01754e3d3ae7b3469932 URL: https://github.com/llvm/llvm-project/commit/21edd381e403079baa2d01754e3d3ae7b3469932 DIFF: https://github.com/llvm/llvm-project/commit/21edd381e403079baa2d01754e3d3ae7b3469932.diff

[clang-tools-extra] bc27f35 - [clang-tidy] Use StringRef::consume_front (NFC)

2024-01-14 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-01-14T12:17:52-08:00 New Revision: bc27f3573d61012771aa3fee2427f0dd5b8a1288 URL: https://github.com/llvm/llvm-project/commit/bc27f3573d61012771aa3fee2427f0dd5b8a1288 DIFF: https://github.com/llvm/llvm-project/commit/bc27f3573d61012771aa3fee2427f0dd5b8a1288.diff

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes [CWG2627](https://wg21.link/CWG2627) I've implemented this to apply to C++11 to 20 as well without a warning. Should this be a SFINAE-able error before C++23? (It isn't currently) --- Full diff:

[clang] [clang-tools-extra] [llvm] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)

2024-01-14 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/76873 >From 7dbaf037b6b2196cee7c0c837e0a89ce3c2556ed Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Wed, 3 Jan 2024 14:37:17 -0800 Subject: [PATCH 1/5] [CLANG] Add warning when comparing to INF or NAN in fast

[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)

2024-01-14 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/78112 [CWG2627](https://wg21.link/CWG2627) I've implemented this to apply to C++11 to 20 as well without a warning. Should this be a SFINAE-able error before C++23? (It isn't currently) >From

[clang] [clang-format] BreakAfterAttributes did not take into account gnu attributes (PR #78102)

2024-01-14 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: You either have to use a new option, or adapt the documentation. Latter clearly only refers to `C++11 attributes`, which `__attribute__(())` isn't. I don't think a new option is needed. When you are already at it, you may also consider handling `__declspec()`.

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-14 Thread Björn Schäpers via cfe-commits
@@ -778,45 +778,31 @@ void FormatTokenLexer::handleTableGenMultilineString() { if (MultiLineString->isNot(TT_TableGenMultiLineString)) return; - bool PrevIsRBrace = false; - const char *FirstBreak = nullptr; - const char *LastBreak = nullptr; - const char *Begin =

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-14 Thread Björn Schäpers via cfe-commits
@@ -778,45 +778,31 @@ void FormatTokenLexer::handleTableGenMultilineString() { if (MultiLineString->isNot(TT_TableGenMultiLineString)) return; - bool PrevIsRBrace = false; - const char *FirstBreak = nullptr; - const char *LastBreak = nullptr; - const char *Begin =

[clang] [clang-format] TableGen multi line string support. (PR #78032)

2024-01-14 Thread Björn Schäpers via cfe-commits
@@ -274,13 +274,13 @@ void FormatTokenLexer::tryMergePreviousTokens() { return; } } - if (Style.isTableGen()) { -if (tryMergeTokens({tok::l_square, tok::l_brace}, - TT_TableGenMultiLineString)) { - // Multi line string starts with [{

[clang] [clang-format] Add ShortReturnTypeLength option. (PR #78011)

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

[clang] [clang-format] Add PenaltyBreakScopeResolution option. (PR #78015)

2024-01-14 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks closed https://github.com/llvm/llvm-project/pull/78015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 60a9874 - [clang-format] Add PenaltyBreakScopeResolution option. (#78015)

2024-01-14 Thread via cfe-commits
Author: rmarker Date: 2024-01-14T20:55:44+01:00 New Revision: 60a9874f54922a0fd9bfca9a028c32473f7ef85f URL: https://github.com/llvm/llvm-project/commit/60a9874f54922a0fd9bfca9a028c32473f7ef85f DIFF: https://github.com/llvm/llvm-project/commit/60a9874f54922a0fd9bfca9a028c32473f7ef85f.diff LOG:

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -1994,6 +2004,106 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { { PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty }); } +void GenerateDirectMethodPrologue(CodeGenFunction , llvm::Function *Fn, +

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -3906,14 +4028,50 @@ llvm::Function *CGObjCGNU::GenerateMethod(const ObjCMethodDecl *OMD, CodeGenTypes = CGM.getTypes(); llvm::FunctionType *MethodTy = Types.GetFunctionType(Types.arrangeObjCMethodDeclaration(OMD)); - std::string FunctionName =

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -1994,6 +2004,106 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { { PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty }); } +void GenerateDirectMethodPrologue(CodeGenFunction , llvm::Function *Fn, +

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -1994,6 +2004,106 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { { PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty }); } +void GenerateDirectMethodPrologue(CodeGenFunction , llvm::Function *Fn, +

[llvm] [mlir] [clang-tools-extra] [clang] [libcxx] [libc++][concepts] Implements concept helper `__libcpp_integer` (PR #78086)

2024-01-14 Thread Hristo Hristov via cfe-commits
H-G-Hristov wrote: > LGTM! Thanks! Please ping me when you've update your other patch with these > changes. Thank you! I'll ping you when I am ready with the other patch. I still need to implement additional tests. https://github.com/llvm/llvm-project/pull/78086

[clang] [mlir] [libcxx] [llvm] [clang-tools-extra] [libc++][concepts] Implements concept helper `__libcpp_integer` (PR #78086)

2024-01-14 Thread Mark de Wever via cfe-commits
https://github.com/mordante approved this pull request. LGTM! Thanks! Please ping me when you've update your other patch with these changes. https://github.com/llvm/llvm-project/pull/78086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [mlir] [libcxx] [llvm] [clang-tools-extra] [libc++][concepts] Implements concept helper `__libcpp_integer` (PR #78086)

2024-01-14 Thread Mark de Wever via cfe-commits
mordante wrote: > ``` > 86\test\std\utilities\format\format.functions\Output\formatted_size.pass.cpp.dir\t.tmp.exe' > # .---command stderr > # | Traceback (most recent call last): > # | File "C:\ws\src\libcxx\utils\run.py", line 72, in > # | exit(main()) > # | File

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-14 Thread Samuel Thibault via cfe-commits
https://github.com/sthibaul updated https://github.com/llvm/llvm-project/pull/78065 >From fefe6175fa21c668f58d69b0acc9abb89af981ab Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 14 Jan 2024 19:01:52 +0100 Subject: [PATCH 1/3] hurd: Fix indent --- clang/test/Driver/hurd.cpp | 16

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-14 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 270c6cbda2acf1f60891e10667af6d9741b62009 151e8d9325e68259bfbf227d148ed4b508125856 --

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-14 Thread Samuel Thibault via cfe-commits
@@ -2477,7 +2477,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( "x86_64-redhat-linux","x86_64-suse-linux", "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", "x86_64-slackware-linux", "x86_64-unknown-linux", -

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-14 Thread via cfe-commits
sethp wrote: I think this change is useful enough on its own that I'd like us to consider merging it: to me, teaching the compiler to do additional diffing or further clarifying the structure of complicated sub-objects feel like they'd benefit from having this work as a fallback. We could

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-14 Thread Samuel Thibault via cfe-commits
@@ -78,3 +78,82 @@ // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/ld" {{.*}} "-m" "elf_i386" // CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o" // CHECK-CROSS:

[llvm] [clang] Hurd: Add x86_64 support (PR #78065)

2024-01-14 Thread Samuel Thibault via cfe-commits
https://github.com/sthibaul updated https://github.com/llvm/llvm-project/pull/78065 >From fefe6175fa21c668f58d69b0acc9abb89af981ab Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 14 Jan 2024 19:01:52 +0100 Subject: [PATCH 1/3] hurd: Fix indent --- clang/test/Driver/hurd.cpp | 16

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-14 Thread via cfe-commits
@@ -0,0 +1,205 @@ +// RUN: %clang_cc1 -std=c++2a -verify -fsyntax-only -triple wasm32 %s +// RUN: %clang_cc1 -std=c++2a -verify -fsyntax-only -triple aarch64_be-linux-gnu %s + +struct A { + int a, b[3], c; + bool operator==(const A&) const = default; +}; + +constexpr auto a0 =

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

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

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module , GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module , ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module ,

[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,62 @@ +//===- OffloadWrapper.h --r-*- 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:

[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module , GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module , ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module ,

[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

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

[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module , GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module , ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module ,

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,62 @@ +//===- OffloadWrapper.h --r-*- 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:

[clang] [llvm] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)

2024-01-14 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 commented: Thanks, some comments. https://github.com/llvm/llvm-project/pull/78057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
@@ -11322,9 +11322,22 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-14 Thread via cfe-commits
seranu wrote: > You'd have to create multiple pull requests. And if they build on each other > there is no nice way of doing this on github. You can of course use this one > for a change. You can also not split the work, but chances are it will take > longer for the changes to land. I

[clang] [libc] [Libc] Give more functions restrict qualifiers (PR #78061)

2024-01-14 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/78061 >From 5dd1e619ca89d326650894bb2983e21616e765eb Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Sat, 13 Jan 2024 14:09:17 -0500 Subject: [PATCH] [Libc] Give more

[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-01-14 Thread via cfe-commits
https://github.com/sethp updated https://github.com/llvm/llvm-project/pull/74852 >From f281d34a51f662c934f158e4770774b0dc3588a2 Mon Sep 17 00:00:00 2001 From: Seth Pellegrino Date: Thu, 7 Dec 2023 08:45:51 -0800 Subject: [PATCH 1/9] [Clang][Sema] Print more static_assert exprs This change

[clang] [clang-format] Separate License text and include blocks (PR #77918)

2024-01-14 Thread via cfe-commits
@@ -17,80 +17,97 @@ namespace clang { namespace format { namespace { +std::string +separateDefinitionBlocks(llvm::StringRef Code, + const std::vector , + const FormatStyle = getLLVMStyle()) { + LLVM_DEBUG(llvm::errs() <<

[clang] [clang-format] Extract utility functions outside of test fixture (PR #78108)

2024-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: serbanu (seranu) Changes Extract utility functions outside of test fixture for DefinitionBlockSeparatorTest so that these functions can be used by other test fixtures. There are no functional changes. This is a refactoring in

[clang] [clang-format] Extract utility functions outside of test fixture (PR #78108)

2024-01-14 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-format] Extract utility functions outside of test fixture (PR #78108)

2024-01-14 Thread via cfe-commits
https://github.com/seranu created https://github.com/llvm/llvm-project/pull/78108 Extract utility functions outside of test fixture for DefinitionBlockSeparatorTest so that these functions can be used by other test fixtures. There are no functional changes. This is a refactoring in

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/78103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [libcxx] [mlir] [libc++][concepts] Implements concept helper `__libcpp_integer` (PR #78086)

2024-01-14 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/78086 >From f2008de694bc867efa9632df183f64e3ea194e4e Mon Sep 17 00:00:00 2001 From: Zingam Date: Sun, 14 Jan 2024 09:34:46 +0200 Subject: [PATCH 1/5] [libc++][concepts] Implements concept helper

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/78103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
@@ -11322,9 +11322,22 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
@@ -11322,9 +11322,22 @@ Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { << ClassType << ConvType; } - if (FunctionTemplateDecl *ConversionTemplate -= Conversion->getDescribedFunctionTemplate()) + if

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
@@ -686,3 +686,19 @@ auto f(auto x) { // cxx14-error {{'auto' not allowed in function prototype}} } } + +struct DeducedTargetTypeOfConversionFunction { + operator auto() const { return char(); } + operator const auto() const { return float(); } cor3ntin

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/78103 >From 522c7dff31a6f63995877674f9f4282ae60f7aaa Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 19:45:04 +0300 Subject: [PATCH 1/2] [clang] Implement CWG1878 "`operator auto` template"

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 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 fb2cc9b9fc5ae5a544e3009ae153f5ae83c5a89c 522c7dff31a6f63995877674f9f4282ae60f7aaa --

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes C++14 introduced deduced return type for regular functions, but shortly after [CWG1878](https://wg21.link/cwg1878) was filed and resolved to disallow deduced return types in conversion function

[clang] [clang] Implement CWG1878 "`operator auto` template" (PR #78103)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78103 C++14 introduced deduced return type for regular functions, but shortly after [CWG1878](https://wg21.link/cwg1878) was filed and resolved to disallow deduced return types in conversion function templates. So

[clang] [clang-format] BreakAfterAttributes did not take into account gnu attributes (PR #78102)

2024-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: MyDeveloperDay (mydeveloperday) Changes Not completely sure if we should handle this with a separate option or just treat [[attribute]] the same as __attribute((attribute)) This was raised by #77310 --- Full diff:

[clang] [clang-format] BreakAfterAttributes did not take into account gnu attributes (PR #78102)

2024-01-14 Thread via cfe-commits
https://github.com/mydeveloperday created https://github.com/llvm/llvm-project/pull/78102 Not completely sure if we should handle this with a separate option or just treat [[attribute]] the same as __attribute((attribute)) This was raised by #77310 >From

[clang-tools-extra] [clang-tidy] Fix false-positives in readability-container-size-empty (PR #74140)

2024-01-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/74140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 7f1d757 - [clang-tidy] Fix false-positives in readability-container-size-empty (#74140)

2024-01-14 Thread via cfe-commits
Author: Piotr Zegar Date: 2024-01-14T15:49:16+01:00 New Revision: 7f1d757fb40f06cc1c6b134d770987b340286996 URL: https://github.com/llvm/llvm-project/commit/7f1d757fb40f06cc1c6b134d770987b340286996 DIFF: https://github.com/llvm/llvm-project/commit/7f1d757fb40f06cc1c6b134d770987b340286996.diff

[clang-tools-extra] 59e79f0 - [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (#77206)

2024-01-14 Thread via cfe-commits
Author: Piotr Zegar Date: 2024-01-14T14:52:46+01:00 New Revision: 59e79f0de59d9e4576b6bf562de40a914702efd4 URL: https://github.com/llvm/llvm-project/commit/59e79f0de59d9e4576b6bf562de40a914702efd4 DIFF: https://github.com/llvm/llvm-project/commit/59e79f0de59d9e4576b6bf562de40a914702efd4.diff

[llvm] [clang-tools-extra] [clang] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/77206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [mlir] [llvm] [lld] [compiler-rt] [clang-tools-extra] [flang] [lldb] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] [libcxx] [mlir] [llvm] [lld] [compiler-rt] [clang-tools-extra] [flang] [lldb] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[lldb] [llvm] [libcxx] [mlir] [clang-tools-extra] [compiler-rt] [lld] [flang] [clang] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Mark de Wever via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[libunwind] [mlir] [libcxxabi] [flang] [libc] [libcxx] [lld] [lldb] [clang] [clang-tools-extra] [compiler-rt] [llvm] PR#72453 : Exceeding maximum file name length (PR #72654)

2024-01-14 Thread Shahid Iqbal via cfe-commits
https://github.com/shahidiqbal13 closed https://github.com/llvm/llvm-project/pull/72654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-14 Thread via cfe-commits
https://github.com/phyBrackets approved this pull request. https://github.com/llvm/llvm-project/pull/77206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-14 Thread via cfe-commits
@@ -18,52 +19,80 @@ using namespace clang::tidy::matchers; namespace clang::tidy::readability { +static SourceRange +getFullInitRangeInclWhitespaces(SourceRange Range, const SourceManager , +const LangOptions ) { + const Token PrevToken = +

[clang-tools-extra] [clang] [llvm] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/77206 >From 66e4026ff568fbd805ddd777596102381e4e0066 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Sat, 6 Jan 2024 18:04:57 + Subject: [PATCH 1/2] [clang-tidy] Add support for in-class initializers in

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-14 Thread Piotr Zegar via cfe-commits
@@ -18,52 +19,80 @@ using namespace clang::tidy::matchers; namespace clang::tidy::readability { +static SourceRange +getFullInitRangeInclWhitespaces(SourceRange Range, const SourceManager , +const LangOptions ) { + const Token PrevToken = +

[clang-tools-extra] [clang-tidy] Add support for in-class initializers in readability-redundant-member-init (PR #77206)

2024-01-14 Thread via cfe-commits
@@ -18,52 +19,80 @@ using namespace clang::tidy::matchers; namespace clang::tidy::readability { +static SourceRange +getFullInitRangeInclWhitespaces(SourceRange Range, const SourceManager , +const LangOptions ) { + const Token PrevToken = +

[flang] [clang-tools-extra] [lld] [clang] [libcxx] [lldb] [compiler-rt] [mlir] [llvm] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,130 @@ +//===--===// +// +// 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:

[lldb] [clang-tools-extra] [lld] [compiler-rt] [mlir] [llvm] [flang] [clang] [libcxx] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[mlir] [clang-tools-extra] [lld] [clang] [libcxx] [flang] [compiler-rt] [llvm] [lldb] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,119 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +//

[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes GCC has changed over the past decade. Fixes #51472 --- Full diff: https://github.com/llvm/llvm-project/pull/78095.diff 1 Files Affected: - (modified) clang/docs/UsersManual.rst (+6-10)

[clang] [clang] Remove outdated parts of documentation for #pragma diagnostic (PR #78095)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/78095 GCC has changed over the past decade. Fixes #51472 >From 1aca1cd3be8209675b8aa3b79b2d626ad9f3c559 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 14 Jan 2024 14:11:16 +0300 Subject: [PATCH] [clang]

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread David Chisnall via cfe-commits
davidchisnall wrote: Formatting issues were introduced by running clang-format15, should now be fixed. https://github.com/llvm/llvm-project/pull/78030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread David Chisnall via cfe-commits
https://github.com/davidchisnall updated https://github.com/llvm/llvm-project/pull/78030 >From c8d733479ee8d0fd7c75c4a623f8c1bc2f132c61 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sun, 7 Jan 2024 14:53:48 + Subject: [PATCH] Enable direct methods and fast alloc calls for libobjc2.

[compiler-rt] [clang] [libcxx] [llvm] [clang-tools-extra] [mlir] [lldb] [flang] [lld] [libc++][numeric] P0543R3: Saturation arithmetic (PR #77967)

2024-01-14 Thread Hristo Hristov via cfe-commits
https://github.com/H-G-Hristov updated https://github.com/llvm/llvm-project/pull/77967 >From 48c4463e8817c8ee0f00ffa7422e6fafbe838275 Mon Sep 17 00:00:00 2001 From: Zingam Date: Wed, 10 Jan 2024 13:46:19 +0200 Subject: [PATCH 01/13] [libc++][numeric] P0543R3: Saturation arithmetic Implements:

<    1   2   3   >