Skip to content

Commit e442c67

Browse files
committed
[clangd] Fix C++20 build failure
1 parent ccd2c3e commit e442c67

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang-tools-extra/clangd/SemanticSelection.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ class PragmaRegionFinder {
222222
}
223223

224224
void operator()(const DirectiveTree::Conditional &C) {
225+
// C.Branches needs to see the DirectiveTree definition, otherwise build
226+
// fails in C++20.
227+
[[maybe_unused]] DirectiveTree Dummy;
225228
for (const auto &[_, SubTree] : C.Branches)
226229
walk(SubTree);
227230
}

0 commit comments

Comments
 (0)