diff options
author | Eric Liu <ioeric@google.com> | 2018-01-09 20:26:49 +0000 |
---|---|---|
committer | Eric Liu <ioeric@google.com> | 2018-01-09 20:26:49 +0000 |
commit | 72b3855bf58702b3731d74f8eb24f8c5dfb150d8 (patch) | |
tree | 62c11c7350280c3d46504ea73fce6341c33fe4ef | |
parent | 56cca7437c1a4c7a8f697e97d9f8b98576b7a97e (diff) | |
download | bcm5719-llvm-72b3855bf58702b3731d74f8eb24f8c5dfb150d8.tar.gz bcm5719-llvm-72b3855bf58702b3731d74f8eb24f8c5dfb150d8.zip |
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.
llvm-svn: 322116
-rw-r--r-- | clang-tools-extra/clangd/index/SymbolYAML.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/index/SymbolYAML.cpp b/clang-tools-extra/clangd/index/SymbolYAML.cpp index 295b2207ca0..8a58a6dfb8a 100644 --- a/clang-tools-extra/clangd/index/SymbolYAML.cpp +++ b/clang-tools-extra/clangd/index/SymbolYAML.cpp @@ -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); } }; |