[Lldb-commits] [lldb] [lldb][TypeSystemClang] Pass ClangASTMetadata around by value (PR #102161)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 6 08:40:29 PDT 2024
================
@@ -219,9 +219,9 @@ void ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Status &err) {
// whatever runtime the debug info says the object pointer belongs to. Do
// that here.
- ClangASTMetadata *metadata =
- TypeSystemClang::DeclContextGetMetaData(decl_context, function_decl);
- if (metadata && metadata->HasObjectPtr()) {
+ if (auto metadata = TypeSystemClang::DeclContextGetMetaData(decl_context,
----------------
JDevlieghere wrote:
Nit: I know everyone has a different opinion on `auto`, but to me it's not obvious from the method name what the return type is, let alone that it's wrapped in an optional.
https://github.com/llvm/llvm-project/pull/102161
More information about the lldb-commits
mailing list