Builtin types are subsitutable if they are qualified. Fixes PR5196.

llvm-svn: 84237
This commit is contained in:
Anders Carlsson 2009-10-16 02:06:06 +00:00
parent 5d9134747b
commit f847117ac8
2 changed files with 6 additions and 1 deletions

View File

@ -705,7 +705,7 @@ void CXXNameMangler::mangleType(QualType T) {
// Only operate on the canonical type!
T = Context.getASTContext().getCanonicalType(T);
bool IsSubstitutable = !isa<BuiltinType>(T);
bool IsSubstitutable = T.hasQualifiers() || !isa<BuiltinType>(T);
if (IsSubstitutable && mangleSubstitution(T))
return;

View File

@ -54,3 +54,8 @@ template<typename T> void ft3(S1<T>, S1<char>) { }
// CHECK: @_ZN2NS3ft3IiEEvNS_2S1IT_EENS1_IcEE
template void ft3<int>(S1<int>, S1<char>);
}
// PR5196
// CHECK: @_Z1fPKcS0_
void f(const char*, const char*) {}