From 4dd55c567aaed30c6842812e0798a70fee324c98 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Thu, 24 Oct 2024 10:23:40 +0100 Subject: [clang] Use {} instead of std::nullopt to initialize empty ArrayRef (#109399) Follow up to #109133. --- clang/lib/Lex/ModuleMap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Lex/ModuleMap.cpp') diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index fd6bc17..0a02a63 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -707,7 +707,7 @@ ModuleMap::findAllModulesForHeader(FileEntryRef File) { if (findOrCreateModuleForHeaderInUmbrellaDir(File)) return Headers.find(File)->second; - return std::nullopt; + return {}; } ArrayRef @@ -716,7 +716,7 @@ ModuleMap::findResolvedModulesForHeader(FileEntryRef File) const { resolveHeaderDirectives(File); auto It = Headers.find(File); if (It == Headers.end()) - return std::nullopt; + return {}; return It->second; } -- cgit v1.1