We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b11e95 commit 3117f18Copy full SHA for 3117f18
clang/lib/AST/Interp/Compiler.cpp
@@ -5281,8 +5281,8 @@ template <class Emitter>
5281
unsigned Compiler<Emitter>::collectBaseOffset(const QualType BaseType,
5282
const QualType DerivedType) {
5283
const auto extractRecordDecl = [](QualType Ty) -> const CXXRecordDecl * {
5284
- if (const auto *PT = dyn_cast<PointerType>(Ty))
5285
- return PT->getPointeeType()->getAsCXXRecordDecl();
+ if (const auto *R = Ty->getPointeeCXXRecordDecl())
+ return R;
5286
return Ty->getAsCXXRecordDecl();
5287
};
5288
const CXXRecordDecl *BaseDecl = extractRecordDecl(BaseType);
0 commit comments