| commit | ac74d9ec0f73898713dd6e0d33f148c13a51875d | [log] [tgz] |
|---|---|---|
| author | Vlad Serebrennikov <serebrennikov.vladislav@gmail.com> | Wed Mar 06 14:39:39 2024 +0400 |
| committer | GitHub <noreply@github.com> | Wed Mar 06 14:39:39 2024 +0400 |
| tree | 9bc444e11b7fe682609f64d2b476697fedf3a9e6 | |
| parent | 471a6128901747130ae11ce87b6e0095f862ed9a [diff] |
[clang][NFC] Regroup declarations in `Sema` (#82217) This patch regroups declarations in `Sema` based on the file they are implemented in (e.g. `SemaChecking.cpp`). This allows to logically split `Sema` in 42 groups. No physical separation is done (e.g. splitting `Sema` into multiple classes). Table of contents added at the very beginning of `Sema`. Grouping is reflected in Doxygen commands, so structure of API reference of `Sema` is also significantly improved ([example from official documentation](https://www.doxygen.nl/manual/examples/memgrp/html/class_memgrp___test.html), [comparison of Sema API reference](https://github.com/llvm/llvm-project/pull/82217#issuecomment-1954567763)). While grouping is intentional, as well as each group consisting of `public` declarations followed by `private` ones (without changing access in-between), exact contents and order of declarations of each group is partially carried over from old structure, partially accidental due to time constrains to do the regrouping over the weekend (`Sema` is just enormously big). Data members and inline function definitions in `Sema.h` complicate the matter, since it's not obvious which group they belong to. Further work is expected to refine contents and order of declarations. What is also intentional is some kind of layering, where Concepts group follows template groups, and ObjC, code completion, CUDA, HLSL, OpenACC, OpenMP, and SYCL are all placed at the end of the file, after C and C++ parts of `Sema`. I used `clang-query` to verify that access specifiers were preserved during the process (https://gcc.godbolt.org/z/9johffY9T, thank you @ilya-biryukov). Only the following 3 member types were converted from `private` to `public` because of limitations of the new grouping: `DeclareTargetContextInfo`, `TypoExprState`, `SatisfactionStackEntryTy`. Member initializer list of `Sema` in `Sema.cpp` is rewritten to reflect new order of data members in order to avoid `-Wreorder-ctor`. Since this patch touches almost every line in `Sema.h`, it was considered appropriate to run clang-format on the whole file, and not just on changed lines.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.