This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Add more descriptive comments and examples in misc-definitions-in-headers check.
ClosedPublic

Authored by hokein on May 20 2016, 2:12 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

hokein updated this revision to Diff 57908.May 20 2016, 2:12 AM
hokein retitled this revision from to [clang-tidy] Add more descriptive comments and examples in misc-definitions-in-headers check..
hokein updated this object.
hokein added a reviewer: alexfh.
hokein added a subscriber: cfe-commits.
alexfh requested changes to this revision.May 20 2016, 2:23 AM
alexfh edited edge metadata.
alexfh added inline comments.
docs/clang-tidy/checks/misc-definitions-in-headers.rst
8 ↗(On Diff #57908)

It wouldn't be a large problem, if linker was always able to detect ODR violations. However, there are cases, where it can't do so. You can still append "in case these headers are included from multiple translation units." to the previous sentence.

35 ↗(On Diff #57908)

s/multiply defined/defined multiple times/

47 ↗(On Diff #57908)

s/a inline/an inline/

53 ↗(On Diff #57908)

s/funtion/function/

60 ↗(On Diff #57908)

full specialization of a function template ...

This revision now requires changes to proceed.May 20 2016, 2:23 AM
hokein updated this revision to Diff 57915.May 20 2016, 2:32 AM
hokein edited edge metadata.
hokein marked 5 inline comments as done.

Address review comments.

hokein updated this revision to Diff 57917.May 20 2016, 2:34 AM
hokein edited edge metadata.

fix a nit.

alexfh accepted this revision.May 20 2016, 2:38 AM
alexfh edited edge metadata.

LG. Thank you!

This revision is now accepted and ready to land.May 20 2016, 2:38 AM
This revision was automatically updated to reflect the committed changes.