[Lldb-commits] [PATCH] D57475: [Reproducers] Add SBReproducer macros

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 31 10:29:07 PST 2019


JDevlieghere marked an inline comment as done.
JDevlieghere added inline comments.


================
Comment at: source/API/SBBlock.cpp:52-58
+  SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBlock, IsValid);
+  return m_opaque_ptr != NULL;
+}
 
 bool SBBlock::IsInlined() const {
+  SB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBlock, IsInlined);
+
----------------
labath wrote:
> It looks like some functions have a newline after the macro, and some don't. What's the reason for that?
It depends on whether there was a newline before or not. So

```
foo { bar }
```

will not have the newline, while

```
foo {
bar;
}
```

This happens because we insert the macro at the first loc, before the potentially existing `\n`. Getting this right for all cases and coding styles is tricky, so the tool doesn't try to get it right. It just inserts it there and relies on clang-format to fix the formatting. 


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D57475





More information about the lldb-commits mailing list