[clang-tools-extra] [clang-tidy] use-after-move: Support null_after_move annotations (PR #186903)
Zeyi Xu via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 21 00:33:23 PDT 2026
================
@@ -323,7 +326,32 @@ void UseAfterMoveFinder::getUsesAndReinits(
});
}
-static bool isStandardSmartPointer(const ValueDecl *VD) {
+static std::optional<StringRef> getStringLiteral(const Expr *E) {
+ if (!E)
+ return std::nullopt;
+ if (const auto *SL = dyn_cast<StringLiteral>(E->IgnoreParenImpCasts()))
----------------
zeyi2 wrote:
Could we use `dyn_cast_if_present<StringLiteral>(E...)`?
https://github.com/llvm/llvm-project/pull/186903
More information about the cfe-commits
mailing list