2016-02-26 00:46:54 +08:00
// RUN: %check_clang_tidy %s modernize-deprecated-headers %t -- -extra-arg-before=-isystem%S/Inputs/modernize-deprecated-headers -- -std=c++11 -v
2016-02-24 21:36:34 +08:00
# include <assert.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'assert.h'; consider using 'cassert' instead [modernize-deprecated-headers]
// CHECK-FIXES: {{^}}#include <cassert>{{$}}
2016-02-24 21:36:34 +08:00
# include <complex.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'complex.h'; consider using 'complex' instead
// CHECK-FIXES: {{^}}#include <complex>{{$}}
2016-02-24 21:36:34 +08:00
# include <ctype.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'ctype.h'; consider using 'cctype' instead
// CHECK-FIXES: {{^}}#include <cctype>{{$}}
2016-02-24 21:36:34 +08:00
# include <errno.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'errno.h'; consider using 'cerrno' instead
// CHECK-FIXES: {{^}}#include <cerrno>{{$}}
2016-02-24 21:36:34 +08:00
# include <fenv.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'fenv.h'; consider using 'cfenv' instead
// CHECK-FIXES: {{^}}#include <cfenv>{{$}}
2016-02-24 21:36:34 +08:00
# include <float.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'float.h'; consider using 'cfloat' instead
// CHECK-FIXES: {{^}}#include <cfloat>{{$}}
2016-02-24 21:36:34 +08:00
# include <inttypes.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'inttypes.h'; consider using 'cinttypes' instead
// CHECK-FIXES: {{^}}#include <cinttypes>{{$}}
2016-02-24 21:36:34 +08:00
# include <limits.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'limits.h'; consider using 'climits' instead
// CHECK-FIXES: {{^}}#include <climits>{{$}}
2016-02-24 21:36:34 +08:00
# include <locale.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'locale.h'; consider using 'clocale' instead
// CHECK-FIXES: {{^}}#include <clocale>{{$}}
2016-02-24 21:36:34 +08:00
# include <math.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'math.h'; consider using 'cmath' instead
// CHECK-FIXES: {{^}}#include <cmath>{{$}}
2016-02-24 21:36:34 +08:00
# include <setjmp.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'setjmp.h'; consider using 'csetjmp' instead
// CHECK-FIXES: {{^}}#include <csetjmp>{{$}}
2016-02-24 21:36:34 +08:00
# include <signal.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'signal.h'; consider using 'csignal' instead
// CHECK-FIXES: {{^}}#include <csignal>{{$}}
2016-02-24 21:36:34 +08:00
# include <stdarg.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'stdarg.h'; consider using 'cstdarg' instead
// CHECK-FIXES: {{^}}#include <cstdarg>{{$}}
2016-02-24 21:36:34 +08:00
# include <stddef.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'stddef.h'; consider using 'cstddef' instead
// CHECK-FIXES: {{^}}#include <cstddef>{{$}}
2016-02-24 21:36:34 +08:00
# include <stdint.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead
// CHECK-FIXES: {{^}}#include <cstdint>{{$}}
2016-02-24 21:36:34 +08:00
# include <stdio.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead
// CHECK-FIXES: {{^}}#include <cstdio>{{$}}
2016-02-24 21:36:34 +08:00
# include <stdlib.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'stdlib.h'; consider using 'cstdlib' instead
// CHECK-FIXES: {{^}}#include <cstdlib>{{$}}
2016-02-24 21:36:34 +08:00
# include <string.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'string.h'; consider using 'cstring' instead
// CHECK-FIXES: {{^}}#include <cstring>{{$}}
2016-02-24 21:36:34 +08:00
# include <tgmath.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'tgmath.h'; consider using 'ctgmath' instead
// CHECK-FIXES: {{^}}#include <ctgmath>{{$}}
2016-02-24 21:36:34 +08:00
# include <time.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'time.h'; consider using 'ctime' instead
// CHECK-FIXES: {{^}}#include <ctime>{{$}}
2016-02-24 21:36:34 +08:00
# include <uchar.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'uchar.h'; consider using 'cuchar' instead
// CHECK-FIXES: {{^}}#include <cuchar>{{$}}
2016-02-24 21:36:34 +08:00
# include <wchar.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'wchar.h'; consider using 'cwchar' instead
// CHECK-FIXES: {{^}}#include <cwchar>{{$}}
2016-02-24 21:36:34 +08:00
# include <wctype.h>
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'wctype.h'; consider using 'cwctype' instead
// CHECK-FIXES: {{^}}#include <cwctype>
2016-02-24 21:36:34 +08:00
[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
2016-08-11 02:01:45 +08:00
// Headers that have no effect in C++; remove them
# include <stdalign.h> // <stdalign.h>
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: including 'stdalign.h' has no effect in C++; consider removing it
// CHECK-FIXES: {{^}}// <stdalign.h>{{$}}
# include <stdbool.h> // <stdbool.h>
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: including 'stdbool.h' has no effect in C++; consider removing it
// CHECK-FIXES: {{^}}// <stdbool.h>{{$}}
# include <iso646.h> // <iso646.h>
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: including 'iso646.h' has no effect in C++; consider removing it
// CHECK-FIXES: {{^}}// <iso646.h>{{$}}
2016-02-24 21:36:34 +08:00
# include "assert.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'assert.h'; consider using 'cassert' instead
// CHECK-FIXES: {{^}}#include <cassert>{{$}}
2016-02-24 21:36:34 +08:00
# include "complex.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'complex.h'; consider using 'complex' instead
// CHECK-FIXES: {{^}}#include <complex>{{$}}
2016-02-24 21:36:34 +08:00
# include "ctype.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'ctype.h'; consider using 'cctype' instead
// CHECK-FIXES: {{^}}#include <cctype>{{$}}
2016-02-24 21:36:34 +08:00
# include "errno.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'errno.h'; consider using 'cerrno' instead
// CHECK-FIXES: {{^}}#include <cerrno>{{$}}
2016-02-24 21:36:34 +08:00
# include "fenv.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'fenv.h'; consider using 'cfenv' instead
// CHECK-FIXES: {{^}}#include <cfenv>{{$}}
2016-02-24 21:36:34 +08:00
# include "float.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'float.h'; consider using 'cfloat' instead
// CHECK-FIXES: {{^}}#include <cfloat>{{$}}
2016-02-24 21:36:34 +08:00
# include "inttypes.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'inttypes.h'; consider using 'cinttypes' instead
// CHECK-FIXES: {{^}}#include <cinttypes>{{$}}
2016-02-24 21:36:34 +08:00
# include "limits.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'limits.h'; consider using 'climits' instead
// CHECK-FIXES: {{^}}#include <climits>{{$}}
2016-02-24 21:36:34 +08:00
# include "locale.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'locale.h'; consider using 'clocale' instead
// CHECK-FIXES: {{^}}#include <clocale>{{$}}
2016-02-24 21:36:34 +08:00
# include "math.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'math.h'; consider using 'cmath' instead
// CHECK-FIXES: {{^}}#include <cmath>{{$}}
2016-02-24 21:36:34 +08:00
# include "setjmp.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'setjmp.h'; consider using 'csetjmp' instead
// CHECK-FIXES: {{^}}#include <csetjmp>{{$}}
2016-02-24 21:36:34 +08:00
# include "signal.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'signal.h'; consider using 'csignal' instead
// CHECK-FIXES: {{^}}#include <csignal>{{$}}
2016-02-24 21:36:34 +08:00
# include "stdarg.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'stdarg.h'; consider using 'cstdarg' instead
// CHECK-FIXES: {{^}}#include <cstdarg>{{$}}
2016-02-24 21:36:34 +08:00
# include "stddef.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'stddef.h'; consider using 'cstddef' instead
// CHECK-FIXES: {{^}}#include <cstddef>{{$}}
2016-02-24 21:36:34 +08:00
# include "stdint.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'stdint.h'; consider using 'cstdint' instead
// CHECK-FIXES: {{^}}#include <cstdint>{{$}}
2016-02-24 21:36:34 +08:00
# include "stdio.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'stdio.h'; consider using 'cstdio' instead
// CHECK-FIXES: {{^}}#include <cstdio>{{$}}
2016-02-24 21:36:34 +08:00
# include "stdlib.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'stdlib.h'; consider using 'cstdlib' instead
// CHECK-FIXES: {{^}}#include <cstdlib>{{$}}
2016-02-24 21:36:34 +08:00
# include "string.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'string.h'; consider using 'cstring' instead
// CHECK-FIXES: {{^}}#include <cstring>{{$}}
2016-02-24 21:36:34 +08:00
# include "tgmath.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'tgmath.h'; consider using 'ctgmath' instead
// CHECK-FIXES: {{^}}#include <ctgmath>{{$}}
2016-02-24 21:36:34 +08:00
# include "time.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'time.h'; consider using 'ctime' instead
// CHECK-FIXES: {{^}}#include <ctime>{{$}}
2016-02-24 21:36:34 +08:00
# include "uchar.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'uchar.h'; consider using 'cuchar' instead
// CHECK-FIXES: {{^}}#include <cuchar>{{$}}
2016-02-24 21:36:34 +08:00
# include "wchar.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'wchar.h'; consider using 'cwchar' instead
// CHECK-FIXES: {{^}}#include <cwchar>{{$}}
2016-02-24 21:36:34 +08:00
# include "wctype.h"
[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
2016-08-11 02:01:45 +08:00
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: inclusion of deprecated C++ header 'wctype.h'; consider using 'cwctype' instead
// CHECK-FIXES: {{^}}#include <cwctype>
2016-02-24 21:36:34 +08:00
[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
2016-08-11 02:01:45 +08:00
// Headers that have no effect in C++; remove them
# include "stdalign.h" // "stdalign.h"
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: including 'stdalign.h' has no effect in C++; consider removing it
// CHECK-FIXES: {{^}}// "stdalign.h"{{$}}
# include "stdbool.h" // "stdbool.h"
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: including 'stdbool.h' has no effect in C++; consider removing it
// CHECK-FIXES: {{^}}// "stdbool.h"{{$}}
# include "iso646.h" // "iso646.h"
// CHECK-MESSAGES: :[[@LINE-1]]:10: warning: including 'iso646.h' has no effect in C++; consider removing it
// CHECK-FIXES: {{^}}// "iso646.h"{{$}}