This is an archive of the discontinued LLVM Phabricator instance.

[scan-build] fix logic error warning emitted on compiler-rt code base
ClosedPublic

Authored by apelete on Apr 27 2016, 2:46 PM.

Details

Summary

Fix a "called c++ object pointer is null" warning emitted by Clang
Static Analyzer on the following file:

  • lib/asan/asan_suppressions.cc.

Signed-off-by: Apelete Seketeli <apelete@seketeli.net>

Diff Detail

Event Timeline

apelete updated this revision to Diff 55329.Apr 27 2016, 2:46 PM
apelete retitled this revision from to [scan-build] fix logic error warning emitted on compiler-rt code base.
apelete added a reviewer: kcc.
apelete updated this object.
apelete added a subscriber: llvm-commits.
Eugene.Zelenko added inline comments.
lib/asan/asan_suppressions.cc
21
apelete updated this revision to Diff 55379.Apr 27 2016, 11:41 PM

[scan-build] fix logic error warning emitted on compiler-rt code base

Changes since last revision:

  • replace deprecated <assert.h> library by C++ <cassert> equivalent.
apelete marked an inline comment as done.Apr 27 2016, 11:44 PM
apelete added inline comments.
lib/asan/asan_suppressions.cc
21

If the changes are good for you, could you please check this in the main repository for me ?

Thanks for your review.

kcc edited edge metadata.Apr 28 2016, 4:48 PM

This code does not use *any* system headers. You may use CHECK

apelete updated this revision to Diff 55535.Apr 28 2016, 11:24 PM
apelete marked an inline comment as done.
apelete edited edge metadata.

[scan-build] fix logic error warning emitted on compiler-rt code base

Changes since last revision:

  • Replace assert() with CHECK() since the code do not rely on any system header.
kcc accepted this revision.Apr 29 2016, 12:42 PM
kcc edited edge metadata.

LGTM

This revision is now accepted and ready to land.Apr 29 2016, 12:42 PM
In D19627#417229, @kcc wrote:

LGTM

Could you please check this in the main repository for me ?

Thanks.

kcc closed this revision.May 2 2016, 12:13 PM
This revision was automatically updated to reflect the committed changes.