================
@@ -568,6 +568,34 @@ class ASTWalker : public RecursiveASTVisitor<ASTWalker> {
}
return true;
}
+
+ void ReportObjCMethodDecl(SourceLocation Loc, ObjCMethodDecl *Method) {
----------------
nico wrote:
very nit: For some reason, all other `report…` member functions in this class
start lower-case, so might be nice to be consistent with that.
nit: "ReportObjCMethodDecl" doesn't really describe what this does.
`reportObjCLiteralMethod` or some such?
Actual comment: `VisitObjCMessageExpr` (around line 419) reports the method
itself, and headersForSymbol() then figures out what the decl's on. Might be
more consistent to do `report(Loc, Method, RefType::Implicit);` for the 2nd
line? (and then probably put it first 😅)
The 1st (then 2nd?) `report(Loc, Method->getClassInterface(),
RefType::Implicit);` is for marking `NSNumber` (etc) itself referenced, yes?
That can stay as-is.
One last question: Since all the refs are implicit, the practical effect of
this PR is that imports of Foundation/NSValue.h (NSString.h, NSArray.h,
NSDictionary.h) aren't removed if present, but they're also not added. Is that
what you want?
https://github.com/llvm/llvm-project/pull/216201
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits