aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2022-12-20 00:15:11 +0100
committerBenjamin Kramer <benny.kra@googlemail.com>2022-12-20 00:41:40 +0100
commit854c10f8d185286d941307e1033eb492e085c203 (patch)
treed80b1b5ae1be07e2cbd1315f64e6ab2d36773847 /clang/lib/Sema/SemaModule.cpp
parenteddb7280462ca316ba8d4d9fa6f175e8e2e65b72 (diff)
downloadllvm-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/lib/Sema/SemaModule.cpp')
-rw-r--r--clang/lib/Sema/SemaModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp
index bb045760..0adcc68 100644
--- a/clang/lib/Sema/SemaModule.cpp
+++ b/clang/lib/Sema/SemaModule.cpp
@@ -320,7 +320,7 @@ Sema::ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc,
Diag(Path[0].second, diag::err_module_redefinition) << ModuleName;
if (M->DefinitionLoc.isValid())
Diag(M->DefinitionLoc, diag::note_prev_module_definition);
- else if (Optional<FileEntryRef> FE = M->getASTFile())
+ else if (OptionalFileEntryRef FE = M->getASTFile())
Diag(M->DefinitionLoc, diag::note_prev_module_definition_from_ast_file)
<< FE->getName();
Mod = M;