forked from OSchip/llvm-project
[clang][sema] instantiateOMPDeclareVariantAttr - merge repeated VariantFuncRef.get() calls. NFCI.
Fixes scan-build warning about dead initialization
This commit is contained in:
parent
0ce3c7111e
commit
b577126d62
|
@ -436,11 +436,11 @@ static void instantiateOMPDeclareVariantAttr(
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Expr *E = VariantFuncRef.get();
|
Expr *E = VariantFuncRef.get();
|
||||||
|
|
||||||
// Check function/variant ref for `omp declare variant` but not for `omp
|
// Check function/variant ref for `omp declare variant` but not for `omp
|
||||||
// begin declare variant` (which use implicit attributes).
|
// begin declare variant` (which use implicit attributes).
|
||||||
Optional<std::pair<FunctionDecl *, Expr *>> DeclVarData =
|
Optional<std::pair<FunctionDecl *, Expr *>> DeclVarData =
|
||||||
S.checkOpenMPDeclareVariantFunction(S.ConvertDeclToDeclGroup(New),
|
S.checkOpenMPDeclareVariantFunction(S.ConvertDeclToDeclGroup(New), E, TI,
|
||||||
VariantFuncRef.get(), TI,
|
|
||||||
Attr.getRange());
|
Attr.getRange());
|
||||||
|
|
||||||
if (!DeclVarData)
|
if (!DeclVarData)
|
||||||
|
|
Loading…
Reference in New Issue