[PATCH] D61350: [clang-tidy] New check calling out uses of +new in Objective-C code
Michael Wyman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 8 11:16:30 PDT 2019
mwyman added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/google/AvoidNSObjectNewCheck.cpp:112
+ Result.Nodes.getNodeAs<ObjCMessageExpr>("new_call")) {
+ // Don't warn if the call expression originates from a macro expansion.
+ if (isMessageExpressionInsideMacro(CallExpr))
----------------
stephanemoore wrote:
> If the message expression is within a macro expansion, maybe we should emit the diagnostic without the fixit?
I'm leery of emitting a warning in a case where the code may not originate from the code in question. Maybe if the macro is defined in the same source file, but I think perhaps that could be a follow-up.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61350/new/
https://reviews.llvm.org/D61350
More information about the cfe-commits
mailing list