File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3601,7 +3601,7 @@ bool ClangASTContext::IsDefined(lldb::opaque_compiler_type_t type) {
3601
3601
}
3602
3602
3603
3603
bool ClangASTContext::IsObjCClassType (const CompilerType &type) {
3604
- if (type) {
3604
+ if (ClangUtil::IsClangType ( type) ) {
3605
3605
clang::QualType qual_type (ClangUtil::GetCanonicalQualType (type));
3606
3606
3607
3607
const clang::ObjCObjectPointerType *obj_pointer_type =
@@ -3886,7 +3886,7 @@ bool ClangASTContext::IsBeingDefined(lldb::opaque_compiler_type_t type) {
3886
3886
3887
3887
bool ClangASTContext::IsObjCObjectPointerType (const CompilerType &type,
3888
3888
CompilerType *class_type_ptr) {
3889
- if (!type)
3889
+ if (!ClangUtil::IsClangType ( type) )
3890
3890
return false ;
3891
3891
3892
3892
clang::QualType qual_type (ClangUtil::GetCanonicalQualType (type));
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ using namespace clang;
15
15
using namespace lldb_private ;
16
16
17
17
bool ClangUtil::IsClangType (const CompilerType &ct) {
18
+ // Invalid types are never Clang types.
19
+ if (!ct)
20
+ return false ;
21
+
18
22
if (llvm::dyn_cast_or_null<ClangASTContext>(ct.GetTypeSystem ()) == nullptr )
19
23
return false ;
20
24
You can’t perform that action at this time.
0 commit comments