[PATCH] Do not store duplicate parents when memoization data is available.
Manuel Klimek
klimek at google.com
Fri Jun 13 00:59:10 PDT 2014
lg
================
Comment at: lib/AST/ASTContext.cpp:8183
@@ +8182,3 @@
+ // For example when we visit all subexpressions of template
+ // instantiations; this is suboptimal, bug benign: the only way to
+ // visit those is with hasAncestor / hasParent, and those do not create
----------------
Please fix my "bug benign" typo :D
================
Comment at: lib/AST/ASTContext.cpp:8209-8212
@@ +8208,6 @@
+ ParentMemo &&
+ std::any_of(Vector->begin(), Vector->end(),
+ [=](const ast_type_traits::DynTypedNode &Node) {
+ return Node.getMemoizationData() == ParentMemo;
+ });
+ if (!Found)
----------------
Any reason not to use std::find?
http://reviews.llvm.org/D4124
More information about the cfe-commits
mailing list