diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2015-04-13 16:55:04 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2015-04-13 16:55:04 +0000 |
commit | 11a6a5c1d6edb51ef32a0a84e4fc9572b7f1d038 (patch) | |
tree | c831f90145857482c65d2e8ad024e83d5a93c757 /test/Index/print-type.cpp | |
parent | e439d2940a9dca8d22b5e38b9a38f6d0d84c72c7 (diff) | |
download | clang-11a6a5c1d6edb51ef32a0a84e4fc9572b7f1d038.tar.gz |
[libclang] Add functions to get information about fields.
Patch by Loïc Jaquemet!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/print-type.cpp')
-rw-r--r-- | test/Index/print-type.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/Index/print-type.cpp b/test/Index/print-type.cpp index af5c556c4d..f73f1b442f 100644 --- a/test/Index/print-type.cpp +++ b/test/Index/print-type.cpp @@ -44,6 +44,7 @@ void foo(int i, int incomplete_array[]) { int variable_array[i]; } struct Blob { int i; + int j; }; int Blob::*member_pointer; @@ -58,7 +59,7 @@ int Blob::*member_pointer; // CHECK: NonTypeTemplateParameter=U:8:32 (Definition) [type=unsigned int] [typekind=UInt] [isPOD=1] // CHECK: TemplateTemplateParameter=W:8:60 (Definition) [type=] [typekind=Invalid] [isPOD=0] // CHECK: Namespace=inner:14:11 (Definition) [type=] [typekind=Invalid] [isPOD=0] -// CHECK: StructDecl=Bar:16:8 (Definition) [type=outer::inner::Bar] [typekind=Record] [isPOD=0] +// CHECK: StructDecl=Bar:16:8 (Definition) [type=outer::inner::Bar] [typekind=Record] [isPOD=0] [nbFields=3] // CHECK: CXXConstructor=Bar:17:3 (Definition) [type=void (outer::Foo<bool> *){{.*}}] [typekind=FunctionProto] [canonicaltype=void (outer::Foo<bool> *){{.*}}] [canonicaltypekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [outer::Foo<bool> *] [Pointer]] [isPOD=0] // CHECK: ParmDecl=foo:17:25 (Definition) [type=outer::Foo<bool> *] [typekind=Pointer] [canonicaltype=outer::Foo<bool> *] [canonicaltypekind=Pointer] [isPOD=1] [pointeetype=outer::Foo<bool>] [pointeekind=Unexposed] // CHECK: NamespaceRef=outer:1:11 [type=] [typekind=Invalid] [isPOD=0] @@ -115,6 +116,6 @@ int Blob::*member_pointer; // CHECK: DeclStmt= [type=] [typekind=Invalid] [isPOD=0] // CHECK: VarDecl=variable_array:43:47 (Definition) [type=int [i]] [typekind=VariableArray] [isPOD=1] // CHECK: DeclRefExpr=i:43:14 [type=int] [typekind=Int] [isPOD=1] -// CHECK: StructDecl=Blob:45:8 (Definition) [type=Blob] [typekind=Record] [isPOD=1] +// CHECK: StructDecl=Blob:45:8 (Definition) [type=Blob] [typekind=Record] [isPOD=1] [nbFields=2] // CHECK: FieldDecl=i:46:7 (Definition) [type=int] [typekind=Int] [isPOD=1] -// CHECK: VarDecl=member_pointer:48:12 (Definition) [type=int Blob::*] [typekind=MemberPointer] [isPOD=1] +// CHECK: VarDecl=member_pointer:49:12 (Definition) [type=int Blob::*] [typekind=MemberPointer] [isPOD=1] |