This is an archive of the discontinued LLVM Phabricator instance.

Fix modernize-deprecated-headers clang-tidy warnings
Needs ReviewPublic

Authored by michael.sharpe on Dec 10 2016, 1:28 PM.

Details

Reviewers
rsmith

Event Timeline

michael.sharpe retitled this revision from to Fix modernize-deprecated-headers clang-tidy warnings.
michael.sharpe updated this object.
michael.sharpe added a reviewer: rsmith.
michael.sharpe added a subscriber: cfe-commits.

Did you enable analysis of headers in Clang-tidy?

lib/Frontend/CompilerInstance.cpp
51–52

Will be good idea to run Clang-format or sort headers manually.

lib/Lex/HeaderSearch.cpp
35

Please add empty line before using.

lib/Lex/ModuleMap.cpp
32–33

Please fix order of headers.

34

Could limits be used instead?

lib/Sema/DelayedDiagnostic.cpp
20

Please add empty line before using.

lib/Tooling/Core/QualTypeNames.cpp
16–17

Please remove empty line.

  • Address review comments, check headers for C style headers

Did you enable analysis of headers in Clang-tidy?

I had not, thanks for the tip.

lib/Lex/ModuleMap.cpp
34

I built without this line on Ubuntu 16.04 without issue and I couldn't see where any limits were referenced from searching for _MAX or _MIN.

I think there might be a benefit to running include-what-you-use on this file, but I don't have the tool set up and will be without access to my personal setup for a couple weeks at the end of the year.

Yes, IWYU is useful tool, but please note that it's not ideal, so will be good idea to check proposed changes manually.

You could build IWYU in-tree with Clang or Clang extra tools.