[PATCH] D44123: [AST] Enhance comment accessing interface. (NFC)

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


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

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....


Repository:
  rC Clang

https://reviews.llvm.org/D44123

Files:
  include/clang/AST/ASTContext.h
  lib/AST/ASTContext.cpp
  lib/AST/ASTDumper.cpp
  lib/Sema/SemaDecl.cpp
  tools/libclang/CXComment.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44123.137098.patch
Type: text/x-patch
Size: 8195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180305/5b18ecc4/attachment-0001.bin>


More information about the cfe-commits mailing list