================
@@ -1237,7 +1237,8 @@ class MatchASTVisitor : public 
RecursiveASTVisitor<MatchASTVisitor>,
           // Make sure we do not visit the same node twice.
           // Otherwise, we'll visit the common ancestors as often as there
           // are splits on the way down.
-          if (Visited.insert(Parent.getMemoizationData()).second)
+          if (Parent.getMemoizationData() == nullptr ||
+              Visited.insert(Parent.getMemoizationData()).second)
----------------
PiotrZSL wrote:

Note: Avoid double calls to getMemoizationData (assign to some local variable 
and use or write), but still call to getMemoizationData should be in theory 
optimized.

https://github.com/llvm/llvm-project/pull/118511
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to