From c5cad396dde973c4a7251a39daf685f7f6dc6f14 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Thu, 28 Apr 2016 07:51:47 +0000 Subject: [PATCH] Addressed review's comments. llvm-svn: 267858 --- clang/lib/Format/AffectedRangeManager.h | 4 +++- clang/lib/Format/Format.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clang/lib/Format/AffectedRangeManager.h b/clang/lib/Format/AffectedRangeManager.h index 9142315a9f34..88b4dcfe76ff 100644 --- a/clang/lib/Format/AffectedRangeManager.h +++ b/clang/lib/Format/AffectedRangeManager.h @@ -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 Ranges; }; @@ -63,4 +64,5 @@ private: } // namespace format } // namespace clang -#endif // LLVM_CLANG_LIB_FORMAT_WHITESPACEMANAGER_H +#endif // LLVM_CLANG_LIB_FORMAT_AFFECTEDRANGEMANAGER_H +# diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index d55886494b43..6370be903dde 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -1460,7 +1460,7 @@ public: std::unique_ptr FileMgr, std::unique_ptr VirtualSM, std::unique_ptr Diagnostics, - std::vector CharRanges) + const std::vector &CharRanges) : Style(Style), ID(ID), CharRanges(CharRanges.begin(), CharRanges.end()), SM(*VirtualSM), FileMgr(std::move(FileMgr)), VirtualSM(std::move(VirtualSM)), Diagnostics(std::move(Diagnostics)) {}