[PATCH] D68093: [clang-scan-deps][static analyzer] Support for clang --analyze in scan-deps

Artem Dergachev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 17:48:54 PDT 2019


NoQ added inline comments.


================
Comment at: clang/include/clang/Driver/CC1Options.td:849
   HelpText<"include a detailed record of preprocessing actions">;
+def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">,
+  HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">;
----------------
jkorous wrote:
> hiraditya wrote:
> > The name doesn't quite reflect what it does.
> `setup-pp-for-analyzer`? I'm open to suggestions.
I actually suggest modifying the help text to something like "Behave as if the Static Analyzer is going to be invoked, even if it's not actually going to be invoked (for now this boils down to defining the __clang_analyzer__ macro)" and keep the flag name roughly the same. This is the actual purpose of the option, right? We don't need to specify what precisely takes place when the option is invoked because this may change in the future, but the contract will remain.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68093/new/

https://reviews.llvm.org/D68093





More information about the llvm-commits mailing list