diff options
author | Nathan James <n.james93@hotmail.co.uk> | 2020-07-27 12:48:53 +0100 |
---|---|---|
committer | Nathan James <n.james93@hotmail.co.uk> | 2020-07-27 12:48:55 +0100 |
commit | 13c9bbc28ef9cf9976a0962e6c930a7dfc52c877 (patch) | |
tree | 990543d06b32f2cf92d9fab07ccbc0a1554a156d /lldb/source/Commands/CommandObjectProcess.cpp | |
parent | 47a0254229ca425aa4e169c2db14e92b8db86784 (diff) | |
download | llvm-13c9bbc28ef9cf9976a0962e6c930a7dfc52c877.zip llvm-13c9bbc28ef9cf9976a0962e6c930a7dfc52c877.tar.gz llvm-13c9bbc28ef9cf9976a0962e6c930a7dfc52c877.tar.bz2 |
[clang-tidy] Refactor IncludeInserter
Simplified how `IncludeInserter` is used in Checks by abstracting away the SourceManager and PPCallbacks inside the method `registerPreprocessor`.
Changed checks that use `IncludeInserter` to no longer use a `std::unique_ptr`, instead the IncludeInserter is just a member of the class thats initialized with an `IncludeStyle`.
Saving an unnecessary allocation.
This results in the removal of the field `IncludeSorter::IncludeStyle` from the checks, as its wrapped in the `IncludeInserter`.
No longer need to create an instance of the `IncludeInserter` in the registerPPCallbacks, now that method only needs to contain:
```
Inserter.registerPreprocessor(PP);
```
Also added a helper method to `IncludeInserter` called `createMainFileInclusionInsertion`, purely sugar but does better express intentions.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D83680
Diffstat (limited to 'lldb/source/Commands/CommandObjectProcess.cpp')
0 files changed, 0 insertions, 0 deletions