This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] minor bug fix to AbseilMatcher.h
ClosedPublic

Authored by hugoeg on Sep 5 2018, 11:38 AM.

Details

Summary

This missing directory is not yet released, but is causing some problems internally. It's gonna be released eventually and received permission to include it here. This matcher will also be periodically updated by my team as we have more releases and or problems internally.

Diff Detail

Repository
rL LLVM

Event Timeline

hugoeg created this revision.Sep 5 2018, 11:38 AM
hugoeg updated this revision to Diff 164091.Sep 5 2018, 11:41 AM

trying to follow style conventions, please correct me if I am wrong

hugoeg retitled this revision from [clang-tidy] minor bug fix to [clang-tidy] minor bug fix to AbseilMatcher.h.Sep 5 2018, 11:44 AM
ioeric accepted this revision.Sep 5 2018, 11:46 AM
ioeric added inline comments.
AbseilMatcher.h
52 ↗(On Diff #164091)

did you run clang-format on this? It looks a bit strange.

This revision is now accepted and ready to land.Sep 5 2018, 11:46 AM
hugoeg added inline comments.
AbseilMatcher.h
52 ↗(On Diff #164091)

yea, clang-format was vastly different to what was originally there, so I tried to follow those conventions, should I go back to clang-format?

hugoeg updated this revision to Diff 164092.Sep 5 2018, 11:52 AM
hugoeg marked 2 inline comments as done.

clang-format

also, I don't have commit access, so if you could land this for me when you get the chance, I'd appreciate it

This revision was automatically updated to reflect the committed changes.
ioeric added inline comments.Sep 5 2018, 12:05 PM
AbseilMatcher.h
52 ↗(On Diff #164091)

Let's go with clang-format ;)

Please don't forget to set the appropriate repository when creating the differential,
so phabricator can automagically subscribe the right -commits mailing list.

Hi @hugoeg! Thank you for the update. Eric was too fast for me to catch up :)

I'm not sure about the _correctness_ and maintainability; I would probably suggest something like warning: absl/flags is reserved for future use for the part of Abseil which is not released yet (since it's hard to follow and might be confusing). Also, I'm not sure about hard-coding the library names in general: some pieces of Abseil can become deprecated, other ones are added eventually (like "flags" in this case). Would matching absl/ substring be enough here? I can't see any good reason users would call their directories absl/ (and not expect Clang-Tidy to produce some warnings :) and that would make it easier for the Abseil team, because you wouldn't have to update hard-coded library names in a specific Clang-Tidy file each release (which is very easy to forget). That would also simplify the code a lot, although it's not a concern for me.

@ioeric, @hugoeg what do you think?

Also, if you manually upload diff, please consider adding -U999999 to your Git or SVN invocation (see LLVM's Phabricator guide for reference). That would help reviewers to get the context of the file which is up for a review.