Fixed/added namespace ending comments using clang-tidy. NFC

The patch is generated using this command:

  $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
      -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
      work/llvm/tools/clang

To reduce churn, not touching namespaces spanning less than 10 lines.

llvm-svn: 240270
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index 7242793..5ecedc7 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/lib/Serialization/ASTReader.cpp
@@ -1686,7 +1686,7 @@
     // files.
     IdentifierInfo *getIdentifierInfo() const { return Found; }
   };
-}
+} // namespace
 
 void ASTReader::updateOutOfDateIdentifier(IdentifierInfo &II) {
   // Note that we are loading an identifier.
@@ -3954,7 +3954,7 @@
                                       SuggestedPredefines, ExistingLangOpts);
     }
   };
-}
+} // namespace
 
 bool ASTReader::readASTFileControlBlock(
     StringRef Filename, FileManager &FileMgr,
@@ -4739,7 +4739,7 @@
   }
 };
 
-}
+} // namespace
 
 PreprocessedEntityID ASTReader::findPreprocessedEntity(SourceLocation Loc,
                                                        bool EndsAfter) const {
@@ -4859,7 +4859,7 @@
     
     Optional<HeaderFileInfo> getHeaderFileInfo() const { return HFI; }
   };
-}
+} // namespace
 
 HeaderFileInfo ASTReader::GetHeaderFileInfo(const FileEntry *FE) {
   HeaderFileInfoVisitor Visitor(FE);
@@ -6192,7 +6192,7 @@
       return false;
     }
   };
-}
+} // namespace
 
 ExternalLoadResult ASTReader::FindExternalLexicalDecls(const DeclContext *DC,
                                          bool (*isKindWeWant)(Decl::Kind),
@@ -6237,7 +6237,7 @@
   }
 };
 
-}
+} // namespace
 
 void ASTReader::FindFileRegionDecls(FileID File,
                                     unsigned Offset, unsigned Length,
@@ -6355,7 +6355,7 @@
       return FoundAnything;
     }
   };
-}
+} // namespace
 
 /// \brief Retrieve the "definitive" module file for the definition of the
 /// given declaration context, if there is one.
@@ -6504,7 +6504,7 @@
       return FoundAnything && !This->VisitAll;
     }
   };
-}
+} // namespace
 
 void ASTReader::completeVisibleDeclsMap(const DeclContext *DC) {
   if (!DC->hasExternalVisibleStorage())
@@ -6848,7 +6848,7 @@
 
     StringRef Next() override;
   };
-}
+} // namespace clang
 
 ASTIdentifierIterator::ASTIdentifierIterator(const ASTReader &Reader)
   : Reader(Reader), Index(Reader.ModuleMgr.size() - 1) {
@@ -6960,7 +6960,8 @@
     }
     bool factoryHasMoreThanOneDecl() const { return FactoryHasMoreThanOneDecl; }
   };
-} } // end namespace clang::serialization
+} // namespace serialization
+ } // namespace clang
 
 /// \brief Add the given set of methods to the method list.
 static void addMethodsToPool(Sema &S, ArrayRef<ObjCMethodDecl *> Methods,
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index 00ebd3e..136ef1a 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -387,7 +387,7 @@
       }
     }
   };
-}
+} // namespace clang
 
 namespace {
 /// Iterator over the redeclarations of a declaration that have already
@@ -423,7 +423,7 @@
     return A.Current != B.Current;
   }
 };
-}
+} // namespace
 template<typename DeclT>
 llvm::iterator_range<MergedRedeclIterator<DeclT>> merged_redecls(DeclT *D) {
   return llvm::iterator_range<MergedRedeclIterator<DeclT>>(
@@ -2934,7 +2934,7 @@
           std::make_pair(Canon, IsUnresolved ? PrevFD : FD));
   }
 }
-}
+} // namespace clang
 void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader, ...) {
   llvm_unreachable("attachPreviousDecl on non-redeclarable declaration");
 }
@@ -3490,7 +3490,7 @@
       return Chain;
     }
   };
-}
+} // namespace
 
 void ASTReader::loadPendingDeclChain(Decl *CanonDecl) {
   // The decl might have been merged into something else after being added to
@@ -3647,7 +3647,7 @@
       return true;
     }
   };
-}
+} // namespace
 
 void ASTReader::loadObjCCategories(serialization::GlobalDeclID ID,
                                    ObjCInterfaceDecl *D,
diff --git a/clang/lib/Serialization/ASTReaderInternals.h b/clang/lib/Serialization/ASTReaderInternals.h
index d1b032b..9a15327 100644
--- a/clang/lib/Serialization/ASTReaderInternals.h
+++ b/clang/lib/Serialization/ASTReaderInternals.h
@@ -241,8 +241,8 @@
 typedef llvm::OnDiskChainedHashTable<HeaderFileInfoTrait>
   HeaderFileInfoLookupTable;
   
-} // end namespace clang::serialization::reader
-} // end namespace clang::serialization
+} // namespace reader
+} // namespace serialization
 } // end namespace clang
 
 
