Skip to content

Commit 62cbf6c

Browse files
committed
Mention weak_ptr in docs
1 parent 0579c69 commit 62cbf6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4162,7 +4162,9 @@ The following C++ standard library types are considered nullable:
41624162
Types should be marked nullable only where the type itself leaves nullability
41634163
ambiguous. For example, ``std::optional`` is not marked ``_Nullable``, because
41644164
``optional<int> _Nullable`` is redundant and ``optional<int> _Nonnull`` is
4165-
not a useful type.
4165+
not a useful type. ``std::weak_ptr`` is not nullable, because its nullability
4166+
can change with no visible modification, so static annotation is unlikely to be
4167+
unhelpful.
41664168
}];
41674169
}
41684170

0 commit comments

Comments
 (0)