hnrklssn wrote: > > > > > > > > > +1, it's why I stopped recommending this approach in my reviews. > > While I agree for the most part, there are quite a few diagnostics that are > absurdly verbose (particularly ones with "did you mean to FLOOP it?"). I > think partial matches are good/fine, but they need enough of the diag to not > be ambiguous.
I don't necessarily oppose the use of truncated checks where it makes sense, I oppose the implicit default on the matcher's part. An `expected-note-re{{.*FLOOP.*}}` would be a reasonable explicit opt-in. A new mode like `expected-note-part{{FLOOP}}` would be even better, making the old mode behave like `expected-note-re{{^FLOOP$}}`. As an (admittedly extreme) example of footgunnery with this implicit behaviour, we had bug downstream where there were two versions of an error, something like this: `cannot use FOO in context asdf` vs `cannot use FOO in context asdf; did you mean to use BAR?`. The `; did you mean to use BAR?` version was accidentally emitted in some cases where it didn't make sense to do so, but the tests still passed because the diagnostic *did* contain `cannot use FOO in context asdf`. https://github.com/llvm/llvm-project/pull/108658 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits