This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Cleanup code in CERT module.
ClosedPublic

Authored by hokein on Dec 29 2015, 3:38 AM.

Details

Summary

This patch fixes some code styles caused by bugs of add_new_check.py script.

Diff Detail

Event Timeline

hokein updated this revision to Diff 43729.Dec 29 2015, 3:38 AM
hokein retitled this revision from to [clang-tidy] Cleanup code in CERT module..
hokein updated this object.
hokein updated this revision to Diff 43730.Dec 29 2015, 3:40 AM

Update.

hokein updated this object.Dec 29 2015, 4:13 AM
hokein added reviewers: aaron.ballman, alexfh.
hokein set the repository for this revision to rL LLVM.
hokein added a subscriber: cfe-commits.

I'm wondering whether should we rename CERT to cert to keep the same with other modules like misc and google.
For adding a new check in CERT module, you need to use the upper name explicitly via python add_new_check.py CERT foo rather than python add_new_check.py cert foo.

alexfh edited edge metadata.Dec 29 2015, 5:07 AM

I'm wondering whether should we rename CERT to cert to keep the same with other modules like misc and google.

SGTM. Aaron, do you see any reasons not to do this?

aaron.ballman accepted this revision.Dec 29 2015, 6:12 AM
aaron.ballman edited edge metadata.

Fine by me -- I went with CERT since it's an acronym, but we don't do this for LLVM, so this change makes sense. Thanks!

This revision is now accepted and ready to land.Dec 29 2015, 6:12 AM

Fine by me -- I went with CERT since it's an acronym, but we don't do this for LLVM, so this change makes sense. Thanks!

AFAIU, LLVM is not an acronym anymore ;) (but still an upper-case spelling is the correct one).

Fine by me -- I went with CERT since it's an acronym, but we don't do this for LLVM, so this change makes sense. Thanks!

Fine by me -- I went with CERT since it's an acronym, but we don't do this for LLVM, so this change makes sense. Thanks!

AFAIU, LLVM is not an acronym anymore ;) (but still an upper-case spelling is the correct one).

Hah, good point. ;-) Regardless, I am fine with the namespace being "cert" in code so that it isn't confused with a macro.

So shoud we need to rename to cert at this patch?

So shoud we need to rename to cert at this patch?

Yes, but just the namespaces as you do in this patch (not anything in user documentation, for instance). This patch LG; if you need me to commit on your behalf, I'm happy to do so.

hokein updated this revision to Diff 43870.Jan 4 2016, 12:46 AM
hokein edited edge metadata.

Rename: 'CERT' => 'cert'

hokein added a comment.Jan 4 2016, 1:08 AM

Yes, but just the namespaces as you do in this patch (not anything in user documentation, for instance). This patch LG; if you need me to commit on your behalf, I'm happy to do so.

Done. But My account has no write access to the code repo. Can I commit the patch by myself? If not, I'm happy you can land it on my behalf :)

Yes, but just the namespaces as you do in this patch (not anything in user documentation, for instance). This patch LG; if you need me to commit on your behalf, I'm happy to do so.

Done. But My account has no write access to the code repo. Can I commit the patch by myself? If not, I'm happy you can land it on my behalf :)

You can ask Chris Lattner for commit privileges if you would like to commit this yourself (http://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access). Let me know if you want me to commit instead.

hokein added a comment.Jan 4 2016, 5:28 AM

Yes, but just the namespaces as you do in this patch (not anything in user documentation, for instance). This patch LG; if you need me to commit on your behalf, I'm happy to do so.

Done. But My account has no write access to the code repo. Can I commit the patch by myself? If not, I'm happy you can land it on my behalf :)

You can ask Chris Lattner for commit privileges if you would like to commit this yourself (http://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access). Let me know if you want me to commit instead.

Thanks for the link. Please commit for me this time :)

aaron.ballman closed this revision.Jan 4 2016, 6:34 AM

I've commit in r256756, thanks!