From: Argyrios Kyrtzidis Date: Thu, 3 Nov 2011 19:02:30 +0000 (+0000) Subject: [libclang] Make sure pointing inside the #include of the fields will return the struct. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea0e4e8466cd57ddc24d89763e2b019b2d687752;p=clang [libclang] Make sure pointing inside the #include of the fields will return the struct. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143638 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Index/targeted-cursor.c b/test/Index/targeted-cursor.c index b6579d1804..7efc07fad7 100644 --- a/test/Index/targeted-cursor.c +++ b/test/Index/targeted-cursor.c @@ -25,6 +25,11 @@ int LocalVar2; // RUN: -Xclang -error-on-deserialized-decl=TopVar \ // RUN: | FileCheck %s -check-prefix=FIELD-CURSOR1 +// RUN: env CINDEXTEST_FAILONERROR=1 c-index-test -cursor-at=%S/targeted-fields.h:1:1 %s -include %t.h \ +// RUN: -Xclang -error-on-deserialized-decl=NestedVar1 \ +// RUN: -Xclang -error-on-deserialized-decl=TopVar \ +// RUN: | FileCheck %s -check-prefix=FIELD-CURSOR2 + // RUN: env CINDEXTEST_FAILONERROR=1 CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_NO_CACHING=1 \ // RUN: c-index-test -cursor-at=%s:5:10 %s -include %t.h \ // RUN: -Xclang -error-on-deserialized-decl=PreambleVar \ @@ -55,4 +60,6 @@ int LocalVar2; // TOP-CURSOR1: VarDecl=TopVar:11:12 // NESTED-CURSOR1: VarDecl=NestedVar1:2:12 // PREAMBLE-CURSOR1: VarDecl=PreambleVar:2:12 + // FIELD-CURSOR1: FieldDecl=z:2:7 (Definition) +// FIELD-CURSOR2: StructDecl=:13:9 (Definition)