How to find move constructors in codebase using Clang AST tools?
问题 Following up a comment from this question: how can I find move constructors in C++ codebase using Clang AST tools? (find definitions / declarations only) 回答1: The Clang AST matcher now provides this functionality with the isMoveConstructor matcher. Here's an example program: #include <iostream> #include "clang/AST/AST.h" #include "clang/ASTMatchers/ASTMatchers.h" #include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/SourceLocation.h"