This is an archive of the discontinued LLVM Phabricator instance.

Rename the safety module to be hicpp
ClosedPublic

Authored by aaron.ballman on Mar 19 2017, 9:35 AM.

Details

Summary

This module is intended to comply with the High-Integrity C++ coding standard by PRQA, so we should be explicit about that in the name of the module and the checks. This patch looks larger than it really is. It:

  • Renames the safety module to hicpp
  • Renames all the bits and pieces that said "safety" to instead say "hicpp", such as check names, module name, documentation, etc.
  • Adds a LICENSE.TXT file, modeled after how we handled the CERT licensing.
  • I updated the link in the hicpp-no-assembler documentation to point to the correct rule in the coding standard.
  • As a drive by, I fixed the ordering in a cmake file to be alphabetical instead of a hodge podge.

I chose the name hicpp because it's easier on the eyes than hic++ (think: hic++-no-assembler), it's consistent with how we treated the C++ Core Guidelines (cppcoreguidelines), and the name is recognizable via at least one popular search engine (the first result for hicpp goes exactly where we'd like it to go).

Diff Detail

Event Timeline

aaron.ballman created this revision.Mar 19 2017, 9:35 AM
jbcoe added inline comments.Mar 19 2017, 9:38 AM
clang-tidy/hicpp/NoAssemblerCheck.cpp
46

Should this message use text taken directly from the HICPP rules?

aaron.ballman added inline comments.Mar 19 2017, 9:42 AM
clang-tidy/hicpp/NoAssemblerCheck.cpp
46

The wording from HICPP rule is too wishy-washy to be used as a diagnostic, IMO. It just says it "should be avoided". I think the current wording is reasonable.

jbcoe accepted this revision.Mar 19 2017, 9:56 AM

LGTM.

Great work on getting this module approved by PRQA Aaron.

clang-tidy/hicpp/NoAssemblerCheck.cpp
46

Should we remove 'in safety-critical code'? That's not HICPP's reason for banning it, they appeal to portability, and the module is no longer called 'safety'.

I'm happy with a shortened message or the message as is.

This revision is now accepted and ready to land.Mar 19 2017, 9:56 AM
JonasToth accepted this revision.Mar 19 2017, 10:02 AM

thank you very much for dealing with this issue :)
I will update the aliases. But maybe later this week since i have an exam. :)

aaron.ballman added inline comments.Mar 19 2017, 10:05 AM
clang-tidy/hicpp/NoAssemblerCheck.cpp
46

Hmmm shortening it isn't a bad idea, but it should probably get its own review (it's largely independent of these changes). Would you like to make a review for it once I land this, or do you think it should be done as part of this commit?

Commit in r298229. If we want to reword the hicpp-no-assembler diagnostic, we can do so in a follow-up patch.

docs/clang-tidy/checks/list.rst