diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2017-02-15 16:16:27 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2017-02-15 16:16:27 +0000 |
commit | 7d90ed0ac923b9756913dd657687d9db59570afb (patch) | |
tree | 535542616bb9239cc3f7f98aebe6cd36c88200b7 /clang/lib/Index/USRGeneration.cpp | |
parent | 5fb8af40df212612ee7845420669119213857811 (diff) | |
download | bcm5719-llvm-7d90ed0ac923b9756913dd657687d9db59570afb.tar.gz bcm5719-llvm-7d90ed0ac923b9756913dd657687d9db59570afb.zip |
[index] USR generation: use getTemplateArgs() instead of getTemplateInstantiationArgs()
Otherwise we may end up creating a different USR for the definition of a function, vs its declaration.
llvm-svn: 295191
Diffstat (limited to 'clang/lib/Index/USRGeneration.cpp')
-rw-r--r-- | clang/lib/Index/USRGeneration.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Index/USRGeneration.cpp b/clang/lib/Index/USRGeneration.cpp index f9ed3c47995..3960074b5a4 100644 --- a/clang/lib/Index/USRGeneration.cpp +++ b/clang/lib/Index/USRGeneration.cpp @@ -310,7 +310,7 @@ void USRGenerator::VisitVarDecl(const VarDecl *D) { // For a template specialization, mangle the template arguments. if (const VarTemplateSpecializationDecl *Spec = dyn_cast<VarTemplateSpecializationDecl>(D)) { - const TemplateArgumentList &Args = Spec->getTemplateInstantiationArgs(); + const TemplateArgumentList &Args = Spec->getTemplateArgs(); Out << '>'; for (unsigned I = 0, N = Args.size(); I != N; ++I) { Out << '#'; @@ -521,7 +521,7 @@ void USRGenerator::VisitTagDecl(const TagDecl *D) { // For a class template specialization, mangle the template arguments. if (const ClassTemplateSpecializationDecl *Spec = dyn_cast<ClassTemplateSpecializationDecl>(D)) { - const TemplateArgumentList &Args = Spec->getTemplateInstantiationArgs(); + const TemplateArgumentList &Args = Spec->getTemplateArgs(); Out << '>'; for (unsigned I = 0, N = Args.size(); I != N; ++I) { Out << '#'; |