[Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

llvm-svn: 325659
diff --git a/clang/lib/Sema/IdentifierResolver.cpp b/clang/lib/Sema/IdentifierResolver.cpp
index 0bdb194..f31c517 100644
--- a/clang/lib/Sema/IdentifierResolver.cpp
+++ b/clang/lib/Sema/IdentifierResolver.cpp
@@ -1,4 +1,4 @@
-//===- IdentifierResolver.cpp - Lexical Scope Name lookup -------*- C++ -*-===//
+//===- IdentifierResolver.cpp - Lexical Scope Name lookup -----------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -14,10 +14,16 @@
 
 #include "clang/Sema/IdentifierResolver.h"
 #include "clang/AST/Decl.h"
+#include "clang/AST/DeclBase.h"
+#include "clang/AST/DeclarationName.h"
+#include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/LangOptions.h"
 #include "clang/Lex/ExternalPreprocessorSource.h"
 #include "clang/Lex/Preprocessor.h"
 #include "clang/Sema/Scope.h"
+#include "llvm/Support/ErrorHandling.h"
+#include <cassert>
+#include <cstdint>
 
 using namespace clang;
 
@@ -35,17 +41,17 @@
   /// impossible to add something to a pre-C++0x STL container without
   /// a completely unnecessary copy.
   struct IdDeclInfoPool {
-    IdDeclInfoPool(IdDeclInfoPool *Next) : Next(Next) {}
-    
     IdDeclInfoPool *Next;
     IdDeclInfo Pool[POOL_SIZE];
+
+    IdDeclInfoPool(IdDeclInfoPool *Next) : Next(Next) {}
   };
   
-  IdDeclInfoPool *CurPool;
-  unsigned int CurIndex;
+  IdDeclInfoPool *CurPool = nullptr;
+  unsigned int CurIndex = POOL_SIZE;
 
 public:
-  IdDeclInfoMap() : CurPool(nullptr), CurIndex(POOL_SIZE) {}
+  IdDeclInfoMap() = default;
 
   ~IdDeclInfoMap() {
     IdDeclInfoPool *Cur = CurPool;
@@ -60,7 +66,6 @@
   IdDeclInfo &operator[](DeclarationName Name);
 };
 
-
 //===----------------------------------------------------------------------===//
 // IdDeclInfo Implementation
 //===----------------------------------------------------------------------===//
@@ -83,9 +88,7 @@
 //===----------------------------------------------------------------------===//
 
 IdentifierResolver::IdentifierResolver(Preprocessor &PP)
-  : LangOpt(PP.getLangOpts()), PP(PP),
-    IdDeclInfos(new IdDeclInfoMap) {
-}
+    : LangOpt(PP.getLangOpts()), PP(PP), IdDeclInfos(new IdDeclInfoMap) {}
 
 IdentifierResolver::~IdentifierResolver() {
   delete IdDeclInfos;
@@ -245,12 +248,14 @@
 }
 
 namespace {
-  enum DeclMatchKind {
-    DMK_Different,
-    DMK_Replace,
-    DMK_Ignore
-  };
-}
+
+enum DeclMatchKind {
+  DMK_Different,
+  DMK_Replace,
+  DMK_Ignore
+};
+
+} // namespace
 
 /// \brief Compare two declarations to see whether they are different or,
 /// if they are the same, whether the new declaration should replace the