diff options
Diffstat (limited to 'kythe/cxx/indexer/cxx/testdata/tvar_template/template_fn_multiple_implicit_spec.cc')
-rw-r--r-- | kythe/cxx/indexer/cxx/testdata/tvar_template/template_fn_multiple_implicit_spec.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kythe/cxx/indexer/cxx/testdata/tvar_template/template_fn_multiple_implicit_spec.cc b/kythe/cxx/indexer/cxx/testdata/tvar_template/template_fn_multiple_implicit_spec.cc new file mode 100644 index 000000000..8305a465a --- /dev/null +++ b/kythe/cxx/indexer/cxx/testdata/tvar_template/template_fn_multiple_implicit_spec.cc @@ -0,0 +1,15 @@ +// Tests support for implicit specializations of function templates. +//- @id defines/binding AbsId +template <typename T> T id(T x) { return x; } +//- @id ref TAppAbsIdInt +int y = id(42); +//- @id ref TAppAbsIdFloat +float z = id(42.0f); +//- IntSpecId specializes TAppAbsIdInt +//- IntSpecId.node/kind function +//- FloatSpecId specializes TAppAbsIdFloat +//- FloatSpecId.node/kind function +//- TAppAbsIdInt param.0 AbsId +//- TAppAbsIdInt param.1 vname("int#builtin",_,_,_,_) +//- TAppAbsIdFloat param.0 AbsId +//- TAppAbsIdFloat param.1 vname("float#builtin",_,_,_,_) |