[cfe-commits] r102171 - in /cfe/trunk: include/clang/AST/DeclarationName.h test/SemaTemplate/destructor-template.cpp
Douglas Gregor
dgregor at apple.com
Thu Apr 22 21:51:46 PDT 2010
Author: dgregor
Date: Thu Apr 22 23:51:46 2010
New Revision: 102171
URL: http://llvm.org/viewvc/llvm-project?rev=102171&view=rev
Log:
Strip cv-qualifiers when building C++ constructor and destructor
names.
Modified:
cfe/trunk/include/clang/AST/DeclarationName.h
cfe/trunk/test/SemaTemplate/destructor-template.cpp
Modified: cfe/trunk/include/clang/AST/DeclarationName.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclarationName.h?rev=102171&r1=102170&r2=102171&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclarationName.h (original)
+++ cfe/trunk/include/clang/AST/DeclarationName.h Thu Apr 22 23:51:46 2010
@@ -334,13 +334,15 @@
/// getCXXConstructorName - Returns the name of a C++ constructor
/// for the given Type.
DeclarationName getCXXConstructorName(CanQualType Ty) {
- return getCXXSpecialName(DeclarationName::CXXConstructorName, Ty);
+ return getCXXSpecialName(DeclarationName::CXXConstructorName,
+ Ty.getUnqualifiedType());
}
/// getCXXDestructorName - Returns the name of a C++ destructor
/// for the given Type.
DeclarationName getCXXDestructorName(CanQualType Ty) {
- return getCXXSpecialName(DeclarationName::CXXDestructorName, Ty);
+ return getCXXSpecialName(DeclarationName::CXXDestructorName,
+ Ty.getUnqualifiedType());
}
/// getCXXConversionFunctionName - Returns the name of a C++
Modified: cfe/trunk/test/SemaTemplate/destructor-template.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/destructor-template.cpp?rev=102171&r1=102170&r2=102171&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/destructor-template.cpp (original)
+++ cfe/trunk/test/SemaTemplate/destructor-template.cpp Thu Apr 22 23:51:46 2010
@@ -32,3 +32,11 @@
template struct X<int>;
}
+namespace cvquals {
+ template<typename T>
+ void f(int *ptr) {
+ ptr->~T();
+ }
+
+ template void f<const volatile int>(int *);
+}
More information about the cfe-commits
mailing list