Don't print a void return type for C++ constructors and destructors when generating a predefined expr for them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90725 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sam Weinig 2009-12-06 23:55:13 +00:00
Родитель f062d9d443
Коммит 3a1ce1ed0f
2 изменённых файлов: 6 добавлений и 5 удалений

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

@ -203,7 +203,8 @@ std::string PredefinedExpr::ComputeName(ASTContext &Context, IdentType IT,
}
Proto += ")";
AFT->getResultType().getAsStringInternal(Proto, Policy);
if (!isa<CXXConstructorDecl>(FD) && !isa<CXXDestructorDecl>(FD))
AFT->getResultType().getAsStringInternal(Proto, Policy);
Out << Proto;

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

@ -12,12 +12,12 @@
// CHECK: private constant [38 x i8] c"void NS::Base::functionTemplate1(int)\00"
// CHECK: private constant [12 x i8] c"~Destructor\00"
// CHECK: private constant [35 x i8] c"void NS::Destructor::~Destructor()\00"
// CHECK: private constant [30 x i8] c"NS::Destructor::~Destructor()\00"
// CHECK: private constant [12 x i8] c"Constructor\00"
// CHECK: private constant [46 x i8] c"void NS::Constructor::Constructor(NS::Base *)\00"
// CHECK: private constant [39 x i8] c"void NS::Constructor::Constructor(int)\00"
// CHECK: private constant [36 x i8] c"void NS::Constructor::Constructor()\00"
// CHECK: private constant [41 x i8] c"NS::Constructor::Constructor(NS::Base *)\00"
// CHECK: private constant [34 x i8] c"NS::Constructor::Constructor(int)\00"
// CHECK: private constant [31 x i8] c"NS::Constructor::Constructor()\00"
// CHECK: private constant [16 x i8] c"virtualFunction\00"
// CHECK: private constant [44 x i8] c"virtual void NS::Derived::virtualFunction()\00"