diff options
-rw-r--r-- | clang/lib/Format/AffectedRangeManager.h | 4 | ||||
-rw-r--r-- | 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 9142315a9f3..88b4dcfe76f 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<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 +# diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index d55886494b4..6370be903dd 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -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)) {} |