[PATCH] D34329: [clang-diff] Initial implementation.

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 4 03:29:40 PDT 2017


arphaman added inline comments.


================
Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:359
+
+  explicit SNodeId(int Id) : Id(Id){};
+  explicit SNodeId() = default;
----------------
NIT: This ';' is redundant.


================
Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:363
+  operator int() const { return Id; }
+  SNodeId &operator++() { return ++this->Id, *this; }
+  SNodeId &operator--() { return --this->Id, *this; }
----------------
NIT: You don't need 'this' here or in the 2 methods below.


================
Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:809
+    NodeId P1 = M.getSrc(P2);
+    assert(P1.isValid());
+    Node &Parent1 = T1.getMutableNode(P1);
----------------
Missing assertion message.


https://reviews.llvm.org/D34329





More information about the cfe-commits mailing list