Home
last modified time | relevance | path

Searched refs:Matcher (Results 1 – 25 of 69) sorted by relevance

123

/freebsd/contrib/llvm-project/llvm/utils/TableGen/Common/
H A DDAGISelMatcher.h27 class Matcher; variable
36 Matcher *ConvertPatternToMatcher(const PatternToMatch &Pattern,
39 void OptimizeMatcher(std::unique_ptr<Matcher> &Matcher,
41 void EmitMatcherTable(Matcher *Matcher, const CodeGenDAGPatterns &CGP,
46 class Matcher {
49 std::unique_ptr<Matcher> Next;
105 Matcher(KindTy K) : Kind(K) {} in Matcher() function
108 virtual ~Matcher() {} in ~Matcher()
114 Matcher *getNext() { return Next.get(); } in getNext()
115 const Matcher *getNext() const { return Next.get(); } in getNext()
[all …]
H A DDAGISelMatcher.cpp18 void Matcher::anchor() {} in anchor()
20 void Matcher::dump() const { print(errs(), 0); } in dump()
22 void Matcher::print(raw_ostream &OS, unsigned indent) const { in print()
28 void Matcher::printOne(raw_ostream &OS) const { printImpl(OS, 0); } in printOne()
33 Matcher *Matcher::unlinkNode(Matcher *Other) { in unlinkNode()
38 Matcher *Cur = this; in unlinkNode()
52 bool Matcher::canMoveBefore(const Matcher *Other) const { in canMoveBefore()
66 bool Matcher::canMoveBeforeNode(const Matcher *Other) const { in canMoveBeforeNode()
80 for (Matcher *C : Children) in ~ScopeMatcher()
96 : Matcher(CheckPredicate), Pred(pred.getOrigPatFragRecord()), in CheckPredicateMatcher()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Testing/Support/
H A DError.h34 explicit ValueMatchesMono(const testing::Matcher<T> &Matcher) in ValueMatchesMono() argument
35 : Matcher(Matcher) {} in ValueMatchesMono()
42 bool result = Matcher.MatchAndExplain(*Holder.Exp, listener); in MatchAndExplain()
47 Matcher.DescribeNegationTo(listener->stream()); in MatchAndExplain()
54 Matcher.DescribeTo(OS); in DescribeTo()
60 Matcher.DescribeNegationTo(OS); in DescribeNegationTo()
65 testing::Matcher<T> Matcher;
71 explicit ValueMatchesPoly(const M &Matcher) : Matcher(Matcher) {} in ValueMatchesPoly() argument
74 operator testing::Matcher<const ExpectedHolder<T> &>() const {
76 new ValueMatchesMono<T>(testing::SafeMatcherCast<T>(Matcher)));
[all …]
/freebsd/contrib/googletest/googletest/src/
H A Dgtest-matchers.cc46 Matcher<const std::string&>::Matcher(const std::string& s) { *this = Eq(s); } in Matcher() function in testing::Matcher::string
50 Matcher<const std::string&>::Matcher(const char* s) { in Matcher() function in testing::Matcher::string
56 Matcher<std::string>::Matcher(const std::string& s) { *this = Eq(s); } in Matcher() function in testing::Matcher::string
60 Matcher<std::string>::Matcher(const char* s) { *this = Eq(std::string(s)); } in Matcher() function in testing::Matcher::string
65 Matcher<const internal::StringView&>::Matcher(const std::string& s) { in Matcher() function in testing::Matcher::StringView
71 Matcher<const internal::StringView&>::Matcher(const char* s) { in Matcher() function in testing::Matcher::StringView
77 Matcher<const internal::StringView&>::Matcher(internal::StringView s) { in Matcher() function in testing::Matcher::StringView
83 Matcher<internal::StringView>::Matcher(const std::string& s) { *this = Eq(s); } in Matcher() function in testing::Matcher::StringView
87 Matcher<internal::StringView>::Matcher(const char* s) { in Matcher() function in testing::Matcher::StringView
93 Matcher<internal::StringView>::Matcher(internal::StringView s) { in Matcher() function in testing::Matcher::StringView
/freebsd/contrib/googletest/googlemock/test/
H A Dgmock-matchers-comparisons_test.cc131 Matcher<int> m = MakeMatcher(new NewEvenMatcherImpl); in TEST()
141 TEST(MatcherTest, CanBeDefaultConstructed) { Matcher<double> m; } in TEST()
146 Matcher<int> m(impl); in TEST()
153 Matcher<int> m1 = 5; in TEST()
160 Matcher<int*> m1 = nullptr; in TEST()
174 Matcher<int> m1 = Undefined::kInt; in TEST()
180 TEST(MatcherTest, CanAcceptAbstractClass) { Matcher<const Undefined&> m = _; } in TEST()
185 Matcher<bool> m1 = Eq(false); in TEST()
198 EXPECT_EQ("is an even number", Describe(Matcher<int>(new EvenMatcherImpl))); in TEST()
203 Matcher<int> m = GreaterThan(0); in TEST_P()
[all …]
H A Dgmock-matchers-arithmetic_test.cc54 Matcher<const Tuple2&> m = Eq(); in TEST()
61 Matcher<const Tuple2&> m = Eq(); in TEST()
68 Matcher<const Tuple2&> m = Ge(); in TEST()
76 Matcher<const Tuple2&> m = Ge(); in TEST()
83 Matcher<const Tuple2&> m = Gt(); in TEST()
91 Matcher<const Tuple2&> m = Gt(); in TEST()
98 Matcher<const Tuple2&> m = Le(); in TEST()
106 Matcher<const Tuple2&> m = Le(); in TEST()
113 Matcher<const Tuple2&> m = Lt(); in TEST()
121 Matcher<const Tuple2&> m = Lt(); in TEST()
[all …]
H A Dgmock-matchers-misc_test.cc56 const Matcher<int> m = Address(Eq(&n)); in TEST()
71 const Matcher<int> m = Address(Eq(&n)); in TEST()
82 const Matcher<std::unique_ptr<int>> m = Address(Eq(&n)); in TEST()
88 Matcher<int> matcher = Address(_); in TEST()
121 const Matcher<const NotCopyable&> m = Eq(ByRef(const_value1)); in TEST()
130 const Matcher<NotCopyable&> m = Ge(ByRef(value2)); in TEST()
156 Matcher<vector<int>> m = IsEmpty(); in TEST()
162 Matcher<vector<int>> m = IsEmpty(); in TEST()
227 const Matcher<TypeParam> m = ContainerEq(my_set); in TYPED_TEST()
238 const Matcher<TypeParam> m = ContainerEq(my_set); in TYPED_TEST()
[all …]
H A Dgmock-matchers-containers_test.cc156 Matcher<const char*> starts_with_he = StartsWith("he"); in TEST()
159 Matcher<const std::string&> ends_with_ok = EndsWith("ok"); in TEST()
166 Matcher<int> is_greater_than_5 = Gt(5); in TEST()
175 const Matcher<int*> m = Pointee(Ge(0)); in TEST()
185 const Matcher<const double*> m = Pointee(Ge(0)); in TEST()
195 const Matcher<int* const&> m = Pointee(Ge(0)); in TEST()
205 const Matcher<double*&> m = Pointee(Ge(0)); in TEST()
217 const Matcher<std::unique_ptr<int>> m = Pointee(Ge(0)); in TEST()
224 const Matcher<std::unique_ptr<const int>> m = Pointee(Ge(0)); in TEST()
235 const Matcher<int*> m = Pointer(Eq(&n)); in TEST()
[all …]
H A Dgmock-internal-utils_test.cc299 std::tuple<Matcher<int>> matchers(Eq(1)); in TEST()
307 std::tuple<Matcher<int>, Matcher<char>> matchers(Eq(1), Eq('a')); in TEST()
318 std::tuple<Matcher<int>, Matcher<char>, Matcher<bool>, in TEST()
319 Matcher<long>, // NOLINT in TEST()
320 Matcher<std::string>> in TEST()
676 std::is_same<std::tuple<Matcher<bool>>, F::ArgumentMatcherTuple>::value)); in TEST()
691 (std::is_same<std::tuple<Matcher<bool>, Matcher<const long&>>, // NOLINT in TEST()
713 std::tuple<Matcher<bool>, Matcher<int>, Matcher<char*>, Matcher<int&>, in TEST()
714 Matcher<const long&>>, // NOLINT in TEST()
/freebsd/contrib/llvm-project/llvm/utils/TableGen/
H A DDAGISelMatcherEmitter.cpp53 SmallVector<unsigned, Matcher::HighestKind + 1> OpcodeCounts;
84 MatcherTableEmitter(const Matcher *TheMatcher, const CodeGenDAGPatterns &cgp) in MatcherTableEmitter()
85 : CGP(cgp), OpcodeCounts(Matcher::HighestKind + 1, 0) { in MatcherTableEmitter()
94 std::function<void(const Matcher *)> Statistic = [&](const Matcher *N) { in MatcherTableEmitter()
169 unsigned EmitMatcherList(const Matcher *N, const unsigned Indent,
172 unsigned SizeMatcherList(Matcher *N, raw_ostream &OS);
176 void EmitHistogram(const Matcher *N, raw_ostream &OS);
184 unsigned SizeMatcher(Matcher *N, raw_ostream &OS);
186 unsigned EmitMatcher(const Matcher *N, const unsigned Indent,
292 unsigned MatcherTableEmitter::SizeMatcherList(Matcher *N, raw_ostream &OS) { in SizeMatcherList()
[all …]
H A DDAGISelMatcherOpt.cpp25 static void ContractNodes(std::unique_ptr<Matcher> &MatcherPtr, in ContractNodes()
28 Matcher *N = MatcherPtr.get(); in ContractNodes()
35 std::unique_ptr<Matcher> Child(Scope->takeChild(i)); in ContractNodes()
45 Matcher *New = nullptr; in ContractNodes()
148 Matcher *CheckType = MatcherPtr.release(); in ContractNodes()
149 Matcher *CheckOpcode = CheckType->takeNext(); in ContractNodes()
150 Matcher *Tail = CheckOpcode->takeNext(); in ContractNodes()
187 static Matcher *FindNodeWithKind(Matcher *M, Matcher::KindTy Kind) { in FindNodeWithKind()
206 static void FactorNodes(std::unique_ptr<Matcher> &InputMatcherPtr) { in FactorNodes()
209 std::unique_ptr<Matcher> *RebindableMatcherPtr = &InputMatcherPtr; in FactorNodes()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/ASTMatchers/
H A DASTMatchersMacros.h96 class matcher_##DefineMatcher##Matcher \
99 explicit matcher_##DefineMatcher##Matcher() = default; \
106 inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() { \
108 new internal::matcher_##DefineMatcher##Matcher()); \
110 inline bool internal::matcher_##DefineMatcher##Matcher::matches( \
134 class matcher_##DefineMatcher##OverloadId##Matcher \
137 explicit matcher_##DefineMatcher##OverloadId##Matcher( \
149 inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher( \
152 new internal::matcher_##DefineMatcher##OverloadId##Matcher(Param)); \
154 typedef ::clang::ast_matchers::internal::Matcher<Type> ( \
[all …]
H A DASTMatchers.h143 using DeclarationMatcher = internal::Matcher<Decl>;
144 using StatementMatcher = internal::Matcher<Stmt>;
145 using TypeMatcher = internal::Matcher<QualType>;
146 using TypeLocMatcher = internal::Matcher<TypeLoc>;
147 using NestedNameSpecifierMatcher = internal::Matcher<NestedNameSpecifier>;
148 using NestedNameSpecifierLocMatcher = internal::Matcher<NestedNameSpecifierLoc>;
149 using CXXBaseSpecifierMatcher = internal::Matcher<CXXBaseSpecifier>;
150 using CXXCtorInitializerMatcher = internal::Matcher<CXXCtorInitializer>;
151 using TemplateArgumentMatcher = internal::Matcher<TemplateArgument>;
152 using TemplateArgumentLocMatcher = internal::Matcher<TemplateArgumentLoc>;
[all …]
H A DASTMatchersInternal.h397 template <typename> class Matcher;
520 template <typename T> Matcher<T> convertTo() const {
529 template <typename T> Matcher<T> unconditionalConvertTo() const;
565 class Matcher {
568 explicit Matcher(MatcherInterface<T> *Implementation)
575 Matcher(const Matcher<From> &Other,
587 Matcher(const Matcher<TypeT> &Other,
595 template <typename To> Matcher<To> dynCastTo() const & {
597 return Matcher<To>(Implementation);
600 template <typename To> Matcher<To> dynCastTo() && {
[all …]
H A DASTMatchFinder.h254 match(MatcherT Matcher, const NodeT &Node, ASTContext &Context);
257 SmallVector<BoundNodes, 1> match(MatcherT Matcher, const DynTypedNode &Node,
264 SmallVector<BoundNodes, 1> match(MatcherT Matcher, ASTContext &Context);
302 SmallVector<BoundNodes, 1> match(MatcherT Matcher, const DynTypedNode &Node, in match() argument
306 Finder.addMatcher(Matcher, &Callback); in match()
313 match(MatcherT Matcher, const NodeT &Node, ASTContext &Context) { in match() argument
314 return match(Matcher, DynTypedNode::create(Node), Context); in match()
319 match(MatcherT Matcher, ASTContext &Context) { in match() argument
322 Finder.addMatcher(Matcher, &Callback); in match()
328 matchDynamic(internal::DynTypedMatcher Matcher, const DynTypedNode &Node, in matchDynamic() argument
[all …]
/freebsd/contrib/llvm-project/clang/lib/ASTMatchers/Dynamic/
H A DVariantValue.cpp59 VariantMatcher::MatcherOps::canConstructFrom(const DynTypedMatcher &Matcher, in canConstructFrom() argument
61 IsExactMatch = Matcher.getSupportedKind().isSame(NodeKind); in canConstructFrom()
62 return Matcher.canConvertTo(NodeKind); in canConstructFrom()
66 const DynTypedMatcher &Matcher) const { in convertMatcher()
67 return Matcher.dynCastTo(NodeKind); in convertMatcher()
93 SinglePayload(const DynTypedMatcher &Matcher) : Matcher(Matcher) {} in SinglePayload() argument
96 return Matcher; in getSingleMatcher()
100 return (Twine("Matcher<") + Matcher.getSupportedKind().asStringRef() + ">") in getTypeAsString()
107 if (Ops.canConstructFrom(Matcher, Ignore)) in getTypedMatcher()
108 return Matcher; in getTypedMatcher()
[all …]
/freebsd/contrib/googletest/googletest/include/gtest/
H A Dgtest-matchers.h463 class Matcher : public internal::MatcherBase<T> {
468 explicit Matcher() {} // NOLINT
471 explicit Matcher(const MatcherInterface<const T&>* impl)
475 explicit Matcher(
483 Matcher(M&& m) : internal::MatcherBase<T>(std::forward<M>(m)) {} // NOLINT
487 Matcher(T value); // NOLINT
494 class GTEST_API_ Matcher<const std::string&>
497 Matcher() = default;
499 explicit Matcher(const MatcherInterface<const std::string&>* impl)
504 Matcher(M&& m) // NOLINT
[all …]
/freebsd/contrib/googletest/googlemock/include/gmock/
H A Dgmock-matchers.h341 static Matcher<T> Cast(const M& polymorphic_matcher_or_value) { in Cast()
356 std::is_convertible<M, Matcher<T>>{}, in Cast()
362 static Matcher<T> CastImpl(const M& polymorphic_matcher_or_value, in CastImpl()
379 static Matcher<T> CastImpl(const M& value, in CastImpl()
382 return Matcher<T>(ImplicitCast_<T>(value)); in CastImpl()
395 static Matcher<T> CastImpl(const M& value,
404 class MatcherCastImpl<T, Matcher<U>> {
406 static Matcher<T> Cast(const Matcher<U>& source_matcher) { in Cast()
407 return Matcher<T>(new Impl(source_matcher)); in Cast()
413 explicit Impl(const Matcher<U>& source_matcher) in Impl()
[all …]
/freebsd/contrib/llvm-project/lldb/source/Plugins/Language/ObjC/
H A DNSDictionary.h43 class Matcher {
45 virtual ~Matcher() = default;
48 typedef std::unique_ptr<Matcher> UP;
50 class Prefix : public Matcher {
59 class Full : public Matcher {
68 typedef Matcher::UP MatcherUP;
/freebsd/contrib/googletest/googletest/include/gtest/internal/
H A Dgtest-death-test-internal.h62 inline Matcher<const ::std::string&> MakeDeathTestMatcher( in MakeDeathTestMatcher()
66 inline Matcher<const ::std::string&> MakeDeathTestMatcher(const char* regex) { in MakeDeathTestMatcher()
69 inline Matcher<const ::std::string&> MakeDeathTestMatcher( in MakeDeathTestMatcher()
76 inline Matcher<const ::std::string&> MakeDeathTestMatcher( in MakeDeathTestMatcher()
77 Matcher<const ::std::string&> matcher) { in MakeDeathTestMatcher()
109 static bool Create(const char* statement, Matcher<const std::string&> matcher,
179 Matcher<const std::string&> matcher, const char* file, in GTEST_DISABLE_MSC_WARNINGS_POP_()
186 bool Create(const char* statement, Matcher<const std::string&> matcher,
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DLoopUnrolling.cpp85 static internal::Matcher<Stmt> simpleCondition(StringRef BindName, in simpleCondition()
99 static internal::Matcher<Stmt>
100 changeIntBoundNode(internal::Matcher<Decl> VarNodeMatcher) { in changeIntBoundNode()
110 static internal::Matcher<Stmt>
111 callByRef(internal::Matcher<Decl> VarNodeMatcher) { in callByRef()
117 static internal::Matcher<Stmt>
118 assignedToRef(internal::Matcher<Decl> VarNodeMatcher) { in assignedToRef()
126 static internal::Matcher<Stmt>
127 getAddrTo(internal::Matcher<Decl> VarNodeMatcher) { in getAddrTo()
133 static internal::Matcher<Stmt> hasSuspiciousStmt(StringRef NodeName) { in hasSuspiciousStmt()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/ObjCopy/
H A DCommonConfig.h131 Error addMatcher(Expected<NameOrPattern> Matcher) { in addMatcher() argument
132 if (!Matcher) in addMatcher()
133 return Matcher.takeError(); in addMatcher()
134 if (Matcher->isPositiveMatch()) { in addMatcher()
135 if (std::optional<StringRef> MaybeName = Matcher->getName()) in addMatcher()
138 PosPatterns.push_back(std::move(*Matcher)); in addMatcher()
140 NegMatchers.push_back(std::move(*Matcher)); in addMatcher()
/freebsd/contrib/llvm-project/llvm/utils/TableGen/Common/GlobalISel/
H A DGlobalISelMatchTable.cpp94 std::vector<Matcher *>
95 optimizeRules(ArrayRef<Matcher *> Rules, in optimizeRules()
96 std::vector<std::unique_ptr<Matcher>> &MatcherStorage) { in optimizeRules()
98 std::vector<Matcher *> OptRules; in optimizeRules()
121 for (Matcher *Rule : Rules) { in optimizeRules()
143 template std::vector<Matcher *> optimizeRules<GroupMatcher>(
144 ArrayRef<Matcher *> Rules,
145 std::vector<std::unique_ptr<Matcher>> &MatcherStorage);
147 template std::vector<Matcher *> optimizeRules<SwitchMatcher>(
148 ArrayRef<Matcher *> Rules,
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/ASTMatchers/Dynamic/
H A DVariantValue.h111 bool canConstructFrom(const DynTypedMatcher &Matcher,
116 DynTypedMatcher convertMatcher(const DynTypedMatcher &Matcher) const;
148 static VariantMatcher SingleMatcher(const DynTypedMatcher &Matcher);
211 ast_matchers::internal::Matcher<T> getTypedMatcher() const { in getTypedMatcher()
304 void setMatcher(const VariantMatcher &Matcher);
347 VariantMatcher *Matcher; member
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/
H A DSpecialCaseList.h118 class Matcher {
130 using SectionEntries = StringMap<StringMap<Matcher>>;
133 Section(std::unique_ptr<Matcher> M) : SectionMatcher(std::move(M)){};
134 Section() : Section(std::make_unique<Matcher>()) {}
136 std::unique_ptr<Matcher> SectionMatcher; in Section()

123