[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-06-22 Thread Gabor Marton via Phabricator via cfe-commits
martong abandoned this revision. martong added a comment. Since D80016 we are able to look up types in the TU, so this patch is no longer needed. We'd like to be as precise with the function signatures as possible. Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-14 Thread Gabor Marton via Phabricator via cfe-commits
martong planned changes to this revision. martong added a comment. We had a separate discussion with @xazax.hun. Let me summarize the outcome. We agreed that we should try our best to provide signatures for all functions (this affects child patches, particularly the POSIX related D79433

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-07 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In D79423#2025001 , @martong wrote: > 1. Some function types contain non-builtin types. E.g. `FILE*`. We cannot get > this type as easily as we do with builtin types (we can get builtins simply > from the ASTContext). In case o

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-07 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D79423#2023150 , @balazske wrote: > Probably something like `IsCStdLibraryFunction` can be included in the > signature, and empty signature is allowed only for functions that are in a C > standard library. Yeah, we could do

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-07 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D79423#2022920 , @xazax.hun wrote: > In D79423#2022812 , @martong wrote: > > > I don't think that could be a concern. > > Actually, redefinition of a reserved name either in the C or in

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-07 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 262620. martong added a comment. - Rename 'empty' -> 'irrelevant' Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79423/new/ https://reviews.llvm.org/D79423 Files: clang/lib/StaticAnalyzer/Checkers/StdLibraryF

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Probably something like `IsCStdLibraryFunction` can be included in the signature, and empty signature is allowed only for functions that are in a C standard library. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79423/new

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In D79423#2022812 , @martong wrote: > I don't think that could be a concern. > Actually, redefinition of a reserved name either in the C or in the C++ > standard library is undefined behavior: I disagree. As you mentioned in

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:263 bool matches(const FunctionDecl *FD) const; +bool empty() const { return RetTy.isNull() && ArgTys.size() == 0; } TODO rename to isIrrelevant

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D79423#2022251 , @xazax.hun wrote: > I am a bit unsure about this change. C libraries might be consumed in C++ > projects and C++ projects might be free to overload those functions. I don't think that could be a concern. Actu

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D79423#2022167 , @balazske wrote: > An empty signature means really that the whole signature is "irrelevant"? It > is like all types and number of arguments is irrelevant. Probably that would > be a better name, instead of `em

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I am a bit unsure about this change. C libraries might be consumed in C++ projects and C++ projects might be free to overload those functions. Does the effort needed to specify the signatures justify not supporting that (probably unintentional) name collisions in C++?

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. An empty signature means really that the whole signature is "irrelevant"? It is like all types and number of arguments is irrelevant. Probably that would be a better name, instead of `empty` use `isIrrelevant`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The empty signature is used to make add of C API functions easy because only the function name must be specified, not all types of parameters? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79423/new/ https://reviews.llvm.

[PATCH] D79423: [analyzer][NFC] StdLibraryFunctionsChecker: Add empty Signatures

2020-05-05 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: Szelethus, NoQ, baloghadamsoftware, balazske, steakhal. Herald added subscribers: cfe-commits, ASDenysPetrov, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, whisperity. Herald added a projec