Skip to content

Commit b577126

Browse files
committed
[clang][sema] instantiateOMPDeclareVariantAttr - merge repeated VariantFuncRef.get() calls. NFCI.
Fixes scan-build warning about dead initialization
1 parent 0ce3c71 commit b577126

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,11 @@ static void instantiateOMPDeclareVariantAttr(
436436
return;
437437

438438
Expr *E = VariantFuncRef.get();
439+
439440
// Check function/variant ref for `omp declare variant` but not for `omp
440441
// begin declare variant` (which use implicit attributes).
441442
Optional<std::pair<FunctionDecl *, Expr *>> DeclVarData =
442-
S.checkOpenMPDeclareVariantFunction(S.ConvertDeclToDeclGroup(New),
443-
VariantFuncRef.get(), TI,
443+
S.checkOpenMPDeclareVariantFunction(S.ConvertDeclToDeclGroup(New), E, TI,
444444
Attr.getRange());
445445

446446
if (!DeclVarData)

0 commit comments

Comments
 (0)