Index: lib/Tooling/ASTDiff/ASTDiff.cpp =================================================================== --- lib/Tooling/ASTDiff/ASTDiff.cpp +++ lib/Tooling/ASTDiff/ASTDiff.cpp @@ -607,6 +607,8 @@ if (auto *ND = ASTNode.get()) { if (ND->getDeclName().isIdentifier()) return ND->getQualifiedNameAsString(); + else + return std::string(); } return llvm::None; } @@ -617,6 +619,8 @@ if (auto *ND = ASTNode.get()) { if (ND->getDeclName().isIdentifier()) return ND->getName(); + else + return StringRef(); } return llvm::None; } Index: test/Tooling/clang-diff-heuristics.cpp =================================================================== --- test/Tooling/clang-diff-heuristics.cpp +++ test/Tooling/clang-diff-heuristics.cpp @@ -10,6 +10,8 @@ void f2(int) {;} +class C3 { C3(); }; + #else // same parents, same value @@ -22,4 +24,8 @@ // CHECK: Match CompoundStmt void f2() {} +// same parents, same identifier +// CHECK: Match CXXConstructorDecl(9) to CXXConstructorDecl(6) +class C3 { C3(int); }; + #endif