================
@@ -68,32 +70,57 @@ static std::string getDREAncestorString(const DeclRefExpr 
*DRE,
 
     if (StParents.size() > 1)
       return "unavailable due to multiple parents";
-    if (StParents.size() == 0)
+    if (StParents.empty())
       break;
     St = StParents.begin()->get<Stmt>();
     if (St)
       SS << " ==> ";
   } while (St);
   return SS.str();
 }
+
 } // namespace
 #endif /* NDEBUG */
 
-namespace clang::ast_matchers {
+namespace {
+// Using a custom matcher instead of ASTMatchers to achieve better performance.
----------------
ziqingluo-90 wrote:

nvm, I realized that `FastMatcher` is mainly an adapter to our interfaces. 

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

Reply via email to