[PATCH] D17484: [clang-tidy] introduce modernize-deprecated-headers check

Richard via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 20 17:40:03 PST 2016


LegalizeAdulthood added a comment.

Other than a few nits, LGTM.


================
Comment at: clang-tidy/modernize/DeprecatedHeadersCheck.cpp:54
@@ +53,3 @@
+    : Check(Check), LangOpts(LangOpts) {
+  CStyledHeaderToCxx["assert.h"] = "cassert";
+  CStyledHeaderToCxx["float.h"] = "cfloat";
----------------
Can't we use C++11 brace initialization here instead of repeated assignments?

================
Comment at: docs/clang-tidy/checks/modernize-deprecated-headers.rst:33
@@ +32,3 @@
+
+The following headers were deprecated before C++ 11:
+
----------------
Can we sort these lists of includes?  Otherwise it's hard to find a specific include in the list.

================
Comment at: test/clang-tidy/modernize-deprecated-headers-cxx11.cpp:3
@@ +2,3 @@
+
+#include "assert.h"
+#include "float.h"
----------------
Can we sort the includes in the test files too please?


http://reviews.llvm.org/D17484





More information about the cfe-commits mailing list