[clang] 21ff652 - [analyzer][NFC] Replace getLastArg with hasArg when applicable
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 14 10:29:06 PDT 2022
Author: Balazs Benics
Date: 2022-06-14T19:28:44+02:00
New Revision: 21ff652de9fc9fe7338a83e2e405aa6c5d824479
URL: https://github.com/llvm/llvm-project/commit/21ff652de9fc9fe7338a83e2e405aa6c5d824479
DIFF: https://github.com/llvm/llvm-project/commit/21ff652de9fc9fe7338a83e2e405aa6c5d824479.diff
LOG: [analyzer][NFC] Replace getLastArg with hasArg when applicable
Depends on D126215.
Added:
Modified:
clang/lib/Frontend/CompilerInvocation.cpp
Removed:
################################################################################
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index ba06b1795bf09..5d7916ace87e8 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";
More information about the cfe-commits
mailing list