aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/Sema.h1
-rw-r--r--lib/Sema/SemaDecl.cpp5
-rw-r--r--lib/Sema/SemaDeclCXX.cpp8
3 files changed, 3 insertions, 11 deletions
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 6a86a8ab78..efe481abae 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -284,7 +284,6 @@ public:
//
virtual TypeTy *isTypeName(const IdentifierInfo &II, Scope *S,
const CXXScopeSpec *SS);
- virtual std::string getTypeAsString(TypeTy *Type);
virtual DeclTy *ActOnDeclarator(Scope *S, Declarator &D, DeclTy *LastInGroup);
virtual DeclTy *ActOnParamDeclarator(Scope *S, Declarator &D);
virtual void ActOnParamDefaultArgument(DeclTy *param,
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index bf29bdf2ce..8c3a5c12c6 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -45,11 +45,6 @@ Sema::TypeTy *Sema::isTypeName(const IdentifierInfo &II, Scope *S,
return 0;
}
-std::string Sema::getTypeAsString(TypeTy *Type) {
- QualType Ty = QualType::getFromOpaquePtr(Type);
- return Ty.getAsString();
-}
-
DeclContext *Sema::getContainingDC(DeclContext *DC) {
if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(DC)) {
// A C++ out-of-line method will return to the file declaration context.
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 128df11385..9bf10cece8 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -705,7 +705,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
CXXConstructorDecl *DefaultCon =
CXXConstructorDecl::Create(Context, ClassDecl,
ClassDecl->getLocation(),
- ClassDecl->getIdentifier(),
+ &Context.Idents.getConstructorId(),
Context.getFunctionType(Context.VoidTy,
0, 0, false, 0),
/*isExplicit=*/false,
@@ -771,7 +771,7 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
CXXConstructorDecl *CopyConstructor
= CXXConstructorDecl::Create(Context, ClassDecl,
ClassDecl->getLocation(),
- ClassDecl->getIdentifier(),
+ &Context.Idents.getConstructorId(),
Context.getFunctionType(Context.VoidTy,
&ArgType, 1,
false, 0),
@@ -795,12 +795,10 @@ void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
// If a class has no user-declared destructor, a destructor is
// declared implicitly. An implicitly-declared destructor is an
// inline public member of its class.
- std::string DestructorName = "~";
- DestructorName += ClassDecl->getName();
CXXDestructorDecl *Destructor
= CXXDestructorDecl::Create(Context, ClassDecl,
ClassDecl->getLocation(),
- &PP.getIdentifierTable().get(DestructorName),
+ &Context.Idents.getConstructorId(),
Context.getFunctionType(Context.VoidTy,
0, 0, false, 0),
/*isInline=*/true,