This is an archive of the discontinued LLVM Phabricator instance.

[clang][cli] Implement ContainsN Google Test matcher
ClosedPublic

Authored by jansvoboda11 on Dec 21 2020, 7:17 AM.

Details

Summary

This allows us to verify that we don't emit options multiple times.

In most cases, that would be benign, but for options with MarshallingInfoVectorString, emitting wrong number of arguments might change the semantics.

Diff Detail

Event Timeline

jansvoboda11 requested review of this revision.Dec 21 2020, 7:17 AM
jansvoboda11 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 21 2020, 7:17 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
jansvoboda11 added inline comments.Dec 21 2020, 7:19 AM
clang/unittests/Frontend/CompilerInvocationTest.cpp
55

I'm not sure where custom Google Test matchers go. I guess this might be useful for other LLVM projects. Any ideas?

Bigcheese accepted this revision.Jan 5 2021, 8:49 AM

lgtm.

We don't really have anywhere specific to put extra matchers, and we don't want to add stuff to the actual gtest folder so it's easy to merge updates. So this is fine.

This revision is now accepted and ready to land.Jan 5 2021, 8:49 AM
This revision was landed with ongoing or failed builds.Jan 7 2021, 1:02 AM
This revision was automatically updated to reflect the committed changes.