[PATCH] D61103: [clang] Add tryToAttachCommentsToDecls method to ASTContext

Jan Korous via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 16:33:41 PDT 2019


jkorous created this revision.
jkorous added reviewers: gribozavr, arphaman.
Herald added subscribers: cfe-commits, dexonsmith.
Herald added a project: clang.

Loading external comments and sorting them is expensive - mostly due to getDecomposedLoc() begin expensive. For modules with very large number of comments (~100k) this is prohibitively expensive.
In this particular case we are actually not at all interested in getting comments for declarations - just using a side-effect of the implementation which causes documentation comments to be parsed (doxygen) and attached to relevant declarations.

The FIXME in tests is fixed now.


Repository:
  rC Clang

https://reviews.llvm.org/D61103

Files:
  clang/include/clang/AST/ASTContext.h
  clang/lib/AST/ASTContext.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/test/Sema/warn-documentation.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61103.196550.patch
Type: text/x-patch
Size: 7892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190424/0b34ba4f/attachment.bin>


More information about the cfe-commits mailing list