[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-06-05 Thread Paul T Robinson via cfe-commits
pogo59 wrote: I wonder if a lot of the new target-specific headers don't need to be in clang/include. That subtree is for headers that declare the exported interface (exported to other libs/layers); if the target-specific headers are just there for splitting up the module, they can stay in cl

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

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

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > Would it make sense to add a new header (SemaUtils.h? SemaTargetUtils.h?) to > move most of the exposed templated helpers to instead of Sema.h? That's what `Sema/Attr.h` does, and those helpers for attribute handling went there. https://github.com/llvm/llvm-project/pull/93966

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: Would it make sense to add a new header (SemaUtils.h? SemaTargetUtils.h?) to move most of the exposed templated helpers to instead of Sema.h? https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Alexey Bader via cfe-commits
@@ -14,9 +14,11 @@ #define LLVM_CLANG_SEMA_SEMASYCL_H #include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" bader wrote: I'm okay with that. It just looks strange to add forward declaration for `Decl` class when full declaration is included with `#inc

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

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

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -14,9 +14,11 @@ #define LLVM_CLANG_SEMA_SEMASYCL_H #include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" Endilll wrote: We definitely can, but can I leave it for a follow-up? It wasn't introduced in this pathc, and I have a significant amount of cl

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Alexey Bader via cfe-commits
@@ -14,9 +14,11 @@ #define LLVM_CLANG_SEMA_SEMASYCL_H #include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" bader wrote: > This one should be fixed as well now. Can we drop `#include "clang/AST/Decl.h"` as well? https://github.com/llvm/llvm-project/p

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -32,5 +36,87 @@ inline bool isFunctionOrMethodOrBlockForAttrSubject(const Decl *D) { return isFuncOrMethodForAttrSubject(D) || llvm::isa(D); } +/// Return true if the given decl has a declarator that should have +/// been processed by Sema::GetTypeForDeclarator. +inline

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -32,5 +36,87 @@ inline bool isFunctionOrMethodOrBlockForAttrSubject(const Decl *D) { return isFuncOrMethodForAttrSubject(D) || llvm::isa(D); } +/// Return true if the given decl has a declarator that should have +/// been processed by Sema::GetTypeForDeclarator. +inline

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -14,9 +14,11 @@ #define LLVM_CLANG_SEMA_SEMASYCL_H #include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" Endilll wrote: This one should be fixed as well now. https://github.com/llvm/llvm-project/pull/93966 __

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -3825,6 +3843,115 @@ class Sema final : public SemaBase { void redelayDiagnostics(sema::DelayedDiagnosticPool &pool); + /// Diagnose mutually exclusive attributes when present on a given Endilll wrote: Making functions accept reference to `SemaBase` is

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 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 c5fdb5c34e0dc3f5f3c0db19cf704b30a778cd0e b7d132f0a9d2b6acc67c227af6ce86eeeb394b82 --

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,57 @@ +//===- SemaSwift.h --- Swift language-specific routines ---*- 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: Apa

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Vlad Serebrennikov via cfe-commits
@@ -32,6 +32,7 @@ #include "clang/Basic/Specifiers.h" #include "clang/Sema/DeclSpec.h" #include "clang/Sema/Ownership.h" +#include "clang/Sema/ParsedAttr.h" Endilll wrote: Yeah, I totally forgot about forward decls while preparing this PR. I fixed that for th

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -32,5 +36,87 @@ inline bool isFunctionOrMethodOrBlockForAttrSubject(const Decl *D) { return isFuncOrMethodForAttrSubject(D) || llvm::isa(D); } +/// Return true if the given decl has a declarator that should have +/// been processed by Sema::GetTypeForDeclarator. +inline

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -32,5 +36,87 @@ inline bool isFunctionOrMethodOrBlockForAttrSubject(const Decl *D) { return isFuncOrMethodForAttrSubject(D) || llvm::isa(D); } +/// Return true if the given decl has a declarator that should have +/// been processed by Sema::GetTypeForDeclarator. +inline

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Precommit CI failures seem relevant. https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

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

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -14,9 +14,11 @@ #define LLVM_CLANG_SEMA_SEMASYCL_H #include "clang/AST/Decl.h" +#include "clang/AST/DeclBase.h" erichkeane wrote: Wonder same about declbase as well, probably a bit of work on a few of these includes to do that sort of analysis. https://g

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -18,6 +18,7 @@ #include "clang/AST/Type.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/TargetInfo.h" +#include "clang/Sema/ParsedAttr.h" erichkeane wrote: Same question here. https://github.com/llvm/llvm-project/pull/93966 ___

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -3825,6 +3843,115 @@ class Sema final : public SemaBase { void redelayDiagnostics(sema::DelayedDiagnosticPool &pool); + /// Diagnose mutually exclusive attributes when present on a given erichkeane wrote: Where did this section of stuff come from? At

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -0,0 +1,57 @@ +//===- SemaSwift.h --- Swift language-specific routines ---*- 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: Apa

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
@@ -32,6 +32,7 @@ #include "clang/Basic/Specifiers.h" #include "clang/Sema/DeclSpec.h" #include "clang/Sema/Ownership.h" +#include "clang/Sema/ParsedAttr.h" erichkeane wrote: Could this be a forward decl? https://github.com/llvm/llvm-project/pull/93966 __

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I didn't take a close look at the individual .cpp files, I assume that is mostly just Copy & paste. I would like us to be a little more forward-decl aggressive in the headers however, and perhpas try to minimize what gets pushed up to Sema.h. https://

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Vlad Serebrennikov (Endilll) Changes This patch moves language- and target-specific functions out of `SemaDeclAttr.cpp`. As a consequence, `SemaAVR`, `SemaM68k`, `SemaMSP430`, `SemaOpenCL`, `SemaSwift` were created (but they are

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch moves language- and target-specific functions out of `SemaDeclAttr.cpp`. As a consequence, `SemaAVR`, `SemaM68k`, `SemaMSP430`, `SemaOpenCL`, `SemaSwift` were created (but they are not the o

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Vlad Serebrennikov (Endilll) Changes This patch moves language- and target-specific functions out of `SemaDeclAttr.cpp`. As a consequence, `SemaAVR`, `SemaM68k`, `SemaMSP430`, `SemaOpenCL`, `SemaSwift` were created (but they are not