remove uses of IdentifierInfo::getName()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59603 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-11-19 07:37:42 +00:00
Родитель 6cf3ed7be7
Коммит da83bac90a
3 изменённых файлов: 11 добавлений и 8 удалений

Просмотреть файл

@ -1372,8 +1372,12 @@ void Parser::ParseDeclaratorInternal(Declarator &D, bool PtrOperator) {
// C++ [dcl.ref]p4: There shall be no references to references.
DeclaratorChunk& InnerChunk = D.getTypeObject(D.getNumTypeObjects() - 1);
if (InnerChunk.Kind == DeclaratorChunk::Reference) {
Diag(InnerChunk.Loc, diag::err_illegal_decl_reference_to_reference)
<< (D.getIdentifier() ? D.getIdentifier()->getName() : "type name");
if (const IdentifierInfo *II = D.getIdentifier())
Diag(InnerChunk.Loc, diag::err_illegal_decl_reference_to_reference)
<< II;
else
Diag(InnerChunk.Loc, diag::err_illegal_decl_reference_to_reference)
<< "type name";
// Once we've complained about the reference-to-referwnce, we
// can go ahead and build the (technically ill-formed)
@ -1832,11 +1836,11 @@ void Parser::ParseFunctionDeclaratorIdentifierList(SourceLocation LParenLoc,
// Reject 'typedef int y; int test(x, y)', but continue parsing.
if (Actions.isTypeName(*ParmII, CurScope))
Diag(Tok, diag::err_unexpected_typedef_ident) << ParmII->getName();
Diag(Tok, diag::err_unexpected_typedef_ident) << ParmII;
// Verify that the argument identifier has not already been mentioned.
if (!ParamsSoFar.insert(ParmII)) {
Diag(Tok, diag::err_param_redefinition) <<ParmII->getName();
Diag(Tok, diag::err_param_redefinition) << ParmII;
} else {
// Remember this identifier in ParamInfo.
ParamInfo.push_back(DeclaratorChunk::ParamInfo(ParmII,
@ -1936,7 +1940,7 @@ void Parser::ParseTypeofSpecifier(DeclSpec &DS) {
if (Tok.isNot(tok::l_paren)) {
if (!getLang().CPlusPlus) {
Diag(Tok, diag::err_expected_lparen_after) << BuiltinII->getName();
Diag(Tok, diag::err_expected_lparen_after) << BuiltinII;
return;
}

Просмотреть файл

@ -808,7 +808,7 @@ Parser::ExprResult Parser::ParseBuiltinPrimaryExpression() {
// All of these start with an open paren.
if (Tok.isNot(tok::l_paren)) {
Diag(Tok, diag::err_expected_lparen_after) << BuiltinII->getName();
Diag(Tok, diag::err_expected_lparen_after) << BuiltinII;
return ExprResult(true);
}

Просмотреть файл

@ -209,8 +209,7 @@ static IdentifierInfo *constructSetterName(IdentifierTable &Idents,
memcpy(&SelectorName[3], Name->getName(), N);
SelectorName[3] = toupper(SelectorName[3]);
IdentifierInfo *Setter =
&Idents.get(SelectorName, &SelectorName[3 + N]);
IdentifierInfo *Setter = &Idents.get(SelectorName, &SelectorName[3 + N]);
delete[] SelectorName;
return Setter;
}