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

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

@ -808,7 +808,7 @@ Parser::ExprResult Parser::ParseBuiltinPrimaryExpression() {
// All of these start with an open paren. // All of these start with an open paren.
if (Tok.isNot(tok::l_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); return ExprResult(true);
} }

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

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