This is an archive of the discontinued LLVM Phabricator instance.

Fix for Bug 22880
ClosedPublic

Authored by eszasip on Mar 13 2015, 1:02 PM.

Details

Reviewers
alexfh
Summary

The misc-static-assert check will not warn on assert(false), assert(False), assert(FALSE); where false / False / FALSE are macros expanding to the false or 0 literals.

Also added corresponding test cases.

Bug 22880

Diff Detail

Event Timeline

eszasip updated this revision to Diff 21948.Mar 13 2015, 1:02 PM
eszasip retitled this revision from to Fix for Bug 22880.
eszasip updated this object.
eszasip edited the test plan for this revision. (Show Details)
eszasip added a reviewer: alexfh.
eszasip added subscribers: Unknown Object (MLST), xazax.hun.
alexfh accepted this revision.Mar 14 2015, 7:17 PM
alexfh edited edge metadata.

Looks good! I'll address the two issues and commit the patch.

Thank you for the fix!

clang-tidy/misc/StaticAssertCheck.cpp
86

Use StringRef::compare_lower here.

test/clang-tidy/misc-static-assert.cpp
16

Define one of these to 0 to test this option.

This revision is now accepted and ready to land.Mar 14 2015, 7:17 PM
alexfh closed this revision.Mar 14 2015, 7:24 PM

Committed revision 232306.