Home
last modified time | relevance | path

Searched refs:Snippet (Results 1 – 24 of 24) sorted by relevance

/llvm-project/clang/unittests/Tooling/
H A DSourceCodeBuildersTest.cpp87 static void testPredicate(bool (*Pred)(const Expr &), StringRef Snippet, in testPredicate() argument
89 auto StmtMatch = matchStmt(Snippet, expr().bind("expr")); in testPredicate()
90 ASSERT_TRUE(StmtMatch) << "Snippet: " << Snippet; in testPredicate()
92 << "Snippet: " << Snippet; in testPredicate()
97 static void testPredicateOnArg(bool (*Pred)(const Expr &), StringRef Snippet, in testPredicateOnArg() argument
100 Snippet, expr(ignoringImplicit(callExpr(hasArgument( in testPredicateOnArg()
102 ASSERT_TRUE(StmtMatch) << "Snippet: " << Snippet; in testPredicateOnArg()
104 << "Snippet: " << Snippet; in testPredicateOnArg()
148 std::string Snippet = "std::unique_ptr<int> P; P;"; in TEST() local
150 matchStmt(Snippet, declRefExpr(hasType(qualType().bind("ty")))); in TEST()
[all …]
H A DStencilTest.cpp99 const std::string Snippet = R"cc( in testError() local
108 Snippet, in testError()
141 const std::string Snippet = R"cc( in TEST_F() local
148 Snippet, ifStmt(hasCondition(expr().bind(Condition)), in TEST_F()
160 const std::string Snippet = R"cc( in TEST_F() local
166 auto StmtMatch = matchStmt(Snippet, ifStmt(hasCondition(stmt().bind("a1")), in TEST_F()
176 // string, when `Id` is bound to the expression-statement in `Snippet`.
177 void testExpr(StringRef Id, StringRef Snippet, const Stencil &Stencil, in testExpr() argument
179 auto StmtMatch = matchStmt(Snippet, expr().bind(Id)); in testExpr()
185 void testFailure(StringRef Id, StringRef Snippet, cons argument
333 std::string Snippet = R"cc( TEST_F() local
342 std::string Snippet = "std::unique_ptr<S> x; x->Field;"; TEST_F() local
377 std::string Snippet = "std::unique_ptr<S> x; x->Field;"; TEST_F() local
391 StringRef Snippet = R"cc( TEST_F() local
400 StringRef Snippet = R"cc( TEST_F() local
409 StringRef Snippet = R"cc( TEST_F() local
418 StringRef Snippet = R"cc( TEST_F() local
427 StringRef Snippet = R"cc( TEST_F() local
436 StringRef Snippet = R"cc( TEST_F() local
445 StringRef Snippet = R"cc( TEST_F() local
454 StringRef Snippet = R"cc( TEST_F() local
471 StringRef Snippet = R"cc( TEST_F() local
493 StringRef Snippet = R"cc( TEST_F() local
509 std::string Snippet = "int *x; x;"; TEST_F() local
519 std::string Snippet = "using Ty = int; Ty *x; x;"; TEST_F() local
529 std::string Snippet = "S s; s;"; TEST_F() local
539 std::string Snippet = "N::C c; c;"; TEST_F() local
549 std::string Snippet = "using N::C; C c; c;"; TEST_F() local
559 std::string Snippet = "auto c = desugar<AnonC>(); c;"; TEST_F() local
578 StringRef Snippet = R"cpp( TEST_F() local
593 StringRef Snippet = R"cpp( TEST_F() local
605 StringRef Snippet = R"cpp( TEST_F() local
620 StringRef Snippet = R"cpp( TEST_F() local
[all...]
/llvm-project/clang-tools-extra/unittests/clang-tidy/
H A DAddConstTest.cpp55 StringRef Snippet = "int target = 0;"; in TEST() local
57 EXPECT_EQ("const int target = 0;", runCheckOnCode<ValueLTransform>(Snippet)); in TEST()
59 runCheckOnCode<PointeeLTransform>(Snippet)); in TEST()
61 EXPECT_EQ("int const target = 0;", runCheckOnCode<ValueRTransform>(Snippet)); in TEST()
63 runCheckOnCode<PointeeRTransform>(Snippet)); in TEST()
221 StringRef Snippet = "int ((target)) = 0;"; in TEST() local
224 runCheckOnCode<ValueLTransform>(Snippet)); in TEST()
226 runCheckOnCode<PointeeLTransform>(Snippet)); in TEST()
229 runCheckOnCode<ValueRTransform>(Snippet)); in TEST()
231 runCheckOnCode<PointeeRTransform>(Snippet)); in TEST()
239 StringRef Snippet = "int target[][1] = {{1}, {2}, {3}};"; TEST() local
252 StringRef Snippet = "int ((target))[][1] = {{1}, {2}, {3}};"; TEST() local
265 StringRef Snippet = "int x; int* target[] = {&x, &x, &x};"; TEST() local
278 StringRef Snippet = "int* x = nullptr; int** target[] = {&x, &x, &x};"; TEST() local
291 StringRef Snippet = "int x; int* (target)[] = {&x, &x, &x};"; TEST() local
309 StringRef Snippet = "int x = 42; int& target = x;"; TEST() local
322 StringRef Snippet = "int&& target = 42;"; TEST() local
334 StringRef Snippet = "int* p; int *& target = p;"; TEST() local
346 StringRef Snippet = "int x = 42; int ((& target)) = x;"; TEST() local
360 StringRef Snippet = "int (&target)[4] = a;"; TEST() local
394 StringRef Snippet = "int* target = nullptr;"; TEST() local
407 StringRef Snippet = "int** target = nullptr;"; TEST() local
421 StringRef Snippet = "int (*target)[4] = &a;"; TEST() local
435 StringRef Snippet = "int ((**target)) = nullptr;"; TEST() local
[all...]
H A DDeclRefExprUtilsTest.cpp44 template <int Indirections> void RunTest(StringRef Snippet) { in RunTest() argument
104 std::string Code = (CommonCode + Snippet).str(); in RunTest()
/llvm-project/llvm/unittests/tools/llvm-exegesis/X86/
H A DSnippetFileTest.cpp103 const auto &Snippet = (*Snippets)[0]; in TEST_F()
104 ASSERT_THAT(Snippet.Key.Instructions, ElementsAre(HasOpcode(X86::INC64r))); in TEST_F()
105 ASSERT_THAT(Snippet.Key.RegisterInitialValues, in TEST_F()
108 ASSERT_THAT(Snippet.LiveIns, ElementsAre(X86::RDI, X86::DL)); in TEST_F()
158 const auto &Snippet = (*Snippets)[0]; in TEST_F()
159 ASSERT_THAT(Snippet.Key.MemoryValues, in TEST_F()
161 ASSERT_THAT(Snippet.Key.MemoryMappings, in TEST_F()
177 const auto &Snippet = (*Snippets)[0]; in TEST_F()
178 ASSERT_THAT(Snippet.Key.MemoryValues, in TEST_F()
181 ASSERT_THAT(Snippet in TEST_F()
102 const auto &Snippet = (*Snippets)[0]; TEST_F() local
157 const auto &Snippet = (*Snippets)[0]; TEST_F() local
176 const auto &Snippet = (*Snippets)[0]; TEST_F() local
218 const auto &Snippet = (*Snippets)[0]; TEST_F() local
228 const auto &Snippet = (*Snippets)[0]; TEST_F() local
[all...]
H A DSnippetGeneratorTest.cpp517 std::vector<InstructionTemplate> Snippet; in TEST_F() local
518 Snippet.push_back(std::move(IT)); in TEST_F()
519 const auto RIV = Generator.computeRegisterInitialValues(Snippet); in TEST_F()
528 std::vector<InstructionTemplate> Snippet; in TEST_F() local
534 Snippet.push_back(std::move(Mov)); in TEST_F()
542 Snippet.push_back(std::move(Add)); in TEST_F()
545 const auto RIV = Generator.computeRegisterInitialValues(Snippet); in TEST_F()
/llvm-project/clang-tools-extra/clangd/
H A DCodeCompletionStrings.cpp120 std::string *Snippet, in getSignature() argument
172 Snippet->clear(); in getSignature()
202 Snippet->clear(); in getSignature()
207 *Snippet += Chunk.Text; in getSignature()
213 *Snippet += Chunk.Text; in getSignature()
226 *Snippet += "$0"; in getSignature()
228 *Snippet += "${" + std::to_string(SnippetArg) + ':'; in getSignature()
229 appendEscapeSnippet(Chunk.Text, Snippet); in getSignature()
230 *Snippet += '}'; in getSignature()
255 TruncateSnippetAt.emplace(Snippet->size()); in getSignature()
[all …]
H A DCodeComplete.cpp182 return CompletionItemKind::Snippet; in toCompletionItemKind()
575 auto *Snippet = onlyValue<&BundledEntry::SnippetSuffix>(); in summarizeSnippet()
576 if (!Snippet) in summarizeSnippet()
582 if (Snippet->empty()) in summarizeSnippet()
590 // Snippet: function(int x, int y) in summarizeSnippet()
595 // Snippet: function<class T>(int x) in summarizeSnippet()
597 if (NextTokenKind == tok::less && Snippet->front() == '<') in summarizeSnippet()
601 // Snippet: function<class T>(int x) in summarizeSnippet()
603 if (Snippet->front() == '<') { in summarizeSnippet()
608 if (Snippet in summarizeSnippet()
566 auto *Snippet = onlyValue<&BundledEntry::SnippetSuffix>(); summarizeSnippet() local
[all...]
H A DCodeCompletionStrings.h53 std::string *Snippet,
H A DProtocol.h354 Snippet = 15, enumerator
1274 Snippet = 2,
1271 Snippet = 2, global() enumerator
/llvm-project/clang-tools-extra/clangd/unittests/
H A DCodeCompletionStringsTests.cpp31 Snippet.clear(); in computeSignature()
32 getSignature(CCS, &Signature, &Snippet, ResultKind, in computeSignature()
42 std::string Snippet; member in clang::clangd::__anonde4d15820111::CompletionStringTest
86 EXPECT_EQ(Snippet, ""); in TEST_F()
102 EXPECT_EQ(Snippet, "(${1:p1}, ${2:p2})"); in TEST_F()
127 EXPECT_EQ(Snippet, "(${1:p1})"); in TEST_F()
138 EXPECT_EQ(Snippet, "(${1:\\$p\\}1\\\\})"); in TEST_F()
153 EXPECT_EQ(Snippet, " ${1:name} = ${2:target};"); in TEST_F()
158 EXPECT_EQ(Snippet, " ${1:name} = $0;"); in TEST_F()
180 EXPECT_EQ(Snippet, "<${1:typename T}, ${2:int U}>"); in TEST_F()
[all …]
H A DCodeCompleteTests.cpp334 Not(Contains(kind(CompletionItemKind::Snippet)))); in testAfterDotCompletion()
380 Contains(kind(CompletionItemKind::Snippet)))); in testGlobalScopeCompletion()
691 has("namespace", CompletionItemKind::Snippet)); in TEST()
2314 EXPECT_EQ(R.insertTextFormat, InsertTextFormat::Snippet); in TEST()
/llvm-project/llvm/tools/llvm-exegesis/lib/
H A DBenchmarkRunner.cpp637 auto Snippet = in runConfiguration()
640 if (Error E = Snippet.takeError()) in runConfiguration()
643 if (auto Err = getBenchmarkFunctionBytes(*Snippet, in runConfiguration()
652 auto Snippet = in runConfiguration()
655 if (Error E = Snippet.takeError()) in runConfiguration()
657 RC.ObjectFile = getObjectFromBuffer(*Snippet); in runConfiguration()
577 auto Snippet = getRunnableConfiguration() local
592 auto Snippet = getRunnableConfiguration() local
H A DSnippetGenerator.h71 const std::vector<InstructionTemplate> &Snippet) const;
/llvm-project/llvm/tools/llvm-cov/
H A DSourceCoverageViewHTML.cpp967 auto Highlight = [&](const std::string &Snippet, unsigned LC, unsigned RC) { in renderLine()
970 if (Snippet.empty()) in renderLine()
971 return tag("span", Snippet, std::string(*Color)); in renderLine()
973 return tag("span", Snippet, "region " + std::string(*Color)); in renderLine()
1043 for (const auto &Snippet : Snippets) in renderLine()
1044 OS << Snippet; in renderLine()
972 __anon22f11e490402(const std::string &Snippet, unsigned LC, unsigned RC) renderLine() argument
1045 for (const auto &Snippet : Snippets) renderLine() local
/llvm-project/clang-tools-extra/clang-tidy/readability/
H A DIsolateDeclarationCheck.cpp217 StringRef Snippet = in collectSourceRanges() local
223 Snippets.emplace_back(Snippet); in collectSourceRanges()
/llvm-project/mlir/include/mlir/Tools/lsp-server-support/
H A DProtocol.h784 Snippet = 15, enumerator
830 Snippet = 2, enumerator
/llvm-project/clang/include/clang/AST/
H A DCommentCommands.td268 def Snippet : VerbatimLineCommand<"snippet">;
/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DBugReporter.cpp1596 StringRef Snippet = Buffer->getBuffer().slice(BeginOffset, EndOffset); in getLengthOnSingleLine()
1602 if (Snippet.find_first_of("\r\n") != StringRef::npos) in getLengthOnSingleLine()
1606 return Snippet.size(); in getLengthOnSingleLine()
1600 StringRef Snippet = Buffer->getBuffer().slice(BeginOffset, EndOffset); getLengthOnSingleLine() local
/llvm-project/llvm/test/tools/llvm-mca/X86/
H A Dread-after-ld-2.s14 # Code Snippet from "Ithemal: Accurate, Portable and Fast Basic Block Throughput Estimation using D…
/llvm-project/mlir/lib/Tools/mlir-pdll-lsp-server/
H A DPDLLServer.cpp783 : lsp::InsertTextFormat::Snippet; in codeCompleteConstraintName()
895 : lsp::InsertTextFormat::Snippet; in codeCompletePatternMetadata()
/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/
H A Ddivergence-structurizer.ll474 ; Snippet from test generated by the GraphicsFuzz tool, frontend generates ir
/llvm-project/llvm/docs/CommandGuide/
H A Dllvm-exegesis.rst147 Snippet:
/llvm-project/clang/docs/
H A DInternalsManual.rst1912 // Snippet #1:
1920 // Snippet #2:
1927 actually have two separate ``NamespaceDecl`` nodes in Snippet #1, each of which