[Lldb-commits] [PATCH] D83199: [lldb/DWARF] Add a utility function for (forceful) completion of types
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 7 02:39:10 PDT 2020
labath marked 3 inline comments as done.
labath added inline comments.
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:1339
+ TypeSystemClang::CompleteTagDeclarationDefinition(type);
+ const auto *td = TypeSystemClang::GetQualType(type.GetOpaqueQualType())
+ .getTypePtr()
----------------
teemperor wrote:
> shafik wrote:
> > This has to be a `TagDecl` so why use `auto`?
> `const TagDecl *td = ClangUtil::GetAsTagDecl(type);`
I think this is a borderline case of "use auto when the type is obvious" policy -- the type name is embedded in the function name, but there's technically no guarantee that it really returns that (it could return an Expected<TagDecl> among other things). OTOH, the name is short enough to just spell it out.
The ClangUtil thingy is cool though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83199/new/
https://reviews.llvm.org/D83199
More information about the lldb-commits
mailing list