yamaguchi added a comment.
Do you think it is not a good idea to change condition if -MD or -MMD exists?
for example,
if ( !A->getOption().matches(options::OPT_MD) && !A->getOption().matches(options::OPT_MQ)) CmdArgs.push_back("-w");
https://reviews.llvm.org/D32341