[libcxx-commits] [PATCH] D136724: [libc++][RFC] Add nullability annotations to string
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 25 17:45:37 PDT 2022
philnik created this revision.
philnik added reviewers: ldionne, Mordante, var-const, huixie90.
Herald added a project: All.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
This patch adds nullability annotations to `<string>`. This allows the compiler to warn if a null pointer is passed to a non-null annotated pointer argument. The main question is whether we want to add these annotations. It adds quite a bit of extra code and potential bugs (false warnings) for a potentially small gain.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D136724
Files:
libcxx/include/__string/extern_template_lists.h
libcxx/include/string
libcxx/test/libcxx/strings/basic.string/string.cons/ptr.nonnull.verify.cpp
libcxx/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136724.470662.patch
Type: text/x-patch
Size: 54478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221026/6f171caf/attachment-0001.bin>
More information about the libcxx-commits
mailing list