[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 &CGF, 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 &CGF, 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 &Types = CGM.getTypes(); llvm::FunctionType *MethodTy = Types.GetFunctionType(Types.arrangeObjCMethodDeclaration(OMD)); - std::string FunctionName = getSymbolName

[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 &CGF, llvm::Function *Fn, +

[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] [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] [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] 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] 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 = Mu

[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 = Mu

[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()`. https:

[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 ba22259dfed861e6d339

[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 math

[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: https://

[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 L

[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 L

[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 https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[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][ASTMatch

[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 https://lists

[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 ___ cfe-

[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 c

[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 i

[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 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 is

[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 is

[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 the

[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 the

[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 --- .../i

[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] [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
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
@@ -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 is

[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 is

[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 TypeKind.f

[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 &M, GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module &M, 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
@@ -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 is

[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 = conf.lib.

[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] [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 &M, GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module &M, 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 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] [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
DeinAlptraum wrote: @AaronBallman could you review this or recommend reviewers? I didn't see any category in `clang/CodeOwners.rst` that seems to cover the bindings. https://github.com/llvm/llvm-project/pull/78114 ___ cfe-commits mailing list cfe-comm

[llvm] [libc] [clang] [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 f69879bb309609d33f75bb7ac525abeb2141aa1f 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 functi

[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 &M, GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module &M, ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module &

[llvm] [libc] [clang] [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 c76bc8254724e313191d402ec2f8b65a09daaeb3 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 functi

[llvm] [libc] [clang] [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 a2c6ba0fe4c681f73f06337b270f7bcf8acc512b 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 functi

[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 &M, GlobalVariable *FatbinDesc, } // namespace -Error wrapOpenMPBinaries(Module &M, ArrayRef> Images) { - GlobalVariable *Desc = createBinDesc(M, Images); +Error OffloadWrapper::wrapOpenMPBinaries( +Module &

[llvm] [clang] [GitHub] Add python 3.7 to libclang python test (PR #77219)

2024-01-14 Thread Craig Hesling via cfe-commits
https://github.com/linux4life798 updated https://github.com/llvm/llvm-project/pull/77219 >From 34492a5aea953be59cf84450862143cbcf53ea6e Mon Sep 17 00:00:00 2001 From: Craig Hesling Date: Sat, 30 Dec 2023 01:17:57 -0500 Subject: [PATCH 1/3] [GitHub] Add python_version input to llvm-project-test

[llvm] [clang] [GitHub] Add python 3.7 to libclang python test (PR #77219)

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

[clang] [llvm] [GitHub] Add python 3.7 to libclang python test (PR #77219)

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

[clang-tools-extra] 332be17 - [clang-tidy]fix readability-implicit-bool-conversion false-positives when comparison bool bitfield (#77878)

2024-01-14 Thread via cfe-commits
Author: Congcong Cai Date: 2024-01-15T09:11:16+08:00 New Revision: 332be179e13df924971f752236f5cf3c6483b588 URL: https://github.com/llvm/llvm-project/commit/332be179e13df924971f752236f5cf3c6483b588 DIFF: https://github.com/llvm/llvm-project/commit/332be179e13df924971f752236f5cf3c6483b588.diff

[clang-tools-extra] [clang-tidy]fix readability-implicit-bool-conversion false-positives when comparison bool bitfield (PR #77878)

2024-01-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/77878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [GitHub] Add python 3.7 to libclang python test (PR #77219)

2024-01-14 Thread Craig Hesling via cfe-commits
@@ -30,10 +30,15 @@ jobs: check-clang-python: # Build libclang and then run the libclang Python binding's unit tests. name: Build and run Python unit tests +strategy: + fail-fast: false + matrix: +python-version: ["3.7", "3.11"]

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

2024-01-14 Thread Fangrui Song via cfe-commits
@@ -2652,6 +2652,31 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( return; } + if (TargetTriple.isOSHurd()) { +static const char *const X86_64HurdTriples[] = {"x86_64-gnu"}; MaskRay wrote: Since there is just one, `TripleAlia

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-14 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,56 @@ +//===--- AvoidNestedConditionalOperatorCheck.cpp - clang-tidy --===// +// +// 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: Apache-

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

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

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

2024-01-14 Thread Fangrui Song via cfe-commits
@@ -57,9 +57,9 @@ // RUN: %clang -### %s --target=i686-pc-hurd-gnu --sysroot=%S/Inputs/basic_hurd_tree \ // RUN: -shared 2>&1 | FileCheck --check-prefix=CHECK-SHARED %s -// CHECK-SHARED: "{{.*}}ld" "--sysroot=[[SYSROOT:[^"]+]]" -// CHECK-SHARED: "{{.*}}/usr/lib/gcc/i686-gnu

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

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

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

2024-01-14 Thread Fangrui Song 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: "-L{{.*}}/Inputs/basi

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

2024-01-14 Thread Fangrui Song via cfe-commits
@@ -29,9 +29,9 @@ // RUN: %clang -### %s --target=i686-pc-hurd-gnu --sysroot=%S/Inputs/basic_hurd_tree \ // RUN: --stdlib=platform -static 2>&1 | FileCheck --check-prefix=CHECK-STATIC %s -// CHECK-STATIC: "-cc1" -// CHECK-STATIC: "-static-define" -// CHECK-STATIC: "-isysro

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

2024-01-14 Thread Fangrui Song via cfe-commits
@@ -2,8 +2,8 @@ // RUN: %clang -### %s --target=i686-pc-hurd-gnu --sysroot=%S/Inputs/basic_hurd_tree \ // RUN: --stdlib=platform 2>&1 | FileCheck --check-prefix=CHECK %s -// CHECK: "-cc1" -// CHECK: "-isysroot" "[[SYSROOT:[^"]+]]" +// CHECK: "-cc1" +// CHECK: "-is

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

2024-01-14 Thread Fangrui Song 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: "-L{{.*}}/Inputs/basi

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

2024-01-14 Thread Fangrui Song via cfe-commits
MaskRay wrote: Thanks for the patch. It's in a very good shape and I did not need to make many nitpicky comments like I had to do for other "support a new target triple" driver patch:) Could you add some descriptions? https://github.com/llvm/llvm-project/pull/78065 ___

[clang-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-14 Thread Congcong Cai via cfe-commits
@@ -0,0 +1,56 @@ +//===--- AvoidNestedConditionalOperatorCheck.cpp - clang-tidy --===// +// +// 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: Apache-

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #72607)

2024-01-14 Thread Yuanfang Chen via cfe-commits
yuanfang-chen wrote: ping? https://github.com/llvm/llvm-project/pull/72607 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-14 Thread Samuel Thibault via cfe-commits
@@ -2652,6 +2652,31 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( return; } + if (TargetTriple.isOSHurd()) { +static const char *const X86_64HurdTriples[] = {"x86_64-gnu"}; sthibaul wrote: But then also `BiarchTripleAliases.

[clang] [CLANG][NFC] Modify test cases to suit assigned default sysroot path (PR #77075)

2024-01-14 Thread Brad Smith via cfe-commits
brad0 wrote: @MaskRay Wasn't it you that mentioned this? https://github.com/llvm/llvm-project/pull/77075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86_64] fix empty structure vaarg in c++ (PR #77907)

2024-01-14 Thread Longsheng Mou via cfe-commits
CoTinker wrote: > I checked it locally, the patch doesn't fix the reported problem: > > ``` > $ clang pr77036.cpp && ./a.out > -nan > Fail > ``` isEmptyRecord return false here, I am checking it. https://github.com/llvm/llvm-project/pull/77907 ___ cf

[clang] [libclang/python] Bump minimum compatibility to Python 3.6 (PR #77228)

2024-01-14 Thread via cfe-commits
h-vetinari wrote: This should just bump to 3.8 IMO. Anything below that is end-of-life and a waste of time to support. https://github.com/llvm/llvm-project/pull/77228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

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

2024-01-14 Thread Samuel Thibault via cfe-commits
sthibaul wrote: > Could you add some descriptions? What kind of description, where? https://github.com/llvm/llvm-project/pull/78065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] 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-tools-extra] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/78022 >From 0988bb25a35e5d50b44bf53d459098777280c3e5 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 13 Jan 2024 16:00:16 +0800 Subject: [PATCH 1/2] [clang-tidy]Add new check readability-avoid-nested-condit

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

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

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

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

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

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

[flang] [clang] [clang-tools-extra] [llvm] [compiler-rt] [mlir] [lld] [libcxx] [lldb] [clang-tidy]Add new check readability-avoid-nested-conditional-operator (PR #78022)

2024-01-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/78022 >From 0988bb25a35e5d50b44bf53d459098777280c3e5 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 13 Jan 2024 16:00:16 +0800 Subject: [PATCH 1/2] [clang-tidy]Add new check readability-avoid-nested-condit

[clang] [Clang][Sema] fix crash of attribute transform (PR #78088)

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

[clang] [AVX10][Doc] Add documentation about AVX10 options and their attentions (PR #77925)

2024-01-14 Thread Shengchen Kan via cfe-commits
KanRobert wrote: Thanks for this! https://github.com/llvm/llvm-project/pull/77925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2024-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Thanks for your patience. https://github.com/llvm/llvm-project/pull/69076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[llvm] [clang] [X86] Use vXi1 for `k` constraint in inline asm (PR #77733)

2024-01-14 Thread Shengchen Kan via cfe-commits
KanRobert wrote: Why not return `i32` for 64-bit mask in 32-bit mode? https://github.com/llvm/llvm-project/pull/77733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [mlir][gpu] Add the `OffloadEmbeddingAttr` offloading translation attr (PR #78117)

2024-01-14 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg created https://github.com/llvm/llvm-project/pull/78117 This patch adds the offloading translation attribute. This attribute uses LLVM offloading infrastructure to embed GPU binaries in the IR. At the program start, the LLVM offloading mechanism registers kernels and

[clang] [llvm] [X86] Use vXi1 for `k` constraint in inline asm (PR #77733)

2024-01-14 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > Why not return `i32` for 64-bit mask in 32-bit mode? You mean in two `i32` registers? The problem is the inline asm constraint has 1:1 map with physical register except corner cases. And represent a `k` constraint into two GPR registers is inefficient. https://github.com/l

[clang] [X86_64] fix empty structure vaarg in c++ (PR #77907)

2024-01-14 Thread Longsheng Mou via cfe-commits
CoTinker wrote: > I checked it locally, the patch doesn't fix the reported problem: > > ``` > $ clang pr77036.cpp && ./a.out > -nan > Fail > ``` It seems that `struct S14{}` is empty record, but `struct S14 { union{}a;}` is not. https://github.com/llvm/llvm-project/pull/77907 ___

[clang] [libclang/python] Bump minimum compatibility to Python 3.6 (PR #77228)

2024-01-14 Thread Craig Hesling via cfe-commits
linux4life798 wrote: > This should just bump to 3.8 IMO. Anything below that is end-of-life and a > waste of time to support. I agree and my personal plan is still to bump the version to 3.7 or 3.8, but it was more important to me to make progress towards adding any usable type annotations th

[llvm] [clang] [X86] Use vXi1 for `k` constraint in inline asm (PR #77733)

2024-01-14 Thread Shengchen Kan via cfe-commits
KanRobert wrote: > > Why not return `i32` for 64-bit mask in 32-bit mode? > > You mean in two `i32` registers? The problem is the inline asm constraint has > 1:1 map with physical register except corner cases. And represent a `k` > constraint into two GPR registers is inefficient. Is it repre

[clang] e3acfbc - [clang-format] Stop aligning the to continuation lines (#76378)

2024-01-14 Thread via cfe-commits
Author: sstwcw Date: 2024-01-15T03:04:42Z New Revision: e3acfbc471ac74425c2a4b54546b322b42c4cf00 URL: https://github.com/llvm/llvm-project/commit/e3acfbc471ac74425c2a4b54546b322b42c4cf00 DIFF: https://github.com/llvm/llvm-project/commit/e3acfbc471ac74425c2a4b54546b322b42c4cf00.diff LOG: [clang

[clang] [clang-format] Stop aligning the to continuation lines (PR #76378)

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

[llvm] [clang] [PGO]Add `-fdiagnostics-show-profile-count` option to show real loop count from instr-profile (PR #75021)

2024-01-14 Thread Elvis Wang via cfe-commits
ElvisWang123 wrote: Gentle ping https://github.com/llvm/llvm-project/pull/75021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 85071a3 - [PowerPC] Implement fence builtin (#76495)

2024-01-14 Thread via cfe-commits
Author: Qiu Chaofan Date: 2024-01-15T11:19:16+08:00 New Revision: 85071a3c74f531ade3709351638c1380c4503d2c URL: https://github.com/llvm/llvm-project/commit/85071a3c74f531ade3709351638c1380c4503d2c DIFF: https://github.com/llvm/llvm-project/commit/85071a3c74f531ade3709351638c1380c4503d2c.diff L

[llvm] [clang] [clang-tools-extra] [PowerPC] Implement fence builtin (PR #76495)

2024-01-14 Thread Qiu Chaofan via cfe-commits
https://github.com/ecnelises closed https://github.com/llvm/llvm-project/pull/76495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [X86] Use vXi1 for `k` constraint in inline asm (PR #77733)

2024-01-14 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > > > Why not return `i32` for 64-bit mask in 32-bit mode? > > > > > > You mean in two `i32` registers? The problem is the inline asm constraint > > has 1:1 map with physical register except corner cases. And represent a `k` > > constraint into two GPR registers is inefficie

[clang] [clang][modules] Print library module manifest path. (PR #76451)

2024-01-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. While we need to delete `clang/test/Driver/Inputs/cxx23_modules/usr/lib/x86_64-linux-gnu/libc++.so` and `clang/test/Driver/Inputs/cxx23_modules/usr/lib/x86_64-linux-gnu/modules.json`. https://github.com/llvm/llvm-project/pull/764

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-14 Thread Chuanqi Xu via cfe-commits
@@ -1796,6 +1797,32 @@ bool CoroutineStmtBuilder::makeOnException() { return true; } +// Adds [[clang::coro_wrapper]] and [[clang::coro_disable_lifetimebound]] +// attributes to the function `get_return_object`. +static void handleGetReturnObject(Sema &S, Expr *E) { + if (a

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-14 Thread Chuanqi Xu via cfe-commits
@@ -15845,8 +15845,10 @@ void Sema::CheckCoroutineWrapper(FunctionDecl *FD) { RecordDecl *RD = FD->getReturnType()->getAsRecordDecl(); if (!RD || !RD->getUnderlyingDecl()->hasAttr()) return; - // Allow `get_return_object()`. - if (FD->getDeclName().isIdentifier() && +

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-14 Thread Chuanqi Xu via cfe-commits
@@ -1796,6 +1797,32 @@ bool CoroutineStmtBuilder::makeOnException() { return true; } +// Adds [[clang::coro_wrapper]] and [[clang::coro_disable_lifetimebound]] +// attributes to the function `get_return_object`. ChuanqiXu9 wrote: ```suggestion // attributes

[clang] [coroutines][coro_lifetimebound] Detect lifetime issues with lambda captures (PR #77066)

2024-01-14 Thread Chuanqi Xu via cfe-commits
@@ -33,6 +34,7 @@ #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" +#include "llvm/Support/Casting.h" ChuanqiXu9 wrote: Maybe we don't need this? https://github.com/llvm/llvm-project/pull/77066 ___

[clang] [clang][modules] Print library module manifest path. (PR #76451)

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

[clang] [clang][modules] Print library module manifest path. (PR #76451)

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

[clang] [clang][docs] Improve "Obtaining Clang" section (PR #71313)

2024-01-14 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: LGTM, but wair for other reviewers. https://github.com/llvm/llvm-project/pull/71313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Use vXi1 for `k` constraint in inline asm (PR #77733)

2024-01-14 Thread Shengchen Kan via cfe-commits
@@ -57046,17 +57046,17 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, // in the normal allocation? case 'k': if (Subtarget.hasAVX512()) { -if (VT == MVT::i1) +if (VT == MVT::v1i1 || VT == MVT::i1) re

<    1   2   3   >