zequanwu added inline comments.
================ Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:3438-3439 } + if (DeclOrStmt) + DiagList.push_back("statements"); } ---------------- aaron.ballman wrote: > I think this will do the wrong thing when the subject list has more than one > entry (I think this will add `statements` to the list once for each subject). > As an experiment, can you add `ObjCMethod` to the list of subjects for > `NoMerge` in Attr.td? Do the resulting diagnostics list "statements" once or > twice? > > Thinking a bit deeper on this -- I think my original advice may have been too > ambitious (we don't yet have support for automatically grabbing the names of > statements for diagnostics like we do for declarations). Trying to add that > as part of this patch would be a big ask, so I think a better approach is to > use a custom diagnostic in Attr.td. I'll add a comment there to this effect. You're right. If I just add `ObjCMethod` to the list of subjects for `NoMerge`, the "statements" shows twice in the diag. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92800/new/ https://reviews.llvm.org/D92800 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits