This is an archive of the discontinued LLVM Phabricator instance.

[AST] Factor out RawComment lookup and caching. (NFC)
Needs ReviewPublic

Authored by dlj on Mar 5 2018, 3:37 PM.

Details

Reviewers
rsmith
Summary

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.

Diff Detail

Repository
rC Clang

Event Timeline

dlj created this revision.Mar 5 2018, 3:37 PM
dlj edited the summary of this revision. (Show Details)Mar 5 2018, 3:38 PM
bruno added a subscriber: bruno.Mar 23 2018, 5:06 PM