From 3ab77491ddc6188a4a438ce0bb6000f795eb05df Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Mon, 6 May 2019 10:08:47 +0000 Subject: [PATCH] [clangd] Qualify uses of ::testing everywhere. NFC Add an initial '::' qualifier to all usages of 'testing' namespace that did not have one. The goal is to make our code style in tests more consistent. llvm-svn: 360026 --- .../clangd/unittests/BackgroundIndexTests.cpp | 18 ++++---- .../clangd/unittests/ClangdUnitTests.cpp | 2 +- clang-tools-extra/clangd/unittests/DexTests.cpp | 6 +-- .../clangd/unittests/DiagnosticsTests.cpp | 27 +++++------ .../clangd/unittests/FileIndexTests.cpp | 20 ++++---- .../clangd/unittests/FindSymbolsTests.cpp | 4 +- .../clangd/unittests/FuzzyMatchTests.cpp | 22 ++++----- .../clangd/unittests/IndexActionTests.cpp | 6 +-- clang-tools-extra/clangd/unittests/IndexTests.cpp | 16 +++---- .../clangd/unittests/PrintASTTests.cpp | 6 +-- .../clangd/unittests/SerializationTests.cpp | 12 ++--- .../clangd/unittests/SymbolCollectorTests.cpp | 54 ++++++++++------------ .../clangd/unittests/SymbolInfoTests.cpp | 2 +- .../clangd/unittests/TypeHierarchyTests.cpp | 18 ++++---- clang-tools-extra/clangd/unittests/XRefsTests.cpp | 10 ++-- 15 files changed, 110 insertions(+), 113 deletions(-) diff --git a/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp b/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp index 91eb6de..86f8700 100644 --- a/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp +++ b/clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp @@ -7,12 +7,12 @@ #include "gtest/gtest.h" #include -using testing::_; -using testing::AllOf; -using testing::Contains; -using testing::ElementsAre; -using testing::Not; -using testing::UnorderedElementsAre; +using ::testing::_; +using ::testing::AllOf; +using ::testing::Contains; +using ::testing::ElementsAre; +using ::testing::Not; +using ::testing::UnorderedElementsAre; namespace clang { namespace clangd { @@ -23,9 +23,9 @@ MATCHER(Declared, "") { } MATCHER(Defined, "") { return !StringRef(arg.Definition.FileURI).empty(); } MATCHER_P(FileURI, F, "") { return StringRef(arg.Location.FileURI) == F; } -testing::Matcher -RefsAre(std::vector> Matchers) { - return ElementsAre(testing::Pair(_, UnorderedElementsAreArray(Matchers))); +::testing::Matcher +RefsAre(std::vector<::testing::Matcher> Matchers) { + return ElementsAre(::testing::Pair(_, UnorderedElementsAreArray(Matchers))); } // URI cannot be empty since it references keys in the IncludeGraph. MATCHER(EmptyIncludeNode, "") { diff --git a/clang-tools-extra/clangd/unittests/ClangdUnitTests.cpp b/clang-tools-extra/clangd/unittests/ClangdUnitTests.cpp index dd3fc6d..2c239ce 100644 --- a/clang-tools-extra/clangd/unittests/ClangdUnitTests.cpp +++ b/clang-tools-extra/clangd/unittests/ClangdUnitTests.cpp @@ -18,7 +18,7 @@ namespace clang { namespace clangd { namespace { -using testing::ElementsAre; +using ::testing::ElementsAre; TEST(ClangdUnitTest, GetBeginningOfIdentifier) { std::string Preamble = R"cpp( diff --git a/clang-tools-extra/clangd/unittests/DexTests.cpp b/clang-tools-extra/clangd/unittests/DexTests.cpp index da744f1..11aedec 100644 --- a/clang-tools-extra/clangd/unittests/DexTests.cpp +++ b/clang-tools-extra/clangd/unittests/DexTests.cpp @@ -352,16 +352,16 @@ TEST(DexIterators, Optimizations) { // Search token tests. //===----------------------------------------------------------------------===// -testing::Matcher> +::testing::Matcher> tokensAre(std::initializer_list Strings, Token::Kind Kind) { std::vector Tokens; for (const auto &TokenData : Strings) { Tokens.push_back(Token(Kind, TokenData)); } - return testing::UnorderedElementsAreArray(Tokens); + return ::testing::UnorderedElementsAreArray(Tokens); } -testing::Matcher> +::testing::Matcher> trigramsAre(std::initializer_list Trigrams) { return tokensAre(Trigrams, Token::Kind::Trigram); } diff --git a/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp b/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp index 301fe09..826428c 100644 --- a/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp +++ b/clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp @@ -27,23 +27,24 @@ namespace clang { namespace clangd { namespace { -using testing::_; -using testing::ElementsAre; -using testing::Field; -using testing::IsEmpty; -using testing::Pair; -using testing::UnorderedElementsAre; - -testing::Matcher WithFix(testing::Matcher FixMatcher) { +using ::testing::_; +using ::testing::ElementsAre; +using ::testing::Field; +using ::testing::IsEmpty; +using ::testing::Pair; +using ::testing::UnorderedElementsAre; + +::testing::Matcher WithFix(::testing::Matcher FixMatcher) { return Field(&Diag::Fixes, ElementsAre(FixMatcher)); } -testing::Matcher WithFix(testing::Matcher FixMatcher1, - testing::Matcher FixMatcher2) { +::testing::Matcher WithFix(::testing::Matcher FixMatcher1, + ::testing::Matcher FixMatcher2) { return Field(&Diag::Fixes, UnorderedElementsAre(FixMatcher1, FixMatcher2)); } -testing::Matcher WithNote(testing::Matcher NoteMatcher) { +::testing::Matcher +WithNote(::testing::Matcher NoteMatcher) { return Field(&Diag::Notes, ElementsAre(NoteMatcher)); } @@ -54,7 +55,7 @@ MATCHER_P2(Diag, Range, Message, MATCHER_P3(Fix, Range, Replacement, Message, "Fix " + llvm::to_string(Range) + " => " + - testing::PrintToString(Replacement) + " = [" + Message + "]") { + ::testing::PrintToString(Replacement) + " = [" + Message + "]") { return arg.Message == Message && arg.Edits.size() == 1 && arg.Edits[0].range == Range && arg.Edits[0].newText == Replacement; } @@ -159,7 +160,7 @@ TEST(DiagnosticsTest, DiagnosticPreamble) { auto TU = TestTU::withCode(Test.code()); EXPECT_THAT(TU.build().getDiagnostics(), - ElementsAre(testing::AllOf( + ElementsAre(::testing::AllOf( Diag(Test.range(), "'not-found.h' file not found"), DiagSource(Diag::Clang), DiagName("pp_file_not_found")))); } diff --git a/clang-tools-extra/clangd/unittests/FileIndexTests.cpp b/clang-tools-extra/clangd/unittests/FileIndexTests.cpp index 4cf589c..142e255 100644 --- a/clang-tools-extra/clangd/unittests/FileIndexTests.cpp +++ b/clang-tools-extra/clangd/unittests/FileIndexTests.cpp @@ -23,13 +23,13 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -using testing::_; -using testing::AllOf; -using testing::Contains; -using testing::ElementsAre; -using testing::IsEmpty; -using testing::Pair; -using testing::UnorderedElementsAre; +using ::testing::_; +using ::testing::AllOf; +using ::testing::Contains; +using ::testing::ElementsAre; +using ::testing::IsEmpty; +using ::testing::Pair; +using ::testing::UnorderedElementsAre; MATCHER_P(RefRange, Range, "") { return std::make_tuple(arg.Location.Start.line(), arg.Location.Start.column(), @@ -49,9 +49,9 @@ MATCHER_P(QName, N, "") { return (arg.Scope + arg.Name).str() == N; } namespace clang { namespace clangd { namespace { -testing::Matcher -RefsAre(std::vector> Matchers) { - return ElementsAre(testing::Pair(_, UnorderedElementsAreArray(Matchers))); +::testing::Matcher +RefsAre(std::vector<::testing::Matcher> Matchers) { + return ElementsAre(::testing::Pair(_, UnorderedElementsAreArray(Matchers))); } Symbol symbol(llvm::StringRef ID) { diff --git a/clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp b/clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp index edb6248..f311237 100644 --- a/clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp +++ b/clang-tools-extra/clangd/unittests/FindSymbolsTests.cpp @@ -44,7 +44,7 @@ MATCHER_P(SymRange, Range, "") { return arg.location.range == Range; } // GMock helpers for matching DocumentSymbol. MATCHER_P(SymNameRange, Range, "") { return arg.selectionRange == Range; } template -testing::Matcher Children(ChildMatchers... ChildrenM) { +::testing::Matcher Children(ChildMatchers... ChildrenM) { return Field(&DocumentSymbol::children, ElementsAre(ChildrenM...)); } @@ -573,7 +573,7 @@ TEST_F(DocumentSymbolsTest, Namespaces) { )cpp"); EXPECT_THAT( getSymbols(FilePath), - ElementsAreArray>( + ElementsAreArray<::testing::Matcher>( {AllOf(WithName("ans1"), Children(AllOf(WithName("ai1"), Children()), AllOf(WithName("ans2"), Children(WithName("ai2"))))), diff --git a/clang-tools-extra/clangd/unittests/FuzzyMatchTests.cpp b/clang-tools-extra/clangd/unittests/FuzzyMatchTests.cpp index 6d5d88c..33d202b 100644 --- a/clang-tools-extra/clangd/unittests/FuzzyMatchTests.cpp +++ b/clang-tools-extra/clangd/unittests/FuzzyMatchTests.cpp @@ -15,7 +15,7 @@ namespace clang { namespace clangd { namespace { -using testing::Not; +using ::testing::Not; struct ExpectedMatch { // Annotations are optional, and will not be asserted if absent. @@ -43,7 +43,7 @@ private: llvm::Optional Annotated; }; -struct MatchesMatcher : public testing::MatcherInterface { +struct MatchesMatcher : public ::testing::MatcherInterface { ExpectedMatch Candidate; llvm::Optional Score; MatchesMatcher(ExpectedMatch Candidate, llvm::Optional Score) @@ -56,7 +56,7 @@ struct MatchesMatcher : public testing::MatcherInterface { } bool MatchAndExplain(llvm::StringRef Pattern, - testing::MatchResultListener *L) const override { + ::testing::MatchResultListener *L) const override { std::unique_ptr OS( L->stream() ? (llvm::raw_ostream *)(new llvm::raw_os_ostream(*L->stream())) @@ -65,15 +65,15 @@ struct MatchesMatcher : public testing::MatcherInterface { auto Result = Matcher.match(Candidate.Word); auto AnnotatedMatch = Matcher.dumpLast(*OS << "\n"); return Result && Candidate.accepts(AnnotatedMatch) && - (!Score || testing::Value(*Result, testing::FloatEq(*Score))); + (!Score || ::testing::Value(*Result, ::testing::FloatEq(*Score))); } }; // Accepts patterns that match a given word, optionally requiring a score. // Dumps the debug tables on match failure. -testing::Matcher matches(llvm::StringRef M, - llvm::Optional Score = {}) { - return testing::MakeMatcher(new MatchesMatcher(M, Score)); +::testing::Matcher matches(llvm::StringRef M, + llvm::Optional Score = {}) { + return ::testing::MakeMatcher(new MatchesMatcher(M, Score)); } TEST(FuzzyMatch, Matches) { @@ -179,7 +179,7 @@ TEST(FuzzyMatch, Matches) { EXPECT_THAT("std", Not(matches("pthread_condattr_setpshared"))); } -struct RankMatcher : public testing::MatcherInterface { +struct RankMatcher : public ::testing::MatcherInterface { std::vector RankedStrings; RankMatcher(std::initializer_list RankedStrings) : RankedStrings(RankedStrings) {} @@ -193,7 +193,7 @@ struct RankMatcher : public testing::MatcherInterface { } bool MatchAndExplain(llvm::StringRef Pattern, - testing::MatchResultListener *L) const override { + ::testing::MatchResultListener *L) const override { std::unique_ptr OS( L->stream() ? (llvm::raw_ostream *)(new llvm::raw_os_ostream(*L->stream())) @@ -236,8 +236,8 @@ struct RankMatcher : public testing::MatcherInterface { // Accepts patterns that match all the strings and rank them in the given order. // Dumps the debug tables on match failure. template -testing::Matcher ranks(T... RankedStrings) { - return testing::MakeMatcher( +::testing::Matcher ranks(T... RankedStrings) { + return ::testing::MakeMatcher( new RankMatcher{ExpectedMatch(RankedStrings)...}); } diff --git a/clang-tools-extra/clangd/unittests/IndexActionTests.cpp b/clang-tools-extra/clangd/unittests/IndexActionTests.cpp index a7a9a56..6adc8cc 100644 --- a/clang-tools-extra/clangd/unittests/IndexActionTests.cpp +++ b/clang-tools-extra/clangd/unittests/IndexActionTests.cpp @@ -32,12 +32,12 @@ MATCHER_P(HasDigest, Digest, "") { return arg.Digest == Digest; } MATCHER_P(HasName, Name, "") { return arg.Name == Name; } MATCHER(HasSameURI, "") { - llvm::StringRef URI = testing::get<0>(arg); - const std::string &Path = testing::get<1>(arg); + llvm::StringRef URI = ::testing::get<0>(arg); + const std::string &Path = ::testing::get<1>(arg); return toUri(Path) == URI; } -testing::Matcher +::testing::Matcher IncludesAre(const std::vector &Includes) { return ::testing::Field(&IncludeGraphNode::DirectIncludes, UnorderedPointwise(HasSameURI(), Includes)); diff --git a/clang-tools-extra/clangd/unittests/IndexTests.cpp b/clang-tools-extra/clangd/unittests/IndexTests.cpp index 2f67654..8d8c8da 100644 --- a/clang-tools-extra/clangd/unittests/IndexTests.cpp +++ b/clang-tools-extra/clangd/unittests/IndexTests.cpp @@ -18,14 +18,14 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -using testing::_; -using testing::AllOf; -using testing::AnyOf; -using testing::ElementsAre; -using testing::IsEmpty; -using testing::Pair; -using testing::Pointee; -using testing::UnorderedElementsAre; +using ::testing::_; +using ::testing::AllOf; +using ::testing::AnyOf; +using ::testing::ElementsAre; +using ::testing::IsEmpty; +using ::testing::Pair; +using ::testing::Pointee; +using ::testing::UnorderedElementsAre; namespace clang { namespace clangd { diff --git a/clang-tools-extra/clangd/unittests/PrintASTTests.cpp b/clang-tools-extra/clangd/unittests/PrintASTTests.cpp index acd77f5..9cf2e7d 100644 --- a/clang-tools-extra/clangd/unittests/PrintASTTests.cpp +++ b/clang-tools-extra/clangd/unittests/PrintASTTests.cpp @@ -21,13 +21,13 @@ namespace clang { namespace clangd { namespace { -using testing::ElementsAreArray; +using ::testing::ElementsAreArray; struct Case { const char *AnnotatedCode; std::vector Expected; }; -class ASTUtils : public testing::Test, +class ASTUtils : public ::testing::Test, public ::testing::WithParamInterface {}; TEST_P(ASTUtils, PrintTemplateArgs) { @@ -55,7 +55,7 @@ TEST_P(ASTUtils, PrintTemplateArgs) { } INSTANTIATE_TEST_CASE_P(ASTUtilsTests, ASTUtils, - testing::ValuesIn(std::vector({ + ::testing::ValuesIn(std::vector({ { R"cpp( template class Bar {}; diff --git a/clang-tools-extra/clangd/unittests/SerializationTests.cpp b/clang-tools-extra/clangd/unittests/SerializationTests.cpp index c859208..792da77 100644 --- a/clang-tools-extra/clangd/unittests/SerializationTests.cpp +++ b/clang-tools-extra/clangd/unittests/SerializationTests.cpp @@ -13,11 +13,11 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -using testing::_; -using testing::AllOf; -using testing::Pair; -using testing::UnorderedElementsAre; -using testing::UnorderedElementsAreArray; +using ::testing::_; +using ::testing::AllOf; +using ::testing::Pair; +using ::testing::UnorderedElementsAre; +using ::testing::UnorderedElementsAreArray; namespace clang { namespace clangd { @@ -135,7 +135,7 @@ TEST(SerializationTest, YAMLConversions) { EXPECT_THAT( *ParsedYAML->Refs, UnorderedElementsAre(Pair(cantFail(SymbolID::fromStr("057557CEBF6E6B2D")), - testing::SizeIs(1)))); + ::testing::SizeIs(1)))); auto Ref1 = ParsedYAML->Refs->begin()->second.front(); EXPECT_EQ(Ref1.Kind, RefKind::Reference); EXPECT_EQ(StringRef(Ref1.Location.FileURI), "file:///path/foo.cc"); diff --git a/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp b/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp index bb77d1d..d372b1d 100644 --- a/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp +++ b/clang-tools-extra/clangd/unittests/SymbolCollectorTests.cpp @@ -32,16 +32,16 @@ namespace clang { namespace clangd { namespace { -using testing::_; -using testing::AllOf; -using testing::Contains; -using testing::Each; -using testing::ElementsAre; -using testing::Field; -using testing::Not; -using testing::Pair; -using testing::UnorderedElementsAre; -using testing::UnorderedElementsAreArray; +using ::testing::_; +using ::testing::AllOf; +using ::testing::Contains; +using ::testing::Each; +using ::testing::ElementsAre; +using ::testing::Field; +using ::testing::Not; +using ::testing::Pair; +using ::testing::UnorderedElementsAre; +using ::testing::UnorderedElementsAreArray; // GMock helpers for matching Symbol. MATCHER_P(Labeled, Label, "") { @@ -96,16 +96,16 @@ MATCHER(VisibleOutsideFile, "") { return static_cast(arg.Flags & Symbol::VisibleOutsideFile); } MATCHER(RefRange, "") { - const Ref &Pos = testing::get<0>(arg); - const Range &Range = testing::get<1>(arg); + const Ref &Pos = ::testing::get<0>(arg); + const Range &Range = ::testing::get<1>(arg); return std::make_tuple(Pos.Location.Start.line(), Pos.Location.Start.column(), Pos.Location.End.line(), Pos.Location.End.column()) == std::make_tuple(Range.start.line, Range.start.character, Range.end.line, Range.end.character); } -testing::Matcher &> +::testing::Matcher &> HaveRanges(const std::vector Ranges) { - return testing::UnorderedPointwise(RefRange(), Ranges); + return ::testing::UnorderedPointwise(RefRange(), Ranges); } class ShouldCollectSymbolTest : public ::testing::Test { @@ -121,8 +121,8 @@ public: // build() must have been called. bool shouldCollect(llvm::StringRef Name, bool Qualified = true) { assert(AST.hasValue()); - const NamedDecl& ND = Qualified ? findDecl(*AST, Name) - : findUnqualifiedDecl(*AST, Name); + const NamedDecl &ND = + Qualified ? findDecl(*AST, Name) : findUnqualifiedDecl(*AST, Name); ASTContext& Ctx = AST->getASTContext(); const SourceManager& SM = Ctx.getSourceManager(); bool MainFile = SM.isWrittenInMainFile(SM.getExpansionLoc(ND.getBeginLoc())); @@ -655,19 +655,15 @@ TEST_F(SymbolCollectorTest, References) { )"; CollectorOpts.CountReferences = true; runSymbolCollector(Header, Main); - EXPECT_THAT(Symbols, - UnorderedElementsAreArray( - {AllOf(QName("W"), RefCount(1)), - AllOf(QName("X"), RefCount(1)), - AllOf(QName("Y"), RefCount(0)), - AllOf(QName("Z"), RefCount(0)), - AllOf(QName("y"), RefCount(0)), - AllOf(QName("z"), RefCount(0)), - AllOf(QName("x"), RefCount(0)), - AllOf(QName("w"), RefCount(0)), - AllOf(QName("w2"), RefCount(0)), - AllOf(QName("V"), RefCount(1)), - AllOf(QName("v"), RefCount(0))})); + EXPECT_THAT( + Symbols, + UnorderedElementsAreArray( + {AllOf(QName("W"), RefCount(1)), AllOf(QName("X"), RefCount(1)), + AllOf(QName("Y"), RefCount(0)), AllOf(QName("Z"), RefCount(0)), + AllOf(QName("y"), RefCount(0)), AllOf(QName("z"), RefCount(0)), + AllOf(QName("x"), RefCount(0)), AllOf(QName("w"), RefCount(0)), + AllOf(QName("w2"), RefCount(0)), AllOf(QName("V"), RefCount(1)), + AllOf(QName("v"), RefCount(0))})); } TEST_F(SymbolCollectorTest, SymbolRelativeNoFallback) { diff --git a/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp b/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp index e0a9ecd..d8d4043 100644 --- a/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp +++ b/clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp @@ -24,7 +24,7 @@ namespace clang { namespace clangd { namespace { -using testing::ElementsAreArray; +using ::testing::ElementsAreArray; auto CreateExpectedSymbolDetails = [](const std::string &name, const std::string &container, diff --git a/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp b/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp index 79307e2..9fcb94a 100644 --- a/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp +++ b/clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp @@ -27,21 +27,21 @@ namespace clang { namespace clangd { namespace { -using testing::AllOf; -using testing::ElementsAre; -using testing::Eq; -using testing::Field; -using testing::IsEmpty; -using testing::Matcher; -using testing::Pointee; -using testing::UnorderedElementsAreArray; +using ::testing::AllOf; +using ::testing::ElementsAre; +using ::testing::Eq; +using ::testing::Field; +using ::testing::IsEmpty; +using ::testing::Matcher; +using ::testing::Pointee; +using ::testing::UnorderedElementsAreArray; // GMock helpers for matching TypeHierarchyItem. MATCHER_P(WithName, N, "") { return arg.name == N; } MATCHER_P(WithKind, Kind, "") { return arg.kind == Kind; } MATCHER_P(SelectionRangeIs, R, "") { return arg.selectionRange == R; } template -testing::Matcher Parents(ParentMatchers... ParentsM) { +::testing::Matcher Parents(ParentMatchers... ParentsM) { return Field(&TypeHierarchyItem::parents, HasValue(ElementsAre(ParentsM...))); } diff --git a/clang-tools-extra/clangd/unittests/XRefsTests.cpp b/clang-tools-extra/clangd/unittests/XRefsTests.cpp index 016753c..77fa042 100644 --- a/clang-tools-extra/clangd/unittests/XRefsTests.cpp +++ b/clang-tools-extra/clangd/unittests/XRefsTests.cpp @@ -25,10 +25,10 @@ namespace clang { namespace clangd { namespace { -using testing::ElementsAre; -using testing::IsEmpty; -using testing::Matcher; -using testing::UnorderedElementsAreArray; +using ::testing::ElementsAre; +using ::testing::IsEmpty; +using ::testing::Matcher; +using ::testing::UnorderedElementsAreArray; class IgnoreDiagnostics : public DiagnosticsConsumer { void onDiagnosticsReady(PathRef File, @@ -120,7 +120,7 @@ MATCHER_P3(Sym, Name, Decl, DefOrNone, "") { } return true; } -testing::Matcher Sym(std::string Name, Range Decl) { +::testing::Matcher Sym(std::string Name, Range Decl) { return Sym(Name, Decl, llvm::None); } MATCHER_P(Sym, Name, "") { return arg.Name == Name; } -- 2.7.4