[clang] f17a1d8 - [OPENMP]Use cast instead dyn_cast, NFC.
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 11:20:39 PST 2019
Author: Alexey Bataev
Date: 2019-12-02T14:16:52-05:00
New Revision: f17a1d8b283d227dcbc88caf94acf55abc91c1f9
URL: https://github.com/llvm/llvm-project/commit/f17a1d8b283d227dcbc88caf94acf55abc91c1f9
DIFF: https://github.com/llvm/llvm-project/commit/f17a1d8b283d227dcbc88caf94acf55abc91c1f9.diff
LOG: [OPENMP]Use cast instead dyn_cast, NFC.
Here the expression is always a DeclRefExpr, no need to use dyn_cast.
Added:
Modified:
clang/lib/Sema/SemaOpenMP.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp
index 2773efcf3dae..50d9ab974dd4 100644
--- a/clang/lib/Sema/SemaOpenMP.cpp
+++ b/clang/lib/Sema/SemaOpenMP.cpp
@@ -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());
More information about the cfe-commits
mailing list