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

2017-06-27 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306396: [analyzer] Move zero-size allocation checks to optin.portability. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D34102?vs=102829&id=104133#toc Repository: rL LLVM

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

2017-06-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D34102#788138, @zaks.anna wrote: > I think it's better to have inconsistency than having checks applicable to > windows in a package named portability.unix. In https://reviews.llvm.org/D34102#788138, @zaks.anna wrote: > If there will be check

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

2017-06-22 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. This just supports the statement that this particular check should not go under unix. I understand that it will be inconsistent with the name of the malloc checker, which we probably should not change as people might be relying on the package names. I think it's bette

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

2017-06-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://reviews.llvm.org/D34102#783161, @zaks.anna wrote: > > eg. checkers for portability across linux/bsd should be off on windows by > > default, checkers for non-portable C++ APIs should be off in plain C code, > > etc > > Is the checker you are moving to portability

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

2017-06-16 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > eg. checkers for portability across linux/bsd should be off on windows by > default, checkers for non-portable C++ APIs should be off in plain C code, etc Is the checker you are moving to portability off and not useful on Windows? https://reviews.llvm.org/D34102

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

2017-06-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 102829. NoQ added a comment. Whoops, forgot to actually attach the patch. Here. https://reviews.llvm.org/D34102 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp test/Analysis/malloc-overflow2.c test

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

2017-06-16 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Here's a version of the patch without `.unix`. I'd still hate it to re-add the subpackages if we decide to turn some portability checkers on and off depending on language/platform (eg. checkers for portability across linux/bsd should be off on windows by default, checkers f

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

2017-06-14 Thread Anna Zaks via Phabricator via cfe-commits
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">; No

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

2017-06-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ 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">; zaks.ann

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

2017-06-12 Thread Anna Zaks via Phabricator via cfe-commits
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">; Do

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

2017-06-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:425 -def UnixAPIChecker : Checker<"API">, +def UnixAPIMisuseChecker : Checker<"API">, HelpText<"Check calls to various UNIX/Posix functions">, This rename is user-invisi

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

2017-06-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. Checkers that find implementation-defined behavior seem to better be off by default - or, at least, there should be a way to turn them off - because we're not sure if our users are developing cross-platform code or target a specific platform. If the behavior is well-d