This is an archive of the discontinued LLVM Phabricator instance.

[LLVM] Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes
ClosedPublic

Authored by Eugene.Zelenko on Apr 4 2016, 5:36 PM.

Details

Summary

Some Include What You Use suggestions were used too.

Use anonymous namespaces in source files.

I checked this patch on my own build on RHEL 6. Regressions were OK.

Diff Detail

Event Timeline

Eugene.Zelenko retitled this revision from to [LLVM] Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes.
Eugene.Zelenko updated this object.
Eugene.Zelenko set the repository for this revision to rL LLVM.
Eugene.Zelenko added a subscriber: llvm-commits.
aaron.ballman added inline comments.Apr 5 2016, 7:30 AM
lib/Support/CrashRecoveryContext.cpp
12

Can you sort these includes, or was this the ordering generated?

lib/Support/SHA1.cpp
50

I think that having a single static function definition is a bit more clear than having an anonymous namespace, but I don't feel that strongly about it. Thoughts?

Eugene.Zelenko added inline comments.Apr 5 2016, 10:19 AM
lib/Support/CrashRecoveryContext.cpp
12

Will do in commit.

lib/Support/SHA1.cpp
50

I definitely saw single functions in anonymous namespace in LLVM code.

aaron.ballman accepted this revision.Apr 5 2016, 12:08 PM
aaron.ballman edited edge metadata.

LGTM (with minor nit about header ordering).

lib/Support/SHA1.cpp
50

I've seen it before, I'm just not convinced it's actually worth the extra few lines of code. Regardless, we prefer inline namespaces, so I say it's good enough.

This revision is now accepted and ready to land.Apr 5 2016, 12:08 PM
This revision was automatically updated to reflect the committed changes.