[clangd] Fix C++20 build failure

This commit is contained in:
Haojian Wu
2025-11-24 17:22:04 +01:00
parent ccd2c3e320
commit e442c67a2c

View File

@@ -222,6 +222,9 @@ public:
}
void operator()(const DirectiveTree::Conditional &C) {
// C.Branches needs to see the DirectiveTree definition, otherwise build
// fails in C++20.
[[maybe_unused]] DirectiveTree Dummy;
for (const auto &[_, SubTree] : C.Branches)
walk(SubTree);
}