[clang-tools-extra] [clang-tidy] Extend `bugprone-use-after-move` to allow custom invalidation functions (PR #170346)

via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 3 15:05:17 PST 2025


================
@@ -253,3 +253,13 @@ For example, if an additional member variable is added to ``S``, it is easy to
 forget to add the reinitialization for this additional member. Instead, it is
 safer to assign to the entire struct in one go, and this will also avoid the
 use-after-move warning.
+
+Options
+-------
+
+.. option:: InvalidationFunctions
+
+  A semicolon-separated list of names of functions that cause their initial
----------------
higher-performance wrote:

I deliberately avoided writing first because that felt super confusing when indices start at 0 and we might be sometimes skipping one... do you feel this is more confusing?

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


More information about the cfe-commits mailing list