I want to write a clang-tidy check which would fix something which clang currently considers an error (namely initializing BSTR with const wchar_t *). I am trying to write node matchers etc. but it seems like it might be redundant given that clang already know when this is happening. I wonder if there is some way to grab the diagnostic messages and if the message matches a given message (with a regex or something) clang could attempt to fix the offending code?
Also, is this complicated by the fact that this diagnostic is and error and not just a warning?