[clang][sema] instantiateOMPDeclareVariantAttr - merge repeated VariantFuncRef.get() calls. NFCI.

Fixes scan-build warning about dead initialization
This commit is contained in:
Simon Pilgrim 2021-10-14 12:51:23 +01:00
parent 0ce3c7111e
commit b577126d62
1 changed files with 2 additions and 2 deletions

View File

@ -436,11 +436,11 @@ static void instantiateOMPDeclareVariantAttr(
return;
Expr *E = VariantFuncRef.get();
// Check function/variant ref for `omp declare variant` but not for `omp
// begin declare variant` (which use implicit attributes).
Optional<std::pair<FunctionDecl *, Expr *>> DeclVarData =
S.checkOpenMPDeclareVariantFunction(S.ConvertDeclToDeclGroup(New),
VariantFuncRef.get(), TI,
S.checkOpenMPDeclareVariantFunction(S.ConvertDeclToDeclGroup(New), E, TI,
Attr.getRange());
if (!DeclVarData)