[PATCH] D126067: [analyzer] Drop the unused 'analyzer-opt-analyze-nested-blocks' cc1 flag

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 20 06:59:13 PDT 2022


steakhal created this revision.
steakhal added reviewers: NoQ, martong, Szelethus.
Herald added subscribers: carlosgalvezp, manas, ASDenysPetrov, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun.
Herald added a project: All.
steakhal requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added projects: clang, clang-tools-extra.

This flag was introduced by
https://github.com/llvm/llvm-project/commit/6818991d7165f68fe196922d9e5c6648dd57cc47

  commit 6818991d7165f68fe196922d9e5c6648dd57cc47
  Author: Ted Kremenek <kremenek at 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 at 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?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126067

Files:
  clang-tools-extra/clang-tidy/ClangTidy.cpp
  clang/include/clang/Driver/Options.td
  clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Analysis/OSAtomic_mac.cpp
  clang/test/Analysis/analyzer-stats.c
  clang/test/Analysis/blocks.m
  clang/test/Analysis/blocks.mm
  clang/test/Analysis/misc-ps-arm.m
  clang/test/Analysis/misc-ps-region-store.cpp
  clang/test/Analysis/misc-ps-region-store.m
  clang/test/Analysis/misc-ps-region-store.mm
  clang/test/Analysis/objc-arc.m
  clang/test/Analysis/unreachable-code-path.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126067.430960.patch
Type: text/x-patch
Size: 12697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220520/f1df757f/attachment-0001.bin>


More information about the cfe-commits mailing list