diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2022-12-20 00:15:11 +0100 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2022-12-20 00:41:40 +0100 |
commit | 854c10f8d185286d941307e1033eb492e085c203 (patch) | |
tree | d80b1b5ae1be07e2cbd1315f64e6ab2d36773847 /clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp | |
parent | eddb7280462ca316ba8d4d9fa6f175e8e2e65b72 (diff) | |
download | llvm-854c10f8d185286d941307e1033eb492e085c203.zip llvm-854c10f8d185286d941307e1033eb492e085c203.tar.gz llvm-854c10f8d185286d941307e1033eb492e085c203.tar.bz2 |
[Clang] Prepare for llvm::Optional becoming std::optional.
The needed tweaks are mostly trivial, the one nasty bit is Clang's usage
of OptionalStorage. To keep this working old Optional stays around as
clang::CustomizableOptional, with the default Storage removed.
Optional<File/DirectoryEntryRef> is replaced with a typedef.
I tested this with GCC 7.5, the oldest supported GCC I had around.
Differential Revision: https://reviews.llvm.org/D140332
Diffstat (limited to 'clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp index f701bd1..5cf40644 100644 --- a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp +++ b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp @@ -28,7 +28,7 @@ public: void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, - Optional<FileEntryRef> File, StringRef SearchPath, + OptionalFileEntryRef File, StringRef SearchPath, StringRef RelativePath, const Module *Imported, SrcMgr::CharacteristicKind FileType) override; void EndOfMainFile() override; @@ -82,7 +82,7 @@ static int getPriority(StringRef Filename, bool IsAngled, bool IsMainModule) { void IncludeOrderPPCallbacks::InclusionDirective( SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, - bool IsAngled, CharSourceRange FilenameRange, Optional<FileEntryRef> File, + bool IsAngled, CharSourceRange FilenameRange, OptionalFileEntryRef File, StringRef SearchPath, StringRef RelativePath, const Module *Imported, SrcMgr::CharacteristicKind FileType) { // We recognize the first include as a special main module header and want |