Convert IdentifierInfo's to be printed the same as DeclarationNames 
with implicit quotes around them.  This has a bunch of follow-on 
effects and requires tweaking to a whole lot of code.  This causes
a regression in two tests (xfailed) by causing it to emit things like:

  Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')

instead of:

  Line 10: duplicate interface declaration for category 'MyClass1(Category1)'

I will fix this in a follow-up commit.

As part of this, I had to start switching stuff to use ->getDeclName() instead
of Decl::getName() for consistency.  This is good, but I was planning to do this
as an independent patch.  There will be several follow-on patches
to clean up some of the mess, but this patch is already too big.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59917 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index e4811df..ce63d13 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -274,7 +274,7 @@
     if (!FD->getType()->isIncompleteType() &&
         S.Context.getTypeAlign(FD->getType()) <= 8)
       S.Diag(Attr.getLoc(), diag::warn_attribute_ignored_for_field_of_type)
-        << Attr.getName() << FD->getType().getAsString();
+        << Attr.getName() << FD->getType();
     else
       FD->addAttr(new PackedAttr(1));
   } else
@@ -533,8 +533,7 @@
   else if (TypeLen == 9 && !memcmp(TypeStr, "protected", 9))
     type = VisibilityAttr::ProtectedVisibility;
   else {
-    S.Diag(Attr.getLoc(), diag::warn_attribute_type_not_supported)
-      << "visibility" << TypeStr;
+    S.Diag(Attr.getLoc(), diag::warn_attribute_unknown_visibility) << TypeStr;
     return;
   }
   
@@ -1142,8 +1141,7 @@
   default:
 #if 0
     // TODO: when we have the full set of attributes, warn about unknown ones.
-    S.Diag(Attr->getLoc(), diag::warn_attribute_ignored)
-        <<  Attr->getName()->getName();
+    S.Diag(Attr->getLoc(), diag::warn_attribute_ignored) << Attr->getName();
 #endif
     break;
   }