| /llvm-project-15.0.7/lldb/unittests/Utility/ |
| H A D | UriParserTest.cpp | 7 EXPECT_EQ((URI{"x", "y", llvm::None, "/"}), URI::Parse("x://y")); in TEST() 11 EXPECT_EQ((URI{"x", "y", 1, "/"}), URI::Parse("x://y:1")); in TEST() 15 EXPECT_EQ((URI{"x", "y", llvm::None, "/"}), URI::Parse("x://y/")); in TEST() 19 EXPECT_EQ((URI{"x", "y", 1, "/"}), URI::Parse("x://y:1/")); in TEST() 23 EXPECT_EQ((URI{"x", "y", llvm::None, "/abc/def/xyz"}), in TEST() 24 URI::Parse("x://y/abc/def/xyz")); in TEST() 67 EXPECT_EQ(llvm::None, URI::Parse("x:/y")); in TEST() 71 EXPECT_EQ(llvm::None, URI::Parse("x:y")); in TEST() 75 EXPECT_EQ(llvm::None, URI::Parse("x//y")); in TEST() 79 EXPECT_EQ(llvm::None, URI::Parse("x/y")); in TEST() [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/ |
| H A D | URI.h | 28 class URI { 44 static llvm::Expected<URI> create(llvm::StringRef AbsolutePath, 49 static URI create(llvm::StringRef AbsolutePath); 52 static URI createFile(llvm::StringRef AbsolutePath); 56 static llvm::Expected<URI> parse(llvm::StringRef Uri); 63 static llvm::Expected<std::string> resolve(const URI &U, 85 static llvm::Expected<std::string> includeSpelling(const URI &U); 87 friend bool operator==(const URI &LHS, const URI &RHS) { 92 friend bool operator<(const URI &LHS, const URI &RHS) { 98 URI() = default; [all …]
|
| H A D | URI.cpp | 58 llvm::Expected<URI> 152 URI::URI(llvm::StringRef Scheme, llvm::StringRef Authority, in URI() function in clang::clangd::URI 177 llvm::Expected<URI> URI::parse(llvm::StringRef OrigUri) { in parse() 178 URI U; in parse() 209 llvm::Expected<URI> URI::create(llvm::StringRef AbsolutePath, in create() 219 URI URI::create(llvm::StringRef AbsolutePath) { in create() 227 if (!URI) { in create() 232 return std::move(*URI); in create() 238 URI URI::createFile(llvm::StringRef AbsolutePath) { in createFile() 245 llvm::Expected<std::string> URI::resolve(const URI &Uri, in resolve() [all …]
|
| H A D | FileDistance.cpp | 150 unsigned URIDistance::distance(llvm::StringRef URI) { in distance() argument 151 auto R = Cache.try_emplace(llvm::hash_value(URI), FileDistance::Unreachable); in distance() 154 if (auto U = clangd::URI::parse(URI)) { in distance() 155 dlog("distance({0} = {1})", URI, U->body()); in distance() 158 log("URIDistance::distance() of unparseable {0}: {1}", URI, U.takeError()); in distance() 168 if (auto U = clangd::URI::create(Source.getKey(), Scheme)) in forScheme()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/unittests/ |
| H A D | URITests.cpp | 32 auto Uri = URI::create(AbsolutePath, Scheme); in createOrDie() 38 URI parseOrDie(llvm::StringRef Uri) { in parseOrDie() 39 auto U = URI::parse(Uri); in parseOrDie() 64 auto Path = URI::resolve(U, HintPath); in resolveOrDie() 90 EXPECT_ERROR(URI::create("/x/y/z", "no")); in TEST() 92 EXPECT_ERROR(URI::create("x/y/z", "file")); in TEST() 127 EXPECT_ERROR(URI::parse("file//x/y/z")); in TEST() 129 EXPECT_ERROR(URI::parse("")); in TEST() 130 EXPECT_ERROR(URI::parse(":/a/b/c")); in TEST() 191 auto U = URI::create(Path, "file"); in TEST() [all …]
|
| H A D | SerializationTests.cpp | 185 const auto *URI = "file:///path/source1.cpp"; in TEST() local 186 ASSERT_TRUE(ParsedYAML->Sources->count(URI)); in TEST() 187 auto IGNDeserialized = ParsedYAML->Sources->lookup(URI); in TEST() 191 EXPECT_EQ(IGNDeserialized.URI, URI); in TEST() 247 IGN.URI = "URI"; in TEST() 251 Sources[IGN.URI] = IGN; in TEST() 264 ASSERT_TRUE(In->Sources->count(IGN.URI)); in TEST() 270 auto IGNDeserialized = In->Sources->lookup(IGN.URI); in TEST() 273 EXPECT_EQ(IGNDeserialized.URI, IGN.URI); in TEST()
|
| H A D | IndexActionTests.cpp | 29 std::string toUri(llvm::StringRef Path) { return URI::create(Path).toString(); } in toUri() 38 llvm::StringRef URI = ::testing::get<0>(arg); variable 40 return toUri(Path) == URI; 54 auto URI = toUri(Path); in checkNodesAreInitialized() local 55 const auto &Node = IndexFile.Sources->lookup(URI); in checkNodesAreInitialized() 57 EXPECT_EQ(Node.URI.data(), IndexFile.Sources->find(URI)->getKeyData()); in checkNodesAreInitialized()
|
| H A D | TestFS.cpp | 124 llvm::Expected<URI> 129 return URI(Scheme, /*Authority=*/"", in uriFromAbsolutePath()
|
| H A D | FileIndexTests.cpp | 576 auto AHeaderUri = URI::create(testPath("a.h")).toString(); in TEST() 577 auto BHeaderUri = URI::create(testPath("b.h")).toString(); in TEST() 578 auto BSourceUri = URI::create(testPath("b.cc")).toString(); in TEST() 620 Node.URI = BSourceUri; in TEST() 626 Node.URI = BHeaderUri; in TEST() 632 Node.URI = AHeaderUri; in TEST()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/index/ |
| H A D | IndexAction.cpp | 37 return URI::create(AbsolutePath).toString(); in toURI() 62 auto URI = toURI(File); in FileChanged() local 63 if (!URI) in FileChanged() 65 auto I = IG.try_emplace(*URI).first; in FileChanged() 69 if (Node.URI.data() == I->getKeyData()) { in FileChanged() 81 Node.URI = I->getKey(); in FileChanged() 110 auto URI = toURI(SkippedFile); in FileSkipped() local 111 if (!URI) in FileSkipped() 113 auto I = IG.try_emplace(*URI); in FileSkipped() 115 assert(I.first->getKeyData() == I.first->getValue().URI.data() && in FileSkipped() [all …]
|
| H A D | YAMLSerialization.cpp | 133 NormalizedFileURI(IO &, const char *FileURI) { URI = FileURI; } in NormalizedFileURI() 139 ->save(URI) in denormalize() 143 std::string URI; member 150 IO.mapRequired("FileURI", NFile->URI); in mapping() 337 IO.mapRequired("URI", Node.URI); in mapping() 450 auto Entry = Sources.try_emplace(IGN.URI).first; in readYAML() 453 Entry->getValue().URI = Entry->getKey(); in readYAML()
|
| H A D | StdLib.cpp | 158 StdLibURIPrefixes.push_back(URI::create(Path).toString()); in filter() 173 for (const char *URI : in filter() 175 auto R = GoodHeader.try_emplace(URI, false); in filter() 179 [&, URIStr(llvm::StringRef(URI))](const std::string &Prefix) { in filter()
|
| H A D | FileIndex.cpp | 108 IncludeGraph getSubGraph(llvm::StringRef URI, const IncludeGraph &FullGraph) { in getSubGraph() argument 111 auto Entry = IG.try_emplace(URI).first; in getSubGraph() 114 Node.URI = Entry->getKey(); in getSubGraph() 119 I->getValue().URI = I->getKey(); in getSubGraph() 471 URI::create(Path).toString(), in updateMain()
|
| H A D | Background.cpp | 193 auto AbsPath = URI::resolve(IGN.URI, MainFile); in update() 203 FilesToUpdate[IGN.URI] = {std::move(*AbsPath), IGN.Digest}; in update() 391 IndexedSymbols.update(URI::create(LS.AbsolutePath).toString(), in loadProject()
|
| /llvm-project-15.0.7/lldb/include/lldb/Utility/ |
| H A D | UriParser.h | 17 struct URI { struct 23 bool operator==(const URI &R) const { argument 28 static llvm::Optional<URI> Parse(llvm::StringRef uri); 31 llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const URI &U);
|
| /llvm-project-15.0.7/lldb/source/Utility/ |
| H A D | UriParser.cpp | 20 const URI &U) { in operator <<() 27 llvm::Optional<URI> URI::Parse(llvm::StringRef uri) { in Parse() 28 URI ret; in Parse()
|
| /llvm-project-15.0.7/lldb/unittests/Host/ |
| H A D | SocketTest.cpp | 148 EXPECT_EQ((URI{"connect", GetParam().localhost_ip, in TEST_P() 150 URI::Parse(uri)); in TEST_P() 162 EXPECT_EQ((URI{"udp", "127.0.0.1", 0, "/"}), URI::Parse(uri)); in TEST_P() 182 EXPECT_EQ((URI{"unix-connect", "", llvm::None, domain_path}), in TEST_P() 183 URI::Parse(uri)); in TEST_P()
|
| H A D | ConnectionFileDescriptorTest.cpp | 30 EXPECT_EQ((URI{"connect", ip, socket->GetRemotePortNumber(), "/"}), in TestGetURI() 31 URI::Parse(uri).value()); in TestGetURI()
|
| /llvm-project-15.0.7/clang/include/clang/Basic/ |
| H A D | Sarif.h | 76 std::string URI; variable 79 explicit SarifArtifactLocation(const std::string &URI) : URI(URI) {} in SarifArtifactLocation() argument 82 static SarifArtifactLocation create(llvm::StringRef URI) { in create() argument 83 return SarifArtifactLocation{URI.str()}; in create()
|
| /llvm-project-15.0.7/lldb/source/Plugins/Platform/Android/ |
| H A D | PlatformAndroidRemoteGDBServer.cpp | 117 llvm::Optional<URI> parsed_url = URI::Parse(url); in ConnectRemote() 211 llvm::Optional<URI> parsed_url = URI::Parse(connect_url); in ConnectProcess()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/unittests/remote/ |
| H A D | MarshallingTests.cpp | 41 auto URI = URI::createFile(testPath(Path)); in testPathURI() local 42 return Strings.save(URI.toString()).begin(); in testPathURI() 127 URI::create(testPath("project/lib/HelloWorld.cpp"), "unittest"); in TEST() 188 auto UnittestURI = URI::create(testPath("home/SomePath.h"), "unittest"); in TEST() 246 Strings.save(URI::createFile(testPath("project/Header.h")).toString()); in TEST()
|
| /llvm-project-15.0.7/lldb/tools/lldb-server/ |
| H A D | Acceptor.cpp | 88 if (llvm::Optional<URI> res = URI::Parse(name)) { in Create()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/index/remote/marshalling/ |
| H A D | Marshalling.cpp | 323 auto Result = URI::createFile(FullPath); in relativePathToURI() 327 llvm::Expected<std::string> Marshaller::uriToRelativePath(llvm::StringRef URI) { in uriToRelativePath() argument 329 auto ParsedURI = URI::parse(URI); in uriToRelativePath() 333 return error("Can not use URI schemes other than file, given: '{0}'.", URI); in uriToRelativePath()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/test/ |
| H A D | test-uri-posix.test | 3 # Test authority-less URI
|
| H A D | test-uri-windows.test | 3 # Test authority-less URI
|