diff --git a/clang/lib/AST/ByteCode/Descriptor.cpp b/clang/lib/AST/ByteCode/Descriptor.cpp index 437b9f1bab2d6..1c16c2022dd02 100644 --- a/clang/lib/AST/ByteCode/Descriptor.cpp +++ b/clang/lib/AST/ByteCode/Descriptor.cpp @@ -428,17 +428,17 @@ QualType Descriptor::getElemQualType() const { } SourceLocation Descriptor::getLocation() const { - if (auto *D = Source.dyn_cast()) + if (auto *D = dyn_cast(Source)) return D->getLocation(); - if (auto *E = Source.dyn_cast()) + if (auto *E = dyn_cast(Source)) return E->getExprLoc(); llvm_unreachable("Invalid descriptor type"); } SourceInfo Descriptor::getLoc() const { - if (const auto *D = Source.dyn_cast()) + if (const auto *D = dyn_cast(Source)) return SourceInfo(D); - if (const auto *E = Source.dyn_cast()) + if (const auto *E = dyn_cast(Source)) return SourceInfo(E); llvm_unreachable("Invalid descriptor type"); }