[PATCH] D27655: Fix modernize-deprecated-headers clang-tidy warnings

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 11 13:38:47 PST 2016


Eugene.Zelenko added a comment.

Did you enable analysis of headers in Clang-tidy?



================
Comment at: lib/Frontend/CompilerInstance.cpp:51
 #include <system_error>
-#include <time.h>
+#include <ctime>
 #include <utility>
----------------
Will be good idea to run Clang-format or sort headers manually.


================
Comment at: lib/Lex/HeaderSearch.cpp:34
 #endif
 using namespace clang;
 
----------------
Please add empty line before using.


================
Comment at: lib/Lex/ModuleMap.cpp:33
 #include "llvm/Support/raw_ostream.h"
-#include <stdlib.h>
+#include <cstdlib>
 #if defined(LLVM_ON_UNIX)
----------------
Please fix order of headers.


================
Comment at: lib/Lex/ModuleMap.cpp:35
 #if defined(LLVM_ON_UNIX)
-#include <limits.h>
+#include <climits>
 #endif
----------------
Could limits be used instead?


================
Comment at: lib/Sema/DelayedDiagnostic.cpp:19
+#include <cstring>
 using namespace clang;
 using namespace sema;
----------------
Please add empty line before using.


================
Comment at: lib/Tooling/Core/QualTypeNames.cpp:17
 #include "clang/AST/Mangle.h"
 
+#include <cstdio>
----------------
Please remove empty line.


https://reviews.llvm.org/D27655





More information about the cfe-commits mailing list