Skip to content

Commit f16a012

Browse files
dougsonosSirraide
andauthored
Update clang/include/clang/AST/Type.h
Co-authored-by: Sirraide <[email protected]>
1 parent 9dc1d86 commit f16a012

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

clang/include/clang/AST/Type.h

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8838,15 +8838,11 @@ void FixedPointValueToString(SmallVectorImpl<char> &Str, llvm::APSInt Val,
88388838
inline FunctionEffectsRef FunctionEffectsRef::get(QualType QT) {
88398839
const Type *TypePtr = QT.getTypePtr();
88408840
while (true) {
8841-
// Note that getPointeeType() seems to successfully navigate some constructs
8842-
// for which isAnyPointerType() returns false (e.g.
8843-
// pointer-to-member-function).
8844-
QualType Pointee = TypePtr->getPointeeType();
8845-
if (Pointee.isNull()) {
8846-
if (TypePtr->isArrayType()) {
8847-
TypePtr = TypePtr->getBaseElementTypeUnsafe();
8848-
continue;
8849-
}
8841+
if (QualType Pointee = TypePtr->getPointeeType())
8842+
TypePtr = Pointee.getTypePtr();
8843+
else if (TypePtr->isArrayType())
8844+
TypePtr = TypePtr->getBaseElementTypeUnsafe();
8845+
else
88508846
break;
88518847
}
88528848
TypePtr = Pointee.getTypePtr();

0 commit comments

Comments
 (0)