diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-02-10 20:10:32 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-02-10 20:10:32 +0000 |
commit | ad133ea9ed91904c649f7f5a1e2f784b3c3c7972 (patch) | |
tree | 87e0d8d68788c274ee9ae9608c64406c2c25b194 /tools | |
parent | e3d8e737e18f0ce95d87be03f74b35413443173c (diff) | |
download | clang-ad133ea9ed91904c649f7f5a1e2f784b3c3c7972.tar.gz clang-ad133ea9ed91904c649f7f5a1e2f784b3c3c7972.tar.bz2 clang-ad133ea9ed91904c649f7f5a1e2f784b3c3c7972.tar.xz |
[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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libclang/CIndexUSRs.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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) { |