瀏覽代碼

[clang][index-while-building][NFC] FileIndexRecord - Comments, replace auto with type

Differential Revision: https://reviews.llvm.org/D58478

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355036 91177308-0d34-0410-b5e6-96231b3b80d8
Jan Korous 6 年之前
父節點
當前提交
2321ead80c
共有 3 個文件被更改,包括 12 次插入14 次删除
  1. 5 6
      include/clang/Index/DeclOccurrence.h
  2. 2 2
      lib/Index/FileIndexRecord.cpp
  3. 5 6
      lib/Index/FileIndexRecord.h

+ 5 - 6
include/clang/Index/DeclOccurrence.h

@@ -1,9 +1,8 @@
-//===--- DeclOccurrence.h - An occurrence of a decl within a file ---------===//
+//===- DeclOccurrence.h - An occurrence of a decl within a file -*- C++ -*-===//
 //
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
 
@@ -39,4 +38,4 @@ struct DeclOccurrence {
 } // namespace index
 } // namespace clang
 
-#endif
+#endif // LLVM_CLANG_INDEX_DECLOCCURRENCE_H

+ 2 - 2
lib/Index/FileIndexRecord.cpp

@@ -1,4 +1,4 @@
-//===--- FileIndexRecord.cpp - Index data per file ------------------------===//
+//===--- FileIndexRecord.cpp - Index data per file --------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -42,7 +42,7 @@ void FileIndexRecord::addDeclOccurence(SymbolRoleSet Roles, unsigned Offset,
 void FileIndexRecord::print(llvm::raw_ostream &OS) const {
   OS << "DECLS BEGIN ---\n";
   for (auto &DclInfo : Decls) {
-    auto D = DclInfo.Dcl;
+    const Decl *D = DclInfo.Dcl;
     SourceManager &SM = D->getASTContext().getSourceManager();
     SourceLocation Loc = SM.getFileLoc(D->getLocation());
     PresumedLoc PLoc = SM.getPresumedLoc(Loc);

+ 5 - 6
lib/Index/FileIndexRecord.h

@@ -1,9 +1,8 @@
-//===--- FileIndexRecord.h - Index data per file --------------------------===//
+//===--- FileIndexRecord.h - Index data per file ----------------*- C++ -*-===//
 //
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
 
@@ -55,4 +54,4 @@ public:
 } // end namespace index
 } // end namespace clang
 
-#endif
+#endif // LLVM_CLANG_LIB_INDEX_FILEINDEXRECORD_H