aprantl added a comment.

Just out of curiosity:

  namespace A {
  namespace B {
  namespace C {
  struct Bar {};
  }
  }
  }
  
  namespace B {
  namespace C {
  struct Foo {};
  }
  }

Does this work?

  (lldb) expr C::Foo f



================
Comment at: lldb/include/lldb/Symbol/SymbolFile.h:333
     return CompilerDeclContext();
   }
 
----------------
This looks like a great opportunity to add a Doxygen comment in the base class!


================
Comment at: lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp:704
+    found_namespace_decl = symbol_file->FindNamespace(
+        name, namespace_decl, /* only root namespaces */ true);
 
----------------
Maybe comment why?


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2337
+    return !only_root_namespaces ||
+           die.GetParent().Tag() == dwarf::DW_TAG_compile_unit;
 
----------------
I find this condition with its double negative really hard to understand. Would 
it be easier to read as
```
if (!decl_ctx.IsValid()) {
    if (only_root_namespaces)
      return die.GetParent().Tag() == dwarf::DW_TAG_compile_unit;
   return true;
}
```
?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147436/new/

https://reviews.llvm.org/D147436

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to