Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(577)

Unified Diff: tools/clang/rewrite_to_chrome_style/EditTracker.h

Issue 2677483004: Emit edit tracking information from *all* rewriters. (Closed)
Patch Set: It even works this time... Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/clang/rewrite_to_chrome_style/EditTracker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/rewrite_to_chrome_style/EditTracker.h
diff --git a/tools/clang/rewrite_to_chrome_style/EditTracker.h b/tools/clang/rewrite_to_chrome_style/EditTracker.h
index ef5e30145adade2118b257dd79ab59d487006647..0d8bf0c115eeaefc16e7e266c999788dbacd9b80 100644
--- a/tools/clang/rewrite_to_chrome_style/EditTracker.h
+++ b/tools/clang/rewrite_to_chrome_style/EditTracker.h
@@ -22,11 +22,19 @@ struct EditInfo {
llvm::StringSet<> filenames;
};
+enum class RenameCategory {
+ kEnumValue,
+ kField,
+ kFunction,
+ kUnresolved,
+ kVariable,
+};
+
// Simple class that tracks the edits made by path. Used to dump the databaes
// used by the Blink rebase helper.
class EditTracker {
public:
- EditTracker() = default;
+ explicit EditTracker(RenameCategory category);
void Add(const clang::SourceManager& source_manager,
clang::SourceLocation location,
@@ -36,7 +44,7 @@ class EditTracker {
// Serializes the tracked edits to |output|. Emits:
// <filename>:<tag>:<original text>:<new text>
// for each distinct filename for each tracked edit.
- void SerializeTo(llvm::StringRef tag, llvm::raw_ostream& output) const;
+ void SerializeTo(llvm::raw_ostream& output) const;
private:
EditTracker(const EditTracker&) = delete;
@@ -44,6 +52,8 @@ class EditTracker {
// The string key is the original text.
llvm::StringMap<EditInfo> tracked_edits_;
+
+ RenameCategory category_;
};
#endif // #define TOOLS_CLANG_REWRITE_TO_CHROME_STYLE_EDIT_TRACKER_H_
« no previous file with comments | « no previous file | tools/clang/rewrite_to_chrome_style/EditTracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698