aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2024-10-24 10:23:40 +0100
committerGitHub <noreply@github.com>2024-10-24 10:23:40 +0100
commit4dd55c567aaed30c6842812e0798a70fee324c98 (patch)
tree832c5f53b744938b73f6484e3acde01bb1972677 /clang/lib/Sema/SemaDecl.cpp
parente37d736def5b95a2710f92881b5fc8b0494d8a05 (diff)
downloadllvm-4dd55c567aaed30c6842812e0798a70fee324c98.zip
llvm-4dd55c567aaed30c6842812e0798a70fee324c98.tar.gz
llvm-4dd55c567aaed30c6842812e0798a70fee324c98.tar.bz2
[clang] Use {} instead of std::nullopt to initialize empty ArrayRef (#109399)
Follow up to #109133.
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 229c908..25061f0 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -14135,8 +14135,8 @@ void Sema::ActOnUninitializedDecl(Decl *RealDecl) {
InitializationKind Kind
= InitializationKind::CreateDefault(Var->getLocation());
- InitializationSequence InitSeq(*this, Entity, Kind, std::nullopt);
- ExprResult Init = InitSeq.Perform(*this, Entity, Kind, std::nullopt);
+ InitializationSequence InitSeq(*this, Entity, Kind, {});
+ ExprResult Init = InitSeq.Perform(*this, Entity, Kind, {});
if (Init.get()) {
Var->setInit(MaybeCreateExprWithCleanups(Init.get()));
@@ -16428,8 +16428,8 @@ NamedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc,
/*NumExceptions=*/0,
/*NoexceptExpr=*/nullptr,
/*ExceptionSpecTokens=*/nullptr,
- /*DeclsInPrototype=*/std::nullopt,
- Loc, Loc, D),
+ /*DeclsInPrototype=*/{}, Loc, Loc,
+ D),
std::move(DS.getAttributes()), SourceLocation());
D.SetIdentifier(&II, Loc);