[PATCH] D36187: [clang-diff] Use the relative name for NamedDecls

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 18 08:28:44 PDT 2017

arphaman added inline comments.

Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:371
+  std::string ContextPrefix;
+  if (auto *Namespace = dyn_cast<NamespaceDecl>(Context))
+    ContextPrefix = Namespace->getQualifiedNameAsString();
You don't need to check both `NamespaceDecl` and `TagDecl`, since you can just do one if with a `NamedDecl`.


More information about the cfe-commits mailing list