From bdadbabf1880c3f15d50bc93e4f1f4d664e80216 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Wed, 31 Mar 2021 14:52:01 -0700 Subject: [PATCH] Adjust GetAttrs() usage in ProfileFunc::PreExpr() to const-reference --- src/script_opt/ProfileFunc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script_opt/ProfileFunc.cc b/src/script_opt/ProfileFunc.cc index 4ae12a2583..f629c4c20d 100644 --- a/src/script_opt/ProfileFunc.cc +++ b/src/script_opt/ProfileFunc.cc @@ -343,7 +343,7 @@ TraversalCode ProfileFunc::PreExpr(const Expr* e) case EXPR_SET_CONSTRUCTOR: { auto sc = static_cast(e); - auto attrs = sc->GetAttrs(); + const auto& attrs = sc->GetAttrs(); if ( attrs ) constructor_attrs.insert(attrs.get()); @@ -353,7 +353,7 @@ TraversalCode ProfileFunc::PreExpr(const Expr* e) case EXPR_TABLE_CONSTRUCTOR: { auto tc = static_cast(e); - auto attrs = tc->GetAttrs(); + const auto& attrs = tc->GetAttrs(); if ( attrs ) constructor_attrs.insert(attrs.get());