diff --git a/clang/lib/Serialization/ASTReaderStmt.cpp b/clang/lib/Serialization/ASTReaderStmt.cpp
index c15f6b0..ae22101b 100644
--- a/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -103,7 +103,7 @@
     void Visit##Type(Type *);
 #include "clang/AST/StmtNodes.inc"
   };
-}
+} // namespace clang
 
 void ASTStmtReader::
 ReadTemplateKWAndArgsInfo(ASTTemplateKWAndArgsInfo &Args,
@@ -1699,7 +1699,7 @@
 #include "clang/Basic/OpenMPKinds.def"
   OMPClause *readClause();
 };
-}
+} // namespace clang
 
 OMPClause *OMPClauseReader::readClause() {
   OMPClause *C;
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 5bb0bec..45ab99c 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -98,7 +98,7 @@
 #define ABSTRACT_TYPE(Class, Base)
 #include "clang/AST/TypeNodes.def"
   };
-}
+} // namespace
 
 void ASTTypeWriter::VisitBuiltinType(const BuiltinType *T) {
   llvm_unreachable("Built-in types are never serialized");
@@ -458,7 +458,7 @@
   void VisitFunctionTypeLoc(FunctionTypeLoc TyLoc);
 };
 
-}
+} // namespace
 
 void TypeLocWriter::VisitQualifiedTypeLoc(QualifiedTypeLoc TL) {
   // nothing to do
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp
index 6c5bc5b..0f81330 100644
--- a/clang/lib/Serialization/ASTWriterDecl.cpp
+++ b/clang/lib/Serialization/ASTWriterDecl.cpp
@@ -193,7 +193,7 @@
       Record.append(LazySpecializations.begin(), LazySpecializations.end());
     }
   };
-}
+} // namespace clang
 
 void ASTDeclWriter::Visit(Decl *D) {
   DeclVisitor<ASTDeclWriter>::Visit(D);
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp
index a461d3f..f58ce5f 100644
--- a/clang/lib/Serialization/ASTWriterStmt.cpp
+++ b/clang/lib/Serialization/ASTWriterStmt.cpp
@@ -47,7 +47,7 @@
     void Visit##Type(Type *);
 #include "clang/AST/StmtNodes.inc"
   };
-}
+} // namespace clang
 
 void ASTStmtWriter::
 AddTemplateKWAndArgsInfo(const ASTTemplateKWAndArgsInfo &Args) {
@@ -1708,7 +1708,7 @@
 #include "clang/Basic/OpenMPKinds.def"
   void writeClause(OMPClause *C);
 };
-}
+} // namespace clang
 
 void OMPClauseWriter::writeClause(OMPClause *C) {
   Record.push_back(C->getClauseKind());
diff --git a/clang/lib/Serialization/GlobalModuleIndex.cpp b/clang/lib/Serialization/GlobalModuleIndex.cpp
index 2c7da3e8..1a6fc78 100644
--- a/clang/lib/Serialization/GlobalModuleIndex.cpp
+++ b/clang/lib/Serialization/GlobalModuleIndex.cpp
@@ -52,7 +52,7 @@
     /// \brief The index for identifiers.
     IDENTIFIER_INDEX
   };
-}
+} // namespace
 
 /// \brief The name of the global index file.
 static const char * const IndexFileName = "modules.idx";
@@ -121,7 +121,7 @@
 typedef llvm::OnDiskIterableChainedHashTable<IdentifierIndexReaderTrait>
     IdentifierIndexTable;
 
-}
+} // namespace
 
 GlobalModuleIndex::GlobalModuleIndex(std::unique_ptr<llvm::MemoryBuffer> Buffer,
                                      llvm::BitstreamCursor Cursor)
@@ -430,7 +430,7 @@
     /// \brief Write the index to the given bitstream.
     void writeIndex(llvm::BitstreamWriter &Stream);
   };
-}
+} // namespace
 
 static void emitBlockID(unsigned ID, const char *Name,
                         llvm::BitstreamWriter &Stream,
@@ -493,7 +493,7 @@
       return std::make_pair(k, IsInteresting);
     }
   };
-}
+} // namespace
 
 bool GlobalModuleIndexBuilder::loadModuleFile(const FileEntry *File) {
   // Open the module file.
@@ -684,7 +684,7 @@
   }
 };
 
-}
+} // namespace
 
 void GlobalModuleIndexBuilder::writeIndex(llvm::BitstreamWriter &Stream) {
   using namespace llvm;
@@ -882,7 +882,7 @@
       return Result;
     }
   };
-}
+} // namespace
 
 IdentifierIterator *GlobalModuleIndex::createIdentifierIterator() const {
   IdentifierIndexTable &Table =
diff --git a/clang/lib/Serialization/ModuleManager.cpp b/clang/lib/Serialization/ModuleManager.cpp
index 03d8ed0..f5dff2c 100644
--- a/clang/lib/Serialization/ModuleManager.cpp
+++ b/clang/lib/Serialization/ModuleManager.cpp
@@ -534,7 +534,7 @@
       return M->ModuleName;
     }
   };
-}
+} // namespace llvm
 
 void ModuleManager::viewGraph() {
   llvm::ViewGraph(*this, "Modules");