shafik added a comment.

A bunch of small comments but a few more serious ones as well.



================
Comment at: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:1394
+  func_tmpl_decl->setDeclName(func_decl->getDeclName());
+  func_tmpl_decl->init(func_decl, template_param_list);
   SetOwningModule(func_tmpl_decl, owning_module);
----------------
It does not look like `func_decl->getLocation()` get used at all.


================
Comment at: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:1526
+                                                          ast, 0);
+  class_template_specialization_decl->setTagKind((TagDecl::TagKind)kind);
+  class_template_specialization_decl->setDeclContext(decl_ctx);
----------------
`static_cast<TagDecl::TagKind>(kind)`


================
Comment at: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:1836
+      var_decl->setDeclName(&getASTContext().Idents.getOwn(name));
+    var_decl->setType(type);
     SetOwningModule(var_decl, owning_module);
----------------
I guess `clang::SC_None` is the default?


================
Comment at: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:7268
+    cxx_ctor_decl = clang::CXXConstructorDecl::CreateDeserialized(
+        getASTContext(), 0, is_explicit ? 1 << 1 : 0);
+    cxx_ctor_decl->setDeclContext(cxx_record_decl);
----------------
Where does `1 << 1` come from? What does it mean? 


================
Comment at: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:7999
+  enumerator_decl->setDeclContext(enutype->getDecl());
+  if (name)
+    enumerator_decl->setDeclName(&getASTContext().Idents.get(name));
----------------
Everywhere else we do:

```
if (name && name[0])
```

Why not for this case?


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

https://reviews.llvm.org/D75715



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

Reply via email to