/llvm-project/llvm/utils/TableGen/Common/ |
H A D | DAGISelMatcher.h | 27 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, 44 /// Matcher - Base class for all the DAG ISel Matcher representation 46 class Matcher { 49 std::unique_ptr<Matcher> Nex 105 Matcher(KindTy K) : Kind(K) {} Matcher() function [all...] |
H A D | DAGISelMatcher.cpp | 18 void Matcher::anchor() {} in anchor() 20 void Matcher::dump() const { print(errs()); } in dump() 22 void Matcher::print(raw_ostream &OS, indent Indent) const { in print() 28 void Matcher::printOne(raw_ostream &OS) const { printImpl(OS, indent(0)); } in printOne() 33 Matcher *Matcher::unlinkNode(Matcher *Other) { in unlinkNode() 38 Matcher *Cur = this; in unlinkNode() 52 bool Matcher::canMoveBefore(const Matcher *Othe [all...] |
/llvm-project/llvm/include/llvm/Testing/Support/ |
H A D | Error.h | 34 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 …]
|
/llvm-project/third-party/unittest/googletest/src/ |
H A D | gtest-matchers.cc | 46 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
|
/llvm-project/llvm/utils/TableGen/ |
H A D | DAGISelMatcherEmitter.cpp | 1 //===- DAGISelMatcherEmitter.cpp - Matcher Emitter ------------------------===// 53 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 * 797 const EmitRegisterMatcher *Matcher = cast<EmitRegisterMatcher>(N); EmitMatcher() local [all...] |
H A D | DAGISelMatcherOpt.cpp | 1 //===- DAGISelMatcherOpt.cpp - Optimize a DAG Matcher ---------------------===// 9 // This file implements the DAG Matcher optimizer. 25 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 *FindNodeWithKin [all...] |
/llvm-project/clang/include/clang/ASTMatchers/ |
H A D | ASTMatchersMacros.h | 10 // Since a matcher is a function which returns a Matcher<T> object, where 28 // clang::ast_matchers::internal::Matcher<clang::ValueDecl>, 40 // internal::Matcher<ValueDecl>, InnerMatcher) { 87 /// Matcher<Type> object. 98 class matcher_##DefineMatcher##Matcher \ 101 explicit matcher_##DefineMatcher##Matcher() = default; \ 108 inline ::clang::ast_matchers::internal::Matcher<Type> DefineMatcher() { \ 110 new internal::matcher_##DefineMatcher##Matcher()); \ 112 inline bool internal::matcher_##DefineMatcher##Matcher::matches( \ 119 /// Matcher<Typ [all...] |
H A D | ASTMatchers.h | 143 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<TemplateArgumentLo 3568 findAll(const internal::Matcher<T> & Matcher) findAll() argument [all...] |
H A D | ASTMatchersInternal.h | 11 // Matchers are methods that return a Matcher<T> which provides a method 18 // 1. A function Matcher<T> MatcherName(<arguments>) which returns a Matcher<T> 20 // on the arguments. Matcher<T>s form an implicit reverse hierarchy 21 // to clang's AST class hierarchy, meaning that you can use a Matcher<Base> 22 // everywhere a Matcher<Derived> is required. 337 /// Used by the implementation of Matcher<T> and DynTypedMatcher. 400 template <typename> class Matcher; 402 /// Matcher that works on a \c DynTypedNode. 404 /// It is constructed from a \c Matcher< [all...] |
H A D | ASTMatchFinder.h | 254 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 …]
|
/llvm-project/clang/lib/ASTMatchers/Dynamic/ |
H A D | VariantValue.cpp | 59 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 …]
|
/llvm-project/third-party/unittest/googletest/include/gtest/ |
H A D | gtest-matchers.h | 463 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 …]
|
/llvm-project/mlir/lib/Query/Matcher/ |
H A D | VariantValue.cpp | 55 : type(ValueType::Matcher) { in VariantValue() 56 value.Matcher = new VariantMatcher(matcher); in VariantValue() 69 case ValueType::Matcher: in operator =() 84 case ValueType::Matcher: in reset() 85 delete value.Matcher; in reset() 107 bool VariantValue::isMatcher() const { return type == ValueType::Matcher; } in isMatcher() 111 return *value.Matcher; in getMatcher() 116 type = ValueType::Matcher; in setMatcher() 117 value.Matcher = new VariantMatcher(newValue); in setMatcher() 124 case ValueType::Matcher: in getTypeAsString()
|
/llvm-project/llvm/unittests/Testing/ADT/ |
H A D | StringMapEntryTest.cpp | 19 using testing::Matcher; 24 template <typename T> std::string Describe(const Matcher<T> &M, bool Match) { in Describe() 35 std::string ExplainMatch(const Matcher<T> &Matcher, const V &Value) { in ExplainMatch() argument 37 Matcher.MatchAndExplain(Value, &Listener); in ExplainMatch() 58 Matcher<llvm::StringMapEntry<int>> M = IsStringMapEntry("A", 1); in TEST() 69 Matcher<llvm::StringMapEntry<int>> M = IsStringMapEntry("A", 1); in TEST() 75 Matcher<llvm::StringMapEntry<int>> M = IsStringMapEntry("A", 1); in TEST() 82 Matcher<llvm::StringMapEntry<int>> M = IsStringMapEntry("A", 1); in TEST()
|
/llvm-project/clang/unittests/ASTMatchers/Dynamic/ |
H A D | RegistryTest.cpp | 20 using ast_matchers::internal::Matcher; 129 Matcher<Stmt> IsArrowValue = constructMatcher( in TEST_F() 131 Matcher<Stmt> BoolValue = in TEST_F() 146 Matcher<Decl> Value = constructMatcher( in TEST_F() 159 Matcher<Decl> HasInitializerSimple = constructMatcher( in TEST_F() 162 Matcher<Decl> HasInitializerComplex = constructMatcher( in TEST_F() 179 Matcher<Decl> HasParameter = in TEST_F() 188 Matcher<Stmt> CallExpr0 = constructMatcher( in TEST_F() 194 Matcher<Stmt> CallExpr1 = constructMatcher( in TEST_F() 202 Matcher<Stmt> ObjCMsgExpr = in TEST_F() [all …]
|
/llvm-project/clang/unittests/Format/ |
H A D | MacroCallReconstructorTest.cpp | 102 struct Matcher { struct 103 Matcher(const TokenList &Tokens, TestLexer &Lex) in Matcher() argument 218 Matcher U(Call, Lex); in TEST_F() 230 Matcher U(Call, Lex); in TEST_F() 242 Matcher U(Call, Lex); in TEST_F() 253 Matcher E(Exp.getTokens(), Lex); in TEST_F() 260 Matcher U(Call, Lex); in TEST_F() 275 Matcher E(Exp2.getTokens(), Lex); in TEST_F() 285 Matcher U1(Call1, Lex); in TEST_F() 287 Matcher U in TEST_F() 106 tokenMatchesclang::format::__anon59adf30c0111::Matcher tokenMatches() argument 115 consumeclang::format::__anon59adf30c0111::Matcher consume() argument 126 Tokensclang::format::__anon59adf30c0111::Matcher global() argument 127 Itclang::format::__anon59adf30c0111::Matcher global() argument 128 Lexclang::format::__anon59adf30c0111::Matcher global() argument [all...] |
/llvm-project/clang/unittests/CodeGen/ |
H A D | IRMatchers.h | 107 class Matcher { 109 virtual ~Matcher() {} in ~Matcher() 121 class EntityMatcher : public Matcher { 161 std::shared_ptr<Matcher> Next; 163 SavingMatcher(const T *&V, std::shared_ptr<Matcher> N) : Var(V), Next(N) {} in SavingMatcher() 176 class SameAsMatcher : public Matcher { 209 class ConstantIntMatcher : public Matcher { 234 SmallVector<std::shared_ptr<Matcher>, 8> OperandMatchers; 244 void push(std::shared_ptr<Matcher> V) { OperandMatchers.push_back(V); } in push() 246 void push(std::shared_ptr<Matcher> V, Args... A) { in push() [all …]
|
/llvm-project/clang/unittests/AST/ |
H A D | TypePrinterTest.cpp | 56 auto Matcher = parmVarDecl(hasType(qualType().bind("id"))); in TEST() local 59 Code, {}, Matcher, "const Type<T> &", in TEST() 63 Code, {}, Matcher, "const Type<T> &", in TEST() 72 auto Matcher = parmVarDecl(hasType(qualType().bind("id"))); in TEST() local 76 ASSERT_TRUE(PrintedTypeMatches(Code, {}, Matcher, "<int>", in TEST() 114 auto Matcher = typedefNameDecl(hasName("::shared::Alias"), in TEST() local 117 Code, {}, Matcher, "a::S<b::Foo>", in TEST() 119 ASSERT_TRUE(PrintedTypeMatches(Code, {}, Matcher, in TEST() 138 auto Matcher = classTemplateSpecializationDecl( in TEST() local 144 Code, {"-std=c++20"}, Matcher, in TEST() [all …]
|
/llvm-project/third-party/unittest/googlemock/include/gmock/ |
H A D | gmock-matchers.h | 341 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 …]
|
/llvm-project/lldb/source/Plugins/Language/ObjC/ |
H A D | NSDictionary.h | 43 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;
|
/llvm-project/clang-tools-extra/clang-tidy/bugprone/ |
H A D | DanglingHandleCheck.cpp | 23 handleFrom(const ast_matchers::internal::Matcher<RecordDecl> &IsAHandle, in handleFrom() 24 const ast_matchers::internal::Matcher<Expr> &Arg) { in handleFrom() 34 ast_matchers::internal::Matcher<Stmt> handleFromTemporaryValue( in handleFromTemporaryValue() 35 const ast_matchers::internal::Matcher<RecordDecl> &IsAHandle) { in handleFromTemporaryValue() 52 ast_matchers::internal::Matcher<RecordDecl> isASequence() { in isASequence() 57 ast_matchers::internal::Matcher<RecordDecl> isASet() { in isASet() 62 ast_matchers::internal::Matcher<RecordDecl> isAMap() { in isAMap() 68 const ast_matchers::internal::Matcher<RecordDecl> &IsAHandle) { in makeContainerMatcher()
|
/llvm-project/clang-tools-extra/clang-tidy/modernize/ |
H A D | UseStdNumbersCheck.cpp | 42 using clang::ast_matchers::internal::Matcher; 51 Matcher<clang::QualType>, InnerMatcher) { in AST_MATCHER_P() 64 AST_MATCHER_P(clang::Expr, anyOfExhaustive, std::vector<Matcher<clang::Stmt>>, in AST_MATCHER_P() 84 ignoreParenAndArithmeticCasting(const Matcher<clang::Expr> Matcher) const { in ignoreParenAndArithmeticCasting() 85 return expr(hasType(qualType(isArithmetic())), ignoringParenCasts(Matcher)); in ignoreParenAndArithmeticCasting() 88 auto ignoreParenAndFloatingCasting(const Matcher<clang::Expr> Matcher) const { in ignoreParenAndFloatingCasting() 89 return expr(hasType(qualType(isFloating())), ignoringParenCasts(Matcher)); in ignoreParenAndFloatingCasting() 93 const Matcher<clang::Expr> ArgumentMatcher) const { in matchMathCall() 100 auto matchSqrt(const Matcher<clang::Expr> ArgumentMatcher) const { in matchSqrt() 148 auto match1Div(const Matcher<clang::Expr> Match) const { in match1Div() [all …]
|
/llvm-project/clang/unittests/Tooling/ |
H A D | LexicallyOrderedRecursiveASTVisitorTest.cpp | 22 LexicallyOrderedDeclVisitor(DummyMatchVisitor &Matcher, in LexicallyOrderedDeclVisitor() argument 25 : LexicallyOrderedRecursiveASTVisitor(SM), Matcher(Matcher), in LexicallyOrderedDeclVisitor() 41 DummyMatchVisitor &Matcher; member in __anon69a958900111::LexicallyOrderedDeclVisitor 69 Matcher.match("overridden TraverseStmt", S); in TraverseStmt() 91 Matcher.match(Path, D); in VisitNamedDecl() 100 Matcher.match(Name, D); in VisitDeclRefExpr()
|
/llvm-project/third-party/unittest/googletest/include/gtest/internal/ |
H A D | gtest-death-test-internal.h | 88 static bool Create(const char* statement, Matcher<const std::string&> matcher, 158 Matcher<const std::string&> matcher, const char* file, in GTEST_DISABLE_MSC_WARNINGS_POP_() 165 bool Create(const char* statement, Matcher<const std::string&> matcher, 176 inline Matcher<const ::std::string&> MakeDeathTestMatcher( in MakeDeathTestMatcher() 180 inline Matcher<const ::std::string&> MakeDeathTestMatcher(const char* regex) { in MakeDeathTestMatcher() 183 inline Matcher<const ::std::string&> MakeDeathTestMatcher( in MakeDeathTestMatcher() 190 inline Matcher<const ::std::string&> MakeDeathTestMatcher( in MakeDeathTestMatcher() 191 Matcher<const ::std::string&> matcher) { in MakeDeathTestMatcher()
|
/llvm-project/clang-tools-extra/clangd/unittests/ |
H A D | FuzzyMatchTests.cpp | 64 FuzzyMatcher Matcher(Pattern); in MatchAndExplain() local 65 auto Result = Matcher.match(Candidate.Word); in MatchAndExplain() 66 auto AnnotatedMatch = Matcher.dumpLast(*OS << "\n"); in MatchAndExplain() 74 ::testing::Matcher<llvm::StringRef> matches(llvm::StringRef M, in matches() 201 FuzzyMatcher Matcher(Pattern); in MatchAndExplain() local 206 auto Score = Matcher.match(Str.Word); in MatchAndExplain() 209 Matcher.dumpLast(*OS << "\n"); in MatchAndExplain() 214 auto AnnotatedMatch = Matcher.dumpLast(Info); in MatchAndExplain() 224 Matcher.match(LastMatch->Word); in MatchAndExplain() 225 Matcher.dumpLast(*OS << "\n"); in MatchAndExplain() [all …]
|