[Lldb-commits] [PATCH] D53749: [PDB] Fix `SymbolFilePDBTests` after r345313

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 26 02:18:34 PDT 2018


Ahh, I meant to remind you, because I noticed this when I was looking
through the SymbolFilePDB code recently.  I think the LLVM guideline is not
to use so much auto.  The generally accepted rule is that we can use for
the result of make_shared, make_unique, and result of iterator types, but
otherwise we prefer to explicitly spell the types out.  You don't have to
go and submit another patch on top of this one to fix it again, it's just
something to keep in mind.

That said, thanks for fixing this for me.  Sorry for the break.

On Fri, Oct 26, 2018 at 2:11 AM Aleksandr Urakov via Phabricator <
reviews at reviews.llvm.org> wrote:

> aleksandr.urakov created this revision.
> aleksandr.urakov added reviewers: zturner, stella.stamenova.
> aleksandr.urakov added a project: LLDB.
> Herald added a subscriber: lldb-commits.
>
> This one fixes tests compilation preserving the type of the `scope`
> parameter.
>
>
> Repository:
>   rLLDB LLDB
>
> https://reviews.llvm.org/D53749
>
> Files:
>   unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
>
>
> Index: unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
> ===================================================================
> --- unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
> +++ unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
> @@ -270,7 +270,7 @@
>    EXPECT_EQ(2u, cus);
>
>    SymbolContextList sc_list;
> -  uint32_t scope = lldb::eSymbolContextCompUnit |
> lldb::eSymbolContextLineEntry;
> +  auto scope = lldb::eSymbolContextCompUnit |
> lldb::eSymbolContextLineEntry;
>
>    uint32_t count =
>        symfile->ResolveSymbolContext(source_file, 0, true, scope, sc_list);
> @@ -319,7 +319,7 @@
>    EXPECT_EQ(2u, cus);
>
>    SymbolContextList sc_list;
> -  uint32_t scope = lldb::eSymbolContextCompUnit |
> lldb::eSymbolContextLineEntry;
> +  auto scope = lldb::eSymbolContextCompUnit |
> lldb::eSymbolContextLineEntry;
>
>    // First test with line 7, and verify that only line 7 entries are
> added.
>    uint32_t count =
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181026/65b117d6/attachment.html>


More information about the lldb-commits mailing list