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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to