Files
clang-p2996/lldb/source/Symbol/VerifyDecl.cpp
Raphael Isemann 5ccdabf25d [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
2019-07-05 21:32:39 +00:00

16 lines
566 B
C++

//===-- VerifyDecl.cpp ------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "lldb/Symbol/VerifyDecl.h"
#include "clang/AST/DeclBase.h"
void lldb_private::VerifyDecl(clang::Decl *decl) {
assert(decl && "VerifyDecl called with nullptr?");
decl->getAccess();
}