| /llvm-project-15.0.7/lldb/unittests/DataFormatter/ |
| H A D | FormattersContainerTest.cpp | 37 EXPECT_FALSE(matcher.Matches(ConstString("am"))); in TEST() 38 EXPECT_FALSE(matcher.Matches(ConstString("a"))); in TEST() 39 EXPECT_FALSE(matcher.Matches(ConstString(" "))); in TEST() 49 EXPECT_TRUE(matcher.Matches(ConstString("abc"))); in TEST() 50 EXPECT_TRUE(matcher.Matches(ConstString("azc"))); in TEST() 60 EXPECT_FALSE(matcher.Matches(ConstString("ac"))); in TEST() 64 EXPECT_FALSE(matcher.Matches(ConstString(""))); in TEST() 71 EXPECT_TRUE(matcher.Matches(ConstString("abc"))); in TEST() 73 EXPECT_TRUE(matcher.Matches(ConstString("azc"))); in TEST() 80 EXPECT_FALSE(matcher.Matches(ConstString("ac"))); in TEST() [all …]
|
| /llvm-project-15.0.7/llvm/unittests/Support/ |
| H A D | RegexTest.cpp | 26 SmallVector<StringRef, 1> Matches; in TEST_F() local 29 EXPECT_EQ(1u, Matches.size()); in TEST_F() 30 EXPECT_EQ("216", Matches[0].str()); in TEST_F() 34 EXPECT_EQ(3u, Matches.size()); in TEST_F() 36 EXPECT_EQ("a", Matches[1].str()); in TEST_F() 40 EXPECT_EQ(3u, Matches.size()); in TEST_F() 42 EXPECT_EQ("", Matches[1].str()); in TEST_F() 50 EXPECT_EQ(1u, Matches.size()); in TEST_F() 67 EXPECT_EQ(2u, Matches.size()); in TEST_F() 72 EXPECT_EQ(2u, Matches.size()); in TEST_F() [all …]
|
| /llvm-project-15.0.7/llvm/lib/TableGen/ |
| H A D | StringMatcher.cpp | 30 assert(!Matches.empty()); in FindFirstNonCommonLetter() 33 char Letter = Matches[0]->first[i]; in FindFirstNonCommonLetter() 35 for (const StringMatcher::StringPair *Match : Matches) in FindFirstNonCommonLetter() 40 return Matches[0]->first.size(); in FindFirstNonCommonLetter() 56 if (CharNo == Matches[0]->first.size()) { in EmitStringMatcherForChar() 57 if (Matches.size() > 1 && !IgnoreDuplicates) in EmitStringMatcherForChar() 61 StringRef Code = Matches[0]->second; in EmitStringMatcherForChar() 78 for (const StringPair *Match : Matches) in EmitStringMatcherForChar() 92 << Matches[0]->first[CharNo] << "')\n"; in EmitStringMatcherForChar() 132 if (Matches.empty()) return; in Emit() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/ |
| H A D | DeclRefExprUtils.cpp | 36 for (const auto &Match : Matches) in extractNodesByIdTo() 53 auto Matches = match( in constReferenceDeclRefExprs() local 59 extractNodesByIdTo(Matches, "declRef", DeclRefs); in constReferenceDeclRefExprs() 72 Matches = in constReferenceDeclRefExprs() 78 Matches = in constReferenceDeclRefExprs() 102 auto Matches = match( in allDeclRefExprs() local 112 auto Matches = match( in allDeclRefExprs() local 126 auto Matches = match( in isCopyConstructorArgument() local 132 return !Matches.empty(); in isCopyConstructorArgument() 140 auto Matches = match( in isCopyAssignmentArgument() local [all …]
|
| /llvm-project-15.0.7/llvm/lib/Support/ |
| H A D | Regex.cpp | 96 unsigned nmatch = Matches ? preg->re_nsub+1 : 0; in match() 118 if (Matches) { // match position requested in match() 119 Matches->clear(); in match() 124 Matches->push_back(StringRef()); in match() 128 Matches->push_back(StringRef(String.data()+pm[i].rm_so, in match() 138 SmallVector<StringRef, 8> Matches; in sub() local 141 if (!match(String, &Matches, Error)) in sub() 146 std::string Res(String.begin(), Matches[0].begin()); in sub() 194 RefValue < Matches.size()) in sub() 195 Res += Matches[RefValue]; in sub() [all …]
|
| H A D | UnicodeNameToCodepoint.cpp | 198 bool Matches; in compareNode() local 200 std::tie(C, Matches, Value) = in compareNode() 203 if (Matches) { in compareNode() 387 bool Matches; in nameToCodepoint() local 390 if (Matches) { in nameToCodepoint() 430 Matches.reserve(MaxMatchesCount + 1); in nearestMatchesForCodepointName() 449 Matches.begin(), Matches.end(), Distance, in nearestMatchesForCodepointName() 455 if (It == Matches.end() && Matches.size() == MaxMatchesCount) in nearestMatchesForCodepointName() 459 Matches.insert(It, std::move(M)); in nearestMatchesForCodepointName() 461 Matches.pop_back(); in nearestMatchesForCodepointName() [all …]
|
| /llvm-project-15.0.7/lldb/unittests/Target/ |
| H A D | PathMappingListTest.cpp | 18 struct Matches { struct 21 Matches(const char *o, const char *r) : original(o), remapped(r) {} in Matches() argument 22 Matches(const char *o, llvm::sys::path::Style style, const char *r) in Matches() argument 28 llvm::ArrayRef<Matches> matches, in TestPathMappings() 50 Matches matches[] = { in TEST() 79 Matches matches[] = { in TEST() 101 Matches matches[] = { in TEST() 122 Matches matches[] = { in TEST()
|
| H A D | FindFileTest.cpp | 25 struct Matches { struct 28 Matches(const char *o, const char *r) : original(o), remapped(r) {} in Matches() function 29 Matches(const char *o, llvm::sys::path::Style style, const char *r) in Matches() function 47 llvm::ArrayRef<Matches> matches, in TestFileFindings() 81 Matches matches[] = { in TEST_F()
|
| /llvm-project-15.0.7/llvm/lib/DebugInfo/PDB/Native/ |
| H A D | NativeEnumTypes.cpp | 37 Matches.push_back(*TI); in NativeEnumTypes() 46 Matches.push_back(*TI); in NativeEnumTypes() 55 : Matches(std::move(Indices)), Index(0), Session(PDBSession) {} in NativeEnumTypes() 58 return static_cast<uint32_t>(Matches.size()); in getChildCount() 62 if (N < Matches.size()) { in getChildAtIndex() 63 SymIndexId Id = Session.getSymbolCache().findSymbolByTypeIndex(Matches[N]); in getChildAtIndex()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/google/ |
| H A D | TodoCommentCheck.cpp | 29 SmallVector<StringRef, 4> Matches; in HandleComment() local 30 if (!TodoMatch.match(Text, &Matches)) in HandleComment() 33 StringRef Username = Matches[1]; in HandleComment() 34 StringRef Comment = Matches[3]; in HandleComment()
|
| /llvm-project-15.0.7/llvm/lib/DebugInfo/Symbolize/ |
| H A D | Markup.cpp | 157 SmallVector<StringRef> Matches; in parseTextOutsideMarkup() local 158 while (SGRSyntax.match(Text, &Matches)) { in parseTextOutsideMarkup() 160 if (Matches.begin()->begin() != Text.begin()) in parseTextOutsideMarkup() 161 Buffer.push_back(textNode(takeTo(Text, Matches.begin()->begin()))); in parseTextOutsideMarkup() 163 Buffer.push_back(textNode(*Matches.begin())); in parseTextOutsideMarkup() 164 advanceTo(Text, Matches.begin()->end()); in parseTextOutsideMarkup()
|
| /llvm-project-15.0.7/llvm/include/llvm/TableGen/ |
| H A D | StringMatcher.h | 36 const std::vector<StringPair> &Matches; variable 42 : StrVariableName(strVariableName), Matches(matches), OS(os) {} in StringMatcher() 47 bool EmitStringMatcherForChar(const std::vector<const StringPair *> &Matches,
|
| /llvm-project-15.0.7/clang/lib/Analysis/ |
| H A D | ExprMutationAnalyzer.cpp | 135 const Stmt *tryEachMatch(ArrayRef<ast_matchers::BoundNodes> Matches, in tryEachMatch() argument 138 for (const auto &Nodes : Matches) { in tryEachMatch() 239 ExprMutationAnalyzer::findExprMutation(ArrayRef<BoundNodes> Matches) { in findExprMutation() argument 249 ArrayRef<ast_matchers::BoundNodes> Matches) { in findExprPointeeMutation() argument 250 return tryEachMatch<Expr>(Matches, this, in findExprPointeeMutation() 255 ArrayRef<ast_matchers::BoundNodes> Matches) { in findDeclPointeeMutation() argument 256 return tryEachMatch<Decl>(Matches, this, in findDeclPointeeMutation() 374 const auto Matches = match( in findDirectMutation() local 383 return selectFirst<Stmt>("stmt", Matches); in findDirectMutation() 552 const auto Matches = match( in findFunctionArgMutation() local [all …]
|
| /llvm-project-15.0.7/clang/include/clang/Analysis/Analyses/ |
| H A D | ExprMutationAnalyzer.h | 55 const Stmt *findExprMutation(ArrayRef<ast_matchers::BoundNodes> Matches); 56 const Stmt *findDeclMutation(ArrayRef<ast_matchers::BoundNodes> Matches); 58 findExprPointeeMutation(ArrayRef<ast_matchers::BoundNodes> Matches); 60 findDeclPointeeMutation(ArrayRef<ast_matchers::BoundNodes> Matches);
|
| /llvm-project-15.0.7/clang/utils/TableGen/ |
| H A D | ClangCommentHTMLTagsEmitter.cpp | 24 std::vector<StringMatcher::StringPair> Matches; in EmitClangCommentHTMLTags() local 26 Matches.emplace_back(std::string(Tag->getValueAsString("Spelling")), in EmitClangCommentHTMLTags() 33 StringMatcher("Name", Matches, OS).Emit(); in EmitClangCommentHTMLTags()
|
| H A D | ClangCommentCommandInfoEmitter.cpp | 63 std::vector<StringMatcher::StringPair> Matches; in EmitClangCommentCommandInfo() local 69 Matches.emplace_back(std::move(Name), std::move(Return)); in EmitClangCommentCommandInfo() 74 StringMatcher("Name", Matches, OS).Emit(); in EmitClangCommentCommandInfo()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/refactor/ |
| H A D | InsertionPoint.cpp | 37 bool Matches = A.Match(NonTemplate); in insertionDecl() local 38 dlog(" {0} {1} {2}", Matches, D->getDeclKindName(), D); in insertionDecl() 42 if (Matches && !LastMatched) { in insertionDecl() 53 if (LastMatched && !Matches) in insertionDecl() 58 LastMatched = Matches; in insertionDecl()
|
| /llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | RunLoopAutoreleaseLeakChecker.cpp | 168 auto Matches = match(GroupM, *D, AM.getASTContext()); in checkTempObjectsInSamePool() local 169 for (BoundNodes Match : Matches) in checkTempObjectsInSamePool() 188 auto Matches = match(GroupM, *D, AM.getASTContext()); in checkTempObjectsInNoPool() local 190 for (BoundNodes Match : Matches) in checkTempObjectsInNoPool()
|
| H A D | GCDAntipatternChecker.cpp | 212 auto Matches = match(SemaphoreMatcherM, *D->getBody(), AM.getASTContext()); in checkASTCodeBody() local 213 for (BoundNodes Match : Matches) in checkASTCodeBody() 217 Matches = match(GroupMatcherM, *D->getBody(), AM.getASTContext()); in checkASTCodeBody() 218 for (BoundNodes Match : Matches) in checkASTCodeBody()
|
| /llvm-project-15.0.7/lldb/unittests/Utility/ |
| H A D | ProcessInstanceInfoTest.cpp | 104 EXPECT_TRUE(match.Matches(info_bar)); in TEST() 105 EXPECT_FALSE(match.Matches(info_empty)); in TEST() 108 EXPECT_TRUE(match.Matches(info_bar)); in TEST() 109 EXPECT_TRUE(match.Matches(info_empty)); in TEST()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/unittests/ |
| H A D | Matchers.h | 57 std::vector<int> Matches(Matchers.size()); in MatchAndExplain() 60 if (Matchers[I].Matches(V[J])) in MatchAndExplain() 61 Matches[I++] = J; in MatchAndExplain() 69 *L << " ==> " << ::testing::PrintToString(V[Matches[K]]); in MatchAndExplain()
|
| /llvm-project-15.0.7/clang/unittests/StaticAnalyzer/ |
| H A D | Reusables.h | 25 auto Matches = match(decl(hasDescendant(What.bind("root"))), in findNode() local 27 assert(Matches.size() <= 1 && "Ambiguous match!"); in findNode() 28 assert(Matches.size() >= 1 && "Match not found!"); in findNode() 29 const T *Node = selectFirst<T>("root", Matches); in findNode()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/ |
| H A D | ArgumentCommentCheck.cpp | 313 llvm::SmallVector<StringRef, 2> Matches; in checkCallArgs() local 314 if (IdentRE.match(Comment.second, &Matches) && in checkCallArgs() 315 !sameName(Matches[2], II->getName(), StrictMode)) { in checkCallArgs() 320 << Matches[2] << II; in checkCallArgs() 321 if (isLikelyTypo(Callee->parameters(), Matches[2], I)) { in checkCallArgs() 323 Comment.first, (Matches[1] + II->getName() + Matches[3]).str()); in checkCallArgs()
|
| /llvm-project-15.0.7/clang/tools/clang-refactor/ |
| H A D | TestSupport.cpp | 327 SmallVector<StringRef, 4> Matches; in findTestSelectionRanges() local 341 if (!RangeRegex.match(Comment, &Matches) || Comment.contains("CHECK")) { in findTestSelectionRanges() 348 if (!Matches[2].empty()) { in findTestSelectionRanges() 350 if (Matches[2].drop_front().getAsInteger(10, ColumnOffset)) in findTestSelectionRanges() 356 if (!Matches[3].empty()) { in findTestSelectionRanges() 360 if (!EndLocRegex.match(Matches[3], &EndLocMatches)) { in findTestSelectionRanges() 376 Matches[1].str(), SmallVector<TestSelectionRange, 8>{Range})); in findTestSelectionRanges()
|
| /llvm-project-15.0.7/clang-tools-extra/clang-tidy/performance/ |
| H A D | UnnecessaryCopyInitialization.cpp | 154 auto Matches = in isInitializingVariableImmutable() local 159 if (selectFirst<CallExpr>(InitFunctionCallId, Matches) != nullptr) in isInitializingVariableImmutable() 162 if (const auto *OrigVar = selectFirst<VarDecl>(ObjectArgId, Matches)) in isInitializingVariableImmutable() 166 if (const auto *OrigVar = selectFirst<VarDecl>(OldVarDeclId, Matches)) in isInitializingVariableImmutable() 180 auto Matches = match( in getSubstitutedType() local 184 return selectFirst<SubstTemplateTypeParmType>("subst", Matches); in getSubstitutedType()
|