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/test/Index/Core/index-source.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/test/Index/Core/index-source.cpp')
-rw-r--r-- | clang/test/Index/Core/index-source.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Index/Core/index-source.cpp b/clang/test/Index/Core/index-source.cpp index 68eafecf679..2a4c1efa960 100644 --- a/clang/test/Index/Core/index-source.cpp +++ b/clang/test/Index/Core/index-source.cpp @@ -23,6 +23,16 @@ public: TemplCls<int> gtv(0); // CHECK: [[@LINE-1]]:1 | class(Gen)/C++ | TemplCls | c:@ST>1#T@TemplCls | <no-cgname> | Ref,RelCont | rel: 1 +template<class T> +class Wrapper {}; +template<class T, class P> +class Wrapper<T(P)> {}; + +// CHECK: [[@LINE+1]]:6 | function/C | test1 | [[TEST1_USR:.*]] | [[TEST1_CG:.*]] | Decl | rel: 0 +void test1(Wrapper<void(int)> f); +// CHECK: [[@LINE+1]]:6 | function/C | test1 | [[TEST1_USR]] | [[TEST1_CG]] | Def | rel: 0 +void test1(Wrapper<void(int)> f) {} + template <typename T> class BT { struct KLR { |