Skip to content

Commit 8aefe33

Browse files
committed
update readme
1 parent 27eb8d5 commit 8aefe33

File tree

1 file changed

+30
-35
lines changed

1 file changed

+30
-35
lines changed

README.md

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,39 @@
1-
# The LLVM Compiler Infrastructure
1+
# Tor's LLVM modifications
22

3-
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/llvm/llvm-project/badge)](https://securityscorecards.dev/viewer/?uri=github.com/llvm/llvm-project)
4-
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8273/badge)](https://www.bestpractices.dev/projects/8273)
5-
[![libc++](https://github.com/llvm/llvm-project/actions/workflows/libcxx-build-and-test.yaml/badge.svg?branch=main&event=schedule)](https://github.com/llvm/llvm-project/actions/workflows/libcxx-build-and-test.yaml?query=event%3Aschedule)
3+
This repo is my running contributions and personal changes to `clangd` and `clang-tidy`. I'll try to merge as many of my updates as are accepted upstream to https://github.com/llvm/llvm-project.
64

7-
Welcome to the LLVM project!
5+
## `clangd` features:
86

9-
This repository contains the source code for LLVM, a toolkit for the
10-
construction of highly optimized compilers, optimizers, and run-time
11-
environments.
7+
### swap binary operands
128

13-
The LLVM project has multiple components. The core of the project is
14-
itself called "LLVM". This contains all of the tools, libraries, and header
15-
files needed to process intermediate representations and convert them into
16-
object files. Tools include an assembler, disassembler, bitcode analyzer, and
17-
bitcode optimizer.
9+
https://github.com/torshepherd/llvm-customizations/assets/49597791/778b35b9-0ab2-4378-b1bb-2bb990cec14d
1810

19-
C-like languages use the [Clang](http://clang.llvm.org/) frontend. This
20-
component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode
21-
-- and from there into object files, using LLVM.
11+
## `clang-tidy` checks:
2212

23-
Other components include:
24-
the [libc++ C++ standard library](https://libcxx.llvm.org),
25-
the [LLD linker](https://lld.llvm.org), and more.
13+
### `performance-vector-pessimization`
2614

27-
## Getting the Source Code and Building LLVM
15+
![image](https://github.com/torshepherd/llvm-customizations/assets/49597791/a6792592-53d0-46eb-9769-e1509bacc4b0)
2816

29-
Consult the
30-
[Getting Started with LLVM](https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm)
31-
page for information on building and running LLVM.
17+
## Planned future work:
3218

33-
For information on how to contribute to the LLVM project, please take a look at
34-
the [Contributing to LLVM](https://llvm.org/docs/Contributing.html) guide.
35-
36-
## Getting in touch
37-
38-
Join the [LLVM Discourse forums](https://discourse.llvm.org/), [Discord
39-
chat](https://discord.gg/xS7Z362),
40-
[LLVM Office Hours](https://llvm.org/docs/GettingInvolved.html#office-hours) or
41-
[Regular sync-ups](https://llvm.org/docs/GettingInvolved.html#online-sync-ups).
42-
43-
The LLVM project has adopted a [code of conduct](https://llvm.org/docs/CodeOfConduct.html) for
44-
participants to all modes of communication within the project.
19+
- `modernize-use-views-enumerate`: transform index-based for loops with end condition of `.size()` that use the index and also use the value at the index to range-based for loops with `| std::views::enumerate`
20+
- `modernize-use-views-iota`: transform index-based for loops that start from an integral `start` and go to an integral `end` to range-based for loops with `std::views::iota(start, end)`
21+
- `modernize-use-views-zip`: transform index-based for loops with end condition of `.size()` that use the value from two ranges `r1` and `r2` at the index to range-based for loops with `std::views::zip(r1, r2)`
22+
- `modernize-use-ctad`: transform `make_` functions to class-template-argument-deduction: `std::make_optional(2)` -> `std::optional(2)`
23+
- `misc-use-static-or-inline-constexpr`: suggest transforming global `constexpr` variables in header files to `inline constexpr` and global variables in source files or function-level variables to `static constexpr`
24+
- `performance-use-array`: In cases with compile-known length of std::vector, change type to array instead
25+
- `bugprone-move-reference-capture`: Suggest move captures for vars captured by reference which are later moved in the lambda iff the lambda is not immediately-invoked
26+
- `bugprone-use-midpoint`: Suggest to use `std::midpoint(x, y)` instead of manual `x + y / 2`
27+
- `performance-initializer-list`: In cases where vector is instantiated with the initializer-list ctor and the type is not trivially copyable, suggest using emplace back instead: `std::vector<T> vec{t1, t2, t3}` -> `std::vector<T> vec = [&]{std::vector<T> out{}; out.emplace_back(t1); out.emplace_back(t2); out.emplace_back(t3); return out;}()`
28+
- Add "swap parameters" code action to clangd
29+
- Add "extract constraints to concept" code action to clangd
30+
- Add "move concept to requires clause" code action to clangd
31+
- Add "fix all" and "fix all from _" quick fixes to clangd
32+
- Add code action to convert include to forward-declarations
33+
- Extract to lambda instead of function
34+
- Inlay hints for lambda captures
35+
- Inlay hints for size of included file
36+
- Convert block comment to multiline comment & vice versa
37+
- Convert member function qualifiers into explicit `this` parameter
38+
- Convert eager monadic functions to lazy versions
39+
- Autocomplete for #include should use fuzzy path finder

0 commit comments

Comments
 (0)