Looks reasonable. I did not review the check itself though.
Are test/clang-tidy/google-upgrade-googletest-case-nosuite.cpp and test/clang-tidy/google-upgrade-googletest-case.cpp identical other than the included header and expected output?
I'd recommend to condense it into a single file, and just have two RUN lines each one checking different message prefixes
Jun 27 2019
The only way to test the negative is to make a second test with a second set of mock googletest headers that declare things in the v1.8 way. Is this what you would prefer?
If that is what it takes to get the test coverage, i suppose so.
Jun 26 2019
It sounds correct, but i don't see accompanying test changes, so i can't be sure.
Sorry, the original comment got lost between me updating two patches as I noticed I did it wrong without seeing your comment.
Unfortunately there are no versioning macros in googletest, so I'm not sure how to keep this check from providing warnings if it is run while depending on a version that is too early. The new names are in master and will be part of an upcoming version 1.9 release. I have tried to update the documentation to clarify which version of googletest this intended for. Please let me know how you think we should proceed.
I'm not fully current on what can and can't be done in clang-tidy, but i suppose if the
check has matched something, then it must mean that the googletest headers were parsed.
Can you perhaps look in the AST that the new names are present?
E.g. the new macros, specified in getNewMacroName().
Jun 12 2019
Fix diff issues again
Fix mistake not uploading full diff
I think will be good idea to replace upgrade with modernize to be consistent with similar checks in other module.
Jun 6 2019
Nov 21 2018
Sorry for the long delay.
Nov 15 2018
Fix incorrect uploaded diff.
Fix to use hasAnyName everywhere
Nov 2 2018
Updated filtering of template instantiations to not use potentially costly hasDescendent matcher.
Oct 31 2018
Reply to comments:
- Change diagnostic message
- Update documentation
Reply to review comments:
- minor code reorder
- improve test coverage
Combine template instantiation matching into the other matcher registration.
Thanks for the feedback so far.
Oct 29 2018
Reply to comments: add check for language being c++, explicitly name type in declaration, alphabetize release notes.