[lldb] Added assert to VerifyDecl

We could VerifyDecl sometimes with a nullptr. It would be nice if we
could get an actual assert here instead of triggering UB.

llvm-svn: 365247
This commit is contained in:
Raphael Isemann 2019-07-05 21:32:39 +00:00
parent b0fc4d470f
commit 5ccdabf25d

View File

@ -9,4 +9,7 @@
#include "lldb/Symbol/VerifyDecl.h"
#include "clang/AST/DeclBase.h"
void lldb_private::VerifyDecl(clang::Decl *decl) { decl->getAccess(); }
void lldb_private::VerifyDecl(clang::Decl *decl) {
assert(decl && "VerifyDecl called with nullptr?");
decl->getAccess();
}