diff --git a/clang/lib/Frontend/TextDiagnostic.cpp b/clang/lib/Frontend/TextDiagnostic.cpp index 52129aa4ff2bd2..809d5309d1aff5 100644 --- a/clang/lib/Frontend/TextDiagnostic.cpp +++ b/clang/lib/Frontend/TextDiagnostic.cpp @@ -20,6 +20,7 @@ #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" #include +#include using namespace clang; @@ -923,7 +924,7 @@ void TextDiagnostic::emitBuildingModuleLocation(FullSourceLoc Loc, } /// Find the suitable set of lines to show to include a set of ranges. -static llvm::Optional> +static std::optional> findLinesForRange(const CharSourceRange &R, FileID FID, const SourceManager &SM) { if (!R.isValid())