This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Fix NSErrorChecker false positives
ClosedPublic

Authored by vsavchenko on Apr 6 2020, 7:36 AM.

Details

Summary

NSErrorChecker used to suggest changing 'void' return type for
constructors and delete operators. This makes little sense because
return types of these functions could not be altered.

Diff Detail

Event Timeline

vsavchenko created this revision.Apr 6 2020, 7:36 AM
NoQ accepted this revision.Apr 6 2020, 9:57 AM

Looks great, thanks! Do you already have commit access or should i commit this for you?

clang/test/Analysis/SpecialFunctionsCFError.cpp
3

-analyzer-store=region is redundant; it's the default and the only possible value for this option. We should remove it from other tests as well.

This revision is now accepted and ready to land.Apr 6 2020, 9:57 AM
Szelethus added inline comments.Apr 6 2020, 10:03 AM
clang/test/Analysis/SpecialFunctionsCFError.cpp
3

The default lit command is a bit silly. What does -setup-analyzer or something like that even do?

vsavchenko marked an inline comment as done.Apr 6 2020, 10:14 AM
In D77551#1964441, @NoQ wrote:

Looks great, thanks! Do you already have commit access or should i commit this for you?

Thanks :-) No, I don't have commit access

clang/test/Analysis/SpecialFunctionsCFError.cpp
3

Should I remove it from here in this commit or we should clean up all tests at once?

NoQ added inline comments.Apr 6 2020, 10:27 AM
clang/test/Analysis/SpecialFunctionsCFError.cpp
3

The default lit command is a bit silly. What does -setup-analyzer or something like that even do?

1029   if (PPOpts.SetUpStaticAnalyzer)
1030     Builder.defineMacro("__clang_analyzer__");

:)

Should I remove it from here in this commit or we should clean up all tests at once?

I'll remove when committing, thx!

vsavchenko added a child revision: Restricted Differential Revision.Apr 6 2020, 10:45 AM
This revision was automatically updated to reflect the committed changes.