[clang] [clang-installapi] Remove unnecessary copy (PR #86808)

via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 27 08:11:13 PDT 2024


================
@@ -255,7 +255,7 @@ bool InstallAPIVisitor::VisitFunctionDecl(const FunctionDecl *D) {
       return true;
 
     // Skip methods in CXX RecordDecls.
-    for (auto P : D->getASTContext().getParents(*M)) {
+    for (const auto &P : D->getASTContext().getParents(*M)) {
----------------
smanna12 wrote:

Thanks you @cyndyishida for the reviews. I have updated patch to be explicit about the type and the title. 

https://github.com/llvm/llvm-project/pull/86808


More information about the cfe-commits mailing list