================
@@ -39,8 +43,42 @@ bool isOperatorNewDelete(OverloadedOperatorKind OpKind) {
using DeclCallback =
llvm::function_ref<void(SourceLocation, NamedDecl &, RefType)>;
+class ObjCSelectorDeclMapBuilder
+ : public RecursiveASTVisitor<ObjCSelectorDeclMapBuilder> {
+public:
+ ObjCSelectorMap takeMap() { return std::move(Map); }
+
+ bool TraverseDecl(clang::Decl *D) {
+ if (!D)
+ return true;
+ if (auto *Container = llvm::dyn_cast<clang::ObjCContainerDecl>(D)) {
+ for (clang::ObjCMethodDecl *M : Container->methods()) {
----------------
dmaclach wrote:
Great catch. Fixed and test added.
https://github.com/llvm/llvm-project/pull/212564
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits