[PATCH] D46940: [ASTImporter] make sure that ACtx::getParents still works
Rafael Stahl via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 11 04:08:03 PDT 2018
r.stahl added a comment.
@rsmith Yes, this should generally better be handled outside of the ASTContext. That would be out of scope of this patch. Is it fine to proceed with this one for now?
For my usage scenario it actually is convenient this way. In my checker I use getParents, but if I would replace this with some tooling functions I wouldn't know when the maps become invalid since the invalidation happens on a lower level within the analyzer. I'd have to search the parents on every callback invocation which would be a massive performance issue.
Once an external parent utility exists, we would still need some invalidation notification. If anyone uses the analyzer and parent maps he'd want to know when they become invalid for performance reasons. Ideally only when necessary like the invalidateParents calls in this patch.
https://reviews.llvm.org/D46940
More information about the cfe-commits
mailing list