summaryrefslogtreecommitdiff
path: root/test/Index/print-type.cpp
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2015-01-29 12:45:29 +0000
committerFrancois Pichet <pichet2000@gmail.com>2015-01-29 12:45:29 +0000
commitfa8a3bc3d030a3e675540b653d4084f44042d09d (patch)
tree6e5d09565f8652149ffae65d324b6293edcfb5b3 /test/Index/print-type.cpp
parent2a27967cd6072877cd42dba59bea170561284e5e (diff)
downloadclang-fa8a3bc3d030a3e675540b653d4084f44042d09d.tar.gz
libclang: Add three functions useful for dealing with anonymous fields:
clang_Cursor_getOffsetOfField clang_Cursor_isAnonymous clang_Type_visitFields Python: Add corresponding methods for dealing with anonymous fields. Patch by Loïc Jaquemet git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/print-type.cpp')
-rw-r--r--test/Index/print-type.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Index/print-type.cpp b/test/Index/print-type.cpp
index af5c556c4d..861baa27a3 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=1]
// 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]