[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread via cfe-commits
cor3ntin wrote: I think the issue here is that there is no extension warning in C++17. There should probably be one. Search for `ExtWarn` in DiagnosticSemaKinds.td and how these `ext_` diagnostics are used https://github.com/llvm/llvm-project/pull/133597

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-29 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,145 @@ +// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -std=c++26 -fcoroutines -fexceptions -Wall -Wpedantic + + +#include "Inputs/std-coroutine.h" + +namespace std { + template struct type_identity { + typedef T type; + }; + typedef __

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-29 Thread Oliver Hunt via cfe-commits
@@ -3128,6 +3128,26 @@ bool Type::isStdByteType() const { return false; } +static const TemplateDecl *getSpecializedTemplateType(const Type *T) { + const Type *DesugaredType = T->getUnqualifiedDesugaredType(); + if (const auto *Specialization = + DesugaredType->ge

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-29 Thread Oliver Hunt via cfe-commits
@@ -477,6 +477,44 @@ class DeclarationName { return OO_None; } + bool isOperatorNew() const { +if (getNameKind() != DeclarationName::CXXOperatorName) + return false; +switch (getCXXOverloadedOperator()) { +case OO_New: +case OO_Array_New: + ret

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-29 Thread Oliver Hunt via cfe-commits
@@ -307,6 +307,10 @@ EXTENSION(datasizeof, LangOpts.CPlusPlus) FEATURE(cxx_abi_relative_vtable, LangOpts.CPlusPlus && LangOpts.RelativeCXXABIVTables) +// Type aware allocators +FEATURE(cxx_type_aware_allocators, LangOpts.TypeAwareAllocators) ojhunt wrote: R

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-29 Thread Oliver Hunt via cfe-commits
@@ -1110,9 +1138,10 @@ static bool findDeleteForPromise(Sema &S, SourceLocation Loc, QualType PromiseTy // The deallocation function's name is looked up by searching for it in the // scope of the promise type. If nothing is found, a search is performed in // the global s

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-29 Thread Oliver Hunt via cfe-commits
@@ -9784,10 +9850,16 @@ bool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD, //results in an ambiguity or in a function that is deleted or inaccessible if (CSM == CXXSpecialMemberKind::Destructor && MD->isVirtual()) { FunctionDecl *OperatorDelete = nullptr; +

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-29 Thread Oliver Hunt via cfe-commits
@@ -16147,6 +16169,108 @@ bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor, return Invalid; } +bool Sema::isTypeAwareOperatorNewOrDelete(const NamedDecl *ND) const { + const FunctionDecl *FnDecl = nullptr; + if (auto *FTD = dyn_cast(ND)) +FnDecl = FT

[clang] [alpha.webkit.RawPtrRefMemberChecker] The checker doesn't warn Objective-C types in ivars. (PR #132833)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes This PR fixes the bug that we weren't generating warnings when a raw poiner is used to point to a NS type in Objective-C ivars. Also fix the bug that we weren't suppressing this warning in sy

[clang] [clang] implement common-sugar for adjusted member-pointers (PR #133613)

2025-03-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vls-2stage` running on `linaro-g3-02` while building `clang` at step 12 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/4/builds/5936 Here is the relevant piece of

[clang] [Clang][Cmake] fix libtool duplicate member name warnings (PR #133619)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Farzon Lotfi (farzonl) Changes fixes #133199 PR #132252 Created a second file that shared `.cpp` in `clang/lib/CodeGen/CMakeLists.txt` For example There were two `AMDGPU.cpp`'s one in `TargetBuiltins` and the other in `Targ

[clang] [Clang][Cmake] fix libtool duplicate member name warnings (PR #133619)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Farzon Lotfi (farzonl) Changes fixes #133199 PR #132252 Created a second file that shared `.cpp` in `clang/lib/CodeGen/CMakeLists.txt` For example There were two `AMDGPU.cpp`'s one in `TargetBuiltins` and the other

[clang] [Clang][Cmake] fix libtool duplicate member name warnings (PR #133619)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Farzon Lotfi (farzonl) Changes fixes #133199 PR #132252 Created a second file that shared `.cpp` in `clang/lib/CodeGen/CMakeLists.txt` For example There were two `AMDGPU.cpp`'s one in `TargetBuiltins` and the other

[clang] [clang] implement common-sugar for adjusted member-pointers (PR #133613)

2025-03-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vls` running on `linaro-g3-03` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/143/builds/6546 Here is the relevant piece of the bui

[clang] [Basic] Use SmallSet::insert_range (NFC) (PR #133594)

2025-03-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/15138 Here is the relevant piece of the

[clang] [clang] implement common-sugar for adjusted member-pointers (PR #133613)

2025-03-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/133613 This implements a missing case for an adjusted member-pointer in getCommonSugaredType, when that was originally implemented here: https://github.com/llvm/llvm-project/pull/130537 This missing case could other

[clang] [clang] implement common-sugar for adjusted member-pointers (PR #133613)

2025-03-29 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/133613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Enable indiviual crbits tracking at -O2 (PR #133617)

2025-03-29 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 HEAD~1 HEAD --extensions cpp,h -- clang/lib/Basic/Targets/PPC.cpp llvm/lib/Target/Pow

[clang] [flang] [flang] Expose -m64 option (PR #132409)

2025-03-29 Thread Daniel Chen via cfe-commits
DanielCChen wrote: @JDPailleux @kiranchandramohan We are planning to add support for flang to compile 32-bit application as well as building 32-bit flang-rt on AIX. The first thing would be to enable `-m32` for flang in the driver. I saw Kiran's comment. Would it be possible to make `-m32` av

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread Owen Pan via cfe-commits
owenca wrote: If @mydeveloperday doesn't object to adding more choices to `AllowShortFunctionsOnASingleLine`, I'd like to see it extended to handle a custom `struct` first, similar to `SBPO_Custom` for example. https://github.com/llvm/llvm-project/pull/133598 __

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread via cfe-commits
@@ -335,6 +336,32 @@ class LineJoiner { } } + if (Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInlineOnly || + Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInline) { +// C

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread via cfe-commits
@@ -335,6 +336,32 @@ class LineJoiner { } } + if (Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInlineOnly || + Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInline) { +// C

[clang] [clang] implement common-sugar for adjusted member-pointers (PR #133613)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This implements a missing case for an adjusted member-pointer in getCommonSugaredType, when that was originally implemented here: https://github.com/llvm/llvm-project/pull/130537 This missing case could

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread via cfe-commits
@@ -335,6 +336,32 @@ class LineJoiner { } } + if (Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInlineOnly || + Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInline) { +// C

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread via cfe-commits
@@ -863,6 +870,12 @@ struct FormatStyle { /// void f() {} /// \endcode SFS_Inline, +/// Only merge functions defined as static inline. Implies ``empty``. irymarchyk wrote: Thanks, fixed. Now it mention that empty function also merged. https:

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread via cfe-commits
@@ -15120,6 +15120,85 @@ TEST_F(FormatTest, PullInlineFunctionDefinitionsIntoSingleLine) { MergeInlineOnly); } +TEST_F(FormatTest, PullStaticInlineFunctionDefinitionsIntoSingleLine) { + FormatStyle MergeStaticInlineOnly = getLLVMStyle(); + MergeStaticInlineOn

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread via cfe-commits
@@ -335,6 +336,32 @@ class LineJoiner { } } + if (Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInlineOnly || + Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInline) { +// C

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread via cfe-commits
@@ -15120,6 +15120,85 @@ TEST_F(FormatTest, PullInlineFunctionDefinitionsIntoSingleLine) { MergeInlineOnly); } +TEST_F(FormatTest, PullStaticInlineFunctionDefinitionsIntoSingleLine) { + FormatStyle MergeStaticInlineOnly = getLLVMStyle(); + MergeStaticInlineOn

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-03-29 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @alexfh should be fixed by https://github.com/llvm/llvm-project/pull/133613 https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread via cfe-commits
https://github.com/irymarchyk updated https://github.com/llvm/llvm-project/pull/133598 >From cc9c8d79396b6be64910eda59c4f7bd1a1d0a839 Mon Sep 17 00:00:00 2001 From: Ivan Rymarchyk <> Date: Sat, 29 Mar 2025 13:54:32 -0700 Subject: [PATCH 1/2] [clang-format]: Add `StaticInlineOnly` and `StaticInli

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx Author: Matheus Izvekov (mizvekov) Changes This makes it so clang can better represent the abscence of the template keyword for a template which cannot be resolved due to a dependent prefix. The tracking of the template keyword is removed from t

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Matheus Izvekov (mizvekov) Changes This makes it so clang can better represent the abscence of the template keyword for a template which cannot be resolved due to a dependent prefix. The tracking of the template keyword is removed

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-coroutines Author: Matheus Izvekov (mizvekov) Changes This makes it so clang can better represent the abscence of the template keyword for a template which cannot be resolved due to a dependent prefix. The tracking of the template keyword is removed fr

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-03-29 Thread Austin Schuh via cfe-commits
AustinSchuh wrote: > If the header is compileable without CUDA SDK (maybe with some stub headers > in tests Inputs), then a source file with a lot of builtin calls and > [autogenerated > checks](https://github.com/llvm/llvm-project/blob/d724bab8064685c98cdded88157b6e2245e0d7bc/llvm/utils/updat

[clang] cuda clang: Add support for CUDA surfaces (PR #132883)

2025-03-29 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 HEAD~1 HEAD --extensions h -- clang/test/Headers/Inputs/include/surface_indirect_func

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-29 Thread Oliver Hunt via cfe-commits
@@ -3134,6 +3134,31 @@ bool Type::isStdByteType() const { return false; } +bool Type::isDestroyingDeleteT() const { + auto *RD = getAsCXXRecordDecl(); + return RD && RD->isInStdNamespace() && RD->getIdentifier() && + RD->getIdentifier()->isStr("destroying_delete_t"

[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: We do tend to offer newer features into older standards when that isn't a burden, as long as we have a warning advertising the incompatibility with the current standard, as we do. What is the motivation for this change? https://github.com/llvm/llvm-proje

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-03-29 Thread Alexander Kornienko via cfe-commits
alexfh wrote: I've found a new crash that's not fixed by https://github.com/llvm/llvm-project/pull/133343. Reducing... https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [WebKit checkers] Treat Objective-C message send return value as safe (PR #133605)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Objective-C selectors are supposed to return autoreleased object. Treat these return values as safe. --- Full diff: https://github.com/llvm/llvm-project/pull/133605.diff 6 Files Affected:

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-29 Thread Oliver Hunt via cfe-commits
@@ -2533,9 +2533,43 @@ bool CXXMethodDecl::isUsualDeallocationFunction( getOverloadedOperator() != OO_Array_Delete) ojhunt wrote: I've adopted them in a few places, and I'm renaming them to isAnyOperatorNew, isAnyOperatorDelete so it's less confusable wit

[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread via cfe-commits
GeorgeKA wrote: Gotcha. Thanks for the feedback. I'll comment in the issue. https://github.com/llvm/llvm-project/pull/133597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-03-29 Thread via cfe-commits
https://github.com/jadhbeika updated https://github.com/llvm/llvm-project/pull/128742 >From fa3dd1423e4bf2209feb9713f1833e653ec43a74 Mon Sep 17 00:00:00 2001 From: Jad Hbeika Date: Wed, 19 Feb 2025 12:53:11 -0800 Subject: [PATCH 1/3] [Clang] [OpenMP] Support NOWAIT with optional argument ---

[clang] [WebKit checkers] Treat Objective-C message send return value as safe (PR #133605)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes Objective-C selectors are supposed to return autoreleased object. Treat these return values as safe. --- Full diff: https://github.com/llvm/llvm-project/pull/133605.diff 6 Files Affected: - (modified) clan

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-29 Thread Shafik Yaghmour via cfe-commits
@@ -1886,8 +1891,9 @@ TEST_F(StructuralEquivalenceCacheTest, VarDeclWithDifferentStorageClassNoEq) { Lang_CXX03); StructuralEquivalenceContext Ctx( - get<0>(TU)->getASTContext(), get<1>(TU)->getASTContext(), - NonEquivalentDecls, StructuralEquivalenceKind::D

[clang] [Driver] Add linker options to support statical linking to shared flang-rt on AIX. (PR #131822)

2025-03-29 Thread Hubert Tong via cfe-commits
@@ -127,9 +127,19 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, } // Force static linking when "-static" is present. - if (Args.hasArg(options::OPT_static)) + if (Args.hasArg(options::OPT_static)) { CmdArgs.push_back("-bnso"); +if (D.

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-03-29 Thread via cfe-commits
https://github.com/jadhbeika updated https://github.com/llvm/llvm-project/pull/128742 >From fa3dd1423e4bf2209feb9713f1833e653ec43a74 Mon Sep 17 00:00:00 2001 From: Jad Hbeika Date: Wed, 19 Feb 2025 12:53:11 -0800 Subject: [PATCH 1/2] [Clang] [OpenMP] Support NOWAIT with optional argument ---

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread Björn Schäpers via cfe-commits
@@ -15120,6 +15120,85 @@ TEST_F(FormatTest, PullInlineFunctionDefinitionsIntoSingleLine) { MergeInlineOnly); } +TEST_F(FormatTest, PullStaticInlineFunctionDefinitionsIntoSingleLine) { + FormatStyle MergeStaticInlineOnly = getLLVMStyle(); + MergeStaticInlineOn

[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread Matheus Izvekov via cfe-commits
@@ -113,7 +113,7 @@ namespace dependent { }; template void f() { typename T::X tx = 0; -typename T::Y ty = 0; +typename T::template Y ty = 0; mizvekov wrote: This is just removing the test. Ideally this would still be tested under C++20. https

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-29 Thread Oliver Hunt via cfe-commits
@@ -16298,6 +16396,70 @@ bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor, return Invalid; } +bool Sema::isTypeAwareOperatorNewOrDelete(const NamedDecl *ND) const { + const FunctionDecl *FnDecl = nullptr; + if (auto *FTD = dyn_cast(ND)) +FnDecl = FTD

[clang] [lld] Add the type to target_link_libraries (PR #133596)

2025-03-29 Thread Theo Paris via cfe-commits
https://github.com/theoparis created https://github.com/llvm/llvm-project/pull/133596 This fixes building with LLVM_TOOL_LLVM_DRIVER_BUILD and LLVM_LINK_LLVM_DYLIB set to true. CMake requires that "all uses of target_link_libraries with a target must be either all-keyword or all-plain". >Fro

[clang] [lld] Add the type to target_link_libraries (PR #133596)

2025-03-29 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] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread Matheus Izvekov via cfe-commits
@@ -9895,26 +9895,30 @@ QualType Sema::DeduceTemplateSpecializationFromInitializer( if (!Template) { if (auto *AliasTemplate = dyn_cast_or_null( TemplateName.getAsTemplateDecl())) { - Diag(Kind.getLocation(), - diag::warn_cxx17_compat_ctad_for_

[clang] [clang-format] Add an option for editing enum trailing commas (PR #133576)

2025-03-29 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. Should this get the same warning as the other non white space changes? https://github.com/llvm/llvm-project/pull/133576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-29 Thread Oliver Hunt via cfe-commits
@@ -1829,10 +1829,18 @@ class DeclContext { // refers to an enclosing template for hte purposes of [temp.friend]p9. LLVM_PREFERRED_TYPE(bool) uint64_t FriendConstraintRefersToEnclosingTemplate : 1; + +// Indicates this function is type aware operator new or dele

[clang] [Basic] Use SmallSet::insert_range (NFC) (PR #133594)

2025-03-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve2-vla-2stage` running on `linaro-g4-02` while building `clang` at step 12 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/199/builds/2460 Here is the relevant piece

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread Björn Schäpers via cfe-commits
@@ -335,6 +336,32 @@ class LineJoiner { } } + if (Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInlineOnly || + Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInline) { +// C

[clang] [clang-format] Add an option for editing enum trailing commas (PR #133576)

2025-03-29 Thread Owen Pan via cfe-commits
owenca wrote: > Should this get the same warning as the other non white space changes? Absolutely! https://github.com/llvm/llvm-project/pull/133576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [clang-format] Add an option for editing enum trailing commas (PR #133576)

2025-03-29 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/133576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Check PP presence when printing stats (PR #131608)

2025-03-29 Thread Fangrui Song via cfe-commits
MaskRay wrote: LGTM! Thanks for the fix https://github.com/llvm/llvm-project/pull/131608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add an option for editing enum trailing commas (PR #133576)

2025-03-29 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/133576 >From 3b352123c47cb382539fefc1bcd49228c17d994f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sat, 29 Mar 2025 00:30:49 -0700 Subject: [PATCH 1/2] [clang-format] Add an option for editing enum trailing commas --

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-03-29 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang-tools-extra] [clang-tidy][NFC][doc] improve "options" sections of `bugprone-` and `modernize-` checks (PR #133525)

2025-03-29 Thread Baranov Victor via cfe-commits
@@ -53,4 +53,4 @@ Options If set to non-zero, the check does not suggest edits that will transform vbvictor wrote: yes, thanks for the notice https://github.com/llvm/llvm-project/pull/133525 ___ cfe-commits maili

[clang-tools-extra] [clang-tidy][NFC][doc] improve "options" sections of `bugprone-` and `modernize-` checks (PR #133525)

2025-03-29 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/133525 >From 9b88fc69e06d08fd06b60af24b5a9c12749185ef Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 29 Mar 2025 00:46:22 +0300 Subject: [PATCH 1/2] improve docs options of `bugprone-` and `modernize-` chec

[clang] Reland [HIP] fix host min/max in header (PR #133590)

2025-03-29 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/133590 >From 3f533ad3a54b199e96a14e91f01b9714c30f52c2 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Sun, 25 Feb 2024 11:13:40 -0500 Subject: [PATCH] [HIP] fix host min/max in header CUDA defines min/max func

[clang-tools-extra] [clang-tidy] Fix broken HeaderFilterRegex when read from config file (PR #133582)

2025-03-29 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp edited https://github.com/llvm/llvm-project/pull/133582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Basic] Use SmallSet::insert_range (NFC) (PR #133594)

2025-03-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-arm-ubuntu` running on `linaro-lldb-arm-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/13707 Here is the relevant piece of the build lo

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 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] 0cd8232 - Fix some typos (NFC) (#133558)

2025-03-29 Thread via cfe-commits
Author: Qinkun Bao Date: 2025-03-29T20:54:15+01:00 New Revision: 0cd82327ff71282b2bfc51090074a3fd63e4842d URL: https://github.com/llvm/llvm-project/commit/0cd82327ff71282b2bfc51090074a3fd63e4842d DIFF: https://github.com/llvm/llvm-project/commit/0cd82327ff71282b2bfc51090074a3fd63e4842d.diff LO

[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: It is generally ok, we only do not allow it when that would cause some significant backwards compatibility issues. https://github.com/llvm/llvm-project/pull/133597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Basic] Use SmallSet::insert_range (NFC) (PR #133594)

2025-03-29 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/133594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-03-29 Thread Tom Honermann via cfe-commits
@@ -229,6 +229,12 @@ class CodeGenTypes { const CGFunctionInfo &arrangeBuiltinFunctionCall(QualType resultType, const CallArgList &args); + /// A SYCL device kernel function is a free standing function with + /// spir_kern

[clang] [llvm] Support alternative sections for patchable function entries (PR #131230)

2025-03-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/131230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3d43739 - [Basic] Use SmallSet::insert_range (NFC) (#133594)

2025-03-29 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-03-29T14:26:36-07:00 New Revision: 3d43739753f3b50824a09343efe40a2a476488df URL: https://github.com/llvm/llvm-project/commit/3d43739753f3b50824a09343efe40a2a476488df DIFF: https://github.com/llvm/llvm-project/commit/3d43739753f3b50824a09343efe40a2a476488df.diff L

[clang] [clang][DependencyScanning] Track dependencies from prebuilt modules to determine IsInStableDir (PR #132237)

2025-03-29 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/132237 When a module is being scanned, it can depend on modules that have already been built from a pch dependency. When this happens, the pcm files are reused for the module dependencies. When this is the case, c

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread Björn Schäpers via cfe-commits
@@ -863,6 +870,12 @@ struct FormatStyle { /// void f() {} /// \endcode SFS_Inline, +/// Only merge functions defined as static inline. Implies ``empty``. HazardyKnusperkeks wrote: This should have a different text. https://github.com/llvm/ll

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread Björn Schäpers via cfe-commits
@@ -335,6 +336,32 @@ class LineJoiner { } } + if (Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInlineOnly || + Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInline) { +// C

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread Björn Schäpers via cfe-commits
@@ -15120,6 +15120,85 @@ TEST_F(FormatTest, PullInlineFunctionDefinitionsIntoSingleLine) { MergeInlineOnly); } +TEST_F(FormatTest, PullStaticInlineFunctionDefinitionsIntoSingleLine) { + FormatStyle MergeStaticInlineOnly = getLLVMStyle(); + MergeStaticInlineOn

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread Björn Schäpers via cfe-commits
@@ -335,6 +336,32 @@ class LineJoiner { } } + if (Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInlineOnly || + Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInline) { +// C

[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread via cfe-commits
GeorgeKA wrote: > We do tend to offer newer features into older standards when that isn't a > burden, as long as we have a warning advertising the incompatibility with the > current standard, as we do. > > What is the motivation for this change? It was originally detailed in [125913](https:/

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread Björn Schäpers via cfe-commits
@@ -335,6 +336,32 @@ class LineJoiner { } } + if (Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInlineOnly || + Style.AllowShortFunctionsOnASingleLine == + FormatStyle::SFS_StaticInline) { +// C

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ivan (irymarchyk) Changes Currently, the `ShortFunctionStyle` option in clang-format lacks the granularity to specifically control the single-line formatting of `static inline` C functions independently from other function types like regu

[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/133597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread via cfe-commits
https://github.com/GeorgeKA edited https://github.com/llvm/llvm-project/pull/133597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add linker options to support statical linking to shared flang-rt on AIX. (PR #131822)

2025-03-29 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131822 >From 21f3ec3b644ea201e3aa15d18f74c795ccf120f3 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Tue, 18 Mar 2025 11:09:41 -0400 Subject: [PATCH] [Driver] Add linker options to support statical linking to sh

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Ivan (irymarchyk) Changes Currently, the `ShortFunctionStyle` option in clang-format lacks the granularity to specifically control the single-line formatting of `static inline` C functions independently from other function types li

[clang] [clang-format]: Add `StaticInlineOnly` and `StaticInline` options to `ShortFunctionStyle` (PR #133598)

2025-03-29 Thread via cfe-commits
https://github.com/irymarchyk created https://github.com/llvm/llvm-project/pull/133598 Currently, the `ShortFunctionStyle` option in clang-format lacks the granularity to specifically control the single-line formatting of `static inline` C functions independently from other function types like

[clang] [NFC][analyzer] Fix typo in VirtualCall checker docs (PR #133593)

2025-03-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/133593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread via cfe-commits
https://github.com/GeorgeKA edited https://github.com/llvm/llvm-project/pull/133597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (GeorgeKA) Changes Alias template class template argument deduction is a C++20 feature. Also updated relevant CTAD test cases. --- Full diff: https://github.com/llvm/llvm-project/pull/133597.diff 4 Files Affected: - (modified) cla

[clang] Disable alias template CTAD for C++17 (PR #133597)

2025-03-29 Thread via cfe-commits
https://github.com/GeorgeKA created https://github.com/llvm/llvm-project/pull/133597 Alias template class template argument deduction is a C++20 feature. Also updated relevant CTAD test cases. >From 5b6d72ce1503196bf1c06a8b3dbc3f913265d76c Mon Sep 17 00:00:00 2001 From: George Asante Date: Sa

[clang] be7f185 - [NFC][analyzer] Fix typo in VirtualCall checker docs (#133593)

2025-03-29 Thread via cfe-commits
Author: Alcaro Date: 2025-03-29T21:34:15+01:00 New Revision: be7f185ca16e990614113519d003bfe3685f489b URL: https://github.com/llvm/llvm-project/commit/be7f185ca16e990614113519d003bfe3685f489b DIFF: https://github.com/llvm/llvm-project/commit/be7f185ca16e990614113519d003bfe3685f489b.diff LOG: [

[clang] [NFC][analyzer] Fix typo in VirtualCall checker docs (PR #133593)

2025-03-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/133593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Basic] Use SmallSet::insert_range (NFC) (PR #133594)

2025-03-29 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar approved this pull request. https://github.com/llvm/llvm-project/pull/133594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix some typos under clang (NFC) (PR #133558)

2025-03-29 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/133558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add linker options to support statical linking to shared flang-rt on AIX. (PR #131822)

2025-03-29 Thread Daniel Chen via cfe-commits
@@ -127,9 +127,19 @@ void aix::Linker::ConstructJob(Compilation &C, const JobAction &JA, } DanielCChen wrote: Thanks for the comment! Yes. I will add test. https://github.com/llvm/llvm-project/pull/131822 ___ cfe-c

[clang] [Basic] Use SmallSet::insert_range (NFC) (PR #133594)

2025-03-29 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/133594 None >From 379db5ff7e08973d2e5a6c08de1a475ce84313f5 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 29 Mar 2025 12:23:18 -0700 Subject: [PATCH] [Basic] Use SmallSet::insert_range (NFC) --- clang/

[clang] [Basic] Use SmallSet::insert_range (NFC) (PR #133594)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/133594.diff 1 Files Affected: - (modified) clang/include/clang/Basic/TargetInfo.h (+1-2) ``diff diff --git a/clang/include/clang/B

[clang] [HIP] Claim `--offload-compress` for `-M` (PR #133456)

2025-03-29 Thread Fangrui Song via cfe-commits
@@ -242,3 +242,9 @@ // NO-WARN-ATOMIC: clang{{.*}} "-triple" "amdgcn-amd-amdhsa" {{.*}} "-Werror=atomic-alignment" {{.*}} "-Wno-error=atomic-alignment" // NO-WARN-ATOMIC-NOT: clang{{.*}} "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-Werror=atomic-alignment" // NO-WARN-ATOMIC-

[clang-tools-extra] 884b19a - [clang-tools-extra] Use *Set::insert_range (NFC) (#133589)

2025-03-29 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-03-29T12:22:13-07:00 New Revision: 884b19ab40c8b6e5d1fb54894c0418fd27bb93f9 URL: https://github.com/llvm/llvm-project/commit/884b19ab40c8b6e5d1fb54894c0418fd27bb93f9 DIFF: https://github.com/llvm/llvm-project/commit/884b19ab40c8b6e5d1fb54894c0418fd27bb93f9.diff L

[clang] [NFC][analyzer] Fix typo in VirtualCall checker docs (PR #133593)

2025-03-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (Alcaro) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/133593.diff 1 Files Affected: - (modified) clang/docs/analyzer/checkers.rst (+2-2) ``diff diff --git a/clang/docs/analyzer/chec

  1   2   >