Skip to content

Commit 4dd55c5

Browse files
authoredOct 24, 2024··
[clang] Use {} instead of std::nullopt to initialize empty ArrayRef (#109399)
Follow up to #109133.
1 parent e37d736 commit 4dd55c5

File tree

115 files changed

+376
-435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+376
-435
lines changed
 

‎clang/include/clang/AST/CommentSema.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Sema {
8080
ArrayRef<T> copyArray(ArrayRef<T> Source) {
8181
if (!Source.empty())
8282
return Source.copy(Allocator);
83-
return std::nullopt;
83+
return {};
8484
}
8585

8686
ParagraphComment *actOnParagraphComment(

‎clang/include/clang/AST/DeclFriend.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class FriendDecl final
115115
static FriendDecl *
116116
Create(ASTContext &C, DeclContext *DC, SourceLocation L, FriendUnion Friend_,
117117
SourceLocation FriendL, SourceLocation EllipsisLoc = {},
118-
ArrayRef<TemplateParameterList *> FriendTypeTPLists = std::nullopt);
118+
ArrayRef<TemplateParameterList *> FriendTypeTPLists = {});
119119
static FriendDecl *CreateDeserialized(ASTContext &C, GlobalDeclID ID,
120120
unsigned FriendTypeNumTPLists);
121121

0 commit comments

Comments
 (0)
Please sign in to comment.