xazax.hun added inline comments.
================ Comment at: clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h:29 + /// Invoked when an unsafe operation over raw pointers is found. + virtual void handleUnsafeOperation(const Stmt *Operation) = 0; +}; ---------------- What is the purpose of the handler, would this add the fixit hints? In that case, is this the right abstraction level? E.g., do we want to group these by the declarations so the handler can rewrite the declaration and its uses at once? ================ Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:22 +// Scan the function and return a list of gadgets found with provided kits. +static GadgetList findGadgets(const Decl *D) { + ---------------- Is this not a FunctionDecl because of ObjCMethod? At some point I wonder if we should have an abstraction that works for both. Would NamedDecl work? ================ Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:35-36 + + GadgetList G; + MatchFinder M; + ---------------- Move these close to their uses? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137346/new/ https://reviews.llvm.org/D137346 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits