Remove getName from ValueDecl

Push the getName method from ValueDecl down to only those types that are
guaranteed to have a name that is backed by an identifier and that will
not be special.
This commit is contained in:
Alex Hoppen
2017-05-05 12:00:25 +01:00
parent b9db212ee6
commit 2078ec6f0a
5 changed files with 17 additions and 7 deletions

View File

@@ -770,7 +770,7 @@ void Parser::diagnoseRedefinition(ValueDecl *Prev, ValueDecl *New) {
assert(New != Prev && "Cannot conflict with self");
diagnose(New->getLoc(), diag::decl_redefinition, New->isDefinition());
diagnose(Prev->getLoc(), diag::previous_decldef, Prev->isDefinition(),
Prev->getName());
Prev->getBaseName());
}
struct ParserUnit::Implementation {