[PATCH] D34102: [analyzer] Add portability package for the checkers.

Anna Zaks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 11:16:02 PDT 2017


zaks.anna added inline comments.


================
Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:454
+def UnixAPIPortabilityChecker : Checker<"API">,
+  HelpText<"Finds implementation-defined behavior in UNIX/Posix functions">,
+  DescFile<"UnixAPIChecker.cpp">;
----------------
NoQ wrote:
> zaks.anna wrote:
> > Does this need to be in unix?
> Well,
>   1. the description still says "UNIX/Posix" and
>   2. even if we believe that `malloc` isn't a UNIX/Posix-specific thing, we'd also need to move our `MallocChecker` out of the `unix` package.
> 
> This is probably the right thing to do, but i didn't try to do it here. If we want this, i'd move the portability checker out of `unix` now and deal with `MallocChecker` in another patch. I can also move the portability checker's code into `MallocChecker.cpp`, because that's what we always wanted to do, according to a `UnixAPIChecker`'s FIXME.
If someone is interested in checking if their code is portable, they'd just enable profitability package. I do not think "unix" adds much here. I suggest to just add the check to portability package directly, change the name and make no other changes.
WDYT?


https://reviews.llvm.org/D34102





More information about the cfe-commits mailing list