Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions clang/lib/AST/ByteCode/Descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,17 +428,17 @@ QualType Descriptor::getElemQualType() const {
}

SourceLocation Descriptor::getLocation() const {
if (auto *D = Source.dyn_cast<const Decl *>())
if (auto *D = dyn_cast<const Decl *>(Source))
return D->getLocation();
if (auto *E = Source.dyn_cast<const Expr *>())
if (auto *E = dyn_cast<const Expr *>(Source))
return E->getExprLoc();
llvm_unreachable("Invalid descriptor type");
}

SourceInfo Descriptor::getLoc() const {
if (const auto *D = Source.dyn_cast<const Decl *>())
if (const auto *D = dyn_cast<const Decl *>(Source))
return SourceInfo(D);
if (const auto *E = Source.dyn_cast<const Expr *>())
if (const auto *E = dyn_cast<const Expr *>(Source))
return SourceInfo(E);
llvm_unreachable("Invalid descriptor type");
}
Expand Down
Loading