@@ -367,7 +367,7 @@ Map::const_iterator parallel_search(const Map &container,
367367
368368decltype (exprs_)::const_iterator search (const clang::Expr *expr) {
369369 auto qualified_name = ToString (expr);
370- auto result = parallel_search (exprs_, [&](std::string tpl) {
370+ auto result = parallel_search (exprs_, [&](const std::string & tpl) {
371371 return matchTemplate (tpl, qualified_name);
372372 });
373373 llvm::errs () << " search expr " << qualified_name << " , result:\n " ;
@@ -382,7 +382,7 @@ decltype(exprs_)::const_iterator search(const clang::Expr *expr) {
382382decltype (types_)::const_iterator search (clang::QualType qual_type) {
383383 auto type = ToString (qual_type);
384384 auto result = parallel_search (
385- types_, [&](std::string tpl) { return matchTemplate (tpl, type); });
385+ types_, [&](const std::string & tpl) { return matchTemplate (tpl, type); });
386386 llvm::errs () << " search type " << type << " , result: "
387387 << ((result == types_.end ()) ? " None"
388388 : result->second .type_info .type )
@@ -531,8 +531,9 @@ clang::QualType normalizeQualType(clang::QualType qual_type) {
531531}
532532
533533std::string mapTypeStringRecursive (const std::string &cpp_type) {
534- auto rule = parallel_search (
535- types_, [&](std::string tpl) { return matchTemplate (tpl, cpp_type); });
534+ auto rule = parallel_search (types_, [&](const std::string &tpl) {
535+ return matchTemplate (tpl, cpp_type);
536+ });
536537 if (rule == types_.end ()) {
537538 llvm::errs () << " cpp_type: " << cpp_type << ' \n ' ;
538539 assert (0 && " Type is not present in types_" );
0 commit comments