[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Nondeterministic pointer usage improvements (PR #110471)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 30 13:19:27 PDT 2024
================
@@ -0,0 +1,31 @@
+.. title:: clang-tidy - bugprone-nondeterministic-pointer-usage
+
+nondeterministic-pointer-usage
+==============================
+
+Finds nondeterministic usages of pointers in unordered containers.
+
+One canonical example is iteration across a container of pointers.
+
+.. code-block:: c++
+
+ {
----------------
whisperity wrote:
```suggestion
std::unordered_set<int *> UnorderedPtrSet
{
```
The example should be reasonably complete with types.
https://github.com/llvm/llvm-project/pull/110471
More information about the cfe-commits
mailing list