summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2016-04-28 07:51:47 +0000
committerEric Liu <ioeric@google.com>2016-04-28 07:51:47 +0000
commitc5cad396dde973c4a7251a39daf685f7f6dc6f14 (patch)
tree7d3fd8da077ad19687fd57608299a9d182f36ec7 /clang/lib/Format
parentbc5f581d47383b90e78277844265c09b709a2805 (diff)
downloadbcm5719-llvm-c5cad396dde973c4a7251a39daf685f7f6dc6f14.tar.gz
bcm5719-llvm-c5cad396dde973c4a7251a39daf685f7f6dc6f14.zip
Addressed review's comments.
llvm-svn: 267858
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/AffectedRangeManager.h4
-rw-r--r--clang/lib/Format/Format.cpp2
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)) {}
OpenPOWER on IntegriCloud