Skip to content

Commit 5bc035f

Browse files
committed
Merge commit 'refs/am/changes/28ebf4b0c10d381b10776c1b878d7c408a61c61b_swift/master-next' into HEAD
Conflicts: lldb/source/Symbol/ClangASTContext.cpp
2 parents 86b2eda + 28ebf4b commit 5bc035f

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
@@ -3614,7 +3614,7 @@ bool ClangASTContext::IsDefined(lldb::opaque_compiler_type_t type) {
36143614
}
36153615

36163616
bool ClangASTContext::IsObjCClassType(const CompilerType &type) {
3617-
if (type && ClangUtil::IsClangType(type)) {
3617+
if (ClangUtil::IsClangType(type)) {
36183618
clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
36193619

36203620
const clang::ObjCObjectPointerType *obj_pointer_type =
@@ -3899,7 +3899,7 @@ bool ClangASTContext::IsBeingDefined(lldb::opaque_compiler_type_t type) {
38993899

39003900
bool ClangASTContext::IsObjCObjectPointerType(const CompilerType &type,
39013901
CompilerType *class_type_ptr) {
3902-
if (!type || !ClangUtil::IsClangType(type))
3902+
if (!ClangUtil::IsClangType(type))
39033903
return false;
39043904

39053905
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)