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

2016-12-11 Thread Michael Sharpe via Phabricator via cfe-commits
michael.sharpe created this revision.
michael.sharpe added a reviewer: rsmith.
michael.sharpe added a subscriber: cfe-commits.
Herald added subscribers: JDevlieghere, klimek.

https://reviews.llvm.org/D27655

Files:
  lib/CodeGen/CGOpenCLRuntime.cpp
  lib/Driver/Types.cpp
  lib/Frontend/CodeGenOptions.cpp
  lib/Frontend/CompilerInstance.cpp
  lib/Lex/HeaderSearch.cpp
  lib/Lex/ModuleMap.cpp
  lib/Sema/DelayedDiagnostic.cpp
  lib/Tooling/Core/QualTypeNames.cpp

Index: lib/Tooling/Core/QualTypeNames.cpp
===
--- lib/Tooling/Core/QualTypeNames.cpp
+++ lib/Tooling/Core/QualTypeNames.cpp
@@ -15,7 +15,7 @@
 #include "clang/AST/GlobalDecl.h"
 #include "clang/AST/Mangle.h"
 
-#include 
+#include 
 #include 
 
 namespace clang {
Index: lib/Sema/DelayedDiagnostic.cpp
===
--- lib/Sema/DelayedDiagnostic.cpp
+++ lib/Sema/DelayedDiagnostic.cpp
@@ -15,7 +15,7 @@
 //
 //===--===//
 #include "clang/Sema/DelayedDiagnostic.h"
-#include 
+#include 
 using namespace clang;
 using namespace sema;
 
Index: lib/Lex/ModuleMap.cpp
===
--- lib/Lex/ModuleMap.cpp
+++ lib/Lex/ModuleMap.cpp
@@ -30,9 +30,9 @@
 #include "llvm/Support/Host.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/raw_ostream.h"
-#include 
+#include 
 #if defined(LLVM_ON_UNIX)
-#include 
+#include 
 #endif
 using namespace clang;
 
Index: lib/Lex/HeaderSearch.cpp
===
--- lib/Lex/HeaderSearch.cpp
+++ lib/Lex/HeaderSearch.cpp
@@ -29,7 +29,7 @@
 #include 
 #include 
 #if defined(LLVM_ON_UNIX)
-#include 
+#include 
 #endif
 using namespace clang;
 
Index: lib/Frontend/CompilerInstance.cpp
===
--- lib/Frontend/CompilerInstance.cpp
+++ lib/Frontend/CompilerInstance.cpp
@@ -48,7 +48,7 @@
 #include "llvm/Support/raw_ostream.h"
 #include 
 #include 
-#include 
+#include 
 #include 
 
 using namespace clang;
Index: lib/Frontend/CodeGenOptions.cpp
===
--- lib/Frontend/CodeGenOptions.cpp
+++ lib/Frontend/CodeGenOptions.cpp
@@ -8,7 +8,7 @@
 //===--===//
 
 #include "clang/Frontend/CodeGenOptions.h"
-#include 
+#include 
 
 namespace clang {
 
Index: lib/Driver/Types.cpp
===
--- lib/Driver/Types.cpp
+++ lib/Driver/Types.cpp
@@ -11,7 +11,7 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringSwitch.h"
 #include 
-#include 
+#include 
 
 using namespace clang::driver;
 using namespace clang::driver::types;
Index: lib/CodeGen/CGOpenCLRuntime.cpp
===
--- lib/CodeGen/CGOpenCLRuntime.cpp
+++ lib/CodeGen/CGOpenCLRuntime.cpp
@@ -18,7 +18,7 @@
 #include "TargetInfo.h"
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/GlobalValue.h"
-#include 
+#include 
 
 using namespace clang;
 using namespace CodeGen;
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2016-12-12 Thread Michael Sharpe via Phabricator via cfe-commits
michael.sharpe updated this revision to Diff 81179.
michael.sharpe added a comment.

- Address review comments, check headers for C style headers


https://reviews.llvm.org/D27655

Files:
  include/clang/Analysis/Analyses/ThreadSafetyTIL.h
  include/clang/Basic/Linkage.h
  include/clang/Basic/TargetBuiltins.h
  lib/CodeGen/CGOpenCLRuntime.cpp
  lib/Driver/Types.cpp
  lib/Frontend/CodeGenOptions.cpp
  lib/Frontend/CompilerInstance.cpp
  lib/Lex/HeaderSearch.cpp
  lib/Lex/ModuleMap.cpp
  lib/Sema/DelayedDiagnostic.cpp
  lib/Tooling/Core/QualTypeNames.cpp

Index: lib/Tooling/Core/QualTypeNames.cpp
===
--- lib/Tooling/Core/QualTypeNames.cpp
+++ lib/Tooling/Core/QualTypeNames.cpp
@@ -14,8 +14,7 @@
 #include "clang/AST/DeclarationName.h"
 #include "clang/AST/GlobalDecl.h"
 #include "clang/AST/Mangle.h"
-
-#include 
+#include 
 #include 
 
 namespace clang {
Index: lib/Sema/DelayedDiagnostic.cpp
===
--- lib/Sema/DelayedDiagnostic.cpp
+++ lib/Sema/DelayedDiagnostic.cpp
@@ -15,7 +15,8 @@
 //
 //===--===//
 #include "clang/Sema/DelayedDiagnostic.h"
-#include 
+#include 
+
 using namespace clang;
 using namespace sema;
 
Index: lib/Lex/ModuleMap.cpp
===
--- lib/Lex/ModuleMap.cpp
+++ lib/Lex/ModuleMap.cpp
@@ -30,10 +30,10 @@
 #include "llvm/Support/Host.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/raw_ostream.h"
-#include 
 #if defined(LLVM_ON_UNIX)
-#include 
+#include 
 #endif
+#include 
 using namespace clang;
 
 Module::ExportDecl 
Index: lib/Lex/HeaderSearch.cpp
===
--- lib/Lex/HeaderSearch.cpp
+++ lib/Lex/HeaderSearch.cpp
@@ -29,8 +29,9 @@
 #include 
 #include 
 #if defined(LLVM_ON_UNIX)
-#include 
+#include 
 #endif
+
 using namespace clang;
 
 const IdentifierInfo *
Index: lib/Frontend/CompilerInstance.cpp
===
--- lib/Frontend/CompilerInstance.cpp
+++ lib/Frontend/CompilerInstance.cpp
@@ -46,9 +46,9 @@
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/Timer.h"
 #include "llvm/Support/raw_ostream.h"
+#include 
 #include 
 #include 
-#include 
 #include 
 
 using namespace clang;
Index: lib/Frontend/CodeGenOptions.cpp
===
--- lib/Frontend/CodeGenOptions.cpp
+++ lib/Frontend/CodeGenOptions.cpp
@@ -8,7 +8,7 @@
 //===--===//
 
 #include "clang/Frontend/CodeGenOptions.h"
-#include 
+#include 
 
 namespace clang {
 
Index: lib/Driver/Types.cpp
===
--- lib/Driver/Types.cpp
+++ lib/Driver/Types.cpp
@@ -11,7 +11,7 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringSwitch.h"
 #include 
-#include 
+#include 
 
 using namespace clang::driver;
 using namespace clang::driver::types;
Index: lib/CodeGen/CGOpenCLRuntime.cpp
===
--- lib/CodeGen/CGOpenCLRuntime.cpp
+++ lib/CodeGen/CGOpenCLRuntime.cpp
@@ -18,7 +18,7 @@
 #include "TargetInfo.h"
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/GlobalValue.h"
-#include 
+#include 
 
 using namespace clang;
 using namespace CodeGen;
Index: include/clang/Basic/TargetBuiltins.h
===
--- include/clang/Basic/TargetBuiltins.h
+++ include/clang/Basic/TargetBuiltins.h
@@ -16,8 +16,8 @@
 #ifndef LLVM_CLANG_BASIC_TARGETBUILTINS_H
 #define LLVM_CLANG_BASIC_TARGETBUILTINS_H
 
-#include 
 #include "clang/Basic/Builtins.h"
+#include 
 #undef PPC
 
 namespace clang {
Index: include/clang/Basic/Linkage.h
===
--- include/clang/Basic/Linkage.h
+++ include/clang/Basic/Linkage.h
@@ -14,8 +14,6 @@
 #ifndef LLVM_CLANG_BASIC_LINKAGE_H
 #define LLVM_CLANG_BASIC_LINKAGE_H
 
-#include 
-#include 
 #include 
 
 namespace clang {
Index: include/clang/Analysis/Analyses/ThreadSafetyTIL.h
===
--- include/clang/Analysis/Analyses/ThreadSafetyTIL.h
+++ include/clang/Analysis/Analyses/ThreadSafetyTIL.h
@@ -53,7 +53,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2016-12-12 Thread Michael Sharpe via Phabricator via cfe-commits
michael.sharpe added a comment.

In https://reviews.llvm.org/D27655#619307, @Eugene.Zelenko wrote:

> Did you enable analysis of headers in Clang-tidy?


I had not, thanks for the tip.




Comment at: lib/Lex/ModuleMap.cpp:35
 #if defined(LLVM_ON_UNIX)
-#include 
+#include 
 #endif

Eugene.Zelenko wrote:
> Could limits be used instead?
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.


https://reviews.llvm.org/D27655



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits