Addressed review's comments.
authorEric Liu <ioeric@google.com>
Thu, 28 Apr 2016 07:51:47 +0000 (07:51 +0000)
committerEric Liu <ioeric@google.com>
Thu, 28 Apr 2016 07:51:47 +0000 (07:51 +0000)
llvm-svn: 267858

clang/lib/Format/AffectedRangeManager.h
clang/lib/Format/Format.cpp

index 9142315..88b4dcf 100644 (file)
@@ -56,6 +56,7 @@ private:
   // Returns \c true if line or one if its children is affected.
   bool nonPPLineAffected(AnnotatedLine *Line,
                          const AnnotatedLine *PreviousLine);
+
   SourceManager &SourceMgr;
   const SmallVector<CharSourceRange, 8> Ranges;
 };
@@ -63,4 +64,5 @@ private:
 } // namespace format
 } // namespace clang
 
-#endif // LLVM_CLANG_LIB_FORMAT_WHITESPACEMANAGER_H
+#endif // LLVM_CLANG_LIB_FORMAT_AFFECTEDRANGEMANAGER_H
+#
index d558864..6370be9 100644 (file)
@@ -1460,7 +1460,7 @@ public:
               std::unique_ptr<FileManager> FileMgr,
               std::unique_ptr<SourceManager> VirtualSM,
               std::unique_ptr<DiagnosticsEngine> Diagnostics,
-              std::vector<CharSourceRange> CharRanges)
+              const std::vector<CharSourceRange> &CharRanges)
       : Style(Style), ID(ID), CharRanges(CharRanges.begin(), CharRanges.end()),
         SM(*VirtualSM), FileMgr(std::move(FileMgr)),
         VirtualSM(std::move(VirtualSM)), Diagnostics(std::move(Diagnostics)) {}