[Lldb-commits] [PATCH] D57475: [Reproducers] Add SBReproducer macros
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 31 11:04:31 PST 2019
labath 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);
+
----------------
JDevlieghere wrote:
> 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.
Aha. That's funny.
How about changing to tool to always add *two* newlines after the macro invocation? clang-format removes multiple empty lines, so if this results in creates them, clang-format should always coalesce into one.
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