This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Move some of the misc checks to readability/
ClosedPublic

Authored by alexfh on Oct 15 2014, 2:19 AM.

Details

Summary

Some of the misc checks belong to readability/. I'm moving them there
without changing check names for now. As the next step, I want to register some
of these checks in the google and llvm modules with suitable settings (e.g.
BracesAroundStatementsCheck). I'm not sure if we want to create a "readability"
module, probably not.

Diff Detail

Event Timeline

alexfh updated this revision to Diff 14916.Oct 15 2014, 2:19 AM
alexfh retitled this revision from to [clang-tidy] Move some of the misc checks to readability/.
alexfh updated this object.
alexfh edited the test plan for this revision. (Show Details)
alexfh added a reviewer: djasper.
alexfh added a subscriber: Unknown Object (MLST).
djasper added inline comments.Oct 15 2014, 2:32 AM
clang-tidy/misc/CMakeLists.txt
18

Hm. I understand that you don't want to create a separate readability at this point. But leave a comment here, otherwise the layering seems quite confusing.

clang-tidy/readability/BracesAroundStatementsCheck.h
10–11

Not sure whether this is allowed/desired for LLVM style, but we should fix the comment on the #endif accordingly.

clang-tidy/readability/FunctionSize.h
48

Fix comment.

clang-tidy/readability/RedundantSmartptrGet.h
37

Same here.

alexfh updated this revision to Diff 14918.Oct 15 2014, 3:34 AM

Fixed #endif comments, documented the clangTidyMisc -> clangTidyReadability
dependency.

clang-tidy/misc/CMakeLists.txt
18

Done.

clang-tidy/readability/BracesAroundStatementsCheck.h
10–11

Yeah, the llvm-header-guard check should at least fix existing comments if not add new ones. Its current behavior is slightly harmful.

clang-tidy/readability/FunctionSize.h
48

Fixed #endif comments.

djasper accepted this revision.Oct 15 2014, 3:45 AM
djasper edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Oct 15 2014, 3:45 AM
alexfh closed this revision.Oct 15 2014, 4:02 AM