summaryrefslogtreecommitdiffstats
path: root/clang/lib/Edit/EditedSource.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2018-03-27 00:01:49 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2018-03-27 00:01:49 +0000
commitdb914a46dabc7723319f47682813543883621aac (patch)
tree2c76f0882cc975eb4d6a8b16c221649075301fb8 /clang/lib/Edit/EditedSource.cpp
parent373c445c241697caf0f0632d643af824cdf5762c (diff)
downloadbcm5719-llvm-db914a46dabc7723319f47682813543883621aac.tar.gz
bcm5719-llvm-db914a46dabc7723319f47682813543883621aac.zip
[Edit, Rewrite] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 328597
Diffstat (limited to 'clang/lib/Edit/EditedSource.cpp')
-rw-r--r--clang/lib/Edit/EditedSource.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/lib/Edit/EditedSource.cpp b/clang/lib/Edit/EditedSource.cpp
index 444d0393ccc..0ff2447f77a 100644
--- a/clang/lib/Edit/EditedSource.cpp
+++ b/clang/lib/Edit/EditedSource.cpp
@@ -1,4 +1,4 @@
-//===----- EditedSource.cpp - Collection of source edits ------------------===//
+//===- EditedSource.cpp - Collection of source edits ----------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -9,12 +9,21 @@
#include "clang/Edit/EditedSource.h"
#include "clang/Basic/CharInfo.h"
+#include "clang/Basic/LLVM.h"
+#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Edit/Commit.h"
#include "clang/Edit/EditsReceiver.h"
+#include "clang/Edit/FileOffset.h"
#include "clang/Lex/Lexer.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
+#include <algorithm>
+#include <cassert>
+#include <tuple>
+#include <utility>
using namespace clang;
using namespace edit;
@@ -269,9 +278,11 @@ bool EditedSource::commit(const Commit &commit) {
struct CommitRAII {
EditedSource &Editor;
+
CommitRAII(EditedSource &Editor) : Editor(Editor) {
Editor.startingCommit();
}
+
~CommitRAII() {
Editor.finishedCommit();
}
OpenPOWER on IntegriCloud