Using the proper helper function instead of manually doing this work. No functional...
authorAaron Ballman <aaron@aaronballman.com>
Fri, 3 Jan 2014 15:02:58 +0000 (15:02 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Fri, 3 Jan 2014 15:02:58 +0000 (15:02 +0000)
llvm-svn: 198421

clang/lib/Sema/SemaType.cpp

index 95e023a..87af59a 100644 (file)
@@ -1737,13 +1737,13 @@ QualType Sema::BuildMemberPointerType(QualType T, QualType Class,
   //   with reference type, or "cv void."
   if (T->isReferenceType()) {
     Diag(Loc, diag::err_illegal_decl_mempointer_to_reference)
-      << (Entity? Entity.getAsString() : "type name") << T;
+      << getPrintableNameForEntity(Entity) << T;
     return QualType();
   }
 
   if (T->isVoidType()) {
     Diag(Loc, diag::err_illegal_decl_mempointer_to_void)
-      << (Entity? Entity.getAsString() : "type name");
+      << getPrintableNameForEntity(Entity);
     return QualType();
   }