From: Argyrios Kyrtzidis Date: Fri, 10 Feb 2012 20:10:32 +0000 (+0000) Subject: [libclang] Encode the template specialization parameters of a function X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad133ea9ed91904c649f7f5a1e2f784b3c3c7972;p=clang [libclang] Encode the template specialization parameters of a function specialization in its USR string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150264 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/libclang/CIndexUSRs.cpp b/tools/libclang/CIndexUSRs.cpp index 446baa08fa..f550394269 100644 --- a/tools/libclang/CIndexUSRs.cpp +++ b/tools/libclang/CIndexUSRs.cpp @@ -197,6 +197,16 @@ void USRGenerator::VisitFunctionDecl(FunctionDecl *D) { if (!Ctx.getLangOptions().CPlusPlus || D->isExternC()) return; + if (const TemplateArgumentList * + SpecArgs = D->getTemplateSpecializationArgs()) { + Out << '<'; + for (unsigned I = 0, N = SpecArgs->size(); I != N; ++I) { + Out << '#'; + VisitTemplateArgument(SpecArgs->get(I)); + } + Out << '>'; + } + // Mangle in type information for the arguments. for (FunctionDecl::param_iterator I = D->param_begin(), E = D->param_end(); I != E; ++I) {