emilio added inline comments.

================
Comment at: clang/test/Index/print-type.cpp:118
 // CHECK: TemplateRef=Foo:4:8 [type=] [typekind=Invalid] [isPOD=0]
-// CHECK: FieldDecl=qux:29:38 (Definition) [type=Qux<int, char *, Foo<int>, 
outer::inner::Bar::FooType>] [typekind=Unexposed] [templateargs/4= [type=int] 
[typekind=Int] [type=char *] [typekind=Pointer] [type=Foo<int>] 
[typekind=Unexposed] [type=outer::inner::Bar::FooType] [typekind=Typedef]] 
[canonicaltype=outer::Qux<int, char *, outer::Foo<int>, int>] 
[canonicaltypekind=Record] [canonicaltemplateargs/4= [type=int] [typekind=Int] 
[type=char *] [typekind=Pointer] [type=outer::Foo<int>] [typekind=Record] 
[type=int] [typekind=Int]] [isPOD=1]
 // CHECK: TemplateRef=Qux:12:8 [type=] [typekind=Invalid] [isPOD=0]
----------------
arphaman wrote:
> Hmm, that's an interesting change. I assume the test passed prior to this 
> patch, right? Did this output change purely because of the change in 
> `GetTemplateArguments`?
Yup, that's right. This makes the type and the canonical type match in this 
case. In this case we lose a tiny bit of information (mainly, that the template 
argument was used through a typedef), but the alternative is to lose 
information about default template parameters, which seems worse to me (and is 
a regression, while template argument packs haven't been inspectionable until 
libclang 4.0).


https://reviews.llvm.org/D32348



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to