aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBalazs Benics <balazs.benics@sigmatechnology.se>2022-06-14 10:22:37 +0200
committerBalazs Benics <balazs.benics@sigmatechnology.se>2022-06-14 10:22:37 +0200
commit9da697e1bcefda6a75cd63a10679efe51333d7f9 (patch)
treed0c54a7fd1310cbafca3a364a2c7327aa9c619dd /clang/lib/Frontend/CompilerInvocation.cpp
parentc0e965e222900e1fdee417a73242e408943d9fb0 (diff)
downloadllvm-9da697e1bcefda6a75cd63a10679efe51333d7f9.zip
llvm-9da697e1bcefda6a75cd63a10679efe51333d7f9.tar.gz
llvm-9da697e1bcefda6a75cd63a10679efe51333d7f9.tar.bz2
Reland "[analyzer] Deprecate the unused 'analyzer-opt-analyze-nested-blocks' cc1 flag"
It was previously reverted by 8406839d1926486de900c7cabeea9f841bd3edf2. --- This flag was introduced by https://github.com/llvm/llvm-project/commit/6818991d7165f68fe196922d9e5c6648dd57cc47 commit 6818991d7165f68fe196922d9e5c6648dd57cc47 Author: Ted Kremenek <kremenek@apple.com> Date: Mon Dec 7 22:06:12 2009 +0000 Add clang-cc option '-analyzer-opt-analyze-nested-blocks' to treat block literals as an entry point for analyzer checks. The last reference was removed by this commit: https://github.com/llvm/llvm-project/commit/5c32dfc5fb1cfcff8ae3671284e17daa8da3a188 commit 5c32dfc5fb1cfcff8ae3671284e17daa8da3a188 Author: Anna Zaks <ganna@apple.com> Date: Fri Dec 21 01:19:15 2012 +0000 [analyzer] Add blocks and ObjC messages to the call graph. This paves the road for constructing a better function dependency graph. If we analyze a function before the functions it calls and inlines, there is more opportunity for optimization. Note, we add call edges to the called methods that correspond to function definitions (declarations with bodies). Consequently, we should remove this dead flag. However, this arises a couple of burning questions. - Should the `cc1` frontend still accept this flag - to keep tools/users passing this flag directly to `cc1` (which is unsupported, unadvertised) working. - If we should remain backward compatible, how long? - How can we get rid of deprecated and obsolete flags at some point? Reviewed By: martong Differential Revision: https://reviews.llvm.org/D126067
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index deec3e8..ba06b17 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -906,6 +906,10 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args,
if (Arg *A = Args.getLastArg(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))
+ Diags.Report(diag::warn_analyzer_deprecated_option)
+ << "-analyzer-opt-analyze-nested-blocks"
+ << "clang-16";
if (Arg *A = Args.getLastArg(OPT_analyzer_constraints)) {
StringRef Name = A->getValue();