aprantl added inline comments.

================
Comment at: source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp:248
 
+  if (CallableLookupCache.count(func_to_match))
+    return CallableLookupCache[func_to_match];
----------------
This is performing the lookup twice.
```
auto it = CallableLookupCache.find(func_to_match);
if (it != CallableLookupCache.end)
  return *it;
```


================
Comment at: source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp:272
       if (first_template_parameter.contains("$_") ||
+          first_template_parameter.contains("'lambda'") ||
           (symbol != nullptr &&
----------------
Factor these conditions out into a helper function with a descriptive name 
since it's also used above?


================
Comment at: source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h:91
+
+  OperatorStringToCallableInfoMap CallableLookupCache;
+
----------------
Since this is used in only one place, I would skip the using statement, but 
that's more a personal style preference.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67111/new/

https://reviews.llvm.org/D67111



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to