From: Eric Liu Date: Thu, 28 Apr 2016 07:51:47 +0000 (+0000) Subject: Addressed review's comments. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c27e5fc4d7fcc83a5b553389d67083286d4a63c;p=clang Addressed review's comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267858 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Format/AffectedRangeManager.h b/lib/Format/AffectedRangeManager.h index 9142315a9f..88b4dcfe76 100644 --- a/lib/Format/AffectedRangeManager.h +++ b/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/lib/Format/Format.cpp b/lib/Format/Format.cpp index d55886494b..6370be903d 100644 --- a/lib/Format/Format.cpp +++ b/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)) {}