diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-15 21:18:27 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-15 21:18:27 +0000 |
commit | 49f25ecf7ff358039ce4c9254b867f32110e660e (patch) | |
tree | dbee2c676279bf24e9850605b96ef45f5129fab7 /lib/AST/DeclarationName.cpp | |
parent | 3bba33d6f58844d4924ab1e221dc2ff44c521624 (diff) |
Make sure that we use the canonical type for the names of instantiated
constructors and destructors. This is a requirement of
DeclarationNameTable::getCXXSpecialName that we weren't assert()'ing,
so it should have been caught much earlier :(
Big thanks to Anders for the test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclarationName.cpp')
-rw-r--r-- | lib/AST/DeclarationName.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/DeclarationName.cpp b/lib/AST/DeclarationName.cpp index 15461bb99b..a17abde777 100644 --- a/lib/AST/DeclarationName.cpp +++ b/lib/AST/DeclarationName.cpp @@ -302,7 +302,8 @@ DeclarationNameTable::getCXXSpecialName(DeclarationName::NameKind Kind, assert(Kind >= DeclarationName::CXXConstructorName && Kind <= DeclarationName::CXXConversionFunctionName && "Kind must be a C++ special name kind"); - + assert(Ty->isCanonical() && + "Can only build C++ special names from canonical types"); llvm::FoldingSet<CXXSpecialName> *SpecialNames = static_cast<llvm::FoldingSet<CXXSpecialName>*>(CXXSpecialNamesImpl); |