[clang-tools-extra] [clang-tidy] Unsafe CRTP check (PR #82403)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 20 12:23:54 PST 2024


================
@@ -0,0 +1,62 @@
+.. title:: clang-tidy - bugprone-unsafe-crtp
+
+bugprone-unsafe-crtp
+====================
+
+Finds CRTP used in an error-prone way.
+
+If the constructor of a class intended to be used in a CRTP is public, then
+it allows users to construct that class on its own.
+
----------------
PiotrZSL wrote:

You pointed out 3 examples, but it's hard to figure out which is good or bad example.

https://github.com/llvm/llvm-project/pull/82403


More information about the cfe-commits mailing list