[PATCH] D36187: [clang-diff] Use the relative name for NamedDecls
Johannes Altmanninger via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 18 10:04:48 PDT 2017
johannes added inline comments.
================
Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:371
+ std::string ContextPrefix;
+ if (auto *Namespace = dyn_cast<NamespaceDecl>(Context))
+ ContextPrefix = Namespace->getQualifiedNameAsString();
----------------
arphaman wrote:
> You don't need to check both `NamespaceDecl` and `TagDecl`, since you can just do one if with a `NamedDecl`.
FunctionDecl should not be used for example
https://reviews.llvm.org/D36187
More information about the cfe-commits
mailing list