From 21ff652de9fc9fe7338a83e2e405aa6c5d824479 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 14 Jun 2022 19:28:44 +0200 Subject: [analyzer][NFC] Replace getLastArg with hasArg when applicable Depends on D126215. --- clang/lib/Frontend/CompilerInvocation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index ba06b17..5d7916a 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -903,10 +903,10 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, #include "clang/Driver/Options.inc" #undef ANALYZER_OPTION_WITH_MARSHALLING - if (Arg *A = Args.getLastArg(OPT_analyzer_store)) + if (Args.hasArg(OPT_analyzer_store)) Diags.Report(diag::warn_analyzer_deprecated_option) << "-analyzer-store" << "clang-16"; - if (Arg *A = Args.getLastArg(OPT_analyzer_opt_analyze_nested_blocks)) + if (Args.hasArg(OPT_analyzer_opt_analyze_nested_blocks)) Diags.Report(diag::warn_analyzer_deprecated_option) << "-analyzer-opt-analyze-nested-blocks" << "clang-16"; -- cgit v1.1