]> granicus.if.org Git - clang/commitdiff
Builtin types are subsitutable if they are qualified. Fixes PR5196.
authorAnders Carlsson <andersca@mac.com>
Fri, 16 Oct 2009 02:06:06 +0000 (02:06 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 16 Oct 2009 02:06:06 +0000 (02:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84237 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/Mangle.cpp
test/CodeGenCXX/mangle-subst.cpp

index fd772748dbda3e0b773b44b4f193573090308cc5..344ef06276bc7b80dc2b299ffcd823806feb805d 100644 (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;
 
index c53a6300aa19cf388220ec1289d3830a3a94761c..46a21b62b515dfa62e10deedca8a3a92f766e9f4 100644 (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*) {}
+