From 4e24bae3a87ad427403ec1ecb539a42e2eb8a351 Mon Sep 17 00:00:00 2001 From: Ivan Donchevskii Date: Fri, 7 Sep 2018 13:23:51 +0000 Subject: [libclang] Return the proper pointee type for 'auto' deduced to pointer Currently the resulting type is always invalid in such case. Differential Revision: https://reviews.llvm.org/D51281 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341656 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Index/print-type.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/Index') diff --git a/test/Index/print-type.cpp b/test/Index/print-type.cpp index e152a7ed3d..3c76c97cca 100644 --- a/test/Index/print-type.cpp +++ b/test/Index/print-type.cpp @@ -75,6 +75,8 @@ template struct A {}; template using C = T; using baz = C>; +auto autoTemplPointer = &autoTemplRefParam; + // RUN: c-index-test -test-print-type %s -std=c++14 | FileCheck %s // CHECK: Namespace=outer:1:11 (Definition) [type=] [typekind=Invalid] [isPOD=0] // CHECK: ClassTemplate=Foo:4:8 (Definition) [type=] [typekind=Invalid] [isPOD=0] @@ -182,3 +184,4 @@ using baz = C>; // CHECK: UnexposedExpr=templRefParam:71:40 [type=const Specialization &>] [typekind=Unexposed] const [templateargs/1= [type=Specialization &] [typekind=LValueReference]] [canonicaltype=const Specialization &>] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=Specialization &] [typekind=LValueReference]] [isPOD=1] // CHECK: DeclRefExpr=templRefParam:71:40 [type=Specialization &>] [typekind=Unexposed] [templateargs/1= [type=Specialization &] [typekind=LValueReference]] [canonicaltype=Specialization &>] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=Specialization &] [typekind=LValueReference]] [isPOD=1] // CHECK: TypeAliasDecl=baz:76:7 (Definition) [type=baz] [typekind=Typedef] [templateargs/1= [type=A] [typekind=Unexposed]] [canonicaltype=A] [canonicaltypekind=Record] [canonicaltemplateargs/1= [type=void] [typekind=Void]] [isPOD=0] +// CHECK: VarDecl=autoTemplPointer:78:6 (Definition) [type=Specialization &> *] [typekind=Auto] [canonicaltype=Specialization &> *] [canonicaltypekind=Pointer] [isPOD=1] [pointeetype=Specialization &>] [pointeekind=Record] -- cgit v1.2.3