Using the proper helper function instead of manually doing this work. No functional changes intended.

llvm-svn: 198421
This commit is contained in:
Aaron Ballman 2014-01-03 15:02:58 +00:00
parent b9bb201194
commit d1e6e141c1
1 changed files with 2 additions and 2 deletions

View 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();
}