gribozavr added inline comments.
Comment at: clang/include/clang/AST/ASTContext.h:728
- class RawCommentAndCacheFlags {
+ class CommentAndOrigin {
public:
`RawCommentAndOrigin`?
Comment at: clang/include/clang/AST/ASTContext.h:751
- /
jkorous updated this revision to Diff 194609.
jkorous added a comment.
rename RawCommentAndCacheFlags -> CommentAndOrigin
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60432/new/
https://reviews.llvm.org/D60432
Files:
clang/include/clang/AST/ASTContext.h
clang/lib/AST/ASTContext.cp
jkorous updated this revision to Diff 194604.
jkorous added a comment.
Second attempt on reducing the cache size and number of operations.
I try in this order
1. cache lookup for the specific provided declaration
2. try to find comment attached to the specific provided declaration without
using
jkorous marked an inline comment as done.
jkorous added inline comments.
Comment at: clang/lib/AST/ASTContext.cpp:372
D = adjustDeclToTemplate(D);
+ const Decl* CanonicalDecl = D->getCanonicalDecl();
gribozavr wrote:
> jkorous wrote:
> > arphaman wrote:
> >
gribozavr added inline comments.
Comment at: clang/include/clang/AST/ASTContext.h:756
/// lazily.
mutable llvm::DenseMap RedeclComments;
The name of this variable (and `RawCommentAndCacheFlags`) don't make sense
after the change.
Comme
jkorous marked an inline comment as done.
jkorous added inline comments.
Comment at: clang/lib/AST/ASTContext.cpp:372
D = adjustDeclToTemplate(D);
+ const Decl* CanonicalDecl = D->getCanonicalDecl();
arphaman wrote:
> Why are we now checking for the canonic
arphaman added inline comments.
Comment at: clang/lib/AST/ASTContext.cpp:372
D = adjustDeclToTemplate(D);
+ const Decl* CanonicalDecl = D->getCanonicalDecl();
Why are we now checking for the canonical declaration instead of `D` as before?
Repository:
rC
jkorous created this revision.
jkorous added reviewers: gribozavr, arphaman, dexonsmith.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
- I assume we can cache comments for canonical declarations only, not for every
redeclaration.
- Caching that we didn't find comments see