shafik accepted this revision.
shafik added a comment.

This is a great change, it makes the code more consistent. LGTM besides the few 
comments I made.



================
Comment at: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:1133
 
-    if (parent_decl_ctx && GetDeclContextContainingUID(
-                               result->getSymIndexId()) != *parent_decl_ctx)
+    if (GetDeclContextContainingUID(result->getSymIndexId()) != 
parent_decl_ctx)
       continue;
----------------
 `!parent_decl_ctx.IsValid() && 
GetDeclContextContainingUID(result->getSymIndexId()) != parent_decl_ctx` seems 
like a more accurate replacement  especially if `GetDeclContextContainingUID` 
can also return an invalid result, I think. 


================
Comment at: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:1326
 
-        if (parent_decl_ctx &&
-            GetDeclContextContainingUID(id) != *parent_decl_ctx)
+        if (GetDeclContextContainingUID(id) != parent_decl_ctx)
           continue;
----------------
Same comment as above.


================
Comment at: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp:1549
 
-    if (parent_decl_ctx && GetDeclContextContainingUID(
-                               result->getSymIndexId()) != *parent_decl_ctx)
+    if (GetDeclContextContainingUID(result->getSymIndexId()) != 
parent_decl_ctx)
       continue;
----------------
same here.


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D74607



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

Reply via email to