Author: ioeric Date: Tue Jan 9 12:26:49 2018 New Revision: 322116 URL: http://llvm.org/viewvc/llvm-project?rev=322116&view=rev Log: Try to fix build failure caused by r322097
Avoid mapping during output when Detail is nullptr; otherwise, an empty "Detail" field will be populated in YAML output. Modified: clang-tools-extra/trunk/clangd/index/SymbolYAML.cpp Modified: clang-tools-extra/trunk/clangd/index/SymbolYAML.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/SymbolYAML.cpp?rev=322116&r1=322115&r2=322116&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/index/SymbolYAML.cpp (original) +++ clang-tools-extra/trunk/clangd/index/SymbolYAML.cpp Tue Jan 9 12:26:49 2018 @@ -92,7 +92,8 @@ template <> struct MappingTraits<Symbol> IO.mapOptional("CompletionSnippetInsertText", Sym.CompletionSnippetInsertText); - IO.mapOptional("Detail", Sym.Detail); + if (!IO.outputting() || Sym.Detail) + IO.mapOptional("Detail", Sym.Detail); } }; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits