diff --git a/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp b/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp --- a/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp +++ b/clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp @@ -45,8 +45,7 @@ } StorageLocation &DataflowAnalysisContext::createStorageLocation(QualType Type) { - if (!Type.isNull() && - (Type->isStructureOrClassType() || Type->isUnionType())) { + if (!Type.isNull() && Type->isRecordType()) { llvm::DenseMap FieldLocs; // During context-sensitive analysis, a struct may be allocated in one // function, but its field accessed in a function lower in the stack than diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp --- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp +++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp @@ -608,7 +608,7 @@ auto &AggregateLoc = *cast(&Loc); const QualType Type = AggregateLoc.getType(); - assert(Type->isStructureOrClassType() || Type->isUnionType()); + assert(Type->isRecordType()); for (const FieldDecl *Field : DACtx->getReferencedFields(Type)) { assert(Field != nullptr); @@ -708,7 +708,7 @@ return &create(PointeeLoc); } - if (Type->isStructureOrClassType() || Type->isUnionType()) { + if (Type->isRecordType()) { CreatedValuesCount++; llvm::DenseMap FieldValues; for (const FieldDecl *Field : DACtx->getReferencedFields(Type)) {