[OPENMP]Use cast instead dyn_cast, NFC.

Here the expression is always a DeclRefExpr, no need to use dyn_cast.
This commit is contained in:
Alexey Bataev 2019-12-02 14:15:38 -05:00
parent 478541a6da
commit f17a1d8b28
1 changed files with 1 additions and 1 deletions

View File

@ -5445,7 +5445,7 @@ void Sema::markOpenMPDeclareVariantFuncsReferenced(SourceLocation Loc,
Func->specific_attrs<OMPDeclareVariantAttr>()) {
// TODO: add checks for active OpenMP context where possible.
Expr *VariantRef = A->getVariantFuncRef();
auto *DRE = dyn_cast<DeclRefExpr>(VariantRef->IgnoreParenImpCasts());
auto *DRE = cast<DeclRefExpr>(VariantRef->IgnoreParenImpCasts());
auto *F = cast<FunctionDecl>(DRE->getDecl());
if (!F->isDefined() && F->isTemplateInstantiation())
InstantiateFunctionDefinition(Loc, F->getFirstDecl());