[clang-tools-extra] [clang-tidy] use-after-move: Support null_after_move annotations (PR #186903)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 22 00:49:03 PDT 2026


================
@@ -323,7 +324,32 @@ void UseAfterMoveFinder::getUsesAndReinits(
   });
 }
 
-static bool isStandardSmartPointer(const ValueDecl *VD) {
+static std::optional<StringRef> getStringLiteral(const Expr *E) {
+  if (!E)
+    return std::nullopt;
----------------
vbvictor wrote:

Can we just `assert(E)` here? All the usages are already guarded by `if (Attr->args_size() != 2)`.
https://llvm.org/docs/CodingStandards.html#assert-liberally

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


More information about the cfe-commits mailing list