From 6ad0788c332bb2043142954d300c49ac3e537f34 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 14 Jan 2023 12:31:01 -0800 Subject: [clang] Use std::optional instead of llvm::Optional (NFC) This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to remove #include "llvm/ADT/Optional.h". This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 --- clang/lib/Lex/Preprocessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Lex/Preprocessor.cpp') diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 87655c7..fe9adb5 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -400,7 +400,7 @@ bool Preprocessor::SetCodeCompletionPoint(const FileEntry *File, assert(!CodeCompletionFile && "Already set"); // Load the actual file's contents. - Optional Buffer = + std::optional Buffer = SourceMgr.getMemoryBufferForFileOrNone(File); if (!Buffer) return true; -- cgit v1.1