aaron.ballman accepted this revision. aaron.ballman marked an inline comment as done. aaron.ballman added a comment.
LGTM modulo the comments from @gribozavr. ================ Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp:76-77 + // Some classes should use standard factory methods instead of alloc/init. + const std::map<StringRef, StringRef> ClassToFactoryMethodMap = { + {"NSDate", "date"}, {"NSNull", "null"}}; + const auto FoundClassFactory = ClassToFactoryMethodMap.find(Receiver); ---------------- mwyman wrote: > aaron.ballman wrote: > > Should this be configurable, or will users not need to control the behavior > > here? > For now I think there is only this handful of Foundation types commonly > created only with the factory methods; I'm not sure it makes a huge amount of > sense to open it for configuration at this time. That seems reasonable to me -- we can add an option later if we find we need one. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61350/new/ https://reviews.llvm.org/D61350 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits