This was added by
453e02ca0903c9f65529d21c513925ab0fdea1e1.Use
isa instead since we don't use the result.
Fixes:
<..>SemaOpenMP.cpp:23149:13: warning: unused variable ‘TargetVarDecl’ [-Wunused-variable]
23149 | if (auto *TargetVarDecl = dyn_cast_or_null<VarDecl>(TargetDecl))
| ^~~~~~~~~~~~~
Which came up when building with GCC 9.
/// variables with static storage duration in declare target directive.
void Sema::ActOnOpenMPDeclareTargetInitializer(Decl *TargetDecl) {
GlobalDeclRefChecker Checker;
- if (auto *TargetVarDecl = dyn_cast_or_null<VarDecl>(TargetDecl))
+ if (isa<VarDecl>(TargetDecl))
Checker.declareTargetInitializer(TargetDecl);
}