[Lldb-commits] [PATCH] D74607: [lldb][NFC] Make all CompilerDeclContext parameters references instead of pointers
Shafik Yaghmour via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 14 10:48:53 PST 2020
shafik accepted this revision.
shafik added a comment.
This is a great change, it makes the code more consistent. LGTM besides the few comments I made.
================
Comment at: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:1133
- if (parent_decl_ctx && GetDeclContextContainingUID(
- result->getSymIndexId()) != *parent_decl_ctx)
+ if (GetDeclContextContainingUID(result->getSymIndexId()) != parent_decl_ctx)
continue;
----------------
`!parent_decl_ctx.IsValid() && GetDeclContextContainingUID(result->getSymIndexId()) != parent_decl_ctx` seems like a more accurate replacement especially if `GetDeclContextContainingUID` can also return an invalid result, I think.
================
Comment at: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:1326
- if (parent_decl_ctx &&
- GetDeclContextContainingUID(id) != *parent_decl_ctx)
+ if (GetDeclContextContainingUID(id) != parent_decl_ctx)
continue;
----------------
Same comment as above.
================
Comment at: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:1549
- if (parent_decl_ctx && GetDeclContextContainingUID(
- result->getSymIndexId()) != *parent_decl_ctx)
+ if (GetDeclContextContainingUID(result->getSymIndexId()) != parent_decl_ctx)
continue;
----------------
same here.
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74607/new/
https://reviews.llvm.org/D74607
More information about the lldb-commits
mailing list