Skip to content

Commit 4084e31

Browse files
committed
[Driver] Use hasArg to fix -Wunused-but-set-variable after #97342
1 parent 11a7ee5 commit 4084e31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3774,7 +3774,7 @@ static void RenderOpenCLOptions(const ArgList &Args, ArgStringList &CmdArgs,
37743774
CmdArgs.push_back(Args.MakeArgString(CLExtStr));
37753775
}
37763776

3777-
if (Arg *A = Args.getLastArg(options::OPT_cl_finite_math_only)) {
3777+
if (Args.hasArg(options::OPT_cl_finite_math_only)) {
37783778
CmdArgs.push_back("-menable-no-infs");
37793779
CmdArgs.push_back("-menable-no-nans");
37803780
}

0 commit comments

Comments
 (0)