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/Sema/Sema.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/Sema/Sema.cpp') diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 5e9886a..2b51765 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -2536,8 +2536,8 @@ bool Sema::tryExprAsCall(Expr &E, QualType &ZeroArgCallReturnTy, // with default arguments, etc. if (IsMemExpr && !E.isTypeDependent()) { Sema::TentativeAnalysisScope Trap(*this); - ExprResult R = BuildCallToMemberFunction(nullptr, &E, SourceLocation(), - std::nullopt, SourceLocation()); + ExprResult R = BuildCallToMemberFunction(nullptr, &E, SourceLocation(), {}, + SourceLocation()); if (R.isUsable()) { ZeroArgCallReturnTy = R.get()->getType(); return true; @@ -2689,7 +2689,7 @@ bool Sema::tryToRecoverWithCall(ExprResult &E, const PartialDiagnostic &PD, // FIXME: Try this before emitting the fixit, and suppress diagnostics // while doing so. - E = BuildCallExpr(nullptr, E.get(), Range.getEnd(), std::nullopt, + E = BuildCallExpr(nullptr, E.get(), Range.getEnd(), {}, Range.getEnd().getLocWithOffset(1)); return true; } -- cgit v1.1