diff options
Diffstat (limited to 'clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp')
-rw-r--r-- | clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 <optional> 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<Token> NextToken = Lexer::findNextToken(End, SM, LangOpts); + std::optional<Token> NextToken = Lexer::findNextToken(End, SM, LangOpts); if (NextToken && NextToken->is(tok::semi) && areOnSameLine(NextToken->getLocation(), End, SM)) { ExtractedRange.setEnd(NextToken->getLocation()); |