[PATCH] D44122: [AST] Factor out RawComment lookup and caching. (NFC)

David L. Jones via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 5 15:37:30 PST 2018

dlj created this revision.
dlj added a reviewer: rsmith.
dlj added a project: clang.
Herald added a subscriber: sanjoy.

This changes how RawComments are looked up, so that they can be added to the
cache or updated independently of parsing.

Loosely, the comment cache has two conceptually separate separate layers:

  RedeclComments - maps Decls to RawComments, which may have come from the Decl
  that is the key (a 'local' comment), or one of its redeclarations. The cache
  entry can keep track of whether the comment is local or a redecl.
  ParsedComments - maps Decls to FullComments, which may have come from the Decl
  that is the key, one of its redecls, or one of its bases (a base class, and
  overridden class method, ObjC interface, typedef, etc.).

This patch factors out the logic that maintains the lower RedeclComments portion
of the cache.

  rC Clang



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44122.137097.patch
Type: text/x-patch
Size: 5165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180305/2d1685b0/attachment.bin>

More information about the cfe-commits mailing list