[Lldb-commits] [PATCH] D113533: [LLDB] Remove access check of decl in TypeSystemClang.cpp

Zequan Wu via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 9 18:01:19 PST 2021


zequanwu created this revision.
zequanwu added reviewers: labath, shafik.
zequanwu requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

As the deleted comment says, we don't care about the access specifier.
I also encountered a crash at here (called from https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp#L2141) when fixing a bug on SymbolFileNativePDB.cpp.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113533

Files:
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp


Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
===================================================================
--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -89,11 +89,6 @@
 namespace {
 static void VerifyDecl(clang::Decl *decl) {
   assert(decl && "VerifyDecl called with nullptr?");
-#ifndef NDEBUG
-  // We don't care about the actual access value here but only want to trigger
-  // that Clang calls its internal Decl::AccessDeclContextSanity check.
-  decl->getAccess();
-#endif
 }
 
 static inline bool


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113533.386025.patch
Type: text/x-patch
Size: 609 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211110/e3c97470/attachment.bin>


More information about the lldb-commits mailing list