================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to