diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-11-17 22:58:34 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-11-17 22:58:34 +0000 |
commit | 10bd36882406cdf4805e35add1ce2f11ab9ae152 (patch) | |
tree | dadf16647fecd2e461b2b18ae40f77dac201905b /lib/Parse/ParseDecl.cpp | |
parent | 34265e7133ad82148aa9b3ac097ed66728f4ff85 (diff) |
Eliminate all of the placeholder identifiers used for constructors,
destructors, and conversion functions. The placeholders were used to
work around the fact that the parser and some of Sema really wanted
declarators to have simple identifiers; now, the code that deals with
declarators will use DeclarationNames.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index baa510485a..048fafbe2d 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -1440,8 +1440,7 @@ void Parser::ParseDirectDeclarator(Declarator &D) { // a normal identifier. if (getLang().CPlusPlus && Actions.isCurrentClassName(*Tok.getIdentifierInfo(), CurScope)) - D.SetConstructor(Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope), - &PP.getIdentifierTable().getConstructorId(), + D.setConstructor(Actions.isTypeName(*Tok.getIdentifierInfo(), CurScope), Tok.getLocation()); else D.SetIdentifier(Tok.getIdentifierInfo(), Tok.getLocation()); @@ -1452,8 +1451,7 @@ void Parser::ParseDirectDeclarator(Declarator &D) { SourceLocation TildeLoc = ConsumeToken(); if (Tok.is(tok::identifier)) { if (TypeTy *Type = ParseClassName()) - D.SetDestructor(Type, &PP.getIdentifierTable().getDestructorId(), - TildeLoc); + D.setDestructor(Type, TildeLoc); else D.SetIdentifier(0, TildeLoc); } else { @@ -1469,9 +1467,7 @@ void Parser::ParseDirectDeclarator(Declarator &D) { } else { // This must be a conversion function (C++ [class.conv.fct]). if (TypeTy *ConvType = ParseConversionFunctionId()) { - D.SetConversionFunction(ConvType, - &PP.getIdentifierTable().getConversionFunctionId(), - OperatorLoc); + D.setConversionFunction(ConvType, OperatorLoc); } } } else if (Tok.is(tok::l_paren) && SS.isEmpty()) { |