Skip to content

Commit c7615e0

Browse files
committed
fixed build error
1 parent 26c0a34 commit c7615e0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

clang-tools-extra/clang-tidy/bugprone/InvalidEnumDefaultInitializationCheck.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@ class FindEnumMember : public TypeVisitor<FindEnumMember, bool> {
6161
return Visit(DesT);
6262
return false;
6363
}
64-
bool VisitArrayType(const ArrayType *T) { return Visit(T->getElementType()); }
64+
bool VisitArrayType(const ArrayType *T) {
65+
return Visit(T->getElementType().getTypePtr());
66+
}
6567
bool VisitConstantArrayType(const ConstantArrayType *T) {
66-
return Visit(T->getElementType());
68+
return Visit(T->getElementType().getTypePtr());
6769
}
6870
bool VisitEnumType(const EnumType *T) {
6971
if (isCompleteAndHasNoZeroValue(T->getDecl())) {
@@ -77,7 +79,7 @@ class FindEnumMember : public TypeVisitor<FindEnumMember, bool> {
7779
if (RD->isUnion())
7880
return false;
7981
auto VisitField = [this](const FieldDecl *F) {
80-
return Visit(F->getType());
82+
return Visit(F->getType().getTypePtr());
8183
};
8284
return llvm::any_of(RD->fields(), VisitField);
8385
}

0 commit comments

Comments
 (0)