[clang] Add the support for recognizing WTF::move like std::move (PR #170820)
Ryosuke Niwa via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 9 13:50:36 PST 2025
================
@@ -185,6 +185,15 @@ bool isCtorOfSafePtr(const clang::FunctionDecl *F) {
isCtorOfRetainPtrOrOSPtr(F);
}
+bool isStdOrWTFMove(const clang::FunctionDecl *F) {
+ auto FnName = safeGetName(F);
+ auto *Namespace = F->getParent();
+ if (!Namespace)
+ return false;
+ auto NsName = safeGetName(Namespace);
+ return (NsName == "WTF" || NsName == "std") && FnName == "move";
+}
----------------
rniwa wrote:
oh, that's neat. will use that instead.
https://github.com/llvm/llvm-project/pull/170820
More information about the cfe-commits
mailing list