[PATCH] D62977: [clang-tidy]: Google: new check 'google-upgrade-googletest-case'

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 26 08:52:59 PDT 2019


lebedev.ri requested changes to this revision.
lebedev.ri added a comment.
This revision now requires changes to proceed.

In D62977#1559334 <https://reviews.llvm.org/D62977#1559334>, @astrelni wrote:

> In D62977#1556346 <https://reviews.llvm.org/D62977#1556346>, @lebedev.ri wrote:
>
> > In D62977#1540184 <https://reviews.llvm.org/D62977#1540184>, @lebedev.ri wrote:
> >
> > > Without seeing the tests - what version checks does this have?
> > >  It shouldn't fire if the googletest version is the one before that rename.
> >
> >
> > I don't believe this question was answered.
>
>
> 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()`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62977/new/

https://reviews.llvm.org/D62977





More information about the cfe-commits mailing list