Skip to content

Commit 28ebf4b

Browse files
author
git apple-llvm automerger
committed
Merge commit '79b3cce7f143' from llvm.org/master into apple/master
2 parents 4853d41 + 79b3cce commit 28ebf4b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lldb/source/Symbol/ClangASTContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3601,7 +3601,7 @@ bool ClangASTContext::IsDefined(lldb::opaque_compiler_type_t type) {
36013601
}
36023602

36033603
bool ClangASTContext::IsObjCClassType(const CompilerType &type) {
3604-
if (type) {
3604+
if (ClangUtil::IsClangType(type)) {
36053605
clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
36063606

36073607
const clang::ObjCObjectPointerType *obj_pointer_type =
@@ -3886,7 +3886,7 @@ bool ClangASTContext::IsBeingDefined(lldb::opaque_compiler_type_t type) {
38863886

38873887
bool ClangASTContext::IsObjCObjectPointerType(const CompilerType &type,
38883888
CompilerType *class_type_ptr) {
3889-
if (!type)
3889+
if (!ClangUtil::IsClangType(type))
38903890
return false;
38913891

38923892
clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));

lldb/source/Symbol/ClangUtil.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ using namespace clang;
1515
using namespace lldb_private;
1616

1717
bool ClangUtil::IsClangType(const CompilerType &ct) {
18+
// Invalid types are never Clang types.
19+
if (!ct)
20+
return false;
21+
1822
if (llvm::dyn_cast_or_null<ClangASTContext>(ct.GetTypeSystem()) == nullptr)
1923
return false;
2024

0 commit comments

Comments
 (0)