This is an archive of the discontinued LLVM Phabricator instance.

[Clang-tidy] Make readability-simplify-boolean-expr working with included files
AbandonedPublic

Authored by Eugene.Zelenko on Feb 1 2016, 6:40 PM.

Details

Summary

This fix for PR26332. I checked it on my work code base.

Build and regressions were OK on RHEL 6.

Diff Detail

Repository
rL LLVM

Event Timeline

Eugene.Zelenko retitled this revision from to [Clang-tidy] Make readability-simplify-boolean-expr working with included files.
Eugene.Zelenko updated this object.
Eugene.Zelenko set the repository for this revision to rL LLVM.
Eugene.Zelenko added a subscriber: cfe-commits.
aaron.ballman edited edge metadata.Feb 2 2016, 4:21 AM

Missing a test case for this functionality. The isExpansionInMainFile() was used to silence the diagnostic in macros, but it was pointed out during review that this should be fixed and it seems to have fallen through the cracks. Can you also add tests for macros to ensure the behavior is acceptable there still?

See D8996 for more context.

I didn't notice test cases for included files for other checkers. So it's hard to tell for should special test case introduced for this specific problem or not.

I think proper solution will be to create tests for included files ot the fly, bu renaming main test to .h and creating dummy source file. But this is task for scripts wizards :-)

Again, isn't this already assigned to me in the bug tracker?

In general, my assumption in bug trackers is that if someone has assigned the bug to themselves, then they are working on it.

Missing a test case for this functionality. The isExpansionInMainFile() was used to silence the diagnostic in macros, but it was pointed out during review that this should be fixed and it seems to have fallen through the cracks. Can you also add tests for macros to ensure the behavior is acceptable there still?

See D8996 for more context.

It hasn't fallen through the cracks, I've been having an offline discussion with Alexander Kornienko about how to get automated checks to work for fixits applied to headers.

Again, isn't this already assigned to me in the bug tracker?

In general, my assumption in bug trackers is that if someone has assigned the bug to themselves, then they are working on it.

Sorry, if I steeped on you toes. My intention was to backport fix into 3.8 if it'll be OK. Sure, it'll be much better if original author will fix problem.

alexfh removed a reviewer: alexfh.Apr 1 2016, 6:05 PM
Eugene.Zelenko abandoned this revision.Apr 7 2016, 11:42 AM