[clangd] If an undocumented definition exists, don't accept documentation from other forward decls.

Summary:
This fixes cases like:
  foo.h
    class Undocumented{}
  bar.h
    // break an include cycle. we should refactor this!
    class Undocumented;
Where the comment doesn't describe the class.

Note that a forward decl that is *visible to the definition* will still have
its doc comment used, by SymbolCollector: Merge isn't involved here.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68467

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@373892 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed