Author: Haojian Wu Date: 2025-11-24T17:22:04+01:00 New Revision: e442c67a2c98a3e1e3bfcf90aaa82ba70fb92760
URL: https://github.com/llvm/llvm-project/commit/e442c67a2c98a3e1e3bfcf90aaa82ba70fb92760 DIFF: https://github.com/llvm/llvm-project/commit/e442c67a2c98a3e1e3bfcf90aaa82ba70fb92760.diff LOG: [clangd] Fix C++20 build failure Added: Modified: clang-tools-extra/clangd/SemanticSelection.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/SemanticSelection.cpp b/clang-tools-extra/clangd/SemanticSelection.cpp index c2dad53bcec6b..dc61a40d733f8 100644 --- a/clang-tools-extra/clangd/SemanticSelection.cpp +++ b/clang-tools-extra/clangd/SemanticSelection.cpp @@ -222,6 +222,9 @@ class PragmaRegionFinder { } 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); } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
