diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-01-13 00:11:19 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-01-13 00:11:19 +0000 |
commit | e63ef48b76b84e7ffb0a38fbf475ddea5c48adb4 (patch) | |
tree | 9df0da640ad5f77ea7910ebaea6acf482ebb4282 /lib/AST/DeclarationName.cpp | |
parent | 35c33293efae24750bccdb88798361c59618d97e (diff) |
Make sure we don't name a constructor or destructor with a qualified
type. It leads to very weird errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62124 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclarationName.cpp')
-rw-r--r-- | lib/AST/DeclarationName.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AST/DeclarationName.cpp b/lib/AST/DeclarationName.cpp index 044acd71d4..ae579c26fa 100644 --- a/lib/AST/DeclarationName.cpp +++ b/lib/AST/DeclarationName.cpp @@ -286,9 +286,11 @@ DeclarationNameTable::getCXXSpecialName(DeclarationName::NameKind Kind, switch (Kind) { case DeclarationName::CXXConstructorName: EKind = DeclarationNameExtra::CXXConstructor; + assert(Ty.getCVRQualifiers() == 0 && "Constructor type must be unqualified"); break; case DeclarationName::CXXDestructorName: EKind = DeclarationNameExtra::CXXDestructor; + assert(Ty.getCVRQualifiers() == 0 && "Destructor type must be unqualified"); break; case DeclarationName::CXXConversionFunctionName: EKind = DeclarationNameExtra::CXXConversionFunction; |