[PATCH] D21666: [Tooling] Add optional argument to getFullyQualifiedName to prepend "::".
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 24 11:10:51 PDT 2016
rnk added inline comments.
================
Comment at: lib/AST/NestedNameSpecifier.cpp:50
@@ +49,3 @@
+
+ NestedNameSpecifier *P = const_cast<NestedNameSpecifier *>(Specifier);
+ while (P->getPrefix() != nullptr) {
----------------
Doesn't this mutate the AST in place? We shouldn't be doing that.
================
Comment at: lib/Tooling/Core/QualTypeNames.cpp:405
@@ -398,3 +404,3 @@
// is not the global scope.
Prefix = createNestedNameSpecifierForScopeOf(Ctx, QT.getTypePtr(),
true /*FullyQualified*/);
----------------
Rather than building the NNS here and mutating it after the fact, why not pass WithGlobalNsPrefix down to createNestedNameSpecifierForScopeOf?
http://reviews.llvm.org/D21666
More information about the cfe-commits
mailing list