[clang-tidy] minor improvements in modernise-deprecated-headers check
authorKirill Bobyrev <omtcyfz@gmail.com>
Wed, 10 Aug 2016 18:01:45 +0000 (18:01 +0000)
committerKirill Bobyrev <omtcyfz@gmail.com>
Wed, 10 Aug 2016 18:01:45 +0000 (18:01 +0000)
commit8694cb97c2c1aead7e8a450659a25bc1c95943ab
tree6005cd43d232e74e7a990518dc3789873c5b28a1
parentd00efc6795f8445c1fd3a1112115ca39461cef8e
[clang-tidy] minor improvements in modernise-deprecated-headers check

This patch introduces a minor list of changes as proposed by Richard Smith in
the mailing list.

See original comments with an impact on the future check state below:

[comments.begin

> +                          {"complex.h", "ccomplex"},

It'd be better to convert this one to <complex>, or leave it alone.
<ccomplex> is an unnecessary wart.

(The contents of C++11's <complex.h> / <ccomplex> / <complex> (all of
which are identical) aren't comparable to C99's <complex.h>, so if
this was C++98 code using the C99 header, the code will be broken with
or without this transformation.)

> +                          {"iso646.h", "ciso646"},

Just delete #includes of this one. <ciso646> does nothing.

> +              {"stdalign.h", "cstdalign"},
> +              {"stdbool.h", "cstdbool"},

We should just delete these two includes. These headers do nothing in C++.

comments.end]

Reviewers: alexfh, aaron.ballman

Differential Revision: https://reviews.llvm.org/D17990

llvm-svn: 278254
clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp
clang-tools-extra/docs/clang-tidy/checks/modernize-deprecated-headers.rst
clang-tools-extra/test/clang-tidy/modernize-deprecated-headers-cxx03.cpp
clang-tools-extra/test/clang-tidy/modernize-deprecated-headers-cxx11.cpp