llvm-project/clang/test/Analysis/diagnostics
George Karpenkov 4316afbb44 [analyzer] Do not infer nullability inside function-like macros, even when macro is explicitly returning NULL
We already suppress such reports for inlined functions, we should then
get the same behavior for macros.
The underlying reason is that the same macro, can be called from many
different contexts, and nullability can only be expected in _some_ of
them.
Assuming that the macro can return null in _all_ of them sometimes leads
to a large number of false positives.

E.g. consider the test case for the dynamic cast implementation in
macro: in such cases, the bug report is unwanted.

Tracked in rdar://36304776

Differential Revision: https://reviews.llvm.org/D42404

llvm-svn: 324161
2018-02-03 00:55:21 +00:00
..
Inputs/include [analyzer] Add more FileIDs to PlistDiagnostic map to avoid assertion 2016-09-01 12:25:16 +00:00
deref-track-symbolic-region.c Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers 2017-03-03 18:02:02 +00:00
deref-track-symbolic-region.cpp Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers 2017-03-03 18:02:02 +00:00
explicit-suppression.cpp [analyzer] Initial commit for the upcoming refactoring of the IteratorChecker. 2017-05-29 15:03:20 +00:00
false-positive-suppression.c Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers 2017-03-03 18:02:02 +00:00
implicit-cxx-std-suppression.cpp [analyzer] NFC: Run many existing C++ tests with a custom operator new(). 2018-01-24 21:24:10 +00:00
macro-null-return-suppression.cpp [analyzer] Do not infer nullability inside function-like macros, even when macro is explicitly returning NULL 2018-02-03 00:55:21 +00:00
macros.cpp Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers 2017-03-03 18:02:02 +00:00
macros.m Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers 2017-03-03 18:02:02 +00:00
no-prune-paths.c Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers 2017-03-03 18:02:02 +00:00
plist-diagnostics-include-check.cpp Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers 2017-03-03 18:02:02 +00:00
report-issues-within-main-file.cpp [analyzer] Fix memory error bug category capitalization. 2017-05-03 11:47:13 +00:00
shortest-path-suppression.c Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers 2017-03-03 18:02:02 +00:00
text-diagnostics.c Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers 2017-03-03 18:02:02 +00:00
undef-value-callee.h
undef-value-caller.c Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers 2017-03-03 18:02:02 +00:00
undef-value-param.c Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers 2017-03-03 18:02:02 +00:00
undef-value-param.m [analyzer] Clarify 'uninitialized function argument' messages 2017-03-08 15:22:24 +00:00