This is an archive of the discontinued LLVM Phabricator instance.

[AST] Enhance comment accessing interface. (NFC)
Needs ReviewPublic

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

Details

Reviewers
rsmith
Summary

Previously, these methods were available for looking up comments:

  1. getCommentForDecl: returns a FullComment attached to a decl, or any of its redecls, or any of its bases.
  2. getRawCommentForAnyRedecl: returns a RawComment attached to a decl, or any of its redecls.
  3. getLocalCommentForDeclUncached: returns a FullComment attached to a decl, but also doesn't update the internal cache.

This change reorganizes into these methods:

  1. getRawCommentForDecl: returns a RawComment attached to a decl (and nowhere else).
  2. getRawCommentForAnyRedecl: as before.
  3. getParsedCommentForAnyRedecl: previously called getCommentForDecl.
  4. getParsedCommentForDeclUncached: previously getLocalCommentFor....

Diff Detail

Repository
rC Clang