Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate
space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80642 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp
index d09358c..4be4a8a 100644
--- a/lib/AST/StmtPrinter.cpp
+++ b/lib/AST/StmtPrinter.cpp
@@ -739,6 +739,9 @@
   OS << (Node->isArrow() ? "->" : ".");
   // FIXME: Suppress printing references to unnamed objects
   // representing anonymous unions/structs
+  if (NestedNameSpecifier *Qualifier = Node->getQualifier())
+    Qualifier->print(OS, Policy);
+
   OS << Node->getMemberDecl()->getNameAsString();
 }
 void StmtPrinter::VisitObjCIsaExpr(ObjCIsaExpr *Node) {
@@ -1126,16 +1129,6 @@
   OS << ")";
 }
 
-void StmtPrinter::VisitCXXAdornedMemberExpr(CXXAdornedMemberExpr *Node) {
-  // FIXME: Suppress printing implicit bases (like "this")
-  PrintExpr(Node->getBase());
-  OS << (Node->isArrow() ? "->" : ".");
-  // FIXME: Suppress printing references to unnamed objects
-  // representing anonymous unions/structs
-  Node->getQualifier()->print(OS, Policy);
-  OS << Node->getMemberDecl()->getNameAsString();
-}
-
 void StmtPrinter::VisitCXXUnresolvedMemberExpr(CXXUnresolvedMemberExpr *Node) {
   PrintExpr(Node->getBase());
   OS << (Node->isArrow() ? "->" : ".");