From e3b557809604d036af6e00c60f012c2025b59a5e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 11 Feb 2023 13:38:04 +0100 Subject: Vendor import of llvm-project main llvmorg-16-init-18548-gb0daacf58f41, the last commit before the upstream release/17.x branch was created. --- clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp') diff --git a/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp b/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp index 5d57ecf90a96..5e69fb805150 100644 --- a/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp +++ b/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp @@ -12,6 +12,7 @@ #include "clang/AST/StmtObjC.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" +#include using namespace clang; @@ -100,7 +101,7 @@ ExtractionSemicolonPolicy::compute(const Stmt *S, SourceRange &ExtractedRange, /// Other statements should generally have a trailing ';'. We can try to find /// it and move it together it with the extracted code. - Optional NextToken = Lexer::findNextToken(End, SM, LangOpts); + std::optional NextToken = Lexer::findNextToken(End, SM, LangOpts); if (NextToken && NextToken->is(tok::semi) && areOnSameLine(NextToken->getLocation(), End, SM)) { ExtractedRange.setEnd(NextToken->getLocation()); -- cgit v1.2.3