[PATCH] D39646: [clang-diff] Rename ChangeKind::None to NoChange

Johannes Altmanninger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 5 10:55:43 PST 2017


johannes created this revision.
Herald added a subscriber: klimek.

https://reviews.llvm.org/D39646

Files:
  include/clang/Tooling/ASTDiff/ASTDiff.h
  tools/clang-diff/ClangDiff.cpp


Index: tools/clang-diff/ClangDiff.cpp
===================================================================
--- tools/clang-diff/ClangDiff.cpp
+++ tools/clang-diff/ClangDiff.cpp
@@ -248,7 +248,7 @@
 
 static std::string getChangeKindAbbr(diff::ChangeKind Kind) {
   switch (Kind) {
-  case diff::None:
+  case diff::NoChange:
     return "";
   case diff::Delete:
     return "d";
@@ -300,7 +300,7 @@
     printHtml(OS, Value);
   }
   OS << "'";
-  if (Node.Change != diff::None)
+  if (Node.Change != diff::NoChange)
     OS << " class='" << getChangeKindAbbr(Node.Change) << "'";
   OS << ">";
 
@@ -409,7 +409,7 @@
                            diff::NodeRef Dst) {
   const diff::Node *Src = Diff.getMapped(DstTree, Dst);
   switch (Dst.Change) {
-  case diff::None:
+  case diff::NoChange:
     break;
   case diff::Delete:
     llvm_unreachable("The destination tree can't have deletions.");
Index: include/clang/Tooling/ASTDiff/ASTDiff.h
===================================================================
--- include/clang/Tooling/ASTDiff/ASTDiff.h
+++ include/clang/Tooling/ASTDiff/ASTDiff.h
@@ -26,7 +26,7 @@
 namespace diff {
 
 enum ChangeKind {
-  None,
+  NoChange,
   Delete,    // (Src): delete node Src.
   Update,    // (Src, Dst): update the value of node Src to match Dst.
   Insert,    // (Src, Dst, Pos): insert Src as child of Dst at offset Pos.
@@ -95,7 +95,7 @@
   int Depth, Height, Shift = 0;
   ast_type_traits::DynTypedNode ASTNode;
   SmallVector<NodeId, 4> Children;
-  ChangeKind Change = None;
+  ChangeKind Change = NoChange;
   Node(SyntaxTree::Impl &Tree) : Tree(Tree), Children() {}
 
   NodeId getId() const;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39646.121634.patch
Type: text/x-patch
Size: 1644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171105/b53fe289/attachment.bin>


More information about the cfe-commits mailing list