kastiglione added inline comments.

================
Comment at: lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp:70
 
+static void consumeNamespace(llvm::StringRef &name) {
+  // Delete past an inline namespace, if any: __[a-zA-Z0-9_]+::
----------------
JDevlieghere wrote:
> rupprecht wrote:
> > nit: this consumes just the inline namespace, so I think 
> > `consumeInlineNamespace` might be a better name. I don't feel that strongly 
> > though so I'll leave it up to you.
> Rather than modifying the passed-in string, would it make sense to return a 
> `llvm::StringRef`? 
@JDevlieghere My answer is twofold: It follows the  "consume" APIs on 
StringRef. And I prefer to avoid find expressions where you assign to a var 
being used on the right side:

```
someVar = someVar.method(...)
```

If you'd like me to change it, I will.


================
Comment at: lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp:70
 
+static void consumeNamespace(llvm::StringRef &name) {
+  // Delete past an inline namespace, if any: __[a-zA-Z0-9_]+::
----------------
kastiglione wrote:
> JDevlieghere wrote:
> > rupprecht wrote:
> > > nit: this consumes just the inline namespace, so I think 
> > > `consumeInlineNamespace` might be a better name. I don't feel that 
> > > strongly though so I'll leave it up to you.
> > Rather than modifying the passed-in string, would it make sense to return a 
> > `llvm::StringRef`? 
> @JDevlieghere My answer is twofold: It follows the  "consume" APIs on 
> StringRef. And I prefer to avoid find expressions where you assign to a var 
> being used on the right side:
> 
> ```
> someVar = someVar.method(...)
> ```
> 
> If you'd like me to change it, I will.
@rupprecht I agree, `consumeInlineNamespace` it is.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133259

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

Reply via email to