Skip to content

Commit d99da80

Browse files
committed
[clangd] Fix path edge-case condition.
1 parent 67d16b6 commit d99da80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: clang-tools-extra/clangd/ConfigProvider.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Provider::fromAncestorRelativeYAMLFiles(llvm::StringRef RelPath,
103103
I != E; ++I) {
104104
// Avoid weird non-substring cases like phantom "." components.
105105
// In practice, Component is a substring for all "normal" ancestors.
106-
if (I->end() < Parent.begin() && I->end() > Parent.end())
106+
if (I->end() < Parent.begin() || I->end() > Parent.end())
107107
continue;
108108
Ancestors.emplace_back(Parent.begin(), I->end() - Parent.begin());
109109
}

0 commit comments

Comments
 (0)