Skip to content

Commit c18bb59

Browse files
tbaederrlravenclaw
authored andcommitted
[clang][Interp][NFC] Use const pointers in Descriptor::getType()
1 parent 5890e7a commit c18bb59

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/AST/Interp/Descriptor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,11 @@ Descriptor::Descriptor(const DeclTy &D)
355355
}
356356

357357
QualType Descriptor::getType() const {
358-
if (auto *E = asExpr())
358+
if (const auto *E = asExpr())
359359
return E->getType();
360-
if (auto *D = asValueDecl())
360+
if (const auto *D = asValueDecl())
361361
return D->getType();
362-
if (auto *T = dyn_cast<TypeDecl>(asDecl()))
362+
if (const auto *T = dyn_cast<TypeDecl>(asDecl()))
363363
return QualType(T->getTypeForDecl(), 0);
364364
llvm_unreachable("Invalid descriptor type");
365365
}

0 commit comments

Comments
 (0)